/* HC² site styles. Plain CSS, no framework.
   Colors live in the tokens below; dark mode overrides them. */

:root {
  --crimson: #A51C30;
  --crimson-hover: #8A1728;
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-2: #F3F2EE;
  --text: #14171D;
  --muted: #555B66;
  --border: #E3E0D9;
  --accent-text: #A51C30;
  --accent-soft: rgba(165, 28, 48, 0.07);
  --grid-dot: rgba(20, 23, 29, 0.09);
  --mark-bg: #FFF0B3;
  --mark-text: #5A4300;
  --mark-border: #E8C95A;
  --focus: #A51C30;
  --header-bg: rgba(250, 250, 248, 0.85);
  --shadow: 0 1px 2px rgba(20, 23, 29, 0.04), 0 8px 24px rgba(20, 23, 29, 0.06);
  /* logo component colors */
  --hc3-ink: #14171D;
  --hc3-aux: #D5D0C8;
  --hc3-bg: var(--bg);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --radius: 12px;
  --header-h: 64px;
  --wrap: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0E1014;
  --surface: #161920;
  --surface-2: #1C2028;
  --text: #ECEDEF;
  --muted: #A3A9B4;
  --border: #2A2F39;
  --accent-text: #F27084;
  --accent-soft: rgba(242, 112, 132, 0.09);
  --grid-dot: rgba(236, 237, 239, 0.07);
  --mark-bg: #3B300D;
  --mark-text: #FFDD7A;
  --mark-border: #7A6320;
  --focus: #F27084;
  --header-bg: rgba(14, 16, 20, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --hc3-ink: #FFFFFF;
  --hc3-aux: #3E4450;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
sup { line-height: 0; font-size: 0.68em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--crimson); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* hide config-driven content until it has been filled in (fallback reveal in <head>) */
html.js:not(.ready) main { visibility: hidden; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section--alt { background: var(--surface-2); }
.section--compact { padding: clamp(40px, 6vw, 64px) 0; }
.section--compact .section-head { margin-bottom: 24px; }

/* placeholders: anything still in [BRACKETS] */
mark.tbd {
  background: var(--mark-bg);
  color: var(--mark-text);
  border: 1px dashed var(--mark-border);
  border-radius: 5px;
  padding: 0 0.3em;
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 500;
  white-space: normal;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* eyebrow / section labels with a code feel */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.eyebrow::before { content: "// "; opacity: 0.6; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--accent-text);
  vertical-align: 0.15em;
  white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  font: 600 1rem/1 var(--font-sans);
  border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.92rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn .arrow { font-family: var(--font-mono); transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
a.is-placeholder { text-decoration: none; cursor: not-allowed; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: opacity .25s;
}
.site-header.is-transparent::before { opacity: 0; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text); text-decoration: none; margin-right: auto;
}
.brand-slot { display: block; width: 58px; height: 32px; flex: none; }
.brand-slot hc3-logo-intro { width: 58px; }
.brand-word { transition: opacity .25s, transform .25s; }
.site-header.is-undocked .brand-word { opacity: 0; transform: translateX(-6px); }

.wordmark { font-family: var(--font-sans); font-weight: 800; letter-spacing: -0.03em; font-size: 1.35rem; line-height: 1; white-space: nowrap; }
.site-header .wordmark { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
/* the name only shows in the header when there's room next to the nav */
@media (min-width: 1021px) and (max-width: 1239px), (max-width: 559px) { .site-header .brand-word { display: none; } }

.fly-logo {
  position: absolute; left: 0; top: 0; z-index: 1;
  pointer-events: none; visibility: hidden;
  will-change: left, top, width;
}
.fly-logo hc3-logo-intro { width: 100%; display: block; }
.fly-logo.is-placed { visibility: visible; }
.menu-open .fly-logo:not(.is-docked) { opacity: 0; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 500;
  padding: 8px 10px; border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--crimson); border-radius: 0; }
.nav sup { font-size: 0.68em; line-height: 0; margin-left: 1px; }

/* dropdowns */
.nav-group { position: relative; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font: inherit; color: var(--muted); font-size: 0.93rem; font-weight: 500;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.nav-toggle:hover, .nav-group.is-open .nav-toggle { color: var(--text); background: var(--accent-soft); }
.nav-toggle.is-current { color: var(--text); }
.nav-toggle .chevron { width: 14px; height: 14px; transition: transform .2s; }
.nav-group.is-open .chevron { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; z-index: 5;
  display: none; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* hover bridge */
.nav-group.is-open .nav-menu { display: flex; }
@media (hover: hover) and (min-width: 1021px) { .nav-group:hover .nav-menu { display: flex; } .nav-group:hover .chevron { transform: rotate(180deg); } }
.nav-menu a { white-space: nowrap; }
.nav-menu a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--crimson); border-radius: 0 8px 8px 0; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }

@media (max-width: 1020px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 20px 20px; box-shadow: var(--shadow);
    display: none; max-height: calc(100vh - var(--header-h)); overflow: auto;
  }
  .menu-open .nav { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--crimson); padding-left: 14px; }
  /* in the phone menu, dropdowns are shown as labelled groups that are always expanded */
  .nav-toggle {
    width: 100%; padding: 18px 8px 6px; border-radius: 0; background: transparent !important; cursor: default;
    font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  }
  .nav-toggle .chevron { display: none; }
  .nav-menu, .nav-group.is-open .nav-menu {
    position: static; display: flex; min-width: 0; padding: 0; gap: 0;
    border: 0; border-radius: 0; box-shadow: none; background: transparent;
  }
  .nav-menu::before { display: none; }
  .menu-open .site-header::before { opacity: 1; }
}
.nav .nav-register { display: none; }
@media (max-width: 420px) { .header-actions .btn { display: none; } .nav .nav-register { display: block; color: var(--accent-text); font-weight: 700; } }

/* ---------- page heads (inner pages) ---------- */
.page-head { padding: calc(var(--header-h) + 56px) 0 48px; border-bottom: 1px solid var(--border); background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px); background-size: 22px 22px; }
.page-head h1 { margin-bottom: 0.3em; }
.page-head .lede { margin: 0; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 24px) 0 72px;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  text-align: center;
}
.hero::after { /* fade the dot grid out at the bottom */
  content: ""; position: absolute; inset: auto 0 0 0; height: 160px;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero-logo-anchor { width: min(400px, 72vw); aspect-ratio: 290 / 160; margin-bottom: 28px; }
.hero h1 { font-size: clamp(2.4rem, 6.6vw, 4.6rem); letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 0.15em; }
.hero .tagline { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 46ch; margin: 10px auto 28px; }
.prize-line {
  display: inline-flex; align-items: baseline; gap: 10px; margin: 18px 0 0;
  padding: 6px 18px 7px; border: 1px solid var(--crimson); border-radius: 999px; background: var(--accent-soft);
  font-family: var(--font-mono); font-size: clamp(0.85rem, 1.6vw, 0.95rem); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.deadline-note {
  margin: 16px 0 0; font-family: var(--font-mono); font-size: 0.88rem; color: var(--accent-text); letter-spacing: 0.02em;
}
.prize-amount { font-size: clamp(1.25rem, 2.6vw, 1.55rem); font-weight: 800; letter-spacing: -0.01em; color: var(--accent-text); }
.hero .btn-row { justify-content: center; }
.hero-meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; z-index: 1; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); text-decoration: none;
}
.scroll-cue span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* staged entrance after the logo animation */
.reveal { opacity: 0; transform: translateY(12px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal-1 { animation-delay: 1.9s; } .reveal-2 { animation-delay: 2.1s; }
.reveal-3 { animation-delay: 2.3s; } .reveal-4 { animation-delay: 2.5s; } .reveal-5 { animation-delay: 2.9s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- countdown ---------- */
.countdown {
  display: inline-block; margin: 6px 0 30px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; max-width: 100%;
}
.countdown-bar {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
}
.countdown-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: inline-block; }
.countdown-bar i:first-child { background: var(--crimson); }
.countdown-bar span { margin-left: 6px; }
.countdown-body { padding: 14px 20px 16px; }
.countdown-units { display: flex; gap: clamp(12px, 3vw, 26px); justify-content: center; }
.cd-unit { text-align: center; min-width: 3.2ch; }
.cd-num { display: block; font-family: var(--font-mono); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.cd-sep { font-family: var(--font-mono); font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--muted); opacity: .5; line-height: 1.3; }
.countdown-caption { margin-top: 10px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); text-align: center; }
.countdown-live { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 600; text-align: center; }
.prompt { color: var(--accent-text); }

/* ---------- section heading ---------- */
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; position: relative;
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .card-icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); margin-bottom: 16px;
  font-family: var(--font-mono); font-weight: 700;
}
.card .card-icon svg { width: 22px; height: 22px; }
.card-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

