/* fonts: self-hosted (OFL), latin + latin-ext only, which covers Romanian; nothing is fetched from Google */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; src: url("fonts/archivo-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; src: url("fonts/archivo-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #060708;
  --bg-2: #0c0e11;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .18);
  --text: #ecebe4;
  --muted: #8a8f99;
  --accent: #c5ff3f;      /* acid lime */
  --accent-rgb: 197, 255, 63;
  --str: #7fdcff;
  --com: #565c66;
  --gut: clamp(16px, 4vw, 56px);
  --display: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* one glow language: tight, centred halo; no offset clouds */
  --glow: 0 0 0 1px rgba(var(--accent-rgb), .25), 0 0 24px -6px rgba(var(--accent-rgb), .45);
  --glow-hi: 0 0 0 1px rgba(var(--accent-rgb), .5), 0 0 32px -4px rgba(var(--accent-rgb), .6);
}
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

* { box-sizing: border-box; }
html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  color: var(--text);
  font: 400 17px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--bg); }
/* decoration (code wall, marquee, glyph layers) is never part of a text selection */
[aria-hidden="true"] { -webkit-user-select: none; user-select: none; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
code, .mono { font-family: var(--mono); }
.mono { font-size: 13px; letter-spacing: .01em; }
.label { color: var(--muted); margin: 0 0 14px; }
.dim { color: var(--com); }
.pr { color: var(--accent); }
.k { color: var(--accent); }
.s { color: var(--str); }
.c { color: var(--com); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--accent); color: var(--bg); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* film grain */
.grain {
  position: fixed; inset: -10%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} }

/* custom pointer (mouse only, enabled by JS so the system cursor stays if JS fails) */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .2s; }
.has-cursor .cursor.on { opacity: 1; }
.cursor svg {
  display: block; width: 22px; height: 22px; margin: -2px 0 0 -2px; /* tip of the path sits on the pointer */
  transform-origin: 2px 2px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55)) drop-shadow(0 0 10px rgba(var(--accent-rgb), .25));
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); /* springy release */
}
.cursor.down svg { transform: scale(.78) rotate(-6deg); transition-duration: .08s; transition-timing-function: ease-out; }
/* click feedback: a few code glyphs burst out of the tip and fade (direction set per glyph by JS) */
.click-fx {
  position: fixed; z-index: 100; pointer-events: none;
  translate: -50% -50%;
  font: 600 11px/1 var(--mono); color: var(--accent);
  animation: click-fx .55s var(--ease) forwards;
}
@keyframes click-fx {
  from { transform: translate(0, 0) scale(.6); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; }
}

/* page background: dot grid + drifting glows, faded in after the hero (opacity set by JS) */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: 0; }
/* pages without a hero show it from the first paint instead of waiting for common.js */
body:not(:has(.hero)) .bg { opacity: 1; }
/* boot.js: what GSAP animates in on load stays hidden until the scripts have set its start state */
.js-wait :is(.hero-meta > *, .lead, .hero .term, .rules-body section > *) { visibility: hidden; }
/* boot.js: an English visitor's Romanian copy stays hidden until common.js has swapped in the English */
.lang-wait [data-en] { visibility: hidden; }
/* page to page: a crossfade instead of a hard cut (Chrome, Edge, Safari; others just navigate) */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
/* the dots sit on a ::before one cell taller than the view and slide by transform (--grid-y stays within one 28px
   cell), so the scroll parallax is composited instead of repainting the whole screen every frame */
.bg-grid::before, .scan-grid::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -28px;
  transform: translate3d(0, var(--grid-y, 0), 0); will-change: transform;
}
.bg-grid::before { background: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.5px) 0 0 / 28px 28px; }
.scan-grid::before { background: radial-gradient(rgba(var(--accent-rgb), .75) 1px, transparent 1.6px) 0 0 / 28px 28px; }
.bg-grid {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 100%);
}
.bg-glow { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; }
.bg-glow.a { left: -15vmax; top: -20vmax; background: radial-gradient(closest-side, rgba(var(--accent-rgb), .06), transparent); transform: translate3d(calc(var(--p, 0) * 40vw), calc(var(--p, 0) * 60vh), 0); }
.bg-glow.b { right: -20vmax; bottom: -25vmax; background: radial-gradient(closest-side, rgba(127, 220, 255, .05), transparent); transform: translate3d(calc(var(--p, 0) * -30vw), calc(var(--p, 0) * -50vh), 0); }

/* inner pages: each one gets its own moving light instead of the landing page's drifting glows */
.pg .bg-glow { display: none; }
.pg .bg::before, .pg .bg::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; will-change: transform, opacity; }

/* participanți: aurora, soft light orbs drifting on wandering paths (moved by script.js); smooth many-stop
   gradients instead of filter: blur, so the falloff stays clean and cheap; screen blend lets overlaps bloom */
.orb {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%; mix-blend-mode: screen; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(var(--c), .26), rgba(var(--c), .17) 22%, rgba(var(--c), .09) 45%, rgba(var(--c), .035) 68%, rgba(var(--c), .01) 86%, transparent);
}

