/* ============================================================================
   elysasecret.com — Elysa's Secret, Nordic AI Cup 2026
   ============================================================================
   Dark single theme. Every colour, font, spacing value and radius is a token
   on :root. Component rules reference tokens, never literals, so the whole
   site re-skins from the block below.

   Contrast (WCAG AA, computed from these exact token values — AA needs 4.5:1):
     --ink        on --canvas   16.24:1
     --ink        on --surface-2 14.48:1
     --ink-muted  on --canvas    7.52:1
     --ink-muted  on --surface   7.09:1
     --ink-muted  on --surface-2  6.71:1
     --accent     on --canvas   11.86:1
     --accent     on --surface  11.19:1
     --warn       on --canvas   10.66:1
     --canvas     on --accent   11.86:1   (pressed language button)
     --mascot     on --canvas    6.62:1   (decorative, needs 3:1)
   ============================================================================ */

:root {
  /* surfaces */
  --canvas:     #0B0C0E;
  --surface:    #121417;
  --surface-2:  #171A1E;

  /* foreground */
  --ink:        #E8EAED;
  --ink-muted:  #9BA1AA;
  --line:       #23272C;

  /* signal colours */
  --accent:     #5CE1A0;  /* phosphor green — the team's own numbers, successes */
  --warn:       #F2B455;  /* amber — reserved for the unflattering numbers       */
  --dk:         #C8102E;  /* Danish red — used exactly once, the DK chip         */

  /* mascot */
  --mascot:      #E07A5B;
  --mascot-line: #F6F2ED;
  --mascot-eye:  #16120F;
  --mascot-size: 147px;

  /* type */
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* layout */
  --page: 72rem;
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 2px;
  --gutter: 1.25rem;
}

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

body, h1, h2, h3, p, dl, dd, figure, blockquote, ol, ul {
  margin: 0;
}
ol, ul { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; }

/* A component's own `display` rule beats the user agent's [hidden] rule, so
   setting .hidden = true silently does nothing. This makes the attribute win
   everywhere — it was leaving a caret blinking after typing had finished, and
   would have left tab strips visible when they should have been hidden. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* rail (2.5rem) + header (3.5rem) + a little air, so #anchors don't land
     underneath the sticky topbar */
  scroll-padding-top: 6.25rem;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; font-weight: 500; letter-spacing: -0.015em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ------------------------------------------------------------- layout --- */
.container {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section__heading { margin-bottom: 2.25rem; max-width: 60ch; }

.section__title {
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  margin-bottom: 0.6rem;
}

.section__sub {
  color: var(--ink-muted);
  font-size: clamp(0.92rem, 1.6vw, 1.02rem);
  max-width: 58ch;
}

.section__title::before {
  content: "";
  display: block;
  width: 2rem;
  border-top: 2px solid var(--accent);
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------ buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn--primary { background: var(--accent); color: var(--canvas); border-color: var(--accent); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); text-decoration: none; }
.btn--secondary { background: transparent; color: var(--ink); }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: progress; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--canvas);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------- status rail ---
   The rail and the header share .topbar, which is the only sticky element.
   That keeps their combined height predictable for scroll-padding, and means
   the rail wrapping on a narrow screen can never slide under the header. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--canvas);
}

.rail {
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}
.rail__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  min-height: 2.5rem;
  flex-wrap: nowrap;
  padding-block: 0.35rem;
}
/* one line always, scrollable if it overflows — a status line that reflows to
   three rows is worse than one you can swipe */
.rail__items {
  display: flex;
  gap: 1.15rem;
  flex-wrap: nowrap;
  align-items: baseline;
  min-width: 0;
  overflow-x: auto;
}
.rail__item { display: inline-flex; gap: 0.4rem; align-items: baseline; white-space: nowrap; }
.rail__key { color: var(--ink-muted); }
.rail__value { font-variant-numeric: tabular-nums; color: var(--ink); }
.rail__item--good .rail__value { color: var(--accent); }
.rail__item--warn .rail__value { color: var(--warn); }
.rail__right { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; flex: 0 0 auto; }
.rail__countdown { color: var(--ink-muted); white-space: nowrap; }

.lang { display: inline-flex; gap: 0.25rem; }
.lang__btn {
  font: inherit;
  color: var(--ink-muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.1rem 0.45rem;
  cursor: pointer;
}
.lang__btn:hover { color: var(--ink); border-color: var(--ink-muted); }
.lang__btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--canvas);
  border-color: var(--accent);
}

