/* ============================================================
   cGEM 2026 — site stylesheet
   Palette: cool biotech — abyss navy, steel, muted tide teal.
   Type: Space Grotesk (display) · Inter (body) · IBM Plex Mono (labels)
   ============================================================ */

:root {
  /* color tokens */
  --abyss: #0A1420;        /* deepest ground — hero, footer */
  --harbor: #12222F;       /* raised dark surface */
  --hairline-d: rgba(169, 191, 206, 0.16);
  --ink: #16222E;          /* text on light */
  --slate: #46596B;        /* secondary text on light */
  --steel: #5B7A99;        /* cool structural accents */
  --mist: #A9BFCE;         /* secondary text on dark */
  --tide: #2F8177;         /* accent — marks, icons */
  --tide-deep: #175E56;    /* accent — buttons, links (AA on white) */
  --tide-100: #E4EFEC;     /* accent tint fill */
  --steel-100: #E8EEF3;    /* steel tint fill */
  --bone: #F2F5F7;         /* light section ground */
  --paper: #FFFFFF;
  --frost: #DCE5EC;        /* hairlines on light */

  /* chart series (validated ordinal ramp) */
  --chart-r1: #7FB0A7;
  --chart-r2: #1F6D63;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-1: 0 1px 2px rgba(16, 32, 46, 0.05), 0 8px 28px rgba(16, 32, 46, 0.06);
  --wrap: 1140px;
  --header-h: 68px;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--tide-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--tide); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--tide-100); color: var(--ink); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4.5vw, 42px); }

.sr-only {
  position: absolute; 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: 16px; top: -48px; z-index: 200;
  background: var(--paper); color: var(--ink); padding: 10px 16px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-1);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* mono annotation — the "specimen label" voice used everywhere */
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(10, 20, 32, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-d);
}

.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: flex; align-items: center; gap: 11px; color: #F2F5F7; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--mist); flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; letter-spacing: -0.01em; }
.brand-year {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  color: var(--mist); border: 1px solid var(--hairline-d);
  padding: 2px 7px; border-radius: 99px; transform: translateY(1px);
}

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); }
.site-nav a { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); }
.site-nav a:hover { color: #FFFFFF; text-decoration: none; }
.site-nav a[aria-current="page"] { color: #FFFFFF; }
.site-nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 3px;
  background: var(--tide); border-radius: 2px;
}

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bone); color: var(--abyss) !important;
  padding: 9px 18px; border-radius: 99px; font-weight: 500;
}
.nav-cta:hover { background: #FFFFFF; }
.nav-cta::after { content: none !important; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--hairline-d);
  color: var(--mist); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer;
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--abyss); border-bottom: 1px solid var(--hairline-d);
    padding: 8px 0 16px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px clamp(20px, 4.5vw, 42px); }
  .site-nav a[aria-current="page"]::after { width: 28px; }
  .nav-cta { margin: 10px clamp(20px, 4.5vw, 42px) 0; justify-content: center; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 99px; border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 550; font-size: 0.96rem;
  cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { flex: none; }

.btn-solid { background: var(--tide-deep); color: #FFFFFF; }
.btn-solid:hover { background: #124B45; }

.btn-light { background: var(--bone); color: var(--abyss); }
.btn-light:hover { background: #FFFFFF; }

.btn-ghost-d { background: transparent; color: var(--bone); border-color: rgba(169, 191, 206, 0.4); }
.btn-ghost-d:hover { border-color: var(--mist); background: rgba(169, 191, 206, 0.08); }

.btn-ghost { background: transparent; color: var(--tide-deep); border-color: var(--frost); }
.btn-ghost:hover { border-color: var(--tide); background: var(--tide-100); }

/* ---------- hero (index) ---------- */

.hero {
  position: relative;
  background: var(--abyss);
  color: var(--bone);
  min-height: max(640px, 92vh);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}

#helix-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* readability scrim over the canvas, under the copy */
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 20, 32, 0.88) 0%, rgba(10, 20, 32, 0.55) 34%, rgba(10, 20, 32, 0) 62%),
    linear-gradient(0deg, rgba(10, 20, 32, 0.9) 0%, rgba(10, 20, 32, 0) 26%);
}

.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  padding-top: calc(var(--header-h) + clamp(48px, 9vh, 96px));
  padding-bottom: clamp(28px, 5vh, 56px);
  flex: 1; display: flex; flex-direction: column; justify-content: center;
}

