/* Rakathon 2026 – design system (DESIGN.md). Plain CSS, no build step. */

/* ============ Fonts (self-hosted, variable) ============ */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ============ Tokens ============ */
:root {
  --brand-mint: #7FF0D2;
  --brand-navy: #0B0D63;
  --on-mint: #04130E;
  --brand-gradient: linear-gradient(160deg, #137A76 0%, #145F80 38%, #10307A 70%, #0B0D63 100%);

  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #EFF1F4;
  --border: #E2E5EA;
  --border-strong: #C7CCD5;
  --text: #0B0C10;
  --text-2: #464B57;
  --text-3: #686E7C;

  --accent-ink: #097155;
  --accent-tint: #E9FBF5;
  --danger: #D81B3C;
  --danger-fill: #D81B3C;
  --danger-tint: #FDECEF;
  --warning: #9A5B00;
  --warning-tint: #FFF4E0;
  --focus: #0B0D63;
  --selected-border: #0B0C10;

  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-1: 0.75rem;
  --fs-2: 0.875rem;
  --fs-3: 1rem;
  --fs-4: 1.25rem;
  --fs-5: 1.75rem;
  --fs-6: 2.75rem;
  --track-tight: -0.035em;
  --track-snug: -0.015em;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --r-1: 2px;
  --r-2: 4px;
  --shadow-1: 0 1px 2px rgba(11, 12, 16, .06);
  --shadow-2: 0 2px 4px rgba(11, 12, 16, .04), 0 8px 24px rgba(11, 12, 16, .08);
  --shadow-3: 0 4px 8px rgba(11, 12, 16, .06), 0 12px 32px rgba(11, 12, 16, .16);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 150ms;
  --t-med: 220ms;
  --header-h: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0B0F; --surface: #121319; --surface-2: #1A1C24;
    --border: #262935; --border-strong: #3A3F4E;
    --text: #F2F3F5; --text-2: #B0B5C1; --text-3: #8D93A2;
    --accent-ink: #7FF0D2; --accent-tint: #10251F;
    --danger: #FF5C6F; --danger-tint: #2A1216;
    --warning: #F5B451; --warning-tint: #2A1F0C;
    --focus: #7FF0D2; --selected-border: #7FF0D2;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 2px 4px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.4);
    --shadow-3: 0 4px 8px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0B0F; --surface: #121319; --surface-2: #1A1C24;
  --border: #262935; --border-strong: #3A3F4E;
  --text: #F2F3F5; --text-2: #B0B5C1; --text-3: #8D93A2;
  --accent-ink: #7FF0D2; --accent-tint: #10251F;
  --danger: #FF5C6F; --danger-tint: #2A1216;
  --warning: #F5B451; --warning-tint: #2A1F0C;
  --focus: #7FF0D2; --selected-border: #7FF0D2;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 2px 4px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.4);
  --shadow-3: 0 4px 8px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 112px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 var(--fs-3)/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: var(--accent-ink);
  scrollbar-color: var(--border-strong) transparent;
}
main { flex: 1 0 auto; }
::selection { background: var(--brand-mint); color: var(--on-mint); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: var(--track-tight); line-height: 1.12; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
p { text-wrap: pretty; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg, video, iframe { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-5) 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, time { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: 0; overflow-wrap: anywhere; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-2); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spacer { flex: 1; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 16px; height: 16px; }
.skip-link { position: absolute; left: var(--s-4); top: -60px; z-index: 100; padding: var(--s-2) var(--s-4); background: var(--text); color: var(--bg); border-radius: var(--r-1); text-decoration: none; }
.skip-link:focus { top: var(--s-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ============ Layout ============ */
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.wrap-wide { width: min(1240px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); }
.wrap-mid { width: min(880px, 100% - 32px); margin-inline: auto; }
.page-pad { padding-block: var(--s-7) var(--s-8); }
.stack-2 { display: grid; gap: var(--s-2); }
.stack-3 { display: grid; gap: var(--s-3); }
.stack-4 { display: grid; gap: var(--s-4); }
.stack-5 { display: grid; gap: var(--s-5); }
.grid-2 { display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============ Header / footer ============ */
.wordmark { display: inline-flex; align-items: baseline; gap: var(--s-2); font-weight: 700; letter-spacing: -0.04em; font-size: var(--fs-4); color: var(--text); text-decoration: none; white-space: nowrap; }
.wordmark b { display: inline-block; width: 10px; height: 10px; background: var(--brand-mint); transform: translateY(-1px); }
.wordmark span { font-weight: 500; letter-spacing: var(--track-snug); font-size: var(--fs-2); color: var(--text-3); }
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.site-header-inner { display: flex; align-items: center; gap: var(--s-3); height: var(--header-h); }
.site-footer { border-top: 1px solid var(--border); padding: var(--s-5) 0 calc(var(--s-5) + env(safe-area-inset-bottom)); font-size: var(--fs-2); color: var(--text-3); }
.site-footer .wrap-wide { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.site-footer a { color: var(--text-2); }
body:has(.mobile-submit) .site-footer { margin-bottom: 72px; }
@media (min-width: 900px) { body:has(.mobile-submit) .site-footer { margin-bottom: 0; } }

/* ============ Brand band (submit, done, gallery) ============ */
.brand-band { background: var(--brand-gradient); color: #fff; position: relative; isolation: isolate; overflow: hidden; }
.brand-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 0% 0%, rgba(127,240,210,.22), transparent 55%); pointer-events: none; }
.band-top { border-bottom: 1px solid rgba(255,255,255,.14); }
.band-top-inner { display: flex; align-items: center; gap: var(--s-3); min-height: var(--header-h); }
.band-top .wordmark { color: #fff; }
.band-top .wordmark span { color: rgba(255,255,255,.72); }
.band-inner { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); align-items: flex-end; justify-content: space-between; padding-block: var(--s-6) var(--s-5); }
.band-inner h1 { font-size: var(--fs-5); color: #fff; }
.band-inner p { color: #fff; margin-top: var(--s-2); font-size: var(--fs-2); }
.band-hero { align-items: flex-start; }
.band-hero h1 { max-width: 20ch; }
.band-hero p { font-size: var(--fs-3); max-width: 60ch; }
.band-back { display: inline-flex; gap: 6px; align-items: center; color: #fff; font-size: var(--fs-2); text-decoration: none; margin-bottom: var(--s-4); }
.band-back:hover { color: #fff; }
.brand-band .badges { margin-bottom: var(--s-3); }
.brand-band :focus-visible { outline-color: #fff; }
@media (min-width: 900px) {
  .band-inner { padding-block: var(--s-7) var(--s-6); }
  .band-inner h1 { font-size: var(--fs-6); letter-spacing: -0.04em; }
}
.on-brand .seg { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.on-brand .seg button, .on-brand .seg a { color: rgba(255,255,255,.82); }
.on-brand .seg [aria-pressed="true"], .on-brand .seg [aria-current="true"] { background: #fff; color: #0B0C10; }

/* ============ Segmented ============ */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); }
.seg button, .seg a, .seg-radio label span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 36px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-1); background: transparent; color: var(--text-2); font: 500 var(--fs-2)/1 var(--font); cursor: pointer; text-decoration: none; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.seg.compact button, .seg.compact a, .seg.compact.seg-radio label span { min-height: 32px; min-width: 32px; padding: 0 10px; }
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg-radio label { position: relative; display: inline-flex; }
.seg-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-radio input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.lang-switch a { min-width: 40px; }

/* ============ Buttons ============ */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  font: 600 var(--fs-2)/1.1 var(--font); letter-spacing: var(--track-snug);
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd); border-radius: var(--r-1);
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover { --btn-bg: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { --btn-bg: var(--brand-mint); --btn-fg: var(--on-mint); --btn-bd: transparent; box-shadow: inset 0 -1px 0 rgba(0,0,0,.12); }
.btn-primary:hover { --btn-bg: #6BE6C5; }
.btn-ink { --btn-bg: var(--text); --btn-fg: var(--bg); --btn-bd: transparent; }
.btn-ink:hover { --btn-bg: color-mix(in srgb, var(--text) 85%, var(--bg)); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-danger { --btn-bg: var(--danger-fill); --btn-fg: #fff; --btn-bd: transparent; }
.btn-danger:hover { --btn-bg: color-mix(in srgb, var(--danger-fill) 88%, #000); }
.btn-lg { min-height: 52px; padding: 0 var(--s-5); font-size: var(--fs-3); }
.btn-sm { min-height: 36px; padding: 0 var(--s-3); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; transform: none; }
.btn .spinner { display: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .spinner { display: inline-block; animation: spin .8s linear infinite; }
.btn.is-loading .btn-icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid transparent; border-radius: var(--r-1); background: transparent; color: var(--text-3); cursor: pointer; text-decoration: none; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-tint); color: var(--danger); }

/* ============ Fields ============ */
.field { display: grid; gap: var(--s-2); }
.field-label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-1) var(--s-3); font-size: var(--fs-2); font-weight: 600; letter-spacing: var(--track-snug); }
.field-label .opt { font-weight: 400; color: var(--text-3); }
.field-help { font-size: var(--fs-2); color: var(--text-3); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: var(--s-3);
  font: 400 var(--fs-3)/1.4 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-1);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 1; }
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text)); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.input[readonly] { background: var(--surface-2); }
.input.mono { font-family: var(--mono); font-size: var(--fs-2); }
.input-sm { min-height: 40px; padding: var(--s-2) var(--s-3); font-size: var(--fs-2); }
.select { width: auto; min-height: 40px; padding: 0 36px 0 var(--s-3); font-size: var(--fs-2); font-weight: 500; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23686E7C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.select-block { width: 100%; min-height: 48px; font-size: var(--fs-3); font-weight: 400; }
.select-sm { min-height: 32px; font-size: var(--fs-1); padding-left: var(--s-2); }
.input-wrap { position: relative; }
.input-wrap > .input { padding-left: 42px; }
.input-wrap > .input-sm { padding-left: 36px; }
.input-wrap > svg.i:first-child { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-wrap > .input:has(+ .valid-mark) { padding-right: 40px; }
.valid-mark { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--accent-ink); opacity: 0; transition: opacity var(--t-fast) var(--ease); pointer-events: none; }
.field.is-valid .valid-mark { opacity: 1; }
.field-meta { display: flex; justify-content: space-between; gap: var(--s-3); min-height: 20px; font-size: var(--fs-1); line-height: 20px; }
.field-error { display: inline-flex; gap: 6px; align-items: flex-start; color: var(--danger); font-weight: 500; font-size: var(--fs-2); line-height: 1.35; }
.field-error:empty { display: none; }
.field-error svg { margin-top: 1px; }
.field.is-invalid .input, .field.is-invalid .textarea, .field.is-invalid .select { border-color: var(--danger); }
.field.is-invalid .input:focus, .field.is-invalid .textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.counter { color: var(--text-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--warning); font-weight: 600; }
.counter.is-over { color: var(--danger); font-weight: 600; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-2); color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-ink); flex: none; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }

/* ============ Badges & chips ============ */
.badges { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 8px; border-radius: var(--r-1); font: 600 var(--fs-1)/1.2 var(--font); letter-spacing: 0; white-space: nowrap; border: 1px solid transparent; }
.badge svg.i { width: 13px; height: 13px; stroke-width: 2; }
.badge-lg { min-height: 28px; padding: 4px 10px; font-size: var(--fs-2); }
.badge-neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-draft { background: transparent; color: var(--text-2); border: 1px dashed var(--border-strong); }
.badge-sent { background: var(--accent-tint); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 25%, transparent); }
.badge-locked { background: var(--text); color: var(--bg); }
.badge-hidden { background: var(--danger-tint); color: var(--danger); }
.badge-winner { background: var(--on-mint); color: var(--brand-mint); }
.badge-mt { background: transparent; color: var(--text-3); border: 1px solid var(--border); font-weight: 500; }
:root[data-theme="dark"] .badge-winner { background: var(--brand-mint); color: var(--on-mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-winner { background: var(--brand-mint); color: var(--on-mint); } }
.on-brand .badge-winner { background: var(--brand-mint); color: var(--on-mint); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s-3); border: 1px solid var(--border-strong); border-radius: var(--r-1); background: var(--surface); color: var(--text-2); font: 500 var(--fs-2)/1 var(--font); cursor: pointer; text-decoration: none; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.chip:hover { color: var(--text); border-color: var(--text-3); text-decoration: none; }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { font-size: var(--fs-1); font-variant-numeric: tabular-nums; opacity: .7; }

/* ============ Countdown & autosave ============ */
.countdown { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-1); font: 500 var(--fs-2)/1 var(--font); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); white-space: nowrap; transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease), border-color var(--t-med) var(--ease); }
.countdown time { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.countdown[data-state="hour"] { background: var(--brand-mint); border-color: transparent; color: var(--on-mint); }
.countdown[data-state="hour"] time { color: var(--on-mint); }
.countdown[data-state="critical"] { background: var(--danger-fill); border-color: transparent; color: #fff; }
.countdown[data-state="critical"] time { color: #fff; }
.countdown[data-state="critical"] svg { animation: pulse 1s var(--ease) infinite; }
.countdown[data-state="closed"] { background: var(--surface-2); color: var(--text-2); }
@keyframes pulse { 50% { opacity: .3; } }
.on-brand .countdown { background: #0E2F66; border-color: rgba(255,255,255,.24); color: #fff; }
.on-brand .countdown time { color: #fff; }
.on-brand .countdown[data-state="hour"] { background: var(--brand-mint); color: var(--on-mint); }
.on-brand .countdown[data-state="hour"] time { color: var(--on-mint); }
.on-brand .countdown[data-state="critical"] { background: var(--danger-fill); color: #fff; border-color: transparent; }
.autosave { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-1); color: var(--text-3); }
.autosave .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }
.autosave.is-saving .pip { background: var(--text-3); animation: pulse .8s infinite; }

/* ============ Toasts ============ */
.toasts { position: fixed; z-index: 90; right: var(--s-4); bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); display: grid; gap: var(--s-2); width: min(380px, calc(100% - 32px)); }
.has-brand .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .has-brand .toasts { bottom: var(--s-4); } }
.toast { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-2) var(--s-3) var(--s-4); background: var(--text); color: var(--bg); border-radius: var(--r-2); box-shadow: var(--shadow-3); font-size: var(--fs-2); animation: toast-in var(--t-med) var(--ease); }
.toast > div { flex: 1; min-width: 0; padding-top: 1px; }
.toast strong { display: block; font-weight: 600; }
.toast span:not(.toast-icon) { display: block; opacity: .78; overflow-wrap: anywhere; }
.toast-icon { color: var(--brand-mint); margin-top: 1px; }
.toast-error .toast-icon { color: #FF8A99; }
:root[data-theme="dark"] .toast-icon { color: #097155; }
:root[data-theme="dark"] .toast-error .toast-icon { color: #D81B3C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast-icon { color: #097155; } :root:not([data-theme="light"]) .toast-error .toast-icon { color: #D81B3C; } }
.toast-close { display: grid; place-items: center; width: 32px; height: 32px; margin-top: -6px; border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; border-radius: var(--r-1); }
.toast-close:hover { opacity: 1; }
.toast.is-leaving { animation: toast-out var(--t-fast) var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(4px); } }

/* ============ Cards, notices, empty ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2); }
.box { padding: var(--s-5); display: grid; gap: var(--s-4); align-content: start; }
.box > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-3); }
.box > header h2 { font-size: var(--fs-3); letter-spacing: var(--track-snug); }
.box > header > span { font-size: var(--fs-1); color: var(--text-3); }
.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); color: var(--text-2); font-size: var(--fs-2); text-decoration: none; }
.notice > svg { margin-top: 2px; color: var(--text-3); }
.notice-ok { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent-ink) 25%, transparent); }
.notice-ok > svg { color: var(--accent-ink); }
.notice-error { background: var(--danger-tint); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--text); }
.notice-error > svg { color: var(--danger); }
.notice-locked { background: var(--surface); border: 2px solid var(--text); color: var(--text); }
.notice-locked > svg { color: var(--text); }
a.notice:hover { border-color: var(--border-strong); }
.alerts { display: grid; gap: var(--s-2); }
.empty { display: grid; justify-items: start; gap: var(--s-3); padding: var(--s-6); border: 1px dashed var(--border-strong); border-radius: var(--r-2); }
.empty h2 { font-size: var(--fs-3); letter-spacing: var(--track-snug); }
.empty p { color: var(--text-2); font-size: var(--fs-2); max-width: 56ch; }
.empty.slim { padding: var(--s-4); }
dl.facts { display: grid; gap: var(--s-3); padding: var(--s-4) 0; border-top: 1px solid var(--border); }
dl.facts > div { display: grid; gap: 2px; }
@media (min-width: 640px) { dl.facts > div { grid-template-columns: 140px minmax(0, 1fr); gap: var(--s-4); } }
dl.facts dt { font-size: var(--fs-2); color: var(--text-3); }
dl.facts dd { margin: 0; font-size: var(--fs-2); overflow-wrap: anywhere; }

/* ============ Prose (team Markdown) ============ */
.prose { color: var(--text-2); display: grid; gap: var(--s-3); max-width: 68ch; overflow-wrap: anywhere; }
.prose .lead-text { color: var(--text); font-size: var(--fs-4); line-height: 1.45; letter-spacing: var(--track-snug); }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); font-size: var(--fs-3); letter-spacing: var(--track-snug); margin-top: var(--s-3); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: var(--s-1); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: var(--r-1); }
.prose pre { overflow-x: auto; background: var(--surface-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-2); font-size: var(--fs-2); }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0; padding-left: var(--s-4); border-left: 2px solid var(--border-strong); }
.prose img { display: none; }

/* ============ Submit form ============ */
.steps { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.steps ol { list-style: none; padding: 0; display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; }
.steps ol::-webkit-scrollbar { display: none; }
.steps a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-2) 0 0; margin-right: var(--s-3); color: var(--text-3); text-decoration: none; font-size: var(--fs-2); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.steps a:hover { color: var(--text); }
.steps .n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); font: 600 var(--fs-1)/1 var(--font); font-variant-numeric: tabular-nums; transition: all var(--t-fast) var(--ease); }
.steps .n svg { display: none; width: 12px; height: 12px; stroke-width: 3; }
.steps [aria-current="step"] { color: var(--text); border-bottom-color: var(--text); }
.steps [aria-current="step"] .n { border-color: var(--text); background: var(--text); color: var(--bg); }
.steps .done { color: var(--text-2); }
.steps .done .n { background: var(--brand-mint); border-color: transparent; color: var(--on-mint); }
.steps .done .n span { display: none; }
.steps .done .n svg { display: block; }

.submit-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding-block: var(--s-6) var(--s-8); }
@media (min-width: 900px) { .submit-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-7); padding-block: var(--s-7) var(--s-8); } }
#submit-form { display: grid; gap: 0; min-width: 0; }
#submit-form > .notice { margin-bottom: var(--s-6); }
.form-section { display: grid; gap: var(--s-5); padding-bottom: var(--s-7); }
.form-section + .form-section { border-top: 1px solid var(--border); padding-top: var(--s-7); }
.form-section > header h2 { font-size: var(--fs-4); letter-spacing: var(--track-snug); }
.form-section > header p { color: var(--text-2); font-size: var(--fs-2); margin-top: var(--s-1); max-width: 62ch; }
.lang-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface-2); border-radius: var(--r-2); font-size: var(--fs-2); color: var(--text-2); }
.lang-pick legend { float: left; margin-right: var(--s-2); }