/* -------------------------------------------------------------- header --- */
.site-header {
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
}
.site-header__brand { display: flex; align-items: center; gap: 0.65rem; color: var(--ink); }
.site-header__brand:hover { text-decoration: none; }
.site-header__logo {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex: 0 0 auto;
}
.site-header__logo img { width: 100%; height: 100%; object-fit: contain; }
.site-header__name { font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: -0.01em; }
.site-header__nav { display: none; }
.site-header__cta { display: none; margin-left: auto; }

.site-header__toggle {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
}
.site-header__toggle-bar { display: block; width: 18px; height: 1px; background: var(--ink); }

.site-header--open .site-header__nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 100% 0 auto 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  padding: 1rem var(--gutter) 1.5rem;
  gap: 0.9rem;
}
.site-header--open .site-header__cta { display: block; margin: 0; }
.site-header--open .site-header__cta .btn { width: 100%; text-align: center; }

@media (min-width: 64em) {
  .site-header__toggle { display: none; }
  .site-header__nav { display: flex; gap: 1.6rem; margin-left: auto; }
  .site-header__nav a {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
  }
  .site-header__nav a:hover { color: var(--accent); text-decoration: none; }
  .site-header__cta { display: block; margin-left: 0; }
}

/* ---------------------------------------------------------------- hero --- */
.section--hero { padding-block: clamp(2.5rem, 9vh, 6rem) var(--section); }
.hero__inner { max-width: 62rem; }
.hero__prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
}
.hero__sigil { color: var(--accent); }
.caret {
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  background: var(--accent);
  vertical-align: -0.18em;
  margin-left: 0.15ch;
}
.hero__headline {
  font-size: clamp(2.3rem, 7.5vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}
.hero__sub {
  color: var(--ink-muted);
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  max-width: 52ch;
  margin-bottom: 2.5rem;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.75rem;
  margin-bottom: 2.5rem;
}
.hero__stat { min-width: 8rem; }
.hero__stat-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-muted);
}
.hero__stat-value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0 0.1rem;
}
.hero__stat-sub { font-size: 0.8rem; color: var(--ink-muted); max-width: 22ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__reveal { opacity: 0; transform: translateY(0.6rem); transition: opacity 0.5s ease, transform 0.5s ease; }
.hero__reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------- the four --- */
.team__grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 48em) { .team__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 76em) { .team__grid { grid-template-columns: repeat(4, 1fr); } }

.member {
  background: var(--surface);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.member__prompt { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-muted); }
.member__sigil { color: var(--accent); }
/* fixed-height head + badge slots so the metric rows align across all four
   panes; only the log then varies, and it bottom-aligns via margin-top: auto */
/* fixed-height head slot: a two-line name (Javier's) must not push its log out
   of line with the other three */
.member__head { display: flex; gap: 0.8rem; align-items: center; min-height: 3.6rem; }
.member__monogram {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.55rem;
  background: var(--canvas);
  flex: 0 0 auto;
}
.member__name { font-size: 0.98rem; line-height: 1.25; }
.member__task { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); margin-top: 0.15rem; }
/* text runs straight down from the header. It is deliberately NOT
   bottom-aligned: with four panes of different lengths, pushing each log to the
   bottom opened a void above the short ones and read as a broken row. */
.member__log { font-size: 0.85rem; color: var(--ink-muted); }
/* pinned to the bottom of the pane, so the four links form one row rather than
   sitting wherever each person's description happens to end */
.member__link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  align-self: flex-start;
  margin-top: auto;
  padding-top: 1rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.2;
}
.member__link:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

/* --------------------------------------------------------- the board --- */
.board__tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.board__tab {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 1rem;
}
.board__tab:hover { color: var(--ink); }
.board__tab[aria-selected="true"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }

.board__caption {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-bottom: 0.8rem;
}
.board__scroll { overflow-x: auto; border: 1px solid var(--line); }
.board__table-el { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 46rem; }
.board__table-el th,
.board__table-el td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.board__table-el tbody tr:last-child td,
.board__table-el tbody tr:last-child th { border-bottom: 0; }
.board__table-el thead th {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  font-weight: 500;
  white-space: nowrap;
}
.board__row--us { background: var(--surface-2); }
.board__row--us .board__points { color: var(--accent); }
.board__row--us .board__total { color: var(--accent); }
.board__rank { font-family: var(--font-mono); color: var(--ink-muted); width: 3.25rem; }
.board__team span { display: block; }
.board__team small { color: var(--ink-muted); font-size: 0.7rem; }
.board__score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.board__points { display: block; }
.board__raw { display: block; color: var(--ink-muted); font-size: 0.66rem; }
.board__total { font-size: 1.05rem; }
.board__gap {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--warn);
  border-left: 2px solid var(--warn);
  padding-left: 0.7rem;
}