.hero-eyebrow { color: var(--mist); display: flex; align-items: center; gap: 12px; }
.hero-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--tide); }

.hero-title {
  margin-top: 20px;
  font-size: clamp(3.4rem, 9.2vw, 6.4rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 0.98;
  color: #F6F9FA;
}
.hero-title .year { color: var(--steel); font-weight: 500; }

.hero-sub {
  margin-top: 20px; max-width: 430px;
  color: var(--mist); font-size: 1.06rem; line-height: 1.55;
}

.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* sequence ruler under the title — pure ornament, sets the genomic register */
.seq-ruler {
  margin-top: 42px; max-width: 520px;
  display: flex; align-items: flex-end; gap: 0;
  color: rgba(169, 191, 206, 0.55);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.32em;
  border-bottom: 1px solid var(--hairline-d);
  padding-bottom: 7px;
  user-select: none;
}
.seq-ruler span { flex: 1; }

/* spec strip — the facts, shown not told */
.spec-strip {
  position: relative; z-index: 2;
  border-top: 1px solid var(--hairline-d);
  background: rgba(10, 20, 32, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.spec-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.spec-cell {
  padding: 20px 22px;
  border-left: 1px solid var(--hairline-d);
  display: flex; flex-direction: column; gap: 5px;
}
.spec-cell:first-child { border-left: none; }
.spec-cell .k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steel); }
.spec-cell .v { font-family: var(--font-display); font-size: 1.22rem; font-weight: 500; color: var(--bone); white-space: nowrap; }

@media (max-width: 860px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .spec-cell { border-top: 1px solid var(--hairline-d); }
  .spec-cell:nth-child(-n+2) { border-top: none; }
  .spec-cell:nth-child(odd) { border-left: none; }
  .spec-cell:nth-child(even) { border-left: 1px solid var(--hairline-d); }
  .spec-cell:last-child { grid-column: 1 / -1; border-left: none; }
}

/* ---------- sequence ticker band ---------- */

.ticker {
  background: var(--harbor);
  border-bottom: 1px solid var(--hairline-d);
  overflow: hidden;
  padding: 11px 0;
}
.ticker-track {
  display: flex; width: max-content; gap: 0;
  animation: ticker-scroll 90s linear infinite;
}
.ticker-track span {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.42em;
  color: rgba(169, 191, 206, 0.5);
  white-space: nowrap; padding-right: 0.42em;
}
.ticker-track b { font-weight: 400; color: rgba(63, 144, 134, 0.85); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- generic section scaffolding ---------- */

.section { padding-block: clamp(64px, 9vw, 108px); background: var(--paper); }
.section.alt { background: var(--bone); }
/* last section before the footer, when it ends on a card of its own */
.section.tight-bottom { padding-bottom: clamp(22px, 2.6vw, 32px); }

.fig-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding-bottom: 18px; margin-bottom: clamp(30px, 4vw, 46px);
  border-bottom: 1px solid var(--frost);
}
.fig-head .tag { color: var(--tide-deep); }
.fig-title { font-size: clamp(1.7rem, 3.4vw, 2.45rem); font-weight: 600; margin-top: 10px; }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- how it works (steps) ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; position: relative; }

.step {
  background: var(--paper); border: 1px solid var(--frost); border-radius: var(--radius);
  padding: 26px 24px 28px; position: relative;
}
.section.alt .step { box-shadow: var(--shadow-1); border-color: transparent; }

.step-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--tide-100); color: var(--tide-deep);
  display: grid; place-items: center; margin-bottom: 18px;
}
.step .tag { color: var(--steel); display: block; }
.step h3 { font-size: 1.22rem; margin-top: 7px; }
.step p { margin-top: 8px; color: var(--slate); font-size: 0.93rem; }
.step-meta {
  margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--slate); background: var(--bone);
  border: 1px solid var(--frost); border-radius: 99px; padding: 4px 10px;
  white-space: nowrap;
}
.section.alt .chip { background: var(--paper); }
.chip svg { color: var(--tide); }

