/* ============================================================
   WHACKATHON — nocturne / terminal
   One stylesheet: token layer + component layer.
   Plain CSS. No build step. No external requests.
   ============================================================ */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jetbrains-mono.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   TOKENS — this :root block is identical in every screen file
   ============================================================ */
:root {
  /* Ground: a warm near-black, never neutral grey. The aurora
     behind it is violet / teal / ember, so the page reads
     late-night rather than "hacker terminal". */
  --color-bg:            #0a0908;
  --color-bg-raised:     #0f0d0c;
  --color-surface:       #171412;
  --color-surface-2:     #211c19;
  --color-surface-3:     #2b2521;

  --color-text:          #ece5da;
  --color-text-muted:    #a79d92;
  --color-text-faint:    #8c8278;  /* 4.6:1 on --color-bg — AA at 11px */
  --color-text-invert:   #170c06;

  /* Ember accent — the only colour that acts. */
  --color-accent:        #e8845a;
  --color-accent-hover:  #f2996f;
  --color-accent-press:  #cf6b41;
  --color-accent-dim:    rgba(232,132,90,.14);

  /* Sage second voice — presence, people, "you are in". */
  --color-accent-2:      #9fb277;
  --color-accent-2-dim:  rgba(159,178,119,.14);

  /* Lilac third voice — used for exactly one thing: the resident cats. Picked
     out of the violet already in the aurora so it belongs to the palette. */
  --color-accent-3:      #a68ac9;
  --color-accent-3-dim:  rgba(166,138,201,.14);
  --color-accent-3-ink:  #150f1e;

  /* Amber = pending / unknown. Rose = error. */
  --color-pending:       #d9a441;
  --color-danger:        #f4796a;
  --color-danger-dim:    rgba(244,121,106,.13);

  --color-line:          rgba(236,229,218,.13);
  --color-line-strong:   rgba(236,229,218,.28);

  /* --- Type --------------------------------------------------
     One family, four weights. The scale is a 1.28 ratio walked
     from a 13.5px UI body — small enough that mono stays dense
     and technical, with a big jump to the display step so the
     wordmark is the only loud thing on the page. */
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: var(--font-mono);
  --font-body: var(--font-mono);

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --step-000: 10.5px;  /* status bar / smallest caps      */
  --step-00:  11.5px;  /* labels, kickers, meta           */
  --step-0:   13.5px;  /* body + all UI text              */
  --step-1:   16px;    /* lead paragraphs, input text     */
  --step-2:   20px;    /* card titles                     */
  --step-3:   26px;    /* section headings                */
  --step-4:   34px;    /* page headings                   */
  --step-5:   46px;    /* confirmation / 404 headline     */
  --step-6:   clamp(40px, 11vw, 104px); /* wordmark       */

  --leading-tight: 1.15;
  --leading-snug: 1.42;
  --leading-body: 1.62;
  --tracking-micro: .16em;
  --tracking-tight: -.04em;

  /* --- Space (4px base) ------------------------------------ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 20px;
  --space-5: 30px;
  --space-6: 48px;
  --space-7: 72px;
  --space-8: 110px;

  --measure: 62ch;
  --page-max: 1180px;
  --gutter: var(--space-4);

  /* --- Radii ------------------------------------------------ */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* --- Elevation (glow, not drop shadow — the page is dark) - */
  --shadow-sm: 0 1px 0 rgba(236,229,218,.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 28px 70px rgba(0,0,0,.6);
  --glow-accent: 0 0 0 1px var(--color-accent), 0 0 26px rgba(232,132,90,.25);

  /* --- Motion ----------------------------------------------- */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-1: 140ms;
  --dur-2: 320ms;
  --dur-3: 620ms;

  --z-bg: 0;
  --z-veil: 1;
  --z-texture: 2;
  --z-content: 3;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* Nothing on this page is meant to scroll sideways; if a long unbroken
     string ever does overflow, clip it rather than shifting the whole layout. */
  overflow-x: clip;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-hover); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--color-accent); color: var(--color-text-invert); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   ATMOSPHERE — aurora, veil, scanlines, grain
   Purely decorative layers; all aria-hidden in the markup.
   ============================================================ */