/* ----------------------------------------------------------- the run --- */
.run__tabs { margin-bottom: 1.5rem; }
.run__task-sub { font-size: 0.88rem; color: var(--ink-muted); max-width: 62ch; margin-bottom: 1.5rem; }
.run__figure { margin: 0 0 2rem; }
.run__svg { width: 100%; height: auto; display: block; }
.run__gridline { stroke: var(--line); stroke-width: 1; }
.run__axis { fill: var(--ink-muted); font-family: var(--font-mono); font-size: 11px; }
.run__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.run__dot--local { fill: var(--canvas); stroke: var(--ink-muted); stroke-width: 2; }
.run__dot--validation { fill: var(--accent); stroke: var(--canvas); stroke-width: 2; }
/* the graded evaluation is amber, the same colour used for every other number
   on this site that is not flattering — the point is that it reads differently
   from the green validation points at a glance */
.run__dot--evaluated { fill: var(--warn); stroke: var(--canvas); stroke-width: 2; }
.run__value {
  fill: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.run__legend {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 48em) { .run__legend { grid-template-columns: repeat(2, 1fr); } }
/* seven points in two columns would leave an empty cell that reads as a
   missing entry — let the odd one out span the full width instead */
@media (min-width: 48em) {
  .run__legend-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.run__legend-item {
  background: var(--surface);
  padding: 0.65rem 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem 0.7rem;
  align-items: baseline;
  font-size: 0.8rem;
}
.run__legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.run__legend-item--local .run__legend-dot { background: var(--canvas); border: 2px solid var(--ink-muted); }
.run__legend-item--validation .run__legend-dot { background: var(--accent); }
.run__legend-item--evaluated .run__legend-dot { background: var(--warn); }
.run__legend-item--evaluated .run__legend-label,
.run__legend-item--evaluated .run__legend-value { color: var(--warn); }
.run__legend-label { color: var(--ink); }
.run__legend-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.run__legend-note { grid-column: 2 / -1; color: var(--ink-muted); font-size: 0.74rem; }
.run__caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.85rem;
}
.run__closing { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.run__closing-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--warn);
}
.run__closing-value {
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  color: var(--warn);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.run__closing-note { max-width: 54ch; color: var(--ink-muted); font-size: 0.86rem; margin-top: 0.5rem; }
.run__closing-median { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-muted); margin-top: 0.9rem; }
.run__closing-median span { color: var(--ink); }

/* --------------------------------------------------------- how we work --- */
.loop {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.loop__step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.32rem 0.68rem;
  color: var(--ink-muted);
  background: var(--surface);
}
.loop__step:last-child { color: var(--accent); border-color: var(--accent); }
.loop__step:not(:last-child)::after {
  content: "→";
  color: var(--line);
  margin-left: 0.75rem;
}
.about__text { max-width: 64ch; color: var(--ink-muted); font-size: 0.95rem; }

/* ------------------------------------------------------------- learned --- */
.features__grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 48em) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 70em) { .features__grid { grid-template-columns: repeat(3, 1fr); } }
/* Five cards in a 3-column grid leave a bare cell on the last row that reads as
   a card that failed to render. Let the odd one out span what is left. */
@media (min-width: 48em) and (max-width: 69.99em) {
  .features__grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 70em) {
  .features__grid > :last-child:nth-child(3n + 2) { grid-column: span 2; }
}
.feature-card { background: var(--surface); padding: 1.5rem; }
.feature-card__icon { color: var(--accent); margin-bottom: 0.85rem; }
.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card__title { font-size: 1rem; margin-bottom: 0.5rem; }
.feature-card__text { color: var(--ink-muted); font-size: 0.87rem; }