/* connector arrows between steps */
.step::after {
  content: ""; position: absolute; top: 50%; right: -15px; z-index: 2;
  width: 12px; height: 12px;
  border-top: 1.6px solid var(--steel); border-right: 1.6px solid var(--steel);
  transform: translateY(-50%) rotate(45deg);
}
.step:last-child::after { content: none; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step::after { top: auto; bottom: -15px; right: auto; left: 32px; transform: rotate(135deg); }
}

/* ---------- domains row ---------- */

.domain-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
}

.domain-card {
  background: var(--paper); border-radius: var(--radius);
  padding: 22px 22px 24px; box-shadow: var(--shadow-1);
}
.domain-card .d-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--steel-100); color: var(--steel);
}
.domain-card:nth-child(odd) .d-icon { background: var(--tide-100); color: var(--tide-deep); }
.domain-card h3 { font-size: 1.04rem; line-height: 1.3; }
.domain-card .tag { display: block; margin-top: 8px; color: var(--steel); letter-spacing: 0.14em; font-size: 0.64rem; }

/* ---------- prizes ---------- */

.prizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.prize {
  border: 1px solid var(--frost); border-radius: var(--radius);
  padding: 24px; background: var(--paper); position: relative; overflow: hidden;
}
.prize.first { background: var(--abyss); border-color: var(--abyss); color: var(--bone); }
.prize-rank {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.22em;
  color: var(--steel); display: flex; align-items: center; gap: 10px;
}
.prize-rank::after { content: ""; flex: 1; height: 1px; background: var(--frost); }
.prize.first .prize-rank { color: var(--mist); }
.prize.first .prize-rank::after { background: var(--hairline-d); }

.prize h3 { margin-top: 16px; font-size: 1.18rem; line-height: 1.3; }
.prize-perks { margin-top: 16px; display: grid; gap: 9px; }
.prize-perks li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--slate); }
.prize.first .prize-perks li { color: var(--mist); }
.prize-perks svg { flex: none; color: var(--tide); }
.prize.first .prize-perks svg { color: #4E9C92; }

.prize-foot {
  margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px;
}

@media (max-width: 860px) { .prizes { grid-template-columns: 1fr; } }

/* ---------- partners band ---------- */

.partners-band { border-top: 1px solid var(--frost); }
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.partner {
  border: 1px solid var(--frost); border-radius: var(--radius);
  padding: 30px 26px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.partner:hover { border-color: var(--steel); }
.partner .tag { color: var(--tide-deep); font-size: 0.64rem; }
.partner-logo { color: var(--slate); }
.partner-name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--ink); }
.partner-sub { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--steel); text-transform: uppercase; }

@media (max-width: 860px) { .partners { grid-template-columns: 1fr; } }

/* ---------- CTA banner ---------- */

.cta-banner {
  background: var(--abyss); color: var(--bone);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(38px, 6vw, 64px);
  position: relative; overflow: hidden;
}
.cta-banner > * { position: relative; z-index: 2; }
.cta-rings {
  /* faint plasmid rings — the dashed one slowly rotates (SMIL) */
  position: absolute; right: -120px; top: 50%;
  width: 420px; height: 420px;
  transform: translateY(-50%);
  color: rgba(91, 122, 153, 0.35);
  pointer-events: none;
}
.cta-banner .tag { color: var(--mist); }
.cta-banner h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-top: 12px; max-width: 560px; }
.cta-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.cta-deadlines { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.cta-deadlines .chip { background: rgba(18, 34, 47, 0.8); border-color: var(--hairline-d); color: var(--mist); }
.cta-deadlines .chip svg { color: #4E9C92; }

/* ---------- footer ---------- */

.site-footer { background: var(--abyss); color: var(--mist); margin-top: 0; }
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px;
  padding-block: clamp(48px, 6vw, 72px);
}
.footer-brand .brand-name { color: var(--bone); }
.footer-tag { margin-top: 14px; font-size: 0.88rem; max-width: 260px; color: var(--steel); line-height: 1.55; }

.foot-h { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steel); margin-bottom: 16px; }
.foot-list { display: grid; gap: 11px; }
.foot-list a, .foot-list span { color: var(--mist); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 9px; }
.foot-list a:hover { color: #FFFFFF; text-decoration: none; }
.foot-list svg { color: var(--steel); flex: none; }

.footer-bottom {
  border-top: 1px solid var(--hairline-d);
  padding-block: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
  color: var(--steel); text-transform: uppercase;
}

@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- sub-page hero ---------- */

.page-hero {
  background: var(--abyss); color: var(--bone);
  padding-top: calc(var(--header-h) + clamp(44px, 7vw, 84px));
  padding-bottom: clamp(40px, 6vw, 72px);
  position: relative; overflow: hidden;
}
.page-hero .hero-eyebrow { color: var(--mist); }
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 3.9rem); margin-top: 16px; letter-spacing: -0.025em; }
.page-hero .hero-sub { margin-top: 14px; }