/* regulament: a scanner pass. A crisp light edge sweeps down the page with a soft trail behind it, and the dot grid
   lights up lime where it passes (a brighter copy of the grid revealed by a mask band moving in sync) */
.pg-regulament .bg::before {
  left: 0; right: 0; top: 0; height: 40vh; border-radius: 0;
  background:
    radial-gradient(ellipse 22% 3px at 50% calc(100% - 1px), rgba(255, 255, 255, .55), transparent),
    linear-gradient(transparent calc(100% - 2px), rgba(var(--accent-rgb), .85) calc(100% - 1px), transparent),
    linear-gradient(transparent, rgba(var(--accent-rgb), .025) 55%, rgba(var(--accent-rgb), .11) calc(100% - 2px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), .35));
  animation: scan 10s cubic-bezier(.65, 0, .35, 1) infinite;
}
.scan-grid {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, rgba(0, 0, 0, .25) 60%, #000 calc(100% - 2px), transparent), radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent);
  mask-image: linear-gradient(transparent, rgba(0, 0, 0, .25) 60%, #000 calc(100% - 2px), transparent), radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent);
  -webkit-mask-size: 100% 40vh, 100% 100%; mask-size: 100% 40vh, 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-in; mask-composite: intersect;
  animation: scan-mask 10s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes scan { 0% { transform: translateY(-40vh); opacity: 0; } 12%, 88% { opacity: 1; } 100% { transform: translateY(100vh); opacity: 0; } }
@keyframes scan-mask { from { -webkit-mask-position: 0 -40vh, 0 0; mask-position: 0 -40vh, 0 0; } to { -webkit-mask-position: 0 100vh, 0 0; mask-position: 0 100vh, 0 0; } }
.pg-regulament .bg::after {
  left: 50%; top: -42vmax; width: 95vmax; height: 70vmax; margin-left: -47.5vmax;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .17), transparent);
  animation: breathe 6s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: .4; transform: scale(.9); } to { opacity: 1; transform: scale(1.08); } }

/* inscriere: code rain, sparse falling columns of code glyphs drawn on a canvas by script.js,
   faded out at the top and bottom edges */
.rain { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 72%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 72%, transparent); }
/* sponsori: the landing page's two drifting glows instead of an effect of its own */
.pg-sponsori .bg-glow { display: block; }

/* buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--bg);
  font: 800 15px/1 var(--mono); text-decoration: none;
  padding: 16px 22px; border-radius: 4px;
  box-shadow: var(--glow);
  transition: scale .15s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { background: #d4ff6e; box-shadow: var(--glow-hi); }
.btn:active { scale: .96; box-shadow: var(--glow); }
.btn:focus-visible { outline-color: var(--text); }
.btn-sm { padding: 10px 14px; font-size: 13px; }
/* on the sign-up page itself the button is just a quiet marker, not a call to action */
.top nav .btn[aria-current="page"] { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .45); pointer-events: none; }
.btn-lg { padding: 22px 34px; font-size: 18px; }

/* header */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gut);
  background: linear-gradient(var(--bg), rgba(6, 7, 8, .75) 70%, transparent);
}
.logo { font: 800 20px/1 var(--display); font-stretch: 115%; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.logo:has(.logo-mark) { display: inline-flex; align-items: center; }
/* faint cyan halo picks up the mark's own swoosh so the navy hexes don't sink into the black header */
.logo-mark { height: 38px; width: auto; margin-right: 12px; filter: drop-shadow(0 0 8px rgba(34, 230, 240, .25)); }
.caret { display: inline-block; width: .5em; height: .9em; margin-left: 3px; background: var(--accent); vertical-align: -.1em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.logo.typing .caret { animation: none; } /* a real caret stays solid while keys are pressed */
.top nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* RO/EN switch: plain mono text; the active language gets a lime underline that draws in
   while the other one retracts toward it */
.lang {
  display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 2px;
  background: none; border: 0; font: 600 12px/1 var(--mono); letter-spacing: .06em; color: var(--muted);
}
.lang i { font-style: normal; color: var(--line-2); }
.lang span { position: relative; padding-bottom: 5px; transition: color .3s; }
.lang span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .6);
  scale: 0 1; transition: scale .45s var(--ease);
}
.lang span:first-child::after { transform-origin: right; }
.lang span:last-child::after { transform-origin: left; }
html[lang="ro"] .lang span:first-child, html[lang="en"] .lang span:last-child { color: var(--text); }
html[lang="ro"] .lang span:first-child::after, html[lang="en"] .lang span:last-child::after { scale: 1 1; }
.lang:hover span { color: var(--text); }