.stage { position: relative; isolation: isolate; background: var(--color-bg); overflow: hidden; }

.aurora { position: absolute; inset: -25%; z-index: var(--z-bg); filter: blur(110px); }
.aurora span { position: absolute; display: block; border-radius: 50%; mix-blend-mode: screen; }
.aurora .a1 {
  width: 58%; height: 66%; left: -8%; top: -18%;
  background: radial-gradient(circle, #33265c 0%, transparent 68%);
  animation: aurora-1 28s var(--ease) infinite alternate;
}
.aurora .a2 {
  width: 64%; height: 72%; right: -12%; top: -26%;
  background: radial-gradient(circle, #0d5257 0%, transparent 66%);
  animation: aurora-2 36s var(--ease) infinite alternate;
}
.aurora .a3 {
  width: 50%; height: 56%; left: 26%; top: 2%;
  background: radial-gradient(circle, #7c3519 0%, transparent 70%);
  animation: aurora-3 32s var(--ease) infinite alternate;
}
@keyframes aurora-1 { to { transform: translate3d(14%, 10%, 0) scale(1.2); } }
@keyframes aurora-2 { to { transform: translate3d(-12%, 16%, 0) scale(1.14); } }
@keyframes aurora-3 { to { transform: translate3d(8%, -12%, 0) scale(1.28); } }

.veil {
  position: absolute; inset: 0; z-index: var(--z-veil); pointer-events: none;
  background: linear-gradient(180deg, rgba(10,9,8,.42) 0%, rgba(10,9,8,.74) 58%, var(--color-bg) 100%);
}
.scan {
  position: absolute; inset: 0; z-index: var(--z-texture); pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
}
.grain {
  position: absolute; inset: 0; z-index: var(--z-texture); pointer-events: none;
  opacity: .4; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ============================================================
   LAYOUT
   ============================================================ */
.stage > .wrap, .stage > .page, .stage .hero, .stage .welcome, .stage .moment { position: relative; z-index: var(--z-content); }
.page { position: relative; z-index: var(--z-content); display: flex; flex-direction: column; min-height: 100vh; }
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-6); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-6); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.rule { height: 1px; background: var(--color-line); border: 0; margin: 0; }

@media (min-width: 720px) {
  :root { --gutter: var(--space-6); }
  .section { padding-block: var(--space-7); }
}

/* ============================================================
   STATUS BAR (header) + FOOT BAR
   ============================================================ */
.statusbar, .footbar {
  display: flex; align-items: stretch; flex-wrap: wrap;
  font-size: var(--step-000); letter-spacing: var(--tracking-micro);
  text-transform: uppercase; background: var(--color-surface);
  position: relative; z-index: var(--z-content);
}
.statusbar { border-bottom: 1px solid var(--color-line); }
.footbar { border-top: 1px solid var(--color-line); color: var(--color-text-muted); margin-top: auto; }
.statusbar > *, .footbar > * { display: flex; align-items: center; padding: 9px var(--space-4); }
.statusbar .spacer, .footbar .spacer { flex: 1; padding: 0; }
.statusbar .path, .footbar .path { color: var(--color-text-muted); }
.footbar b { color: var(--color-text); font-weight: var(--weight-bold); }

.seg-accent { background: var(--color-accent); color: var(--color-text-invert); font-weight: var(--weight-bold); }
.seg-sage { background: var(--color-accent-2); color: #131707; font-weight: var(--weight-bold); }
.seg-danger { background: var(--color-danger); color: #2a0c08; font-weight: var(--weight-bold); }

/* wrap, or four tabs push the document wider than a phone viewport and the
   whole page scrolls sideways */
.tabs { display: flex; flex-wrap: wrap; margin-left: auto; }
.tabs a {
  display: flex; align-items: center; padding: 9px var(--space-4);
  color: var(--color-text-muted); text-decoration: none;
  border-left: 1px solid var(--color-line);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.tabs a::before { content: "["; color: var(--color-text-faint); margin-right: 2px; }
.tabs a::after  { content: "]"; color: var(--color-text-faint); margin-left: 2px; }
.tabs a:hover { color: var(--color-text); background: var(--color-surface-2); }
.tabs a[aria-current="page"] { color: var(--color-accent); background: var(--color-surface-2); }

@media (max-width: 719px) {
  .statusbar .path, .footbar .path { display: none; }
  .tabs a { padding-inline: var(--space-3); }
}

/* ============================================================
   PROMPT + OUTPUT — the terminal voice
   ============================================================ */
.prompt { color: var(--color-text-muted); font-size: var(--step-0); word-break: break-word; }
.prompt .user { color: var(--color-accent-2); }
.prompt .sep  { color: var(--color-text-faint); }
.prompt .cmd  { color: var(--color-text); }

.caret {
  display: inline-block; width: .62em; height: 1.05em; vertical-align: -.16em;
  background: var(--color-accent); margin-left: .18em;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.out { display: flex; flex-direction: column; gap: var(--space-2); }
.out p { color: var(--color-text-muted); max-width: var(--measure); text-wrap: pretty; }
.out p::before { content: "› "; color: var(--color-accent-2); }
.out p b { color: var(--color-text); font-weight: var(--weight-medium); }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-5); }
.section-heading h2 {
  font-size: var(--step-00); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--color-accent);
  white-space: nowrap;
}
.section-heading .line { flex: 1; height: 1px; background: var(--color-line); }
.section-heading .count { color: var(--color-text-faint); font-size: var(--step-00); letter-spacing: var(--tracking-micro); white-space: nowrap; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  white-space: nowrap; cursor: pointer; font-family: var(--font-mono);
  font-size: var(--step-0); line-height: 1; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; padding: 14px 20px; min-height: 44px;
  border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm);
  color: var(--color-text); background: transparent;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.btn::before { content: "["; color: var(--color-text-faint); }
.btn::after  { content: "]"; color: var(--color-text-faint); }
.btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn:active { background: var(--color-accent-dim); }

.btn-primary {
  background: var(--color-accent); border-color: var(--color-accent);
  color: var(--color-text-invert); font-weight: var(--weight-bold);
}
.btn-primary::before, .btn-primary::after { color: rgba(23,12,6,.4); }
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: var(--color-text-invert); }
.btn-primary:active { background: var(--color-accent-press); border-color: var(--color-accent-press); }

.btn-secondary { border-color: var(--color-line-strong); background: var(--color-surface-2); }

.btn-ghost { border-color: transparent; color: var(--color-text-muted); padding-inline: var(--space-3); }
.btn-ghost:hover { color: var(--color-accent); background: var(--color-accent-dim); }

.btn-danger { border-color: transparent; color: var(--color-text-faint); }
.btn-danger:hover { color: var(--color-danger); background: var(--color-danger-dim); }

.btn-sm { padding: 8px 12px; min-height: 34px; font-size: var(--step-00); }
.btn-block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Pending: the label dims and a run of cycling blocks appears beside it.
   Driven either by data-state="pending" (server-rendered) or by htmx's
   .htmx-request class while a request is in flight. */
.btn[data-state="pending"] { pointer-events: none; color: var(--color-text-invert); }
.btn[data-state="pending"] .btn-label,
.btn.htmx-request .btn-label { opacity: .55; }
.btn.htmx-request { pointer-events: none; }

.spinner { display: inline-flex; gap: 3px; }
.btn .spinner { display: none; }
.btn[data-state="pending"] .spinner, .btn.htmx-request .spinner { display: inline-flex; }
.spinner i { width: 5px; height: 5px; background: currentColor; border-radius: 1px; animation: pulse-dot 1s var(--ease) infinite; }
.spinner i:nth-child(2) { animation-delay: .16s; }
.spinner i:nth-child(3) { animation-delay: .32s; }
@keyframes pulse-dot { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ============================================================
   FORM FIELDS
   ============================================================ */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 620px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field > label {
  font-size: var(--step-00); letter-spacing: var(--tracking-micro);
  text-transform: uppercase; color: var(--color-text-muted);
}
.field .req { color: var(--color-accent); }
.field .hint { font-size: var(--step-00); color: var(--color-text-faint); line-height: 1.5; }

.input, .textarea {
  width: 100%; font-family: var(--font-mono); font-size: var(--step-1); line-height: 1.4;
  color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm);
  padding: 13px 14px; min-height: 48px;
  caret-color: var(--color-accent);
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.textarea { min-height: 108px; resize: vertical; font-size: var(--step-0); line-height: var(--leading-body); }
.input::placeholder, .textarea::placeholder { color: var(--color-text-faint); }
.input:hover, .textarea:hover { border-color: var(--color-text-faint); }
.input:focus-visible, .textarea:focus-visible { border-color: var(--color-accent); outline: 2px solid var(--color-accent); outline-offset: 1px; }
.input[disabled], .textarea[disabled] { opacity: .45; cursor: not-allowed; }

.field[data-invalid] .input, .field[data-invalid] .textarea { border-color: var(--color-danger); background: var(--color-danger-dim); }
.field-error {
  display: flex; gap: var(--space-2); font-size: var(--step-00);
  color: var(--color-danger); letter-spacing: .02em;
}
.field-error::before { content: "!"; font-weight: var(--weight-bold); }

.field-count { font-size: var(--step-000); color: var(--color-text-faint); text-align: right; letter-spacing: var(--tracking-micro); }

/* ============================================================
   BADGE / PILL
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--step-000); letter-spacing: var(--tracking-micro); text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-line-strong); color: var(--color-text-muted);
  align-self: flex-start; /* never stretch as a flex item */
}
.badge-accent { background: var(--color-accent-dim); border-color: transparent; color: var(--color-accent); }
.badge-sage { background: var(--color-accent-2-dim); border-color: transparent; color: var(--color-accent-2); }
.badge-pending { border-color: var(--color-pending); color: var(--color-pending); }
.badge-pending::after { content: "▮"; animation: blink 1.4s steps(1) infinite; }
.badge-date { font-variant-numeric: tabular-nums; letter-spacing: .1em; }

/* ============================================================
   VENUE — degrades to a plain line when the address lands
   ============================================================ */
.venue { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.venue .value { color: var(--color-text); }
.venue[data-state="pending"] .value { color: var(--color-text-muted); font-style: normal; }

/* ============================================================
   ROSTER
   ============================================================ */
.roster { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.roster-entry {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 8px 14px 8px 8px; border-radius: var(--radius-pill);
  background: var(--color-surface); border: 1px solid var(--color-line);
  font-size: var(--step-0); color: var(--color-text);
  animation: roster-in var(--dur-3) var(--ease-out) both;
}
.roster-entry .initial {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-surface-3); color: var(--color-accent-2);
  font-size: var(--step-00); font-weight: var(--weight-bold);
}
.roster-entry[data-you] { border-color: var(--color-accent); background: var(--color-accent-dim); }
.roster-entry[data-you] .initial { background: var(--color-accent); color: var(--color-text-invert); }
.roster-entry[data-new] .initial { background: var(--color-accent-2); color: #131707; }

/* The organiser always heads the list, whether or not he has signed up. */
.roster-entry[data-host] { border-color: var(--color-accent); }
.roster-entry[data-host] .initial { background: var(--color-accent); color: var(--color-text-invert); }
.roster-entry[data-host] .when { color: var(--color-accent); }

/* Appa and Momo get their own row under the roster proper. */
.guests {
  display: flex; flex-direction: column; gap: var(--space-2);
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px dashed var(--color-line);
  align-items: flex-start;
}

/* They live there; they did not sign up. */
.roster-entry[data-cat] { border-color: var(--color-accent-3); background: var(--color-accent-3-dim); }
.roster-entry[data-cat] .initial { background: var(--color-accent-3); color: var(--color-accent-3-ink); }
.roster-entry[data-cat] .when { color: var(--color-accent-3); }
.roster-entry .when { font-size: var(--step-000); color: var(--color-text-faint); letter-spacing: var(--tracking-micro); }
@keyframes roster-in { from { opacity: 0; transform: translateY(6px); } }

.roster-count { display: flex; align-items: baseline; gap: var(--space-3); }
.roster-count .n {
  font-size: var(--step-4); font-weight: var(--weight-bold); color: var(--color-text);
  letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums;
}
.roster-count .label { font-size: var(--step-00); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--color-text-faint); }

/* ============================================================
   IDEA BOARD
   ============================================================ */
.board { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 700px)  { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.idea-card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--color-line);
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.idea-card:hover { border-color: var(--color-line-strong); transform: translateY(-2px); }
.idea-card[data-mine] { border-color: var(--color-accent); background: linear-gradient(180deg, var(--color-accent-dim), transparent 60%), var(--color-surface); }
.idea-card .idea-head { display: flex; align-items: flex-start; gap: var(--space-3); }
.idea-card .idea-index { font-size: var(--step-00); color: var(--color-text-faint); letter-spacing: var(--tracking-micro); padding-top: 4px; }
.idea-card h3 { font-size: var(--step-2); font-weight: var(--weight-bold); line-height: 1.2; flex: 1; }
.idea-card .idea-body { color: var(--color-text-muted); line-height: var(--leading-body); text-wrap: pretty; }
.idea-card .idea-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--color-line);
  font-size: var(--step-00); color: var(--color-text-faint); letter-spacing: .02em;
}
.idea-card .author { color: var(--color-accent-2); }
.idea-card .idea-actions { display: flex; gap: var(--space-2); margin-left: auto; }

/* Interest toggle — a real <button> with aria-pressed. */
.interest {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 36px; padding: 6px 14px 6px 10px; cursor: pointer;
  text-decoration: none; /* it renders as an <a> for signed-out visitors */
  font-family: var(--font-mono); font-size: var(--step-00); letter-spacing: var(--tracking-micro);
  text-transform: uppercase; color: var(--color-text-muted);
  background: var(--color-surface-2); border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  transition: all var(--dur-1) var(--ease);
}
.interest .box {
  display: grid; place-items: center; width: 18px; height: 18px;
  border: 1px solid currentColor; border-radius: var(--radius-sm); font-size: 11px; line-height: 1;
}
.interest .box::before { content: "+"; }
.interest .n { font-variant-numeric: tabular-nums; color: var(--color-text); font-weight: var(--weight-bold); }
.interest:hover { border-color: var(--color-accent-2); color: var(--color-accent-2); }
.interest[aria-pressed="true"] {
  background: var(--color-accent-2); border-color: var(--color-accent-2); color: #131707; font-weight: var(--weight-bold);
}
.interest[aria-pressed="true"] .box::before { content: "✓"; }
.interest[aria-pressed="true"] .n { color: #131707; }
.interest[disabled] { opacity: .4; cursor: not-allowed; }
.interest.htmx-request { opacity: .55; pointer-events: none; }

/* The interest toggle is wrapped in a form so it works without JS. */
.interest-form { display: contents; }

/* ============================================================
   COPY-LINK FIELD
   ============================================================ */
.copy-field { display: flex; flex-direction: column; gap: var(--space-2); }
.copy-shell {
  display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
  border: 1px solid var(--color-accent); border-radius: var(--radius-md);
  background: var(--color-surface); box-shadow: var(--glow-accent); overflow: hidden;
}
.copy-shell .copy-input {
  flex: 1 1 260px; min-width: 0; border: 0; background: transparent;
  font-family: var(--font-mono); font-size: var(--step-0); color: var(--color-text);
  padding: 15px var(--space-4); text-overflow: ellipsis;
}
.copy-shell .copy-input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.copy-shell .btn { border: 0; border-left: 1px solid var(--color-accent); border-radius: 0; flex: 0 0 auto; }
.copy-note { font-size: var(--step-00); color: var(--color-text-faint); }
.copy-shell[data-copied] { border-color: var(--color-accent-2); box-shadow: 0 0 0 1px var(--color-accent-2), 0 0 26px rgba(159,178,119,.22); }
.copy-shell[data-copied] .btn { border-left-color: var(--color-accent-2); background: var(--color-accent-2); border-color: var(--color-accent-2); color: #131707; }

/* ============================================================
   PANELS / EMPTY STATES / CALLOUTS
   ============================================================ */
.panel {
  border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  background: rgba(23, 20, 18, .68); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.panel-accent { border-color: var(--color-accent); background: linear-gradient(180deg, var(--color-accent-dim), transparent 70%), rgba(23,20,18,.72); }

.empty {
  border: 1px dashed var(--color-line-strong); border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5); text-align: left;
  display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start;
  background: repeating-linear-gradient(135deg, rgba(236,229,218,.02) 0 8px, transparent 8px 16px);
}
.empty h3 { font-size: var(--step-2); font-weight: var(--weight-bold); }
.empty p { color: var(--color-text-muted); max-width: 46ch; text-wrap: pretty; }
.empty .glyph { font-size: var(--step-3); color: var(--color-text-faint); line-height: 1; }

.callout {
  display: flex; gap: var(--space-3); padding: var(--space-4);
  border-radius: var(--radius-md); background: var(--color-danger-dim);
  border: 1px solid var(--color-danger); color: var(--color-text);
}
.callout::before { content: "!"; color: var(--color-danger); font-weight: var(--weight-bold); }
.callout p { color: var(--color-text-muted); }
.callout a { color: var(--color-danger); }

/* ============================================================
   KEY / VALUE
   ============================================================ */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0; }
.kv dt { font-size: var(--step-00); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--color-text-faint); align-self: center; }
.kv dd { margin: 0; color: var(--color-text); }
.kv .pending { color: var(--color-pending); }
.kv .pending::after { content: " ▮"; animation: blink 1.4s steps(1) infinite; }

/* ============================================================
   HERO (landing)
   ============================================================ */
.hero { padding-block: var(--space-7) var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); }
.wordmark {
  font-size: var(--step-6); font-weight: var(--weight-bold); line-height: 1;
  letter-spacing: var(--tracking-tight); display: flex; align-items: center; word-break: break-word;
}
.wordmark .caret { width: .4em; height: .62em; margin-left: .16em; }
.hero .pitch {
  font-size: var(--step-2); line-height: var(--leading-snug); font-weight: var(--weight-light);
  color: var(--color-text); max-width: 34ch; text-wrap: pretty;
}
.hero-cols { display: grid; grid-template-columns: 1fr; gap: var(--space-5); align-items: end; }
@media (min-width: 860px) { .hero-cols { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--space-6); align-items: start; } }
@media (min-width: 720px) { .hero { padding-block: var(--space-8) var(--space-7); } }