.page-hero-art {
  position: absolute; right: clamp(-80px, -2vw, 0px); bottom: -30px;
  color: rgba(91, 122, 153, 0.4); pointer-events: none;
}
@media (max-width: 720px) { .page-hero-art { display: none; } }

/* variant with a spec strip pinned to the bottom: the copy lives in
   .page-hero-body so the strip stays flush against the section edge. */
.page-hero.has-strip { padding-block: 0; }
.page-hero.has-strip .page-hero-body {
  position: relative; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(44px, 7vw, 84px));
  padding-bottom: clamp(24px, 3vw, 36px);
}

/* the art rides on the headline's own line, centred against it */
.hero-head {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(20px, 4vw, 56px);
}
.hero-head h1 { margin-top: 0; }
.hero-head .page-hero-art { position: static; height: auto; flex: 0 1 auto; }

@media (max-width: 900px) { .hero-head .page-hero-art { display: none; } }

.anchor-chips { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.anchor-chips .chip { background: rgba(18, 34, 47, 0.8); border-color: var(--hairline-d); color: var(--mist); }
.anchor-chips a.chip:hover { text-decoration: none; color: #FFFFFF; border-color: var(--steel); }

/* ---------- info: eligibility grid ---------- */

.icon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.icon-cell {
  display: flex; align-items: center; gap: 15px;
  border: 1px solid var(--frost); border-radius: var(--radius-sm);
  background: var(--paper); padding: 17px 18px;
}
.icon-cell .ic {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: var(--tide-100); color: var(--tide-deep);
  display: grid; place-items: center;
}
.icon-cell:nth-child(even) .ic { background: var(--steel-100); color: var(--steel); }
.icon-cell b { display: block; font-weight: 600; font-size: 0.96rem; letter-spacing: -0.01em; }
.icon-cell small { color: var(--slate); font-size: 0.8rem; }

@media (max-width: 900px) { .icon-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .icon-grid { grid-template-columns: 1fr; } }

/* ---------- info: rounds ---------- */

.rounds { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.round-card {
  border: 1px solid var(--frost); border-radius: var(--radius);
  background: var(--paper); padding: 28px; display: flex; flex-direction: column;
}
.round-card.dark { background: var(--abyss); border-color: var(--abyss); color: var(--bone); }
.round-no { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.round-no .tag { color: var(--tide-deep); }
.round-card.dark .round-no .tag { color: #4E9C92; }
.round-badge {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  color: var(--steel); border: 1px solid var(--frost); border-radius: 99px; padding: 4px 10px;
  text-transform: uppercase; white-space: nowrap;
}
.round-card.dark .round-badge { border-color: var(--hairline-d); color: var(--mist); }
.round-card h3 { font-size: 1.5rem; margin-top: 14px; }

.round-specs { margin-top: 22px; border-top: 1px solid var(--frost); }
.round-card.dark .round-specs { border-color: var(--hairline-d); }
.round-specs div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--frost);
  font-size: 0.9rem;
}
.round-card.dark .round-specs div { border-color: var(--hairline-d); }
.round-specs dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel); margin: 0; }
.round-specs dd { margin: 0; font-weight: 550; text-align: right; }
.round-card.dark .round-specs dd { color: var(--bone); }

.round-chips { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 7px; }
.round-card.dark .chip { background: rgba(18, 34, 47, 0.9); border-color: var(--hairline-d); color: var(--mist); }

@media (max-width: 860px) { .rounds { grid-template-columns: 1fr; } }

/* ---------- info: domains grid ---------- */

.domain-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.domain-tile {
  border: 1px solid var(--frost); border-radius: var(--radius-sm);
  background: var(--paper); padding: 20px 16px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 13px;
}
.domain-tile .d-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--steel-100); color: var(--steel);
  display: grid; place-items: center;
}
.domain-tile:nth-child(odd) .d-icon { background: var(--tide-100); color: var(--tide-deep); }
.domain-tile b { font-weight: 600; font-size: 0.9rem; line-height: 1.3; letter-spacing: -0.01em; }