/* language-switch transition panel (moved by JS) */
.lang-fx {
  position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; pointer-events: none;
  visibility: hidden; transform: translateY(100%);
  background: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.5px) 0 0 / 28px 28px, var(--bg);
}
.lang-fx.on { visibility: visible; pointer-events: auto; }
.lang-fx::before, .lang-fx::after { /* lit leading and trailing edges */
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  box-shadow: 0 0 24px 2px rgba(var(--accent-rgb), .5);
}
.lang-fx::before { top: 0; }
.lang-fx::after { bottom: 0; }
.lang-fx p { margin: 0; font-size: clamp(15px, 2vw, 22px); color: var(--text); }
.lang-cmd::after { content: "▋"; color: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.top nav a:not(.btn) { font: 500 13px var(--mono); text-decoration: none; color: var(--muted); transition: color .2s; }
.top nav a:not(.btn) b { color: var(--accent); font-weight: 400; margin-right: 6px; font-size: 11px; }
.top nav a:not(.btn):hover, .top nav a[aria-current="page"] { color: var(--text); }
.page { padding-top: 40px; } /* no hero on the inner pages, so the first section clears the fixed header */
.menu-btn { display: none; font: 600 13px var(--mono); background: none; border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 12px; cursor: pointer; color: var(--text); }

/* hero */
.hero {
  position: relative; height: 100svh; min-height: 640px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 84px var(--gut) 32px;
  isolation: isolate;
}
.hero::after { /* vignette */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 42%, transparent 30%, var(--bg) 100%),
              linear-gradient(transparent 70%, var(--bg));
}
.code-wall { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.code-wall pre {
  position: absolute; left: 0; right: 0; top: 0; margin: 0; padding: 0 var(--gut);
  font: 13px/1.75 var(--mono); white-space: pre; color: rgba(255, 255, 255, .055);
  animation: wall 90s linear infinite;
}
.code-wall pre .k { color: rgba(var(--accent-rgb), .12); }
.code-wall pre .s { color: rgba(127, 220, 255, .1); }
.code-wall pre .c { color: rgba(255, 255, 255, .04); }
.code-wall .cw-lit pre { color: rgba(255, 255, 255, .5); }
/* mask lives on a static wrapper: on the scrolling <pre> it drifted away from the pointer */
/* spotlight window, positioned by hero.js through transforms (see the comment there) */
.code-wall .cw-lit {
  position: absolute; left: 0; top: 0; width: 480px; height: 480px; overflow: hidden; will-change: transform;
  -webkit-mask-image: radial-gradient(circle 240px, #000, transparent); mask-image: radial-gradient(circle 240px, #000, transparent);
}
.code-wall .cw-in { position: absolute; left: 0; top: 0; width: 100vw; height: 100%; will-change: transform; }
.code-wall .cw-lit .k { color: var(--accent); }
.code-wall .cw-lit .s { color: var(--str); }
.code-wall .cw-lit .c { color: #6c727c; }
@keyframes wall { to { transform: translateY(-50%); } }
.hero.lit::before { opacity: 1; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before { /* lime glow under the wordmark */
  content: ""; position: absolute; z-index: -4; left: 50%; top: 42%; width: 70vw; height: 40vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .12), transparent);
  filter: blur(20px);
  opacity: 0; transition: opacity 1.8s var(--ease); /* JS adds .lit once the word has compiled */
}

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; color: var(--muted); text-transform: uppercase; }
.live { color: var(--accent); }
.live i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; box-shadow: 0 0 12px var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.hero-bottom { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: 40px; align-items: end; }
.lead { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.45; max-width: 32ch; margin: 0; color: var(--muted); }
.lead strong { color: var(--text); font-weight: 600; }
.scroll-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--com); text-decoration: none; }

/* terminal window */
.term {
  background: rgba(12, 14, 17, .9);
  border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 80px -30px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2e35; }
.term-bar i:first-child { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; font: 12px var(--mono); color: var(--muted); }
.term-body { padding: 18px; margin: 0; font-size: 13.5px; }
.term-body p { margin: 0 0 8px; }
/* hanging indent: a value that wraps lines up under itself, not under the key */
.term-body .out { padding-left: 92px; text-indent: -92px; }
.term-body .out .k { display: inline-block; min-width: 92px; text-indent: 0; }
#countdown { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.term-body .btn { margin-top: 12px; }
.typed::after { content: "▋"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
.typed.done::after { content: ""; }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; color: var(--muted); white-space: nowrap; }
.mq-track { display: inline-flex; animation: mq 40s linear infinite; }
.mq-track span { padding: 0 28px; }
.mq-track span::before { content: "◆"; color: var(--accent); margin-right: 28px; font-size: 9px; vertical-align: 2px; }
@keyframes mq { to { transform: translateX(-50%); } }
.marquee-big { padding: 34px 0; border: 0; }
.marquee-big .mq-track { animation-duration: 30s; }
.marquee-big span { font: 800 clamp(32px, 5vw, 72px)/1 var(--display); font-stretch: 112%; letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1px var(--line-2); transition: color .3s, -webkit-text-stroke-color .3s; }
.marquee-big span:hover { color: var(--text); }
.marquee-big span::before { font-size: 16px; vertical-align: 12px; -webkit-text-stroke: 0; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.stats div { padding: 40px var(--gut); border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b { font: 800 clamp(48px, 6vw, 92px)/1 var(--display); font-stretch: 118%; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stats i { font: 600 15px var(--mono); color: var(--accent); font-style: normal; margin-left: 4px; }
.stats span { display: block; margin-top: 10px; font: 13px var(--mono); color: var(--muted); }

/* sections */
.block, .program { padding: clamp(80px, 12vw, 160px) var(--gut); }
.sec-head { margin-bottom: clamp(40px, 6vw, 80px); max-width: 1100px; }
.idx { color: var(--muted); margin: 0 0 18px; }
.idx span { color: var(--bg); background: var(--accent); padding: 2px 6px; margin-right: 8px; font-weight: 800; border-radius: 2px; }
h2 { font: 850 clamp(40px, 7vw, 112px)/.92 var(--display); font-stretch: 115%; letter-spacing: -.045em; }
h3 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.big { font-size: clamp(20px, 2vw, 26px); line-height: 1.45; margin: 0; color: var(--muted); }
.big-sm { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; max-width: 52ch; }

/* spotlight cards */
.card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: border-color .3s; /* never transition transform here: GSAP drives it and a CSS transition makes it lag */
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--x, 50%) var(--y, 50%), rgba(var(--accent-rgb), .1), transparent 60%);
}
.card.lit { border-color: rgba(var(--accent-rgb), .35); } /* .lit set by JS, also while scrolling */
.card.lit::before { opacity: 1; }
.tag { color: var(--accent); margin: 0; }