/* round cards on home / format */
.round { display: flex; flex-direction: column; gap: 6px; }
.round-tag { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-text); }
.round h3 { font-size: 1.45rem; margin: 0; }
.round-date { font-weight: 600; font-size: 1.05rem; }
.round dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 0.95rem; }
.round dt { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); padding-top: 2px; }
.round dd { margin: 0; }
.rounds { position: relative; }
@media (min-width: 760px) {
  .rounds .round:first-child::after { /* connector arrow between the two rounds */
    content: "→"; position: absolute; right: -22px; top: 50%; transform: translate(50%, -50%);
    font-family: var(--font-mono); color: var(--muted); background: var(--bg); padding: 4px; z-index: 1;
  }
}

/* stat tiles (format + register pages) */
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.stat {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  border-top: 3px solid var(--crimson);
}
.stat-value { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.stat-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* numbered ranking steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li {
  counter-increment: step; position: relative; padding: 20px 22px 20px 74px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 22px; top: 20px;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem;
}
.steps h3 { margin: 0 0 4px; font-size: 1.1rem; }
.steps p { margin: 0; }
.split .section-head { margin-bottom: 24px; }

.problem-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.problem-counts > div { display: flex; flex-direction: column; gap: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2);
}

/* prizes panel (format page) */
.prize-panel {
  display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between;
  padding: clamp(28px, 5vw, 48px); border: 1px solid var(--border); border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 60%), var(--surface);
}
.prize-panel > div { max-width: 640px; }
.prize-panel h2 { margin: 6px 0 10px; }
.prize-panel p { margin: 0; }
.prize-big { color: var(--accent-text); font-family: var(--font-mono); }