.choice-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-list { display: grid; gap: var(--s-2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice {
  position: relative; display: grid; gap: 2px; align-content: start;
  min-height: 64px; padding: var(--s-3) 40px var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-2);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.choice:hover { border-color: var(--text-3); }
.choice b { font-weight: 600; letter-spacing: var(--track-snug); line-height: 1.25; }
.choice small { color: var(--text-3); font-size: var(--fs-1); line-height: 1.4; }
.choice .tick { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); transition: all var(--t-fast) var(--ease); }
.choice .tick svg { width: 12px; height: 12px; stroke-width: 3; opacity: 0; transform: scale(.6); transition: all var(--t-fast) var(--ease); color: var(--on-mint); }
.choice:has(input:checked) { border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border); background: var(--accent-tint); }
.choice:has(input:checked) .tick { background: var(--brand-mint); border-color: transparent; }
.choice:has(input:checked) .tick svg { opacity: 1; transform: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice .badge { margin-top: var(--s-2); justify-self: start; }
.choice-city { min-height: 72px; padding: var(--s-3) 32px var(--s-3) var(--s-3); }
.choice-city b { font-size: var(--fs-3); }
.choice-city small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choice-city .tick { top: 10px; right: 10px; }
.js .choice-city-name { display: none; }
.js .choice-list.is-filtered .choice[hidden] { display: none; }

.tr-block { border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); }
.tr-block > summary { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; min-height: 52px; padding: var(--s-3) var(--s-4); cursor: pointer; font-weight: 600; font-size: var(--fs-2); list-style: none; }
.tr-block > summary::-webkit-details-marker { display: none; }
.tr-block > summary::before { content: ""; width: 8px; height: 8px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(-45deg); transition: transform var(--t-fast) var(--ease); margin-right: var(--s-1); }
.tr-block[open] > summary::before { transform: rotate(45deg); }
.tr-block[open] { padding-bottom: var(--s-4); }
.tr-block > :not(summary) { margin-inline: var(--s-4); }
.tr-block > .field + .field { margin-top: var(--s-3); }
.tr-block > .field-help { margin-bottom: var(--s-3); }