.steps { list-style: none; padding: 0; margin: 0 0 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { padding: 32px 28px 36px; min-height: 340px; display: flex; flex-direction: column; }
.steps .num { font: 900 110px/.8 var(--display); font-stretch: 125%; color: transparent; -webkit-text-stroke: 1px var(--line-2); margin-bottom: auto; padding-bottom: 32px; transition: -webkit-text-stroke-color .3s; }
.steps li.lit .num { -webkit-text-stroke-color: var(--accent); }
.steps h3 { margin: 10px 0 12px; }
/* prizes: ranked rows, value right-aligned like a receipt */
.prizes ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-2); }
.prizes li { display: grid; grid-template-columns: 36px 1fr auto; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.prizes .rank { color: var(--accent); font-weight: 800; font-size: 14px; }
.prizes b { font-weight: 700; }
.prizes .val { color: var(--muted); font-size: 13px; text-align: right; }


/* sub-sections inside #despre (etape, kit) */
.sec-head.sub { margin-top: clamp(96px, 12vw, 160px); }
.sec-head.sub h3 { margin: 0; font: 850 clamp(32px, 4.6vw, 68px)/.95 var(--display); font-stretch: 115%; letter-spacing: -.04em; }
.steps p { margin: 0; color: var(--muted); }

.elig ul { list-style: none; padding: 0; margin: 0; }
.elig li { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); align-items: baseline; }
.elig code { color: var(--accent); font-size: 14px; }
.elig code::before { content: "✓ "; }
.elig span { color: var(--muted); }

/* program: all days visible at once */
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.day { padding: 28px; }
.day h3 { font-size: 40px; font-stretch: 112%; margin: 10px 0 22px; }
.day ul { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.day li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); }
.day li.hl { color: var(--text); }
.day time { font: 13px var(--mono); color: var(--accent); padding-top: 2px; }
.day.done { opacity: .4; }
.day.now { border-color: var(--accent); box-shadow: var(--glow); }
.day.now::after { content: "● LIVE"; position: absolute; top: 24px; right: 24px; font: 800 11px var(--mono); color: var(--accent); }

.spec { list-style: none; }
.spec li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.spec li:first-child { display: block; border: 0; color: var(--text); padding-top: 0; }
.spec li span:last-child { color: var(--muted); text-align: right; }

/* regulament: sticky contents on the left, chapters on the right */
.rules { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 760px); gap: clamp(40px, 7vw, 120px); align-items: start; }
.rules-toc { position: sticky; top: 100px; }
.rules-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.rules-toc a { display: flex; gap: 14px; padding: 9px 0 9px 18px; margin-left: -1px; border-left: 1px solid transparent; font-size: 13px; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.rules-toc a b { color: var(--com); font-weight: 600; transition: color .2s; }
.rules-toc a:hover, .rules-toc a.on { color: var(--text); border-color: var(--accent); }
.rules-toc a:hover b, .rules-toc a.on b { color: var(--accent); }
.rules-meta { margin: 24px 0 0; font-size: 12px; color: var(--com); }
.rules-body section { padding-bottom: clamp(48px, 6vw, 72px); scroll-margin-top: 90px; }
.rules-body section + section { padding-top: clamp(48px, 6vw, 72px); border-top: 1px dashed var(--line); }
.rules-body h2 { display: flex; align-items: baseline; gap: 16px; margin: 0 0 24px; font: 700 clamp(22px, 2.4vw, 30px)/1.2 var(--mono); letter-spacing: -.02em; }
.rules-body h2 b { font-size: .5em; font-weight: 600; letter-spacing: .08em; color: var(--accent); }
.rules-body h2 b::before { content: "§"; margin-right: 2px; }
.rules-body ul { list-style: none; margin: 0; padding: 0; }
.rules-body li { position: relative; padding: 0 0 14px 26px; line-height: 1.6; color: var(--muted); }
.rules-body li::before { content: "→"; position: absolute; left: 0; font: 13px/1.85 var(--mono); color: var(--accent); }
.rules-body strong { font-weight: 600; color: var(--text); }
.rules-body a { color: var(--accent); }
.rules-body code { font-size: .9em; color: var(--text); }
.rules-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; margin: 0; }
.rules-body dt { font: 600 14px/1.6 var(--mono); color: var(--text); }
.rules-body dd { margin: 0; line-height: 1.6; color: var(--muted); }
.link { color: var(--accent); text-decoration: none; font-size: 14px; border-bottom: 1px solid rgba(var(--accent-rgb), .4); }
.link:hover { border-color: var(--accent); }