@media (max-width: 960px) { .domain-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 580px) { .domain-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- info: judging chart ---------- */

.judging-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .judging-layout { grid-template-columns: 1fr; } }

.chart-card {
  border: 1px solid var(--frost); border-radius: var(--radius);
  background: var(--paper); padding: 26px;
}

.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--slate); }
.chart-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.chart-legend .k1 { background: var(--chart-r1); }
.chart-legend .k2 { background: var(--chart-r2); }

.crow { display: grid; grid-template-columns: 168px 1fr; gap: 14px; align-items: center; padding: 9px 0; }
.crow + .crow { border-top: 1px solid var(--bone); }
.clabel { font-size: 0.83rem; color: var(--ink); line-height: 1.3; font-weight: 500; }
.cbars { display: grid; gap: 4px; padding-right: 52px; position: relative; }
.cbars::before {
  /* recessive gridlines every 5 pts of 25 */
  content: ""; position: absolute; inset: -4px 52px -4px 0; pointer-events: none;
  background:
    repeating-linear-gradient(to right, transparent 0, transparent calc(20% - 1px), var(--bone) calc(20% - 1px), var(--bone) 20%);
}
.cbar {
  position: relative; height: 13px; border-radius: 0 4px 4px 0;
  width: calc(var(--v) / 25 * 100%);
  min-width: 3px;
}
.cbar.r1 { background: var(--chart-r1); }
.cbar.r2 { background: var(--chart-r2); }
.cbar em {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  font-style: normal; font-family: var(--font-mono); font-size: 0.68rem; color: var(--slate);
  white-space: nowrap;
}

@media (max-width: 580px) {
  .crow { grid-template-columns: 1fr; gap: 7px; padding: 12px 0; }
}

.chart-note { margin-top: 18px; font-size: 0.78rem; color: var(--slate); }
.chart-table { margin-top: 14px; font-size: 0.85rem; }
.chart-table summary { cursor: pointer; color: var(--tide-deep); font-weight: 550; font-size: 0.85rem; }
.chart-table table { border-collapse: collapse; margin-top: 12px; width: 100%; }
.chart-table th, .chart-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--frost); }
.chart-table th { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); }
.chart-table td:nth-child(n+2), .chart-table th:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }

.chart-tip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--abyss); color: var(--bone);
  font-size: 0.78rem; line-height: 1.4;
  padding: 8px 12px; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(10, 20, 32, 0.25);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  max-width: 240px;
}
.chart-tip.show { opacity: 1; transform: none; }
.chart-tip .t-round { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); display: block; margin-bottom: 2px; }

.judges-side .foot-h { color: var(--steel); }
.judge-list { display: grid; gap: 10px; }
.judge-list li {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--frost); border-radius: var(--radius-sm);
  background: var(--paper); padding: 13px 16px; font-size: 0.9rem; color: var(--ink);
}
.judge-list svg { color: var(--steel); flex: none; }

/* ---------- info: timeline ---------- */

.timeline { position: relative; margin-left: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--frost); border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 26px 42px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 0; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--steel);
}
.tl-item.key .tl-dot { background: var(--tide); border-color: var(--tide); }
.tl-date { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tide-deep); }
.tl-item h3 { font-size: 1.06rem; margin-top: 4px; }
.tl-item p { color: var(--slate); font-size: 0.88rem; margin-top: 3px; }
.tl-note { margin-top: 26px; font-size: 0.8rem; color: var(--slate); display: flex; gap: 8px; align-items: center; }
.tl-note svg { color: var(--steel); flex: none; }

.timeline-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .timeline-layout { grid-template-columns: 1fr; } }

/* ---------- info: rules + packet ---------- */