.members { display: grid; gap: var(--s-2); }
.member-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: var(--s-2); }
.member-row > .input:nth-child(2) { grid-column: 1; }
.member-row > .icon-btn { grid-column: 2; grid-row: 1; }
@media (min-width: 640px) { .member-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; } .member-row > .input:nth-child(2) { grid-column: 2; } .member-row > .icon-btn { grid-column: 3; } }
@media (max-width: 639px) { .member-row + .member-row { padding-top: var(--s-2); border-top: 1px solid var(--border); } }

.summary { position: sticky; top: 72px; align-self: start; display: none; gap: var(--s-4); }
@media (min-width: 900px) { .summary { display: grid; } }
.summary .card { padding: var(--s-5); display: grid; gap: var(--s-4); box-shadow: var(--shadow-1); }
.summary-title { font-size: var(--fs-3); letter-spacing: var(--track-snug); }
.summary dl { display: grid; gap: var(--s-3); font-size: var(--fs-2); }
.summary dt { color: var(--text-3); font-size: var(--fs-1); }
.summary dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.summary dd.is-empty { color: var(--text-3); font-weight: 400; }
.summary .countdown { justify-self: start; }
.checklist { list-style: none; padding: 0; display: grid; gap: var(--s-2); font-size: var(--fs-2); }
.checklist li { display: flex; gap: var(--s-2); align-items: center; color: var(--text-3); }
.checklist li.ok { color: var(--text); }
.checklist .ci { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-strong); transition: all var(--t-fast) var(--ease); }
.checklist li.ok .ci { background: var(--brand-mint); border-color: transparent; color: var(--on-mint); }
.checklist .ci svg { width: 11px; height: 11px; stroke-width: 3; opacity: 0; }
.checklist li.ok .ci svg { opacity: 1; }