/* allowed / not allowed (rules page) */
.contents { display: contents; }
.rule-card h3 { display: flex; align-items: center; gap: 10px; }
.rule-card h3::before {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 1rem; font-weight: 800;
}
.rule-card--yes h3::before { content: "✓"; background: rgba(34, 140, 84, 0.12); color: #1F8A52; }
.rule-card--no h3::before { content: "✕"; background: var(--accent-soft); color: var(--accent-text); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 12px 0; border-top: 1px solid var(--border); }
.checklist li:last-child { padding-bottom: 0; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 30px 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--crimson);
}
.timeline .t-date { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-text); }
.timeline .t-title { font-weight: 700; font-size: 1.1rem; margin: 2px 0; }
.timeline .t-detail { color: var(--muted); margin: 0; }
.timeline .t-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px;
}
.timeline li::before { top: 22px; }
.timeline::before { top: 24px; bottom: 24px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* ---------- prose pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--crimson);
  background: var(--surface); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5em 0;
}
.callout p:last-child { margin: 0; }
.two-col { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: 0.92rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc-title { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; } }

/* key-value fact list */
.facts { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; border-top: 1px solid var(--border); margin: 0; }
.facts dt, .facts dd { padding: 12px 0; border-bottom: 1px solid var(--border); margin: 0; }
.facts dt { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); padding-right: 16px; padding-top: 14px; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 650; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 1.3rem; color: var(--accent-text); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--muted); max-width: 68ch; }

/* ---------- forms ---------- */
.form { display: grid; gap: 22px; max-width: 720px; }
.form fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 0; display: grid; gap: 18px; background: var(--surface); }
.form legend { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-text); padding: 0 8px; }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); }
.req { color: var(--accent-text); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #D93848; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.choice input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--crimson); flex: none; }
.radio-row { display: flex; gap: 24px; flex-wrap: wrap; }
.form-status { padding: 14px 18px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.form-status:empty { display: none; }
.form-status.ok { border-color: #2E8B57; }
.form-status.err { border-color: #D93848; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.signup { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.signup input { flex: 1 1 240px; }

/* ---------- sponsors ---------- */
.sponsor-tier + .sponsor-tier { margin-top: 36px; }
.sponsor-tier h3 { font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sponsor-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.sponsor-grid a, .sponsor-grid span {
  display: grid; place-items: center; width: 200px; height: 100px; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.sponsor-grid img { max-width: 100%; max-height: 64px; object-fit: contain; }
.sponsor-grid .logo-dark { display: none; }
:root[data-theme="dark"] .sponsor-grid .has-dark .logo-light { display: none; }
:root[data-theme="dark"] .sponsor-grid .has-dark .logo-dark { display: block; }
.cta-panel {
  border: 1px solid var(--border); border-radius: 18px; padding: clamp(28px, 5vw, 56px);
  background: var(--surface);
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px); background-size: 22px 22px;
}

/* ---------- team ---------- */
.team-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.person { text-align: left; }
.avatar {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius); object-fit: cover; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 12px;
  font-family: var(--font-mono); font-size: 2.4rem; color: var(--muted);
}
.person .name { font-weight: 700; }
.person .role { color: var(--muted); font-size: 0.92rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 36px; background: var(--surface-2); font-size: 0.93rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr; align-items: start; }
.footer-org { color: var(--muted); max-width: 46ch; }
.footer-org strong { color: var(--text); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
.socials { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.socials a, .socials span {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); color: var(--text); background: var(--surface);
}
.socials a:hover { border-color: var(--text); }
.socials span { opacity: 0.45; cursor: not-allowed; }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .scroll-cue { display: none; }
  .page-head, .hero { padding-top: 24px; }
}
