/* Featured projects (/projects) - same look as the Hyperfocus community page (/community/):
   flat, square corners only (never border-radius), the user's accent colour from accent.js. */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #0e0e10; --card: #151517; --surface: #1a1a1d; --surface-3: #212125;
  --border: #292930; --border-2: #35353d;
  --text: #e7e7ea; --mid: #a1a1aa; --dim: #71717a;
  --accent: #9d8ad1; --accent-dim: rgba(157, 138, 209, .12);
  --btn-bg: var(--accent); --btn-text: #16141c;
  --err: #c26a6a; --ok: #6f9e7c; --warn: #d9b46a;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body > header, body > .pj-bar, body > main, body > footer { position: relative; z-index: 1; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.2px; }
p { margin: 0 0 10px; }
svg.i { width: 15px; height: 15px; flex: none; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── header band ── */
.pj-head { overflow: hidden; background: #0a0a14; border-bottom: 1px solid var(--border); }
.pj-head-in { position: relative; max-width: 1120px; margin: 0 auto; padding: 44px 20px 40px; }
.pj-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.pj-title { margin: 8px 0 10px; font-size: 36px; line-height: 1.1; letter-spacing: -1px; }
.pj-lead { color: var(--mid); font-size: 15px; max-width: 600px; margin: 0 0 20px; }
.pj-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pj-actions .btn { padding: 9px 16px; }
body:not(.v-gallery) .pj-head-in { padding: 22px 20px 20px; }
body:not(.v-gallery) .pj-lead, body:not(.v-gallery) .pj-actions { display: none; }
body:not(.v-gallery) .pj-title { font-size: 24px; margin-bottom: 0; }

/* ── tabs + account ── */
.pj-bar { background: var(--card); border-bottom: 1px solid var(--border); }
.pj-bar-in { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
#tabs { display: flex; flex: 1; flex-wrap: wrap; min-width: 0; }
#tabs a { display: block; padding: 12px 16px; color: var(--mid); font-weight: 600; font-size: 13px; text-decoration: none; border-right: 1px solid var(--border); }
#tabs a:first-child { border-left: 1px solid var(--border); }
#tabs a:hover { color: var(--text); background: var(--surface); }
#tabs a.on { color: var(--text); background: var(--accent-dim); box-shadow: inset 0 -2px 0 var(--accent); }
#acct { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; }
#acct .who { color: var(--dim); }
.pfp { width: 22px; height: 22px; flex: none; object-fit: cover; background: var(--surface-3); display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--mid); }

main#main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px 40px; }
.pj-foot { width: 100%; max-width: 1120px; margin: 0 auto; padding: 18px 20px 28px; border-top: 1px solid var(--border); color: var(--dim); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ── boxes ── */
.box { background: var(--card); border: 1px solid var(--border); margin-bottom: 20px; }
.box-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--mid); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.p { padding: 16px; }
.hint { color: var(--dim); font-size: 12.5px; }
.acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ── buttons + inputs ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; vertical-align: middle;
  background: var(--btn-bg); border: 1px solid var(--btn-bg); border-radius: 0; color: var(--btn-text) !important;
  padding: 7px 14px; font: 600 13px/1.3 var(--font); text-decoration: none !important; cursor: pointer; white-space: nowrap;
  transition: filter .15s, background .15s, border-color .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: var(--border-2); color: var(--text) !important; }
.btn.ghost:hover { filter: none; background: var(--surface-3); border-color: var(--dim); }
.btn.danger { background: transparent; border-color: var(--err); color: var(--err) !important; }
.btn.danger:hover { background: var(--err); color: #fff !important; filter: none; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
input, textarea, select {
  font: 13.5px/1.4 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-2); border-radius: 0; padding: 8px 10px; max-width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { width: 100%; resize: vertical; min-height: 130px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; }
.field .lbl { font-size: 13px; font-weight: 600; color: var(--mid); }
.field .lbl .opt { font-weight: 400; color: var(--dim); }
.field input[type=text], .field input[type=url] { width: 100%; }
.msg { padding: 10px 12px; border: 1px solid var(--border-2); border-left: 3px solid var(--accent); background: var(--surface); margin-bottom: 16px; font-size: 13px; }
.msg.err { border-left-color: var(--err); }
.msg.ok { border-left-color: var(--ok); }

/* ── gallery ── */
.bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.search { flex: 1; min-width: 200px; position: relative; }
.search input { width: 100%; padding-left: 32px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { font: 600 12px/1.3 var(--font); padding: 5px 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--mid); cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip.on { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.empty { grid-column: 1 / -1; padding: 36px; text-align: center; color: var(--dim); border: 1px dashed var(--border-2); }
.card { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none !important; border: 1px solid var(--border); background: var(--surface); transition: border-color .15s, transform .15s; }
.card:hover, .card:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover, .card:focus-visible { transform: none; transition: none; } }
.art { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; display: grid; place-items: center; }
.art > img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art > img.logo-over, .hero > img.logo-over { position: absolute; inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); height: auto; max-height: 80%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .55)); }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; color: var(--text); }
.art > img.mid { width: 34%; aspect-ratio: 1; object-fit: cover; }
.art > .letter { font-size: 44px; font-weight: 800; color: var(--dim); }
.tag { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; background: rgba(14, 14, 16, .85); border: 1px solid var(--border-2); color: var(--warn); text-transform: uppercase; letter-spacing: 1px; }
.tag svg.i { width: 11px; height: 11px; vertical-align: 0; }
.card-body { display: flex; gap: 10px; padding: 10px 12px 6px; align-items: flex-start; }
.ico { width: 36px; height: 36px; flex: none; object-fit: cover; background: var(--surface-3); }
.ico.letter, .big-ico.letter { display: grid; place-items: center; background: var(--accent-dim); color: var(--accent); font-weight: 700; }
.card-text { flex: 1; min-width: 0; }
.card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tagline { font-size: 12.5px; color: var(--mid); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px; font-size: 12px; color: var(--dim); min-width: 0; }
.by { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.by span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 4px; }
.svc span { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border: 1px solid var(--border-2); color: var(--mid); white-space: nowrap; }
.more { display: flex; justify-content: center; margin-top: 16px; }

