/* Self-hosted variable fonts (no third-party requests) */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/static/fonts/archivo-var.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/static/fonts/jetbrains-mono-var.woff2) format("woff2");
}

/* =========================================================================
   THR3E — design system
   Black / white / neutral. One typeface family (Archivo, variable width),
   extended + heavy for statements, normal width for reading.
   ========================================================================= */

:root {
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* dark (default) */
  --bg: #000;
  --bg-2: #080808;
  --panel: #0e0e0e;
  --panel-2: #151515;
  --line: #242424;
  --line-2: #3a3a3a;
  --ink: #f3f3f3;
  --ink-2: #a6a6a6;
  --ink-3: #6f6f6f;
  --ok: #58c08a;
  --warn: #d8a640;
  --bad: #ef6a63;
  --shadow: 0 30px 80px rgba(0, 0, 0, .6);
  --nav-h: 68px;
  --r: 2px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f4f4;
  --bg-2: #ececec;
  --panel: #ffffff;
  --panel-2: #f0f0f0;
  --line: #dadada;
  --line-2: #bcbcbc;
  --ink: #0a0a0a;
  --ink-2: #4f4f4f;
  --ink-3: #858585;
  --ok: #1f8a55;
  --warn: #a5740f;
  --bad: #c9352e;
  --shadow: 0 30px 80px rgba(0, 0, 0, .18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }

/* the wide, heavy voice of the brand */
.display {
  font-family: var(--font);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  text-transform: uppercase;
  letter-spacing: -.025em;
  line-height: .92;
}
.mono { font-family: var(--mono); font-size: .85em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* logo mark: the vector 3, coloured by currentColor */
.mark {
  display: inline-block;
  aspect-ratio: 300 / 490;
  background: currentColor;
  -webkit-mask: url(/static/img/logo.svg) center / contain no-repeat;
  mask: url(/static/img/logo.svg) center / contain no-repeat;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: var(--r);
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: .95rem; letter-spacing: .005em;
  transition: color .3s ease, border-color .3s ease, opacity .18s;
}
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; background: var(--ink);
  transform: translateY(102%); transition: transform .42s cubic-bezier(.2, .8, .2, 1);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover { color: var(--bg); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid::before { background: var(--bg); }
.btn-solid:hover { color: var(--ink); }
.btn-quiet { border-color: var(--line-2); color: var(--ink-2); }
.btn-quiet::before { display: none; }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger::before { background: var(--bad); }
.btn-danger:hover { color: #fff; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: .85rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-block { width: 100%; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--ink);
  transition: border-color .18s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* ---------------------------------------------------------------- top nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .mark { height: 28px; }
.brand .word { font-size: 1.15rem; font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: .92rem; color: var(--ink-2); }
.nav-links a { padding: 6px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.nav-links a:hover { color: var(--ink); border-color: var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-burger { display: none; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px clamp(20px, 4vw, 56px) 20px; display: none; font-size: 1.05rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-actions { margin-left: auto; }
  .nav-burger { display: inline-grid; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: 100svh; padding: calc(var(--nav-h) + 40px) 0 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.hero-mark {
  position: absolute; right: clamp(16px, 5vw, 90px); top: calc(var(--nav-h) + 4vh);
  height: min(74vh, 720px); aspect-ratio: 300 / 490; color: var(--ink); opacity: .96;
}
.hero-mark svg { width: 100%; height: 100%; overflow: visible; }
.hero-mark path {
  fill: none; stroke: currentColor; stroke-width: 13; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 2.4s cubic-bezier(.65, 0, .3, 1) forwards; animation-delay: calc(var(--i) * .16s + .1s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-body { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(28px, 5vh, 56px); }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 6.4rem); }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.hero h1 .ln span { display: block; transform: translateY(105%); animation: rise 1s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * .14s + .55s); }
@keyframes rise { to { transform: none; } }
.hero-lede { max-width: 46ch; color: var(--ink-2); margin-top: 28px; font-size: 1.05rem; }
.hero-foot {
  position: relative; z-index: 2; border-top: 1px solid var(--line); background: var(--bg);
}
.hero-foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.hero-count { display: flex; align-items: baseline; gap: 14px; }
.hero-count strong { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.hero-date { color: var(--ink-2); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-mark { opacity: .16; right: -4vw; height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark path { animation: none; stroke-dashoffset: 0; }
  .hero h1 .ln span { animation: none; transform: none; }
}

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(84px, 12vw, 190px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 90px); }
.h2 { font-size: clamp(2.1rem, 5.4vw, 5.2rem); }
.section-note { color: var(--ink-2); max-width: 44ch; margin-top: 22px; }

.manifesto p { font-weight: 700; font-stretch: 105%; font-variation-settings: "wdth" 105; font-size: clamp(1.7rem, 4.3vw, 4.2rem); line-height: 1.06; letter-spacing: -.02em; max-width: 19em; }
.manifesto p + p { margin-top: .5em; }
.manifesto .dim { color: var(--ink-3); }
.manifesto .sig { margin-top: 56px; color: var(--ink-2); font-size: 1rem; font-weight: 400; letter-spacing: 0; line-height: 1.5; font-stretch: 100%; font-variation-settings: "wdth" 100; max-width: 48ch; }

/* the code */
.code-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 90px); align-items: start; }
.code-side { position: sticky; top: calc(var(--nav-h) + 40px); }
.code-list li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.code-list li:first-child { border-top: 1px solid var(--line); }
.code-list h3 { font-size: clamp(1.5rem, 3.1vw, 2.7rem); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.code-list li:hover h3 { transform: translateX(12px); }
.code-list p { color: var(--ink-2); max-width: 52ch; }

/* brotherhood */
.sports { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: clamp(40px, 6vw, 80px) 0; }
.sports span {
  flex: 1 1 auto; padding: 22px clamp(16px, 2.2vw, 34px); text-align: center; border-right: 1px solid var(--line);
  font-size: clamp(1rem, 2vw, 1.7rem); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125;
  text-transform: uppercase; letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1.2px var(--ink);
}
.sports span:last-child { border-right: 0; }
/* ---------------------------------------------------------------- athletes
   Cards are built from config.json (name, rank, type, optional photo, bio, stats...). */
.roster-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.roster-bar:empty { display: none; }
.roster-count { font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.roster-count b { color: var(--ink); font-weight: 500; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--ink-2);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.chip sup { font-size: .9em; opacity: .55; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.athletes {
  display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.athletes[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
.athletes[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.athletes[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.athlete {
  position: relative; isolation: isolate; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent;
  min-height: clamp(360px, 40vw, 580px); padding: clamp(20px, 2.4vw, 36px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--panel);
}
.athlete:focus-visible { outline-offset: -4px; }
.athlete .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; position: relative; z-index: 3; }
.athlete .bot { position: relative; z-index: 3; }
.athlete .role { color: var(--ink-2); font-size: .95rem; }
.athlete .idx { font-size: clamp(1.4rem, 2vw, 2.1rem); color: transparent; -webkit-text-stroke: 1px var(--ink-3); line-height: 1; transition: -webkit-text-stroke-color .4s ease; }
.athlete h3 { font-size: clamp(1.9rem, 2.9vw, 3.4rem); overflow-wrap: anywhere; }
.athlete .disc { margin-top: 12px; font-size: 1.1rem; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.athlete .disc svg { width: 18px; height: 18px; flex: none; }

/* big outline discipline icon (cards without a photo) */
.athlete .art {
  position: absolute; z-index: 1; right: clamp(-10px, 1vw, 20px); top: 50%; width: clamp(120px, 15vw, 220px); aspect-ratio: 1;
  translate: 0 -54%; color: var(--ink); opacity: .07; pointer-events: none;
  transition: opacity .5s ease, rotate .8s cubic-bezier(.2, .8, .2, 1), translate .8s cubic-bezier(.2, .8, .2, 1);
}
.athlete .art svg { width: 100%; height: 100%; stroke-width: .8; }
.athlete:hover .art { opacity: .16; rotate: -6deg; translate: -8px -54%; }
.athlete.has-photo .art { display: none; }

/* stats peek + footer line */
.athlete .kpis {
  display: flex; flex-wrap: wrap; gap: 6px 22px; max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
  font-family: var(--mono); text-transform: uppercase;
  transition: max-height .5s cubic-bezier(.2, .8, .2, 1), opacity .4s ease, margin-top .4s ease;
}
.athlete .kpis span { display: grid; gap: 2px; }
.athlete .kpis small { font-size: .62rem; letter-spacing: .16em; opacity: .6; }
.athlete .kpis b { font-size: .95rem; font-weight: 600; letter-spacing: .04em; }
.athlete:hover .kpis, .athlete:focus-visible .kpis { max-height: 80px; opacity: 1; margin-top: 16px; }
.athlete .meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.athlete .meta .go { display: inline-flex; align-items: center; gap: 8px; transition: color .3s ease, gap .4s cubic-bezier(.2, .8, .2, 1); }
.athlete .meta .go svg { width: 15px; height: 15px; }
.athlete:hover .meta .go { gap: 14px; color: currentColor; }

/* cursor spotlight (all cards) */
.athlete .glow {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--glow, rgba(255, 255, 255, .14)), transparent 62%);
}
.athlete:hover .glow { opacity: 1; }
.athlete.no-photo { --glow: color-mix(in srgb, var(--bg) 16%, transparent); }
.athlete.no-photo:hover .idx { -webkit-text-stroke-color: var(--bg); }
.athlete.no-photo:hover .art { color: var(--bg); }
.athlete.no-photo:hover .meta { color: color-mix(in srgb, var(--bg) 62%, transparent); }

/* with a photo: full-bleed portrait, dark shade, light text */
.athlete.has-photo { color: #fff; background: #050505; }
.athlete .ph {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  opacity: 0; scale: 1.08; filter: grayscale(1) contrast(1.08) brightness(.84);
  transition: opacity .9s ease, scale 1.2s cubic-bezier(.2, .8, .2, 1), translate .35s ease-out, filter .7s ease;
}
.athlete .ph.ready { opacity: 1; scale: 1; }
.athlete.has-photo:hover .ph {
  scale: 1.07; filter: grayscale(0) contrast(1.03) brightness(.94);
  translate: calc(var(--tx, 0) * -14px) calc(var(--ty, 0) * -10px);
}
.athlete .shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .94) 0%, rgba(0, 0, 0, .55) 36%, rgba(0, 0, 0, .1) 62%, rgba(0, 0, 0, .5) 100%);
}
.athlete.has-photo .role { color: rgba(255, 255, 255, .78); font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; padding-top: 4px; }
.athlete.has-photo .idx { -webkit-text-stroke-color: rgba(255, 255, 255, .55); }
.athlete.has-photo h3 { text-shadow: 0 2px 30px rgba(0, 0, 0, .55); }
.athlete.has-photo .disc {
  padding: 7px 13px; border: 1px solid rgba(255, 255, 255, .55);
  font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.athlete.has-photo .disc svg { width: 15px; height: 15px; }
.athlete.has-photo .meta { color: rgba(255, 255, 255, .55); }
.athlete.has-photo:hover { background: #050505; color: #fff; }
.athlete.has-photo:hover .role { color: rgba(255, 255, 255, .9); }
.athlete.has-photo:hover .disc { background: #fff; color: #000; border-color: #fff; }
/* viewfinder corners */
.athlete.has-photo::before, .athlete.has-photo::after {
  content: ""; position: absolute; z-index: 3; width: 22px; height: 22px; pointer-events: none; opacity: 0;
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
}
.athlete.has-photo::before { top: 14px; left: 14px; border-top: 1.5px solid #fff; border-left: 1.5px solid #fff; transform: translate(8px, 8px); }
.athlete.has-photo::after { bottom: 14px; right: 14px; border-bottom: 1.5px solid #fff; border-right: 1.5px solid #fff; transform: translate(-8px, -8px); }
.athlete.has-photo:hover::before, .athlete.has-photo:hover::after { opacity: .9; transform: none; }
@media (hover: none) {
  .athlete .ph { filter: grayscale(.4) contrast(1.05) brightness(.88); }
  .athlete .kpis { max-height: 80px; opacity: 1; margin-top: 16px; }
}

/* seat number */
.seat-no { font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }

/* ---------------------------------------------------------------- athlete profile (dialog) */
html.modal-open { overflow: hidden; }
dialog.dossier {
  padding: 0; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink);
  width: min(1120px, calc(100vw - 32px)); max-width: none; height: min(720px, calc(100dvh - 32px)); max-height: none;
  margin: auto; overflow: hidden; box-shadow: var(--shadow);
}
dialog.dossier::backdrop { background: rgba(0, 0, 0, .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
dialog.dossier[open] { animation: dossier-in .55s cubic-bezier(.2, .8, .2, 1) both; }
dialog.dossier[open]::backdrop { animation: fadein .4s ease both; }
dialog.dossier.closing { animation: dossier-out .24s ease both; }
dialog.dossier.closing::backdrop { animation: fadeout .24s ease both; }
@keyframes dossier-in { from { opacity: 0; transform: translateY(26px) scale(.985); } }
@keyframes dossier-out { to { opacity: 0; transform: translateY(12px) scale(.99); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }

.d-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); height: 100%; }
.d-media { position: relative; overflow: hidden; background: var(--panel); border-right: 1px solid var(--line); isolation: isolate; }
.d-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; animation: kenburns 14s ease-out both; }
@keyframes kenburns { from { scale: 1.14; } to { scale: 1.02; } }
.d-media .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .35)); }
.d-media .d-id { position: absolute; left: 24px; bottom: 22px; z-index: 2; font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.d-media .d-big {
  position: absolute; inset: auto -4% -8% auto; z-index: 1; font-size: clamp(9rem, 26vw, 24rem); line-height: .8;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .55); pointer-events: none; user-select: none;
}
.d-media.has-photo .d-big { -webkit-text-stroke-color: rgba(255, 255, 255, .5); }
.d-media:not(.has-photo) .d-big { -webkit-text-stroke-color: var(--line-2); }
.d-media:not(.has-photo) .d-id { color: var(--ink-3); }
.d-media .d-art { position: absolute; left: 50%; top: 42%; translate: -50% -50%; width: min(46%, 220px); aspect-ratio: 1; color: var(--ink); opacity: .16; }
.d-media .d-art svg { width: 100%; height: 100%; stroke-width: .7; }
.d-media.has-photo .d-art { display: none; }

.d-body { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: clamp(22px, 3vw, 44px); gap: 26px; }
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.d-count { font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.d-count b { color: var(--ink); font-weight: 500; }
.d-main { display: flex; flex-direction: column; gap: 22px; }
.d-rank { font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }
.d-rank::before { content: ""; width: 28px; height: 1px; background: var(--ink-3); }
.d-name { font-size: clamp(2.4rem, 5.2vw, 4.8rem); overflow-wrap: anywhere; }
.d-name.long { font-size: clamp(2.1rem, 4vw, 3.8rem); }
.d-name.xlong { font-size: clamp(1.8rem, 3.1vw, 2.9rem); }
.d-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.d-tag {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
}
.d-tag svg { width: 16px; height: 16px; }
.d-tag.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.d-motto { font-size: clamp(1.15rem, 1.9vw, 1.6rem); font-weight: 700; font-stretch: 108%; font-variation-settings: "wdth" 108; line-height: 1.2; letter-spacing: -.01em; padding-left: 18px; border-left: 2px solid var(--ink); }
.d-bio { color: var(--ink-2); max-width: 54ch; }
.d-empty { color: var(--ink-3); max-width: 44ch; }
.d-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.d-stats div { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.d-stats b { display: block; font-size: clamp(1.4rem, 2.4vw, 2.1rem); font-variant-numeric: tabular-nums; }
.d-stats small { display: block; margin-top: 8px; font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.d-links { display: flex; flex-wrap: wrap; gap: 10px; }
.d-links .btn svg { width: 17px; height: 17px; }
.d-nav { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.d-nav button {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 0; background: none; border: 0; color: var(--ink-2);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; transition: color .2s ease, gap .35s cubic-bezier(.2, .8, .2, 1);
}
.d-nav button svg { width: 18px; height: 18px; }
.d-nav button:hover { color: var(--ink); gap: 18px; }
.d-nav span { display: block; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-nav .nx { margin-left: auto; }
.dossier.fresh .d-media img { animation: kenburns 14s ease-out both, fadein .6s ease both; }
.dossier.fresh .d-main > *, .dossier.fresh .d-nav, .dossier.fresh .d-stats { animation: fadeup .6s cubic-bezier(.2, .8, .2, 1) both; }
.dossier.fresh .d-main > :nth-child(2) { animation-delay: .05s; }
.dossier.fresh .d-main > :nth-child(3) { animation-delay: .1s; }
.dossier.fresh .d-main > :nth-child(4) { animation-delay: .15s; }
.dossier.fresh .d-main > :nth-child(5) { animation-delay: .2s; }
.dossier.fresh .d-main > :nth-child(6) { animation-delay: .25s; }
.dossier.fresh .d-nav { animation-delay: .3s; }
@media (max-width: 820px) {
  dialog.dossier { width: 100vw; height: 100dvh; border: 0; }
  .d-grid { grid-template-columns: 1fr; grid-template-rows: minmax(150px, 30dvh) minmax(0, 1fr); }
  .d-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .d-media .d-big { font-size: 9rem; }
  .d-media .d-art { width: 110px; top: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.dossier[open], dialog.dossier.closing, .d-media img { animation: none !important; }
}

.seat { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); padding: 22px clamp(20px, 2.4vw, 36px); border: 1px solid var(--line); border-top: 0; }
.seat .mark { height: 56px; color: var(--ink-3); flex: none; }
.seat h3 { font-size: clamp(1.2rem, 2.2vw, 2rem); color: var(--ink-3); }
.seat p { margin-top: 6px; }
@media (max-width: 1000px) { .athletes[data-cols] { grid-template-columns: repeat(2, minmax(0, 1fr)); } .athlete { min-height: clamp(360px, 56vw, 520px); } }
@media (max-width: 640px) { .athletes[data-cols] { grid-template-columns: minmax(0, 1fr); } .athlete { min-height: 440px; } }

/* apparel */
.apparel-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 90px); }
.apparel-grid .h2 { font-size: clamp(1.9rem, 3.9vw, 4.2rem); }
.traits li { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.traits li:first-child { border-top: 1px solid var(--line); }
.traits b { font-size: clamp(1.3rem, 2.6vw, 2.2rem); }
.traits span { color: var(--ink-2); font-size: .95rem; text-align: right; max-width: 30ch; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 40px; border: 1px solid var(--line); }
.swatches div { height: 120px; padding: 12px 14px; display: flex; align-items: flex-end; font-size: .85rem; font-weight: 600; }
.swatches .s1 { background: #000; color: #fff; }
.swatches .s2 { background: #fff; color: #000; }
.swatches .s3 { background: #8b8b8b; color: #000; }

/* long road (a real sequence -> numbered) */
.road li { display: grid; grid-template-columns: clamp(64px, 10vw, 150px) minmax(0, 1fr); gap: 20px; padding: 30px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.road li:first-child { border-top: 1px solid var(--line); }
.road .n { font-size: clamp(2rem, 5vw, 4.4rem); color: var(--ink-3); }
.road h3 { font-size: clamp(1.3rem, 2.6vw, 2.2rem); }
.road p { color: var(--ink-2); margin-top: 8px; max-width: 56ch; }

/* 2030 — the one inverted block */
.year { background: var(--ink); color: var(--bg); border-top: 0; padding: clamp(90px, 14vw, 200px) 0; }
.year .h2 { font-size: clamp(3rem, 11vw, 11rem); }
.year-note { margin-top: 26px; max-width: 46ch; opacity: .7; }
.clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(50px, 8vw, 110px); border-top: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); }
.clock div { padding: 22px 0 0; }
.clock b { display: block; font-size: clamp(1.8rem, 6.4vw, 7.2rem); font-variant-numeric: tabular-nums; line-height: .95; }
.clock small { display: block; margin-top: 10px; opacity: .65; font-size: .95rem; }
.year .see { margin-top: clamp(40px, 6vw, 80px); font-size: clamp(1.4rem, 3vw, 2.6rem); }

/* join + footer */
.join { text-align: left; }
.join .h2 { max-width: 12em; }
.join-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }

@media (max-width: 860px) {
  .section-head, .code-grid, .apparel-grid { grid-template-columns: 1fr; }
  .code-side { position: static; }
  .clock { grid-template-columns: repeat(2, 1fr); }
  .clock div { padding-bottom: 20px; }
  .traits li { flex-direction: column; gap: 4px; }
  .traits span { text-align: left; }
}

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-size: .9rem; font-weight: 600; }
.field .hint { font-size: .85rem; color: var(--ink-3); }
.input {
  width: 100%; min-height: 50px; padding: 0 16px; background: transparent;
  border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color .15s, background-color .15s;
}
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--ink); background: var(--panel); }
.input.keyfield { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.pw { position: relative; }
.pw .input { padding-right: 76px; }
.pw button { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 12px; background: transparent; border: 0; color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.pw button:hover { color: var(--ink); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.meter i { height: 3px; background: var(--line-2); transition: background-color .2s; }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--bad); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-s="3"] i:nth-child(-n+3) { background: var(--ok); }
.meter[data-s="4"] i:nth-child(-n+4) { background: var(--ok); }
.form-error { display: none; padding: 12px 14px; margin-bottom: 18px; border: 1px solid var(--bad); color: var(--bad); border-radius: var(--r); font-size: .92rem; }
.form-error.show { display: block; }
.form-ok { padding: 12px 14px; border: 1px solid var(--ok); color: var(--ok); border-radius: var(--r); font-size: .92rem; margin-bottom: 16px; }

/* ---------------------------------------------------------------- auth page */
.auth { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-side {
  background: var(--bg-2); color: var(--ink); border-right: 1px solid var(--line); padding: clamp(28px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side .big-mark { position: absolute; right: -8%; top: 8%; height: 66%; color: var(--ink); opacity: .07; }
.auth-side h1 { position: relative; font-size: clamp(1.7rem, 3.3vw, 3.5rem); }
.auth-side p { position: relative; margin-top: 20px; max-width: 34ch; opacity: .7; }
.auth-main { display: flex; flex-direction: column; padding: clamp(24px, 4vw, 56px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-top a { color: var(--ink-2); font-size: .92rem; }
.auth-top a:hover { color: var(--ink); }
.auth-box { width: 100%; max-width: 440px; margin: auto; padding: 40px 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.tabs button { background: none; border: 0; padding: 14px 0; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.auth-box h2 { font-size: 1.9rem; margin-bottom: 8px; }
.auth-box .sub { color: var(--ink-2); margin-bottom: 28px; }
.auth-fine { margin-top: 22px; color: var(--ink-3); font-size: .85rem; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 22px 20px; min-height: 0; }
  .auth-side h1, .auth-side p, .auth-side .big-mark { display: none; }
}

/* ---------------------------------------------------------------- vault (member area) */
.vault { padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 90px)); padding-bottom: 120px; }
.vault h1 { font-size: clamp(2.4rem, 6.4vw, 6rem); overflow-wrap: anywhere; }
.vault .lede { color: var(--ink-2); margin-top: 18px; max-width: 52ch; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); margin: clamp(34px, 5vw, 64px) 0; }
.facts div { padding: 20px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts small { display: block; color: var(--ink-3); font-size: .85rem; }
.facts b { display: block; margin-top: 6px; font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.vault-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); }
.card { border: 1px solid var(--line); background: var(--panel); padding: clamp(20px, 2.4vw, 32px); }
.card + .card { margin-top: 24px; }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 18px; }
.rules li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.rules li:first-child { border-top: 1px solid var(--line); }
.rules b { font-weight: 800; font-stretch: 115%; font-variation-settings: "wdth" 115; text-transform: uppercase; letter-spacing: -.01em; }
.rules span { color: var(--ink-2); text-align: right; font-size: .92rem; }
.sess li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; display: grid; gap: 2px; }
.sess li:first-child { border-top: 1px solid var(--line); }
.sess .when { font-weight: 600; }
.mini-clock { font-size: clamp(2.4rem, 5vw, 4rem); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .vault-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .rules li { flex-direction: column; gap: 2px; }
  .rules span { text-align: left; }
}

/* ---------------------------------------------------------------- admin shell */
.shell { min-height: 100svh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100svh; border-right: 1px solid var(--line); background: var(--bg-2); padding: 22px 16px; display: flex; flex-direction: column; gap: 26px; }
.side .brand { padding: 4px 10px; }
.side nav { display: grid; gap: 2px; }
.side nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; border: 0; border-radius: var(--r);
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: .95rem; transition: background-color .15s, color .15s;
}
.side nav button svg { width: 18px; height: 18px; flex: none; }
.side nav button:hover { color: var(--ink); background: var(--panel-2); }
.side nav button[aria-current="page"] { background: var(--ink); color: var(--bg); }
.side .count { margin-left: auto; font-size: .78rem; font-family: var(--mono); opacity: .7; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.whoami { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); font-size: .88rem; }
.whoami b { display: block; font-size: 1rem; }
.whoami span { color: var(--ink-3); }
.side-foot .row { display: flex; gap: 8px; }
.side-foot .row .btn { flex: 1; }

.main { padding: clamp(20px, 3vw, 44px); min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.page-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.page-head p { color: var(--ink-2); margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border: 1px solid var(--line); margin-bottom: 32px; background: var(--panel); }
.stat { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat small { color: var(--ink-3); display: block; font-size: .85rem; }
.stat b { display: block; font-size: 2.3rem; line-height: 1.1; margin-top: 6px; font-stretch: 115%; font-variation-settings: "wdth" 115; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .85rem; }

.two .card + .card { margin-top: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { min-height: 42px; width: auto; flex: 1 1 220px; max-width: 360px; }
.toolbar select.input { flex: 0 0 auto; max-width: none; padding-right: 10px; }
.toolbar .spacer { flex: 1; }

.table-wrap { border: 1px solid var(--line); background: var(--panel); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .8rem; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); position: sticky; top: 0; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl td.wrap { white-space: normal; min-width: 160px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--panel-2); }
.tbl .num { text-align: right; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl .actions .btn + .btn { margin-left: 6px; }
.empty { padding: 44px 20px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.pill.mute { color: var(--ink-3); }

.keycell { font-family: var(--mono); font-size: .85rem; letter-spacing: .04em; white-space: nowrap; }
.copy { background: none; border: 0; color: var(--ink-3); padding: 2px 6px; margin-left: 6px; font-size: .78rem; font-family: var(--font); font-weight: 600; }
.copy:hover { color: var(--ink); }

.gen { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 20px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 24px; }
.gen .field { margin: 0; }
@media (max-width: 700px) { .gen { grid-template-columns: 1fr 1fr; } .gen .btn { grid-column: 1 / -1; } .gen .field:nth-child(2) { grid-column: 1 / -1; grid-row: 1; } }
.fresh { border: 1px solid var(--ink); padding: 20px; margin-bottom: 24px; background: var(--panel); }
.fresh header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fresh h3 { font-size: 1.05rem; }
.fresh .list { display: grid; gap: 8px; }
.fresh .k { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border: 1px dashed var(--line-2); font-family: var(--mono); letter-spacing: .06em; }

.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.feed .dot.ok { background: var(--ok); } .feed .dot.bad { background: var(--bad); } .feed .dot.warn { background: var(--warn); }
.feed small { color: var(--ink-3); display: block; }
.feed time { color: var(--ink-3); font-size: .8rem; white-space: nowrap; }

/* drawer + modal */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(560px, 100vw); background: var(--bg); border-left: 1px solid var(--line-2); box-shadow: var(--shadow); transform: translateX(102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.6rem; overflow-wrap: anywhere; }
.drawer-body { padding: 8px 24px 40px; overflow-y: auto; flex: 1; }
.dsec { padding: 22px 0; border-bottom: 1px solid var(--line); }
.dsec:last-child { border-bottom: 0; }
.dsec h4 { font-size: .9rem; font-weight: 700; margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px; font-size: .9rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.ua { margin-top: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); font-family: var(--mono); font-size: .75rem; color: var(--ink-2); overflow-wrap: anywhere; }
.drawer .actions { display: flex; flex-wrap: wrap; gap: 8px; }

.modal { position: fixed; z-index: 100; left: 50%; top: 50%; width: min(440px, calc(100vw - 32px)); transform: translate(-50%, -46%); opacity: 0; pointer-events: none; background: var(--bg); border: 1px solid var(--line-2); box-shadow: var(--shadow); padding: 28px; transition: opacity .2s, transform .2s; }
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal h3 { font-size: 1.35rem; margin-bottom: 10px; }
.modal p { color: var(--ink-2); margin-bottom: 20px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; }

.toasts { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: grid; gap: 10px; }
.toast { padding: 13px 18px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .92rem; border-radius: var(--r); box-shadow: var(--shadow); animation: toast-in .25s ease; max-width: 340px; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading { padding: 60px 20px; text-align: center; color: var(--ink-3); }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 14px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { display: flex; overflow-x: auto; order: 3; width: 100%; }
  .side nav button { width: auto; white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; display: flex; align-items: center; }
  .whoami { display: none; }
  .side-foot .btn-label { display: none; }
}

.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 24px; }
.notfound .mark { height: 120px; margin-bottom: 30px; }
.notfound h1 { font-size: clamp(2rem, 6vw, 4rem); margin-bottom: 14px; }
.notfound p { color: var(--ink-2); margin-bottom: 28px; }

/* small-screen type sizing for the extended face (kept last on purpose) */
@media (max-width: 860px) {
  .hero h1 { font-size: 8.2vw; }
  .clock b { font-size: 11vw; }
  .year .h2 { font-size: 12.5vw; }
}

/* =========================================================================
   MOTION + NEW SECTIONS
   ========================================================================= */
@keyframes fadeup { from { opacity: 0; transform: translateY(16px); } }
@keyframes pagein { from { opacity: 0; } }

/* page-to-page fade, theme cross-fade */
body { animation: pagein .6s ease both; }
body.leaving { opacity: 0; transition: opacity .24s ease; }
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease, stroke .45s ease, -webkit-text-stroke-color .45s ease !important;
}

/* scroll reveal (only when JS is on, so no-JS visitors still see everything) */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s), transform .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js .athlete[data-reveal], .js .pillar[data-reveal] {
  transition: opacity .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s), transform .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s), background-color .45s ease, color .45s ease;
}

/* hairlines that draw themselves */
.code-list li, .traits li, .road li, .qa { position: relative; }
.code-list li::after, .traits li::after, .road li::after, .qa::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink-3);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.3s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0s) + .25s);
}
.code-list li.in::after, .traits li.in::after, .road li.in::after, .qa.in::after { transform: none; }
.road .n { transition: color .9s ease calc(var(--d, 0s) + .3s); }
.road li.in .n { color: var(--ink); }

/* smart nav + progress */
.nav.hide { transform: translateY(-101%); }
.nav-links a[aria-current="true"] { color: var(--ink); border-color: var(--ink); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; background: var(--ink); transform-origin: left; transform: scaleX(0); pointer-events: none; }

/* hero extras */
.scroll-cue { display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-size: .85rem; }
.scroll-cue i { display: block; position: relative; overflow: hidden; width: 1px; height: 38px; background: var(--line-2); }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--ink); animation: cue 2.2s cubic-bezier(.6, 0, .2, 1) infinite; }
@keyframes cue { to { top: 100%; } }
.hero-mark { will-change: transform; }
@media (max-width: 860px) { .scroll-cue { display: none; } }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(18px, 3vw, 34px) 0; }
.marquee .track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .group { display: flex; align-items: center; flex: none; gap: clamp(28px, 4vw, 64px); padding-right: clamp(28px, 4vw, 64px); }
.marquee span { font-size: clamp(2rem, 6vw, 5.4rem); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.marquee span.o { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.marquee .mark { height: clamp(1.6rem, 4.6vw, 4rem); color: var(--ink); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* principles + figures */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 80px); border: 1px solid var(--line); }
.pillar { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: clamp(280px, 28vw, 400px); padding: clamp(24px, 3vw, 44px); border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar .pn { font-size: clamp(2.6rem, 5vw, 4.6rem); color: transparent; -webkit-text-stroke: 1.2px var(--ink-3); transition: -webkit-text-stroke-color .45s ease; }
.pillar h3 { font-size: clamp(1.4rem, 2.05vw, 2.3rem); overflow-wrap: anywhere; }
.pillar p { margin-top: 14px; color: var(--ink-2); max-width: 34ch; transition: color .45s ease; }
.pillar:hover, .athlete:hover { background: var(--ink); color: var(--bg); }
.pillar:hover .pn { -webkit-text-stroke-color: var(--bg); }
.pillar:hover p, .athlete:hover .role { color: color-mix(in srgb, var(--bg) 68%, transparent); }
.athlete:hover .disc { color: var(--bg); }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.figures > div { padding-top: 28px; }
.figures b { display: block; font-size: clamp(2.2rem, 5.2vw, 5.2rem); line-height: .95; font-variant-numeric: tabular-nums; }
.figures small { display: block; margin-top: 12px; color: var(--ink-2); }
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pillar:last-child { border-bottom: 0; }
  .figures { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .figures b { font-size: 10vw; }
}

/* FAQ */
.faq .qa { border-bottom: 1px solid var(--line); }
.faq .qa:first-child { border-top: 1px solid var(--line); }
.q { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; background: none; border: 0; text-align: left;
  font-size: clamp(1.1rem, 1.9vw, 1.5rem); font-weight: 700; font-stretch: 110%; font-variation-settings: "wdth" 110; letter-spacing: -.01em; }
.q span { transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.q:hover span { transform: translateX(8px); }
.plus { position: relative; flex: none; width: 22px; height: 22px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.plus::after { transform: rotate(90deg); }
.qa.open .plus { transform: rotate(180deg); }
.qa.open .plus::after { transform: rotate(0); }
.a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.2, .8, .2, 1); }
.a > div { overflow: hidden; }
.a p { padding: 0 0 28px; max-width: 58ch; color: var(--ink-2); opacity: 0; transform: translateY(-8px); transition: opacity .35s ease, transform .45s ease; }
.qa.open .a { grid-template-rows: 1fr; }
.qa.open .a p { opacity: 1; transform: none; transition-delay: .12s; }
.ulink { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* connect channels */
.channels { margin-top: clamp(40px, 6vw, 80px); }
.channels li { border-bottom: 1px solid var(--line); }
.channels li:first-child { border-top: 1px solid var(--line); }
.channel { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 30px; align-items: center; gap: clamp(12px, 2vw, 28px); padding: 24px 0; transition: padding .45s cubic-bezier(.2, .8, .2, 1), color .3s; }
.channel .ci svg { width: 28px; height: 28px; }
.channel .cn { font-size: clamp(1.4rem, 3vw, 2.6rem); }
.channel .cd { color: var(--ink-2); text-align: right; overflow-wrap: anywhere; transition: color .3s; }
.channel .go svg { width: 26px; height: 26px; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
a.channel:hover { padding-left: 18px; }
a.channel:hover .go svg { transform: translateX(8px); }
a.channel:hover .cd { color: var(--ink); }
.channel.off { color: var(--ink-3); }
.channel.off .go { opacity: 0; }

/* footer */
.foot { padding: clamp(60px, 8vw, 110px) 0 28px; overflow: hidden; color: var(--ink-2); font-size: .95rem; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.5fr .9fr .9fr 1.7fr; gap: 40px; }
.foot h4 { margin-bottom: 16px; color: var(--ink-3); font-size: .85rem; font-weight: 600; }
.foot ul li + li { margin-top: 10px; }
.foot a { transition: color .2s; }
.foot a:hover { color: var(--ink); }
.foot-brand .brand { color: var(--ink); }
.foot-brand p { margin-top: 18px; max-width: 34ch; }
.social { display: flex; flex-wrap: wrap; gap: 10px; }
.soc { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), background-color .25s, color .25s, border-color .25s; }
.soc svg { width: 20px; height: 20px; }
a.soc:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-5px); }
.soc.off { color: var(--ink-3); border-style: dashed; cursor: default; }
.wordmark { margin: clamp(48px, 7vw, 96px) 0 clamp(20px, 3vw, 40px); font-size: 20vw; line-height: .8; text-align: center; letter-spacing: -.03em; white-space: nowrap; user-select: none;
  color: transparent; -webkit-text-stroke: 1.5px var(--line-2); transition: -webkit-text-stroke-color .6s ease, opacity .9s, transform .9s !important; }
.wordmark:hover { -webkit-text-stroke-color: var(--ink); }
.foot-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-tools { display: flex; gap: 10px; align-items: center; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* auth page motion */
.auth-box [role="tabpanel"]:not([hidden]) { animation: fadeup .5s cubic-bezier(.2, .8, .2, 1) both; }
.auth-box form > * { animation: fadeup .6s cubic-bezier(.2, .8, .2, 1) both; }
.auth-box form > :nth-child(2) { animation-delay: .06s; }
.auth-box form > :nth-child(3) { animation-delay: .12s; }
.auth-box form > :nth-child(4) { animation-delay: .18s; }
.auth-box form > :nth-child(5) { animation-delay: .24s; }
.auth-box form > :nth-child(6) { animation-delay: .3s; }
.auth-side .big-mark { animation: float 10s ease-in-out infinite alternate; }
@keyframes float { to { transform: translateY(-18px) rotate(-1.5deg); } }
.form-error.show { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.input { transition: border-color .2s, background-color .2s, box-shadow .25s; }
.input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 10%, transparent); }

/* admin motion */
.main.enter > * { animation: fadeup .55s cubic-bezier(.2, .8, .2, 1) both; }
.main.enter > :nth-child(2) { animation-delay: .06s; }
.main.enter > :nth-child(3) { animation-delay: .12s; }
.main.enter > :nth-child(4) { animation-delay: .18s; }
.main.enter > :nth-child(5) { animation-delay: .24s; }
.drawer.fresh .dsec { animation: fadeup .5s cubic-bezier(.2, .8, .2, 1) both; }
.drawer.fresh .dsec:nth-child(2) { animation-delay: .06s; }
.drawer.fresh .dsec:nth-child(3) { animation-delay: .12s; }
.drawer.fresh .dsec:nth-child(4) { animation-delay: .18s; }
.drawer.fresh .dsec:nth-child(5) { animation-delay: .24s; }
.tbl tbody tr { transition: background-color .2s; }
.stat { transition: background-color .3s; }
.stat:hover { background: var(--panel-2); }

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee .track { animation: none; }
}

.faq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.faq-grid .h2 { font-size: clamp(1.9rem, 3.7vw, 4rem); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }
.pillar p { min-height: 4.7em; }


/* ================================================================ polish pass */
/* thin scrollbar that matches the theme */
html { scrollbar-width: thin; scrollbar-color: var(--line-2) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 2px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* film grain over everything (very light) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html[data-theme="light"] body::before { filter: invert(1); opacity: .045; }

/* small mono section labels */
.eyebrow {
  display: flex; align-items: center; gap: 14px; margin-bottom: clamp(18px, 2.2vw, 28px);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--ink-3); }
.eyebrow b { font-weight: 400; opacity: .6; margin: 0 -4px; }

/* marquee fades out at both edges */
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }


/* ================================================================ events (dashboard) */
.events-section { margin: 40px 0 48px; }
.events-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 6px; }
.events-head .muted { max-width: 56ch; }
.events-section .chips { margin: 18px 0 20px; }
.events-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event-card { border: 1px solid var(--line); background: var(--panel); padding: 20px clamp(18px, 2.2vw, 26px); display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.event-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ink-3); }
.event-card.status-running::before { background: var(--ok); }
.event-card.status-expired::before { background: var(--line-2); }
.event-card.status-expired { opacity: .68; }
.ev-top { display: flex; align-items: flex-start; gap: 12px; }
.ev-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink-2); }
.ev-icon svg { width: 19px; height: 19px; }
.ev-heading { flex: 1; min-width: 0; }
.ev-heading h3 { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.ev-heading .ev-type { color: var(--ink-3); font-size: .82rem; margin-top: 2px; }
.ev-when { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .9rem; }
.ev-when svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.ev-details { color: var(--ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.ev-actions .lead { min-height: 34px; padding: 0 10px; font-size: .8rem; flex: 1 1 150px; max-width: 190px; }
.ev-actions .btn-sm { display: inline-flex; align-items: center; gap: 7px; }
.ev-actions .btn-sm svg { width: 15px; height: 15px; }
.ev-actions .btn-sm.is-on { border-color: var(--ok); color: var(--ok); }

/* ================================================================ admin: events view */
.evtype { display: inline-flex; align-items: center; gap: 7px; }
.evtype svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.modal.wide { width: min(560px, calc(100vw - 32px)); }