/* sponsori: an editorial credits sheet, one ruled row per tier, mono label on the left */
.tiers { border-top: 1px solid var(--line-2); }
.tier { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: clamp(20px, 4vw, 64px); align-items: baseline; padding: clamp(32px, 5vw, 64px) 0; border-bottom: 1px solid var(--line-2); }
.tier-label { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tier-label::before { content: "▸ "; color: var(--accent); }
.tier-name { margin: 0; font: 850 clamp(44px, 8vw, 132px)/.9 var(--display); font-stretch: 118%; letter-spacing: -.045em;
  background: linear-gradient(100deg, var(--text) 40%, var(--accent) 50%, var(--text) 60%) 100% 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.tier-main { align-items: start; }
.tier-brand { display: grid; justify-items: start; gap: clamp(18px, 2.4vw, 32px); }
.tier-logo { display: block; width: min(100%, 560px); height: auto; border-radius: 4.75% / 16.5%; box-shadow: 0 0 44px -14px rgba(255, 204, 0, .4); }
.tier-main .tier-name { font-size: clamp(26px, 3.4vw, 52px); line-height: 1; letter-spacing: -.03em; }
.tier-note { margin: 0; max-width: 62ch; color: var(--muted); font-size: 16px; line-height: 1.65; }
.tier-note a { color: var(--accent); }
.tier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; }
.tier-list li { font: 750 clamp(24px, 3.4vw, 48px)/1.15 var(--display); font-stretch: 112%; letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .45); transition: color .3s, -webkit-text-stroke-color .3s; }
.tier-list li:hover { color: var(--text); -webkit-text-stroke-color: transparent; }
.tier-list li:not(:last-child)::after { content: "/"; margin: 0 .45em; color: var(--accent); -webkit-text-stroke: 0; font-weight: 400; }

/* nav: "#" links scroll the landing page, "./" chips open a separate page (dashed = a file, arrow on hover) */
.nav-sep { width: 1px; height: 18px; background: var(--line-2); }
.top nav a.nav-page { display: inline-flex; align-items: center; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 6px; transition: color .2s, border-color .2s, background .2s; }
.top nav a.nav-page b { margin-right: 1px; }
.top nav a.nav-page i { display: inline-block; width: 0; opacity: 0; overflow: hidden; font-style: normal; color: var(--accent); transform: translateX(-6px); transition: width .25s var(--ease), margin .25s var(--ease), opacity .2s, transform .25s var(--ease); }
.top nav a.nav-page:hover, .top nav a.nav-page[aria-current="page"] { border-style: solid; border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .06); }
.top nav a.nav-page:hover i { width: 1em; margin-left: 6px; opacity: 1; transform: none; }
section[id] { scroll-margin-top: 70px; }

/* participants: registered teams */
/* page entrance for the inner pages: driven by CSS, so it is already in place on the first paint (a script-set
   start state lets the content flash, vanish and pop back while the CDN scripts load); --i staggers the blocks */
.enter { animation: enter 1.2s cubic-bezier(.16, 1, .3, 1) calc(.08s + var(--i, 0) * .09s) backwards; }
@keyframes enter { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } }
.tier:nth-child(1) { --i: 1; } .tier:nth-child(2) { --i: 2; }