/* ── a project's page ── */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--mid); font-size: 13px; }
.hero { position: relative; aspect-ratio: 16 / 6; min-height: 160px; background: var(--surface-3); overflow: hidden; border-bottom: 1px solid var(--border); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.proj-body { display: flex; gap: 24px; padding: 20px; flex-wrap: wrap; }
.proj-main { flex: 1; min-width: 260px; }
.proj-side { width: 300px; max-width: 100%; display: flex; flex-direction: column; gap: 12px; }
.proj-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.big-ico { width: 64px; height: 64px; object-fit: cover; flex: none; background: var(--surface-3); font-size: 26px; }
.proj-head h2 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.proj-head p { margin: 2px 0 0; color: var(--mid); }
.desc { white-space: pre-line; color: var(--mid); overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.facts .k, .facts .v { padding: 7px 12px; border-top: 1px solid var(--border); }
.facts .k:nth-child(1), .facts .v:nth-child(2) { border-top: 0; }
.facts .k { color: var(--dim); }
.facts .v { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.svc-list { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--surface); }
.svc-list a { display: block; padding: 7px 12px; border-top: 1px solid var(--border); color: var(--text); font-size: 13px; }
.svc-list a:first-child { border-top: 0; }
.svc-list a:hover { background: var(--surface-3); text-decoration: none; }
.creator { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.creator .pfp { width: 36px; height: 36px; font-size: 15px; }
.creator small { display: block; color: var(--dim); font-size: 11.5px; }
a.creator:hover { border-color: var(--accent); text-decoration: none; }

/* ── your submissions ── */
.row-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.row-item:first-child { border-top: 0; }
.row-item .grow { flex: 1; min-width: 200px; }
.status { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 1px 6px; border: 1px solid currentColor; margin-left: 6px; vertical-align: 1px; }
.status.pending { color: var(--warn); }
.status.approved { color: var(--ok); }
.status.rejected { color: var(--err); }
.status.hidden { color: var(--dim); }
.reason { margin-top: 6px; font-size: 13px; color: var(--mid); border-left: 3px solid var(--err); padding: 4px 10px; background: var(--surface); }

/* ── submit form ── */
.form-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.form-main { flex: 1; min-width: 280px; }
.form-side { width: 300px; max-width: 100%; position: sticky; top: 16px; }
.svc-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border-2); background: var(--surface); font-size: 12.5px; cursor: pointer; color: var(--mid); }
.svc-pick input { accent-color: var(--accent); margin: 0; }
.svc-pick label:has(input:checked) { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }
.img-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.img-pick .thumb { width: 64px; height: 64px; background: var(--surface-3); object-fit: cover; flex: none; border: 1px solid var(--border); }
.img-pick .thumb.wide { width: 114px; }
.img-pick input[type=url] { flex: 1; min-width: 180px; }
.img-pick input[type=file] { display: none; }
.count { font-size: 11.5px; color: var(--dim); text-align: right; }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--card); border: 1px solid var(--border-2); border-left: 3px solid var(--accent); padding: 10px 14px; font-size: 13px; max-width: 320px; }
.toast.err { border-left-color: var(--err); }

@media (max-width: 640px) {
  .pj-title { font-size: 28px; }
  .pj-head-in { padding: 28px 16px 26px; }
  main#main, .pj-bar-in, .pj-foot { padding-left: 16px; padding-right: 16px; }
  .form-side { position: static; width: 100%; }
}