/* --------------------------------------------------------------- doors --- */
.doors {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
@media (min-width: 48em) { .doors { grid-template-columns: repeat(2, 1fr); } }
.door { background: var(--surface); padding: 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; }
.door__title { font-size: 1.02rem; }
.door__text { color: var(--ink-muted); font-size: 0.87rem; }
.door__cta { align-self: flex-start; margin-top: auto; font-size: 0.76rem; }

/* ------------------------------------------------------------- contact --- */
/* ------------------------------------------------------------- contact ---
   One constrained column, everything flush to the container's left edge. The
   earlier two-column version put a single email address beside a tall form,
   which left a large empty column and read as off-centre; and the mail icon
   indented the address so it no longer lined up with the section heading. */
.contact__inner { display: grid; gap: 1.75rem; max-width: 40rem; }
.contact__info { display: flex; flex-direction: column; gap: 0.3rem; }
.contact__info-item strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.contact__info-item a {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  word-break: break-word;
}

.contact__form { display: flex; flex-direction: column; gap: 1rem; }
/* a full-width button reads as a banner, not a button */
.contact__form .btn { align-self: flex-start; min-width: 12rem; text-align: center; }

/* Honeypot field. Moved off-screen rather than display:none: some bots skip
   fields that are not rendered, and the point is for them to find this one. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field > span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--ink-muted) 70%, transparent); }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 7rem; }
.field--consent { flex-direction: row; align-items: flex-start; gap: 0.6rem; }
.field--consent input { width: auto; margin-top: 0.25rem; }
.field--consent span {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.form-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border-left: 2px solid var(--line);
  padding-left: 0.7rem;
}
.form-status--success { color: var(--accent); border-color: var(--accent); }
.form-status--error { color: var(--warn); border-color: var(--warn); }

/* -------------------------------------------------------------- footer --- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; }
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.footer__brand { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__logo { display: flex; align-items: center; gap: 0.65rem; color: var(--ink); }
.footer__logo:hover { text-decoration: none; }
.footer__tagline { color: var(--ink-muted); font-size: 0.8rem; max-width: 44ch; }
.footer__socials { display: flex; gap: 0.75rem; }
.footer__socials a { color: var(--ink-muted); }
.footer__socials a:hover { color: var(--accent); }
.footer__socials svg { width: 20px; height: 20px; }
.footer__bottom {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* -------------------------------------------------------------- thanks ---
   The post-submission page. One screen, no JS, no nav — it exists so the form
   service has somewhere to send people that is still ours. */
.thanks {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 1rem;
  max-width: 34rem;
  margin-inline: auto;
  padding: var(--gutter);
}
.thanks__prompt { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
.thanks__title { font-size: clamp(1.8rem, 6vw, 2.8rem); letter-spacing: -0.03em; }
.thanks__text { color: var(--ink-muted); }
.thanks__back { justify-self: start; margin-top: 0.75rem; }

/* -------------------------------------------------------------- mascot ---
   Positioned entirely by transform: translate(x, y) scale(sx, sy). One
   mechanism covers the entrance, the idle, dragging and the return home, so
   nothing fights between CSS `right/bottom` and the animation.

   It is draggable, so unlike the rest of the decorative layer it DOES take
   pointer events. It is small, in a corner, and aria-hidden, so the cost is
   bounded — but it is a deliberate reversal of the earlier
   pointer-events: none, made only because dragging was requested. */
.mascot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  width: var(--mascot-size);
  height: calc(var(--mascot-size) * 0.897);
  pointer-events: auto;
  touch-action: none;      /* let pointermove track a drag instead of scrolling */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}
.mascot--held { cursor: grabbing; }
.mascot__svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mascot__inner { transform-box: fill-box; transform-origin: 50% 78%; }
.mascot__body {
  fill: var(--mascot);
  stroke: var(--mascot-line);
  stroke-width: 3;
  stroke-linejoin: round;
}
.mascot__eye { fill: var(--mascot-eye); }
.mascot__eyes { transform-origin: 50% 50%; transform-box: fill-box; }

/* --- parts that only exist in one state --------------------------------- */
.mascot__arm,
.mascot__beret,
.mascot__eyes-uwu,
.mascot__eyes-angry { display: none; }

.mascot__arm {
  fill: var(--mascot);
  stroke: var(--mascot-line);
  stroke-width: 3;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: 0% 50%;   /* the shoulder is the box's left edge */
}
.mascot__uwu { fill: none; stroke: var(--mascot-eye); stroke-width: 5; stroke-linecap: round; }
.mascot__iris { fill: #E01B22; }
.mascot__brow { stroke: var(--mascot-eye); stroke-width: 6; stroke-linecap: round; }
.mascot__beret-crown { fill: #4C5527; stroke: var(--mascot-line); stroke-width: 3; stroke-linejoin: round; }
.mascot__beret-band { fill: #2B2F1A; }
.mascot__beret-badge { fill: #D9A441; }

/* --- state switches ------------------------------------------------------ */
.mascot--uwu .mascot__eyes-default { display: none; }
.mascot--uwu .mascot__eyes-uwu { display: block; }
/* locked in: bloodshot eyes UNDER the chevrons, so the pupils sit on red */
.mascot--locked .mascot__eyes-angry { display: block; }
.mascot--salute .mascot__beret { display: block; }
.mascot--wave .mascot__arm,
.mascot--salute .mascot__arm { display: block; }

/* --- speech -------------------------------------------------------------- */
.mascot__speech {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 46;
  max-width: 15rem;
  margin: 0;
  padding: 0.4rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--accent);
  white-space: pre-wrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform, opacity;
}
.mascot__speech.is-on { opacity: 1; }
.is-booting .mascot__speech { display: none; }

/* --------------------------------------------------------------- final ---
   The countdown. It is revealed by JS after the command above it types out;
   the hidden state is applied inline by JS rather than in CSS, so with JS
   disabled the clock is simply visible instead of missing. */
.final__cmd {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
.final__clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 1.25rem;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.final__unit { background: var(--surface); padding: 1.4rem 0.75rem; text-align: center; }
.final__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 7vw, 3.75rem);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.final__label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.final__venue { font-size: 0.85rem; color: var(--ink-muted); max-width: 68ch; }

@media (max-width: 30em) { :root { --mascot-size: 106px; } }
@media (max-height: 24em) { .mascot { display: none; } }

/* ---------------------------------------------------------------- boot ---
   A full-viewport terminal that owns the screen until it finishes. The rest of
   the page is hidden while it runs, so the first thing anyone sees is a machine
   starting up rather than a page that has already arrived.

   display:none unless <html> carries .is-booting — a class an inline script
   sets before first paint. With JS disabled the class is never added and the
   overlay can never cover the page. */
.boot { display: none; }
.boot--shown {
  display: grid;
  align-content: center;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--canvas);
  padding: var(--gutter);
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.6vw, 0.9rem);
}
.boot__screen { width: 100%; max-width: var(--page); margin-inline: auto; min-height: 8rem; }
.boot__log { display: flex; flex-direction: column; gap: 0.32rem; }
.boot__line { color: var(--ink-muted); display: flex; align-items: baseline; gap: 0.5rem; }
.boot__sigil { color: var(--accent); }
.boot__cmd { color: var(--ink); }
.boot__key { color: var(--ink-muted); }
/* the dotted leader is drawn, not typed — it costs nothing and never wraps */
.boot__dots { flex: 1 1 auto; border-bottom: 1px dotted var(--line); transform: translateY(-0.22em); min-width: 1.5rem; }
.boot__status { color: var(--accent); }
.boot__ready { color: var(--accent); margin-top: 0.45rem; }

/* everything behind the terminal, including the chrome and the mascot */
.is-booting .topbar,
.is-booting main,
.is-booting .site-footer,
.is-booting .mascot { visibility: hidden; }
html.is-booting { overflow: hidden; }

/* Exit: the terminal scrolls up and out, the way output leaves a screen —
   deliberately not a fade. */
@media (prefers-reduced-motion: no-preference) {
  .boot--lifting {
    transition: transform 0.75s cubic-bezier(0.55, 0.06, 0.32, 1);
    transform: translateY(-101%);
  }
}

/* ------------------------------------------------------- section unlock ---
   Sections decode in the first time they are reached rather than being fully
   present at load. Each title resolves out of random glyphs and its body
   follows with a short stagger. Everything here is inside the no-preference
   query, so with reduced motion nothing is ever hidden in the first place. */
.section__title { min-height: 1.25em; }

@media (prefers-reduced-motion: no-preference) {
  html.is-ready .section { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
  html.is-ready .section.is-unlocked { opacity: 1; transform: none; }
  html.is-ready .section > .container > * { opacity: 0; transform: translateY(7px); transition: opacity 0.45s ease, transform 0.45s ease; }
  html.is-ready .section.is-unlocked > .container > * { opacity: 1; transform: none; }
  html.is-ready .section.is-unlocked > .container > *:nth-child(2) { transition-delay: 0.07s; }
  html.is-ready .section.is-unlocked > .container > *:nth-child(3) { transition-delay: 0.14s; }
  html.is-ready .section.is-unlocked > .container > *:nth-child(4) { transition-delay: 0.21s; }
}

/* ------------------------------------------------------------------ motion ---
   Every animated behaviour sits behind this query. With reduced motion the
   page is complete and static — nothing below runs at all. */
@media (prefers-reduced-motion: no-preference) {
  .caret { animation: caret-blink 1.05s steps(1) infinite; }

  /* idle: breathe and blink — only when no event or drag owns the mascot */
  .mascot--settled:not(.mascot--busy) .mascot__svg {
    animation: mascot-bob 3.6s ease-in-out infinite;
  }
  .mascot--settled:not(.mascot--busy) .mascot__eyes {
    animation: mascot-blink 5.4s ease-in-out infinite;
  }
  /* dragged: squints and grumbles */
  .mascot--annoyed .mascot__eyes { animation: mascot-squint 0.4s steps(2, end) infinite; }
  .mascot--annoyed .mascot__inner { animation: mascot-grumble 0.38s ease-in-out infinite; }
  /* released: giggling squash, three quick beats */
  .mascot--giggle .mascot__eyes { animation: mascot-giggle-eyes 0.3s ease-in-out 3; }
  .mascot--giggle .mascot__inner { animation: mascot-giggle-body 0.3s ease-in-out 3; }

  /* the four idle events */
  .mascot--wave .mascot__arm { animation: mascot-wave 0.85s ease-in-out infinite; }
  .mascot--wave .mascot__svg { animation: mascot-lean 1.9s ease-in-out infinite; }
  .mascot--salute .mascot__arm { transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .mascot--salute .mascot__svg { animation: mascot-stand 0.6s ease-out 1; }
  .mascot--uwu .mascot__svg { animation: mascot-sway 1.9s ease-in-out infinite; }
  .mascot--locked .mascot__svg { animation: mascot-tense 0.14s steps(2, end) infinite; }
  .mascot--locked .mascot__eyes { animation: mascot-strain 0.7s ease-in-out infinite; }

  /* The run's hidden start state is OPT-IN via .is-animated. If motion.js
     never runs, or the observer never fires, the chart is simply complete —
     it is never left blank. */
  .run__svg.is-animated .run__line {
    stroke-dasharray: 2200;
    stroke-dashoffset: 2200;
    transition: stroke-dashoffset 1.6s ease-out;
  }
  .run__svg.is-animated .run__marks { opacity: 0; transition: opacity 0.6s ease 1.2s; }
  .run__svg.is-animated.is-complete .run__line { stroke-dashoffset: 0; }
  .run__svg.is-animated.is-complete .run__marks { opacity: 1; }
}

@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  45% { transform: translateY(-4px) rotate(-0.8deg); }
  55% { transform: translateY(-4px) rotate(0.8deg); }
}

/* Blink: the chevron eyes squash to dashes, then spring back. */
@keyframes mascot-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  93% { transform: scaleY(0.12); }
  96% { transform: scaleY(1); }
}

/* Annoyed: eyes flattened to an unimpressed slit, whole body grumbling. */
@keyframes mascot-squint {
  0%, 100% { transform: scaleY(0.34); }
  50% { transform: scaleY(0.26); }
}
@keyframes mascot-grumble {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50% { transform: rotate(2.5deg) translateY(-1px); }
}

/* Giggling: eyes shut to dashes, body squashes and springs. */
@keyframes mascot-giggle-eyes {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(0.1); }
  70% { transform: scaleY(0.55); }
}
@keyframes mascot-giggle-body {
  0%, 100% { transform: scale(1, 1); }
  40% { transform: scale(1.09, 0.9); }
  70% { transform: scale(0.97, 1.04); }
}

/* The arm poses are static and live OUTSIDE the motion query, so with reduced
   motion a salute still reads as a salute — only the oscillation is dropped. */
.mascot--wave .mascot__arm { transform: rotate(-112deg); }
.mascot--salute .mascot__arm { transform: rotate(-118deg); }

@keyframes mascot-wave {
  0%, 100% { transform: rotate(-98deg); }
  50% { transform: rotate(-134deg); }
}
@keyframes mascot-lean {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.5deg); }
}
@keyframes mascot-stand {
  0% { transform: translateY(3px) scale(1.04, 0.96); }
  60% { transform: translateY(-3px) scale(0.98, 1.03); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes mascot-sway {
  0%, 100% { transform: rotate(-1.6deg) translateY(0); }
  50% { transform: rotate(1.6deg) translateY(-2px); }
}
@keyframes mascot-tense {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0.8px, -0.5px); }
}
/* locked in: the bloodshot eyes strain wide and breathe hard */
@keyframes mascot-strain {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  50% { transform: scaleY(1.18) scaleX(0.94); }
}

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