.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rule-card {
  border: 1px solid var(--frost); border-radius: var(--radius-sm);
  background: var(--paper); padding: 20px;
}
.rule-card .ic {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 14px;
  background: var(--steel-100); color: var(--steel);
  display: grid; place-items: center;
}
.rule-card b { display: block; font-size: 0.94rem; font-weight: 600; letter-spacing: -0.01em; }
.rule-card small { display: block; margin-top: 5px; color: var(--slate); font-size: 0.8rem; line-height: 1.45; }

@media (max-width: 900px) { .rules-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .rules-grid { grid-template-columns: 1fr; } }

.doc-cards { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-card {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--frost); border-radius: var(--radius);
  background: var(--bone); padding: 20px 22px;
  color: var(--ink);
}
.doc-card:hover { text-decoration: none; border-color: var(--tide); }
.doc-card .ic {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: var(--abyss); color: var(--bone);
  display: grid; place-items: center;
}
.doc-card b { display: block; font-weight: 600; }
.doc-card small { color: var(--slate); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.doc-card .arrow { margin-left: auto; color: var(--steel); flex: none; }
@media (max-width: 720px) { .doc-cards { grid-template-columns: 1fr; } }

/* ---------- people ---------- */

.people-section + .people-section { padding-top: 0; }

.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .people-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .people-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .people-grid { grid-template-columns: 1fr; } }

.person {
  border: 1px solid var(--frost); border-radius: var(--radius);
  background: var(--paper); padding: 24px 20px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.person:hover { border-color: var(--steel); transform: translateY(-2px); }

.avatar { position: relative; width: 84px; height: 84px; margin-bottom: 16px; }
.avatar .ring { position: absolute; inset: 0; color: var(--frost); }
.avatar .core {
  position: absolute; inset: 8px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--steel-100); color: var(--steel);
  font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: 0.02em;
}
.person.hs .avatar .core { background: var(--tide-100); color: var(--tide-deep); }
.person.hs .avatar .ring { color: rgba(47, 129, 119, 0.4); }

.person h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
.person .role { margin-top: 5px; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tide-deep); }
.person .org {
  margin-top: 13px; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em;
  color: var(--steel); background: var(--bone); border: 1px solid var(--frost);
  padding: 3px 10px; border-radius: 99px; text-transform: uppercase;
}

.join-card {
  margin-top: clamp(36px, 5vw, 56px);
  border: 1px dashed var(--steel); border-radius: var(--radius);
  padding: 30px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--bone);
}
.join-card h3 { font-size: 1.3rem; }
.join-card p { color: var(--slate); font-size: 0.92rem; max-width: 420px; }

/* ---------- teams: carousel ---------- */

.carousel { position: relative; }

.carousel-viewport { overflow: hidden; border-radius: var(--radius); }

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0.02, 0.2, 1);
  will-change: transform;
}
.carousel-track > .slide { flex: 0 0 100%; min-width: 0; }

/* ---------- teams: the podium card ---------- */

/* a hairline rather than a shadow: the viewport has to clip horizontally,
   and a clipped drop shadow reads as a mistake at the slide edges */
.team-card {
  display: grid; grid-template-columns: 1fr 208px; align-items: stretch;
  background: var(--paper); border: 1px solid var(--frost); border-radius: var(--radius);
  overflow: hidden; min-height: 360px;
}

.tc-main {
  padding: clamp(26px, 3.4vw, 40px);
  display: flex; flex-direction: column;
}

.tc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-no {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--tide-deep); background: var(--tide-100);
  border-radius: 6px; padding: 5px 11px; flex: none;
}
.tc-domain {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--steel);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.team-card h3 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  letter-spacing: -0.02em; margin-top: 20px;
}
.tc-school {
  margin-top: 7px; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel);
}
.tc-blurb { margin-top: 16px; color: var(--slate); font-size: 0.95rem; max-width: 54ch; }