.mobile-submit { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(11,12,16,.06); }
.mobile-submit .countdown { flex: none; }
.mobile-submit .btn { flex: 1; }
@media (min-width: 900px) { .mobile-submit { display: none; } }

/* ============ Success ============ */
.success { width: min(640px, 100% - 32px); margin-inline: auto; padding-block: var(--s-8); display: grid; gap: var(--s-5); }
.success h1 { font-size: var(--fs-5); }
.success-mark { width: 56px; height: 56px; display: grid; place-items: center; background: var(--brand-mint); color: var(--on-mint); border-radius: 50%; }
.success-mark svg { width: 28px; height: 28px; stroke-width: 2.5; stroke-dasharray: 24; stroke-dashoffset: 0; }
.success-mark.sm { width: 40px; height: 40px; flex: none; }
.success-mark.sm svg { width: 20px; height: 20px; }
.success.is-in .success-mark { animation: pop 320ms var(--ease); }
.success.is-in .success-mark svg { animation: draw 420ms 120ms var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.editlink { border: 2px solid var(--text); border-radius: var(--r-2); background: var(--surface); padding: var(--s-5); display: grid; gap: var(--s-3); }
.editlink.compact { padding: var(--s-4); }
.editlink h2 { font-size: var(--fs-3); letter-spacing: var(--track-snug); display: flex; gap: var(--s-2); align-items: center; }
.editlink h2 svg { color: var(--warning); }
.editlink p { font-size: var(--fs-2); color: var(--text-2); }
.linkbox { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.linkbox .input { flex: 1 1 260px; }
.js-copy.is-copied { --btn-bg: var(--brand-mint); --btn-fg: var(--on-mint); --btn-bd: transparent; }
.mailnote { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-2); color: var(--text-2); }
.mailnote svg { margin-top: 2px; color: var(--text-3); }
.mailnote b { color: var(--text); }

/* ============ Project cards ============ */
.pgrid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.pcard {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); min-width: 0;
  padding: var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.pcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.pcard .meta { display: flex; gap: var(--s-2); align-items: center; font-size: var(--fs-1); color: var(--text-3); padding-right: 36px; min-width: 0; }
.pcard .meta > span:first-child { flex: none; }
.pcard .meta > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .meta .sep { flex: none; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.pcard .badges { margin-top: var(--s-3); }
.pcard h3 { font-size: var(--fs-4); letter-spacing: var(--track-tight); line-height: 1.15; overflow-wrap: anywhere; }
.pcard h3 a { color: inherit; text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard .desc { font-size: var(--fs-2); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: var(--s-2); }
.pcard .mt-note { margin-top: var(--s-3); }
.pcard footer { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--border); font-size: var(--fs-2); }
.pcard .team { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); font-weight: 500; min-width: 0; }
.pcard .team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .links { display: flex; gap: 2px; position: relative; z-index: 2; }
.pcard .links a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-1); color: var(--text-3); }
.pcard .links a:hover { background: var(--surface-2); color: var(--text); }
.pcard.is-winner { border-color: var(--text); }
.pcard:has(.stretched:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pcard .stretched:focus-visible { outline: none; }

/* judge variant */
.pick-label { position: absolute; inset: 0; z-index: 1; cursor: pointer; border-radius: var(--r-2); }
.pcard .pick { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); transition: all var(--t-fast) var(--ease); pointer-events: none; }
.pcard .pick svg { width: 16px; height: 16px; stroke-width: 3; color: var(--on-mint); opacity: 0; transform: scale(.5); transition: all var(--t-med) var(--ease); }
.pcard .pick.is-on, .pcard:has(.js-pick:checked) .pick { background: var(--brand-mint); border-color: transparent; }
.pcard .pick.is-on svg, .pcard:has(.js-pick:checked) .pick svg { opacity: 1; transform: none; }
.pcard:has(.js-pick:checked), .pcard:has(.pick.is-on) { border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border), var(--shadow-2); background: var(--accent-tint); }
.pcard:has(.js-pick:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.judge-grid.is-full .pcard:not(:has(.js-pick:checked)) { opacity: .55; }
.judge-grid.is-full .pcard:not(:has(.js-pick:checked)):hover { opacity: .85; }
.pcard .detail-btn { position: relative; z-index: 2; }

.judge-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-4); padding-block: var(--s-6) var(--s-5); }
.judge-head h1 { font-size: var(--fs-5); }
.judge-head p { color: var(--text-2); font-size: var(--fs-2); margin-top: var(--s-2); max-width: 70ch; }
.judge-body { display: grid; gap: var(--s-5); padding-bottom: var(--s-8); }
.vote-done { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-5); border: 2px solid var(--text); border-radius: var(--r-2); background: var(--surface); }
.vote-done h2 { font-size: var(--fs-4); }
.vote-done > div { display: grid; gap: var(--s-2); }
.picked-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); margin-block: var(--s-2); }
.picked-list li { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-1); background: var(--surface); font-size: var(--fs-2); }
.picked-list li svg { color: var(--accent-ink); }
.vote-bar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-5); padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2) var(--r-2) 0 0; box-shadow: 0 -8px 24px rgba(11,12,16,.08); }
.vote-count { display: flex; align-items: center; gap: var(--s-3); font-weight: 600; letter-spacing: var(--track-snug); white-space: nowrap; min-width: 0; }
.vote-dots { display: flex; gap: 4px; }
.vote-dots i { width: 22px; height: 6px; border-radius: 1px; background: var(--border-strong); transition: background var(--t-med) var(--ease); }
.vote-dots i.on { background: var(--brand-mint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-ink) 40%, transparent); }
.vote-hint { font-size: var(--fs-1); color: var(--text-3); font-weight: 400; }
@media (max-width: 479px) { .vote-dots { display: none; } .vote-bar .btn { padding: 0 var(--s-3); } }