/* the counters are the page's headline: a live readout instead of a big title */
.teams-head { margin-bottom: clamp(32px, 5vw, 56px); }
.teams-head > p { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 8px; margin-right: 14px; padding: 4px 10px; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 999px; color: var(--accent); background: rgba(var(--accent-rgb), .06); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.teams-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-block: 1px solid var(--line-2); }
.teams-stats div { position: relative; display: flex; flex-direction: column-reverse; gap: 14px; padding: clamp(24px, 3vw, 40px) clamp(16px, 2.5vw, 36px); overflow: hidden; }
.teams-stats div + div { border-left: 1px solid var(--line); }
.teams-stats div:first-child { padding-left: 0; }
.teams-stats dt { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.teams-stats dd { margin: 0; font: 850 clamp(48px, 11vw, 168px)/.8 var(--display); font-stretch: 118%; letter-spacing: -.05em; font-variant-numeric: tabular-nums; } /* 48px floor: three digits still fit a third of a phone */
.teams-stats div:last-child dd { color: var(--accent); text-shadow: 0 0 40px rgba(var(--accent-rgb), .35); }
.teams { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.team { display: flex; flex-direction: column; gap: 22px; min-height: 210px; padding: 22px 22px 20px; }
.team-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.team-no { color: var(--com); transition: color .3s; }
.team.lit .team-no { color: var(--accent); }
.team-status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }
.team-status i { width: 6px; height: 6px; border-radius: 50%; background: #febc2e; box-shadow: 0 0 8px #febc2e; animation: pulse 1.6s ease-in-out infinite; }
.team-status.ok { color: var(--accent); border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .06); }
.team-status.ok i { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: none; }
@keyframes pulse { 50% { opacity: .3; } }
.team h3 { margin-top: auto; font: 850 clamp(26px, 2.4vw, 34px)/1 var(--display); font-stretch: 112%; letter-spacing: -.03em; overflow-wrap: anywhere; }
.team-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.team-foot .dim { margin-left: auto; }
.team-slots { display: inline-flex; gap: 4px; }
.team-slots i { width: 14px; height: 6px; border-radius: 2px; background: var(--line-2); }
.team-slots i.on { background: var(--accent); box-shadow: 0 0 6px rgba(var(--accent-rgb), .6); }
.team.solo .team-slots i.on { background: var(--str); box-shadow: 0 0 6px rgba(127, 220, 255, .6); }
.teams-empty { --i: 2; max-width: 560px; }

/* CTA */
.cta { position: relative; overflow: hidden; padding: clamp(110px, 16vw, 220px) var(--gut); text-align: center; border-top: 1px solid var(--line); isolation: isolate; }
/* spotlight falling from a thin lit edge, instead of a big lime cloud that turns olive on black */
.cta-glow { position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 45% 55% at 50% 0%, rgba(var(--accent-rgb), .09), transparent 70%); }
.cta-glow::before { content: ""; position: absolute; top: -1px; left: 50%; width: min(640px, 70vw); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .8), transparent); }
.cta > .mono { color: var(--muted); }
.cta h2 { font-size: clamp(48px, 10vw, 168px); margin: 22px auto 52px; max-width: 12ch; }
.small { font-size: 14px; color: var(--muted); margin-top: 28px; }

.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 64px var(--gut) 32px; border-top: 1px solid var(--line); }
.foot p { margin: 0; font-size: 15px; color: var(--muted); }
.foot .label { color: var(--accent); margin-bottom: 10px; font-size: 13px; }
.foot .logo { display: inline-block; margin-bottom: 14px; }
.foot a:hover { color: var(--accent); }
.copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px !important; }
.copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.copy i { color: var(--accent); font-style: normal; }
.credit { color: var(--muted); text-decoration: none; }
.credit b { color: var(--text); font-weight: 600; border-bottom: 1px solid rgba(var(--accent-rgb), .4); transition: border-color .2s, color .2s; }
.credit:hover b { color: var(--accent); border-color: var(--accent); }

/* ---------- registration page ---------- */
[hidden] { display: none !important; }
.reg {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start;
  max-width: 1400px; margin: 0 auto; padding: 120px var(--gut) 100px;
}
.reg-intro { position: sticky; top: 110px; display: grid; gap: 28px; }
/* the title rises out of an invisible slot (tilted, settling flat), the last syllable lit lime, then a hairline draws
   under it; padding keeps the Î circumflex and the descenders inside the clipped slot */