/* ============================================================
   BIG MOMENT (confirmation / 404)
   ============================================================ */
.moment { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--space-5); padding-block: var(--space-7); }
.moment h1 { font-size: var(--step-5); font-weight: var(--weight-bold); max-width: 20ch; }
.moment .lede { font-size: var(--step-1); color: var(--color-text-muted); max-width: 54ch; line-height: var(--leading-body); text-wrap: pretty; }

/* ============================================================
   PERSONAL PAGE
   ============================================================ */
.welcome { display: flex; flex-direction: column; gap: var(--space-3); padding-block: var(--space-6) var(--space-5); }
.welcome h1 { font-size: var(--step-4); font-weight: var(--weight-bold); }
.welcome h1 .name { color: var(--color-accent); }
.countdown { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.countdown div { display: flex; flex-direction: column; gap: 2px; }
.countdown dt, .countdown .k { font-size: var(--step-000); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--color-text-muted); }
.countdown dd { margin: 0; }
.welcome h1 .caret { width: .38em; height: .6em; vertical-align: -.02em; }
.countdown .v { font-size: var(--step-2); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }

/* ============================================================
   COMPONENT SHEET (documentation page only)
   ============================================================ */
.spec { display: flex; flex-direction: column; gap: var(--space-6); }
.spec-group { display: flex; flex-direction: column; gap: var(--space-4); }
.spec-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
.spec-label { font-size: var(--step-000); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--color-text-faint); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.swatch { border: 1px solid var(--color-line); border-radius: var(--radius-md); overflow: hidden; }
.swatch .chip { height: 56px; }
.swatch .meta { padding: 8px 10px; font-size: var(--step-000); color: var(--color-text-muted); display: flex; flex-direction: column; gap: 2px; }
.swatch .meta b { color: var(--color-text); font-weight: var(--weight-medium); letter-spacing: .02em; }

/* ============================================================
   MOTION PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .caret, .badge-pending::after, .kv .pending::after { opacity: 1; }
}