/* the roster — every member named, avatar beside the name */
.tc-team { margin-top: auto; padding-top: 26px; }
.tc-size {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--tide-deep);
}
.tc-roster {
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px;
}
.tc-roster li { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tc-roster .face { flex: none; }
.tc-roster .mname {
  font-size: 0.94rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tc-roster .mbar {
  height: 9px; width: 84px; border-radius: 99px; background: var(--frost);
}

/* the avatar, shared with the pending state */
.tc-roster .face {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--steel-100); color: var(--steel);
  font-family: var(--font-display); font-weight: 600; font-size: 0.76rem;
  letter-spacing: 0.02em;
}
.tc-roster li:nth-child(2n) .face { background: var(--tide-100); color: var(--tide-deep); }

@media (max-width: 900px) { .tc-roster { grid-template-columns: 1fr; } }

/* dark side panel — medal, placement, and the plate reading team size */
.tc-side {
  position: relative; background: var(--abyss); color: var(--bone);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 30px 20px;
}
.tc-side::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(47, 129, 119, 0.22), transparent 70%);
  pointer-events: none;
}
.tc-medal {
  position: relative;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(169, 191, 206, 0.1);
  border: 2px solid rgba(169, 191, 206, 0.45);
}
.tc-medal span {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  color: var(--bone); letter-spacing: -0.01em;
}
.tc-place {
  position: relative;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--mist);
}
.tc-plate { position: relative; color: var(--steel); }
.tc-plate .well-on { fill: var(--tide); stroke: none; }

/* first place carries the podium's weight */
.team-card.is-first { background: var(--abyss); border-color: var(--abyss); color: var(--bone); }
.is-first .tc-no { color: #CFE4E0; background: rgba(47, 129, 119, 0.3); }
.is-first h3 { color: var(--bone); }
.is-first .tc-school { color: var(--mist); }
.is-first .tc-blurb { color: var(--mist); }
.is-first .tc-size { color: #4E9C92; }
.is-first .tc-roster .mname { color: var(--bone); }
.is-first .tc-roster .face { background: rgba(169, 191, 206, 0.14); color: var(--bone); }
.is-first .tc-roster li:nth-child(2n) .face { background: rgba(47, 129, 119, 0.3); color: #CFE4E0; }
.is-first .tc-side { background: var(--harbor); }
.is-first .tc-medal { background: rgba(47, 129, 119, 0.24); border-color: var(--tide); }

/* placement still to be announced */
.team-card.is-pending { border-style: dashed; }
.is-pending .tc-no { color: var(--steel); background: var(--steel-100); }
.is-pending h3 { color: var(--steel); }
.is-pending .tc-size { color: var(--steel); }
.is-pending .tc-roster .face { background: transparent; border: 1.5px dashed var(--frost); }
.is-pending .tc-side { background: var(--harbor); }
.is-pending .tc-side::before { background: none; }
.is-pending .tc-medal { background: transparent; border-style: dashed; }
.is-pending .tc-medal span { color: rgba(169, 191, 206, 0.5); }
.is-pending .tc-plate { color: rgba(169, 191, 206, 0.3); }

@media (max-width: 720px) {
  .team-card { grid-template-columns: 1fr; }
  .tc-side { flex-direction: row; justify-content: flex-start; gap: 18px; padding: 20px 24px; }
  .tc-plate { order: 3; margin-left: auto; }
}
/* ---------- teams: carousel controls ---------- */

.carousel-controls {
  margin-top: 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}

.car-dots { display: flex; align-items: center; gap: 8px; }
.car-dot {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--frost); border: none;
  transition: background 0.15s ease, width 0.2s ease;
}
.car-dot:hover { background: var(--steel); }
.car-dot[aria-selected="true"] { background: var(--tide-deep); width: 26px; border-radius: 99px; }

.car-count {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  color: var(--steel);
}
.car-count b { color: var(--ink); font-weight: 500; }

.car-nav { margin-left: auto; display: flex; gap: 8px; }
.car-btn {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  background: var(--paper); border: 1px solid var(--frost); color: var(--ink);
  display: grid; place-items: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.car-btn:hover:not(:disabled) { border-color: var(--tide); color: var(--tide-deep); }
.car-btn:disabled { opacity: 0.4; cursor: default; }

@media (max-width: 560px) {
  .car-nav { margin-left: 0; width: 100%; justify-content: space-between; }
}


/* the join card sits on bone here, so it needs the lighter fill to read */
.section.alt .join-card { background: var(--paper); }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .btn:hover, .person:hover, .team:hover { transform: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