/* dialog */
dialog.dialog { border: 0; border-radius: var(--r-2); padding: 0; width: min(480px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-3); }
dialog.dialog::backdrop { background: rgba(5, 6, 12, .55); }
dialog.dialog[open] { animation: dlg-in var(--t-med) var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-body { padding: var(--s-5); display: grid; gap: var(--s-4); }
.dlg-body h2 { font-size: var(--fs-4); letter-spacing: var(--track-snug); }
.dlg-body p { color: var(--text-2); font-size: var(--fs-2); }
.dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-2) var(--r-2); }

/* side panel */
.panel { position: fixed; inset: 0 0 0 auto; z-index: 80; width: min(600px, 100%); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-3); display: grid; grid-template-rows: auto 1fr auto; clip-path: inset(0 0 0 100%); opacity: 0; visibility: hidden; transition: clip-path var(--t-med) var(--ease), opacity var(--t-fast) var(--ease), visibility 0s var(--t-med); }
.panel.is-open { clip-path: inset(0 0 0 -40px); opacity: 1; visibility: visible; transition: clip-path var(--t-med) var(--ease), opacity var(--t-fast) var(--ease), visibility 0s; }
.panel-scrim { position: fixed; inset: 0; z-index: 79; background: rgba(5,6,12,.4); opacity: 0; pointer-events: none; transition: opacity var(--t-med) var(--ease); }
.panel-scrim.is-open { opacity: 1; pointer-events: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-5); border-bottom: 1px solid var(--border); }
.panel-body { overflow-y: auto; overscroll-behavior: contain; padding: var(--s-5); display: grid; gap: var(--s-5); align-content: start; }
.panel-title h2 { font-size: var(--fs-5); }
.meta-line { font-size: var(--fs-1); color: var(--text-3); margin-bottom: var(--s-2); }
.panel-foot { padding: var(--s-3) var(--s-5) calc(var(--s-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: var(--s-2); }
.panel-foot .btn { flex: 1; }
.link-buttons { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.link-buttons .btn { justify-content: flex-start; }
.link-buttons .btn span { flex: 1; text-align: left; }
.muted-icon { opacity: .5; }
/* padding-based 16:9 box: aspect-ratio inside a grid row collapses in some engines */
.video { position: relative; height: 0; padding-top: 56.25%; border-radius: var(--r-2); background: #0B0C10; overflow: hidden; border: 1px solid var(--border); }
.video > * { position: absolute; inset: 0; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-play { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: var(--s-2); border: 0; background: radial-gradient(80% 80% at 50% 40%, #16234d, #0B0C10); color: #fff; cursor: pointer; font-weight: 600; }
.video-play svg { width: 48px; height: 48px; stroke-width: 1.25; transition: transform var(--t-fast) var(--ease); }
.video-play:hover svg { transform: scale(1.06); }
.video-play small { color: rgba(255,255,255,.65); font-weight: 400; font-family: var(--mono); font-size: var(--fs-1); }

/* ============ Gallery ============ */
.gallery-filters { display: grid; gap: var(--s-3); padding-block: var(--s-5) var(--s-4); }
.gallery-body { padding-bottom: var(--s-8); display: grid; gap: var(--s-3); }
.result-count { margin-bottom: var(--s-1); }
.preview-bar { background: var(--warning-tint); color: var(--text); font-size: var(--fs-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.preview-bar .wrap-wide { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.project-page .prose { max-width: none; }

/* ============ Error / auth ============ */
.error-page { display: grid; gap: var(--s-4); justify-items: start; }
.error-page h1 { font-size: var(--fs-5); }
.error-code { font: 600 var(--fs-2)/1 var(--mono); color: var(--text-3); }
.debug { max-width: 100%; overflow: auto; font: var(--fs-1)/1.5 var(--mono); background: var(--surface-2); padding: var(--s-4); border-radius: var(--r-2); }
.auth-page { display: grid; justify-items: center; }
.auth-card { width: min(440px, 100%); padding: var(--s-6); display: grid; gap: var(--s-4); }
.auth-card h1 { font-size: var(--fs-5); }

/* ============ Admin ============ */
.admin { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
@media (min-width: 1000px) { .admin { grid-template-columns: 232px minmax(0, 1fr); } }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-4); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.admin-nav .wordmark { font-size: var(--fs-3); margin-right: var(--s-2); }
.admin-nav-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; order: 3; }
.admin-nav-links::-webkit-scrollbar { display: none; }
.admin-nav a:not(.wordmark) { display: flex; align-items: center; gap: var(--s-3); min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-1); color: var(--text-2); text-decoration: none; font-size: var(--fs-2); font-weight: 500; white-space: nowrap; }
.admin-nav a:not(.wordmark):hover { background: var(--surface-2); color: var(--text); }
.admin-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.admin-nav .grp { display: none; }
.admin-nav-foot { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.admin-nav-foot > a { display: none !important; }
.admin-user { display: flex; align-items: center; gap: var(--s-1); min-width: 0; }
.admin-user span { display: none; }
@media (min-width: 1000px) {
  .admin-nav { position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; flex-wrap: nowrap; padding: var(--s-4) var(--s-3); border-bottom: 0; border-right: 1px solid var(--border); }
  .admin-nav .wordmark { padding: var(--s-2) var(--s-3) var(--s-4); }
  .admin-nav-links { flex-direction: column; flex: 1; order: 0; overflow: visible; }
  .admin-nav .grp { display: block; font-size: var(--fs-1); color: var(--text-3); padding: var(--s-4) var(--s-3) var(--s-1); }
  .admin-nav-foot { flex-direction: column; align-items: stretch; margin-left: 0; gap: 2px; border-top: 1px solid var(--border); padding-top: var(--s-3); }
  .admin-nav-foot > a { display: flex !important; }
  .admin-user { justify-content: space-between; padding: var(--s-2) 0 var(--s-2) var(--s-3); }
  .admin-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-nav-foot .theme-toggle { align-self: flex-start; margin: var(--s-2) var(--s-3) 0; }
}
.admin-main { padding: var(--s-5) var(--s-4) var(--s-8); display: grid; gap: var(--s-5); align-content: start; min-width: 0; }
@media (min-width: 900px) { .admin-main { padding: var(--s-6) var(--s-6) var(--s-8); } }
.admin-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-3); }
.admin-title h1 { font-size: var(--fs-5); display: flex; align-items: center; gap: var(--s-3); }
.admin-title > div { display: grid; gap: var(--s-2); }
.admin-title > .btn-row { display: flex; }
.back-link { display: inline-flex; gap: 4px; align-items: center; color: var(--text-3); text-decoration: none; }
.back-link:hover { color: var(--text); }
.count-pill { font-size: var(--fs-2); font-weight: 600; letter-spacing: 0; padding: 2px 8px; border-radius: var(--r-1); background: var(--surface-2); color: var(--text-2); }
.section-title { font-size: var(--fs-4); letter-spacing: var(--track-snug); display: flex; align-items: baseline; gap: var(--s-3); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: var(--s-4) var(--s-5); display: grid; gap: var(--s-1); align-content: start; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--border); }
@media (max-width: 899px) { .kpi:nth-child(3) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--border); } }
.kpi dt { font-size: var(--fs-2); color: var(--text-2); }
.kpi dd { margin: 0; font-size: var(--fs-5); font-weight: 700; letter-spacing: var(--track-tight); line-height: 1.2; }
.kpi .sub { font-size: var(--fs-1); color: var(--text-3); overflow-wrap: anywhere; }
.kpi .bar { height: 4px; background: var(--surface-2); border-radius: 1px; overflow: hidden; margin-top: var(--s-2); }
.kpi .bar i { display: block; height: 100%; background: var(--text); }
.two-col, .detail-layout { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } .detail-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.mini-stats { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); }
.mini-stats dt { font-size: var(--fs-1); color: var(--text-3); }
.mini-stats dd { margin: 2px 0 0; font-size: var(--fs-4); font-weight: 700; letter-spacing: var(--track-snug); }
.recent { list-style: none; padding: 0; display: grid; }
.recent li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.recent li:last-child { border-bottom: 0; }
.recent li > a { grid-column: 1; grid-row: 1; }
.recent li .muted { grid-column: 1; grid-row: 2; }
.recent li time { grid-column: 2; grid-row: 1; align-self: baseline; }
.recent a { color: var(--text); text-decoration: none; }
.recent a:hover { text-decoration: underline; }
.table-tools { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.table-tools .grow { flex: 1 1 240px; }
.action-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; padding: var(--s-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2); }
.action-bar .input-sm { width: 200px; }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); }
.table-wrap.flat { border: 0; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-2); }
th { text-align: left; font-weight: 500; color: var(--text-3); font-size: var(--fs-1); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
th.num, td.num { text-align: right; }
.th-sort { display: inline-flex; gap: 4px; align-items: center; color: inherit; text-decoration: none; }
.th-sort:hover, .th-sort[aria-sort] { color: var(--text); }
td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--t-fast) var(--ease); }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
tr.is-muted td { opacity: .6; }
td .t { font-weight: 600; letter-spacing: var(--track-snug); color: var(--text); text-decoration: none; display: block; }
a.t:hover { text-decoration: underline; }
td .s, .s { color: var(--text-3); font-size: var(--fs-1); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.row-actions form { display: contents; }
.row-actions .icon-btn { width: 36px; height: 36px; }
.link-list, .plain-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.link-list li { display: flex; gap: var(--s-2); align-items: center; min-width: 0; }
.plain-list li { overflow-wrap: anywhere; }
.error-text { color: var(--danger); font-size: var(--fs-1); margin-top: 2px; }
.tally { display: grid; gap: var(--s-1); }
.tally-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 28px; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-2); border-radius: var(--r-1); cursor: pointer; font-size: var(--fs-2); }
.tally-row:hover { background: var(--surface-2); }
.tally-row input { width: 18px; height: 18px; accent-color: var(--accent-ink); margin: 0; }
.tally-name { display: grid; min-width: 0; }
.tally-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tally-row .bar { grid-column: 2; height: 6px; background: var(--surface-2); border-radius: 1px; overflow: hidden; }
.tally-row .bar i { display: block; height: 100%; background: var(--text-3); }
.tally-row:has(input:checked) .bar i { background: var(--brand-mint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-ink) 40%, transparent); }
.tally-row .n { grid-column: 3; grid-row: 1 / span 2; text-align: right; font-weight: 600; font-size: var(--fs-3); }
.tally-row .select-sm { grid-column: 2; justify-self: start; }
@media (min-width: 700px) {
  .tally-row { grid-template-columns: 20px minmax(0, 1fr) 140px 28px auto; }
  .tally-row .bar { grid-column: 3; grid-row: 1; }
  .tally-row .n { grid-column: 4; grid-row: 1; }
  .tally-row .select-sm { grid-column: 5; grid-row: 1; }
}
.matrix th { white-space: normal; max-width: 120px; }
.matrix td, .matrix th { padding: var(--s-2) var(--s-3); }
.dot-on { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-mint); color: var(--on-mint); }
.dot-on svg { stroke-width: 3; width: 14px; height: 14px; }
.dot-off { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.judge-list { list-style: none; padding: 0; display: grid; }
.judge-item { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
.judge-item:first-child { padding-top: 0; }
.judge-item > div:first-child { display: grid; gap: 2px; min-width: 0; }
.judge-item .s { overflow-wrap: anywhere; }
.judge-item .badges { margin-top: var(--s-1); }
.judge-item.is-muted { opacity: .55; }
.add-judge { padding-top: var(--s-2); }
.add-judge h3 { font-size: var(--fs-3); letter-spacing: var(--track-snug); }
.sticky-box { position: sticky; top: var(--s-5); }
.narrow-box { max-width: 640px; }
.check-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); font-size: var(--fs-2); }
.check-list li { display: flex; gap: var(--s-2); align-items: center; }
.check-list li.ok svg { color: var(--accent-ink); }
.check-list li.bad { color: var(--danger); }
.grid-fit { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
@media (max-width: 419px) {
  .band-top-inner, .site-header-inner { gap: var(--s-2); }
  .band-top .wordmark span, .site-header .wordmark span { display: none; }
  .seg.compact button, .seg.compact a { min-width: 32px; padding: 0 8px; }
}
/* long challenge names must not widen the page */
.gallery-filters { grid-template-columns: minmax(0, 1fr); }
.gallery-filters .inline-form { flex: 1 1 220px; min-width: 0; }
.gallery-filters .select, .table-tools .select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.gallery-filters .inline-form .select { width: 100%; }

/* ============ Teams ============ */
.brand-band .band-inner p a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.chip-link { border-style: dashed; }
.textarea-sm { min-height: 72px; }
.team-form { gap: var(--s-5); }
.team-form > header h2 { font-size: var(--fs-4); }

.team-page { display: grid; gap: var(--s-5); }
.team-status { display: grid; gap: var(--s-3); }
@media (min-width: 720px) { .team-status { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.status-card { gap: var(--s-3); }
.status-card.is-todo { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.status-card.is-done { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent-ink) 30%, transparent); }
.status-value { display: grid; gap: 4px; }
.status-value b { font-size: var(--fs-4); letter-spacing: var(--track-snug); line-height: 1.2; overflow-wrap: anywhere; }
.status-value small { font-size: var(--fs-2); color: var(--text-2); }

/* ============ Live challenge board & picking ============ */
.board { display: grid; gap: var(--s-7); padding-bottom: var(--s-8); }
.board > .js-board { display: grid; gap: var(--s-7); }
.board-city { display: grid; gap: var(--s-3); }
.board-city-head { display: grid; gap: var(--s-2); }
.board-city-head h2 { font-size: var(--fs-5); }
.board-stats { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-2); color: var(--text-2); }
.board-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.board-stats .is-full b { color: var(--accent-ink); }
.board-stats .stat-warn b { color: var(--warning); }
.coverage-bar { height: 6px; background: var(--surface-2); border-radius: 1px; overflow: hidden; max-width: 480px; }
.coverage-bar i { display: block; height: 100%; background: var(--accent-ink); transition: width var(--t-med) var(--ease); }
.board-missing { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-2); background: var(--danger-tint); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); font-size: var(--fs-2); }
.board-missing > svg { color: var(--danger); margin-top: 2px; flex: none; }
.board-missing.is-ok { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent-ink) 25%, transparent); }
.board-missing.is-ok > svg { color: var(--accent-ink); }
.board-grid, .pick-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.bcard { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--s-2); min-width: 0; padding: var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2); }
.bcard header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); }
.bcard h3 { font-size: var(--fs-3); letter-spacing: var(--track-snug); line-height: 1.25; overflow-wrap: anywhere; }
.bcount { flex: none; font: 700 var(--fs-4)/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: var(--track-tight); }
.bsponsor { font-size: var(--fs-1); color: var(--text-3); }
.bcard.is-empty { background: var(--danger-tint); border: 1.5px solid var(--danger); }
.bcard.is-empty .bcount, .bempty { color: var(--danger); }
.bempty { font-size: var(--fs-2); font-weight: 600; }
.bcard.is-mine { background: var(--accent-tint); border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border); }
.bempty-note { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-2); color: var(--text-2); overflow-wrap: anywhere; }
.bcard.is-empty .bempty-note { color: var(--danger); font-weight: 600; }
.bcard.is-mine .bempty-note { color: var(--text); font-weight: 600; }
.bcard .btn { justify-self: start; }
.bteams { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.bteams li, .bchip { display: inline-flex; flex-direction: column; justify-content: center; min-height: 26px; padding: 3px 8px; border-radius: var(--r-1); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-2); font-weight: 500; overflow-wrap: anywhere; }
.board-unpicked { display: flex; flex-wrap: wrap; gap: 4px var(--s-2); align-items: center; font-size: var(--fs-2); color: var(--text-2); }
.board-unpicked .bchip { border-style: dashed; background: transparent; color: var(--text); }
[data-pick].is-new { animation: pick-in 2.4s var(--ease); }
@keyframes pick-in { 0%, 30% { background: var(--brand-mint); color: var(--on-mint); border-color: transparent; } }
@media (prefers-reduced-motion: reduce) { [data-pick].is-new { animation: none; outline: 2px solid var(--accent-ink); } }
.board-updated { font-size: var(--fs-1); color: var(--text-3); min-height: 1.5em; margin-top: calc(var(--s-6) * -1); }
.board-updated.is-stale { color: var(--warning); font-weight: 600; }
.board-how { max-width: 760px; }
.how-steps { padding-left: 1.3em; display: grid; gap: var(--s-1); font-size: var(--fs-2); color: var(--text-2); }
.lost-link { padding-top: var(--s-4); border-top: 1px solid var(--border); }