.reg-title {
  position: relative; justify-self: start; margin: 0; padding: .16em 0 .14em; clip-path: inset(-1em -1em 0 -1em); /* only the bottom edge clips, so the glow can spread */
  font: 900 clamp(44px, 4.6vw, 80px)/.95 var(--display); font-stretch: 112%; letter-spacing: -.045em; white-space: nowrap; /* never split "Înscrie-te" at its hyphen */
}
.reg-title .rt { display: inline-block; transform-origin: 0 100%; animation: rt-rise 1.1s cubic-bezier(.16, 1, .3, 1) .15s both; }
.reg-title em { font-style: normal; color: var(--accent); text-shadow: 0 0 28px rgba(var(--accent-rgb), .22); }
.reg-title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), .25) 60%, transparent);
  transform-origin: left; animation: rt-line 1.2s cubic-bezier(.76, 0, .24, 1) .7s both;
}
@keyframes rt-rise { from { transform: translateY(115%) skewY(7deg); } }
@keyframes rt-line { from { transform: scaleX(0); } }
.reg-intro > :not(.reg-title) { animation: rise .9s var(--ease) both; }
/* the form settles fast and from close by: a long eased tail read as the form "lifting" under the first click */
.reg-card { animation: card-in .55s cubic-bezier(.2, .7, .3, 1) .15s both; }
/* register.js removes .checking once it knows whether sign-ups are open, so the form never shows before the closed notice */
.reg-card.checking { visibility: hidden; animation: none; }
/* participanți: teams.js removes .loading once the list is in, so the footer never jumps down and the entrance plays once */
.page.loading .enter, .page.loading ~ .foot { visibility: hidden; animation: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }
.reg-intro > :nth-child(2) { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

.reg-card { background: rgba(12, 14, 17, .92); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 30px 80px -30px #000, inset 0 1px 0 rgba(255, 255, 255, .05); }
.reg-form, .reg-done { display: grid; gap: 24px; padding: clamp(20px, 3vw, 36px); }
.f-group, .member { min-width: 0; margin: 0; padding: 0; border: 0; }
.f-label { display: block; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.f-label i { font-style: normal; color: var(--com); }
legend.f-label { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; margin-bottom: 12px; }
.f-field { display: block; min-width: 0; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reg-form :is(input:not([type=radio], [type=checkbox]), textarea, .sel-btn) {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: 8px;
  background: rgba(255, 255, 255, .02); color: var(--text); font: 400 15px/1.4 var(--display);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.reg-form textarea { resize: vertical; min-height: 92px; }
.reg-form ::placeholder { color: var(--com); }
.reg-form :is(input, textarea, .sel-btn):hover { border-color: rgba(255, 255, 255, .28); }
.reg-form :is(input:not([type=radio], [type=checkbox]), textarea, .sel-btn):focus, .sel-btn[aria-expanded="true"] {
  outline: none; border-color: var(--accent); background: rgba(var(--accent-rgb), .03); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14);
}
/* red is set by register.js: only for a wrong value on leaving a field, or for anything left wrong on submit
   (:user-invalid also lit fields that were merely clicked and left empty) */
#reg-form [aria-invalid="true"] { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 107, 107, .12); }

/* error bubble, the site's own take on the browser's "fill out this field" */
.f-field, .check { position: relative; }
.f-tip {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 6; display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: min(340px, 100%); padding: 10px 14px;
  background: #15181d; border: 1px solid rgba(255, 107, 107, .45); border-radius: 8px;
  box-shadow: 0 18px 40px -14px #000, 0 0 0 4px rgba(255, 107, 107, .06);
  font: 12px/1.45 var(--mono); color: var(--text); pointer-events: none;
  animation: tip-in .28s var(--ease);
}
.f-tip::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: #ff6b6b; color: var(--bg); font-weight: 800; }
.f-tip::after { content: ""; position: absolute; left: 18px; top: -6px; width: 10px; height: 10px; background: #15181d; border: solid rgba(255, 107, 107, .45); border-width: 1px 0 0 1px; rotate: 45deg; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-6px); } }

/* year-of-study menu: a themed listbox standing in for the native select (which stays hidden for the value) */
.sel { position: relative; }
.sel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer;
}
.sel-btn::after { content: ""; flex: none; width: 12px; height: 8px; transition: rotate .25s var(--ease);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c5ff3f' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center; }
.sel-btn[aria-expanded="true"]::after { rotate: 180deg; }
.reg-form .sel-btn.empty { color: var(--com); } /* placeholder look while nothing is chosen */
.sel-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 7; margin: 0; padding: 6px; list-style: none;
  background: rgba(17, 19, 23, .97); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 24px 60px -18px #000; animation: tip-in .22s var(--ease);
}
.sel-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 6px; font: 500 13px var(--mono); color: var(--muted); cursor: pointer; }
.sel-list li.active { background: rgba(var(--accent-rgb), .08); color: var(--text); }
.sel-list li[aria-selected="true"] { color: var(--accent); }
.sel-list li[aria-selected="true"]::after { content: "✓"; }

/* team / solo segmented control */
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: 10px; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.seg span { display: block; padding: 10px 18px; border-radius: 7px; font: 600 13px/1 var(--mono); color: var(--muted); transition: background .3s var(--ease), color .3s, box-shadow .3s; }
.seg label:hover span { color: var(--text); }
.seg input:checked + span { background: var(--accent); color: var(--bg); box-shadow: var(--glow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.members { display: grid; gap: 24px; }
.member { padding-top: 20px; border-top: 1px dashed var(--line-2); }
.m-idx { color: var(--accent); font-weight: 800; }
.m-remove {
  display: grid; place-items: center; width: 28px; height: 28px; margin-left: auto; padding: 0;
  background: none; border: 1px solid var(--line-2); border-radius: 6px; color: var(--muted); font: 16px/1 var(--mono);
  transition: color .2s, border-color .2s;
}
.m-remove:hover { color: #ff6b6b; border-color: rgba(255, 107, 107, .5); }
.add-member {
  justify-self: start; padding: 12px 16px; background: none; border: 1px dashed var(--line-2); border-radius: 8px;
  color: var(--accent); font-size: 13px; transition: border-color .2s, background .2s;
}
.add-member:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .05); }

/* sign-up form, code style: mono text, the native caret hidden and the
   logo's block caret drawn instead by register.js */
.f-code .reg-form :is(input:not([type=radio], [type=checkbox]), textarea, .sel-btn) { font: 500 14px/1.5 var(--mono); caret-color: transparent; }
.f-code .reg-form ::placeholder { font-style: normal; }
/* sized like the logo's caret relative to its text: a touch narrower than a glyph, cap height tall, with a small gap
   after the last character (left/top set by register.js) */
.f-caret { position: absolute; z-index: 2; margin: 0 0 0 2px; width: 7px; height: 16px; pointer-events: none; }
.f-caret[hidden] { display: none; }
.f-caret.busy { animation: none; }

/* editor look: no boxes, each field is an underlined code line with a gutter bar; text is coloured like a string
   literal, the gutter and underline light up lime on focus */
.f-code .reg-form :is(input:not([type=radio], [type=checkbox]), textarea, .sel-btn) {
  padding: 10px 4px 10px 16px; border: 0; border-radius: 0; color: var(--str);
  background: linear-gradient(var(--line-2), var(--line-2)) 0 0 / 2px 100% no-repeat, linear-gradient(90deg, var(--line-2), transparent) 0 100% / 100% 1px no-repeat, transparent;
  transition: background .3s, box-shadow .3s;
}
.f-code .reg-form :is(input:not([type=radio], [type=checkbox]), textarea, .sel-btn):is(:hover, :focus) { border: 0; box-shadow: none; }
.f-code .reg-form :is(input:not([type=radio], [type=checkbox]), textarea, .sel-btn):focus {
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 2px 100% no-repeat, linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), .15)) 0 100% / 100% 1px no-repeat, linear-gradient(90deg, rgba(var(--accent-rgb), .07), transparent 70%);
}
.f-code .reg-form ::placeholder { color: var(--com); transition: color .2s; }
/* the example text steps aside once the field is focused, so the block caret never sits on top of it */
.f-code .reg-form :focus::placeholder { color: transparent; }
.f-code .reg-form .sel-btn.empty { color: var(--com); }
.f-code .f-label { color: var(--text); }
.f-code .f-caret { background: var(--str); box-shadow: 0 0 10px rgba(127, 220, 255, .6); }
.f-code #reg-form [aria-invalid="true"] { box-shadow: none; background: linear-gradient(#ff6b6b, #ff6b6b) 0 0 / 2px 100% no-repeat, linear-gradient(90deg, #ff6b6b, transparent) 0 100% / 100% 1px no-repeat; }

.f-checks { display: grid; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--muted); }
.check input {
  appearance: none; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin: 1px 0 0;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line-2); border-radius: 5px; transition: background .2s, border-color .2s;
}
.check input::after { content: ""; width: 10px; height: 5px; border: solid var(--bg); border-width: 0 0 2px 2px; rotate: -45deg; translate: 0 -1px; scale: 0; transition: scale .25s var(--ease); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { scale: 1; }
.check input[aria-invalid="true"] { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 107, 107, .12); }
.check a { color: var(--accent); }
.f-error { margin: 0; color: #ff6b6b; font-size: 13px; }
.reg-form .btn { justify-self: start; border: 0; }

.done-ok { margin: 0; color: var(--accent); }
.done-title { font-size: clamp(32px, 4vw, 52px); outline: none; }
.reg-done .small { margin: 0; }
.reg-done .small a, .reg-done .big a { color: var(--accent); }
.done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.edit-btn { padding: 0 0 2px; background: none; border-width: 0 0 1px; }

/* tablet */
@media (max-width: 1024px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 0; }
  .steps .num { font-size: 72px; padding-bottom: 20px; }
  .hero-bottom { grid-template-columns: 1fr; }
  .elig li { grid-template-columns: 1fr; gap: 6px; }
  .reg { grid-template-columns: 1fr; padding-top: 100px; }
  .reg-intro { position: static; }
  .rules { grid-template-columns: 1fr; }
  .rules-toc { position: static; }
  .rules-body dl { grid-template-columns: 1fr; gap: 2px; }
  .rules-body dd { margin-bottom: 12px; }
}