/* TV mode (/vyzvy?tv=1): projector at the venue */
html:has(body.board-tv) { font-size: 125%; }
.board-tv .site-footer { display: none; }
.board-tv .board, .board-tv .tv-head { width: min(100% - 48px, 2400px); margin-inline: auto; }
.tv-head { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: baseline; padding-block: var(--s-5) var(--s-4); }
.tv-head h1 { font-size: var(--fs-5); }
.board-tv .board-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ============ Jury questions ============ */
.qa-block { display: grid; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--border); }
.qa-block h3 { font-size: var(--fs-3); letter-spacing: var(--track-snug); display: flex; gap: var(--s-2); align-items: baseline; }
.qa-block h3 .count { font-size: var(--fs-2); color: var(--text-3); font-weight: 500; }
.qa-list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.qa { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2); }
.qa.is-open { border-left: 3px solid var(--warning); }
.qa-who { display: block; font-size: var(--fs-1); color: var(--text-3); margin-bottom: 2px; }
.qa-q p, .qa-a p { font-size: var(--fs-2); overflow-wrap: anywhere; }
.qa-q p { font-weight: 500; }
.qa-a { padding-left: var(--s-3); border-left: 2px solid var(--accent-ink); }
.qa-a p { color: var(--text-2); }
.qa-wait { font-size: var(--fs-2); color: var(--warning); }
.qa-a-form, .qa-ask { display: grid; gap: var(--s-2); }
.qa-ask { padding-top: var(--s-2); }
.table-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; }
.table-row .input { width: 180px; }
.table-row .input:disabled { opacity: .5; }
.choice.is-uncovered { border-left: 3px solid var(--danger); }
.bteam b { font-weight: 600; }
.tmeta { font-size: var(--fs-1); color: var(--text-3); font-weight: 400; line-height: 1.3; }
[data-pick].is-new .tmeta { color: inherit; }
.tv-cta { font-size: var(--fs-3); color: var(--text-2); }
.tv-cta b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.lost-link > summary { cursor: pointer; color: var(--text-2); }
.lost-link[open] > form { margin-top: var(--s-3); }
.input-narrow { max-width: 180px; }
.picks-until { margin-top: var(--s-2); }
.picks-until .input-sm { width: auto; }
@media (max-width: 439px) {
  .choice-city { padding: var(--s-3) 24px var(--s-3) var(--s-3); }
  .choice-city .tick { top: 8px; right: 6px; width: 16px; height: 16px; }
  .choice-city b { font-size: var(--fs-2); }
}