/* phone */
@media (max-width: 760px) {
  .menu-btn { display: block; order: 1; }
  .tier { grid-template-columns: 1fr; gap: 16px; }
  .lead { text-shadow: 0 0 14px var(--bg), 0 0 28px var(--bg); } /* keeps it readable over the hero code wall on narrow screens */
  .teams-stats div { padding-inline: 12px; }
  .lang { margin-left: auto; }
  .f-grid { grid-template-columns: 1fr; }
  .top nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .top nav.open { display: flex; }
  .top nav a { padding: 14px var(--gut); border-top: 1px solid var(--line); }
  .top nav .btn { margin: 12px var(--gut); justify-content: center; }
  .hero { min-height: 700px; padding-bottom: 24px; }
  .hero-meta span:nth-child(3) { display: none; }
  .lead { font-size: 16px; }
  .scroll-hint { display: none; }
  .two-col, .foot { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav-sep { display: none; }
  .top nav a.nav-page { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px var(--gut); }
  .top nav a.nav-page i { width: auto; margin-left: auto; opacity: 1; transform: none; }
  .stats div { padding: 28px var(--gut); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .spec li { flex-direction: column; gap: 2px; }
  .spec li span:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* privacy notice (built by common.js), bottom-left, under the cursor and grain layers */
.notice {
  position: fixed; left: var(--gut); bottom: 16px; z-index: 60; max-width: min(520px, calc(100vw - 2 * var(--gut)));
  display: flex; align-items: center; gap: 16px; padding: 14px 16px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  animation: notice-in .6s cubic-bezier(.16, 1, .3, 1) .8s backwards;
}
.notice p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.notice b { color: var(--accent); font-weight: 500; }
.notice a { color: var(--text); }
.notice .btn { flex: none; }
@keyframes notice-in { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 520px) { .notice { flex-direction: column; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .notice { animation: none; } }