/* ============ Built at / before the hackathon ============ */
.build-group { display: grid; gap: var(--s-4); padding: var(--s-4); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); }
.build-group h3 { font-size: var(--fs-3); letter-spacing: var(--track-snug); }
.build-group .textarea { background: var(--surface); }
.build-facts dd { white-space: normal; }

/* ============ Impact & AI, cover image ============ */
.check-grid { display: grid; gap: var(--s-3) var(--s-4); grid-template-columns: minmax(0, 1fr); padding: var(--s-1) 0; }
@media (min-width: 640px) { .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.seg.seg-radio { flex-wrap: wrap; justify-self: start; }
.input-file { padding: var(--s-2); cursor: pointer; }
.input-file::file-selector-button { margin-right: var(--s-3); padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-1); background: var(--surface-2); color: var(--text); font: 500 var(--fs-2)/1.2 var(--font); cursor: pointer; }
.cover-current { display: flex; gap: var(--s-3); align-items: center; }
.cover-current img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-1); border: 1px solid var(--border); background: var(--surface-2); flex: none; }
.project-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-2); border: 1px solid var(--border); background: var(--surface-2); margin-bottom: var(--s-4); }
.pcard:has(> .pcard-cover) { grid-template-rows: auto auto 1fr auto; }
.pcard-cover { margin: calc(-1 * var(--s-5)) calc(-1 * var(--s-5)) 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: calc(var(--r-2) - 1px) calc(var(--r-2) - 1px) 0 0; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pcard-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* demo button on project cards (gallery and jury), pinned to the bottom of the card body */
.pcard-main { display: flex; flex-direction: column; min-width: 0; }
.pcard-demo { margin-top: auto; padding-top: var(--s-3); position: relative; z-index: 2; }
.pcard-demo .btn { gap: 6px; }

/* ============ Hacker Prize ballot ============ */
.hp-choice { gap: 4px; }
.hp-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-1); border: 1px solid var(--border); background: var(--surface-2); margin-bottom: var(--s-2); }
.hp-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2); }
.hp-detail { position: relative; z-index: 1; justify-self: start; margin-top: var(--s-1); color: var(--text-2); }
.hp-choice.is-own { cursor: not-allowed; opacity: .6; }
.hp-choice .badge { margin-top: var(--s-1); }
.hp-submit { position: sticky; bottom: 0; padding: var(--s-3) 0; background: linear-gradient(transparent, var(--bg) 35%); display: flex; justify-content: flex-end; }
.hp-tally .tally-row { grid-template-columns: minmax(0, 1fr) 32px auto; cursor: default; }
.hp-tally .tally-row .tally-name { grid-column: 1; grid-row: 1; }
.hp-tally .tally-row .bar { grid-column: 1; grid-row: 2; }
.hp-tally .tally-row .n { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
.hp-tally .tally-row form { grid-column: 3; grid-row: 1 / span 2; }
