/* Techie Factory — "Night Shift" design system.
   Midnight ink surfaces, vivid cyan / lime / orange signal colors, warm paper
   for long reading. Type: Bricolage Grotesque (display), Plus Jakarta Sans
   (text), Space Mono (labels, data). */

@font-face { font-family: 'Bricolage Grotesque'; src: url(/assets/fonts/bricolage-grotesque-normal-500-800.woff2) format('woff2'); font-weight: 500 800; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url(/assets/fonts/plus-jakarta-sans-normal-400-800.woff2) format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: italic; src: url(/assets/fonts/plus-jakarta-sans-italic-400-600.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url(/assets/fonts/space-mono-normal-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url(/assets/fonts/space-mono-normal-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink-0: #05070f;
  --ink-1: #0a0e1f;
  --ink-2: #111733;
  --ink-3: #1a2147;
  --line: rgba(190, 210, 255, .14);
  --line-strong: rgba(190, 210, 255, .28);
  --text: #eef2ff;
  --soft: #b4bde3;
  --dim: #8590bf;
  --cyan: #2be4ff;
  --lime: #b6ff3b;
  --orange: #ff7a1f;
  --pink: #ff4f9a;
  --violet: #9b7bff;
  --amber: #ffc93d;
  --sky: #5aa8ff;
  --red: #ff5a52;
  --paper: #f6f2e9;
  --paper-2: #ece6d8;
  --paper-ink: #151a2e;
  --paper-soft: #4b5170;
  --display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r-lg: 22px; --r: 14px; --r-sm: 9px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--ink-1); color: var(--text); font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.04; margin: 0 0 .45em; letter-spacing: -.015em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.9rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); letter-spacing: -.005em; }
h4 { font-size: 1.05rem; }
ul, ol { padding-left: 1.2em; }
code, kbd { font-family: var(--mono); font-size: .9em; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; padding: .05em .4em; background: rgba(255,255,255,.04); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
::selection { background: var(--lime); color: var(--ink-0); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.paper :focus-visible { outline-color: #0b62d6; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--lime); color: var(--ink-0); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.section { padding-block: clamp(56px, 9vw, 112px); position: relative; }
.section.tight { padding-block: clamp(40px, 6vw, 72px); }
.paper { background: var(--paper); color: var(--paper-ink); color-scheme: light; }
.paper .lead, .paper .muted { color: var(--paper-soft); }
.paper-2 { background: var(--paper-2); }
.ink-2 { background: var(--ink-2); }
.blueprint {
  background-color: var(--ink-1);
  background-image: linear-gradient(rgba(90,168,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(90,168,255,.07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.lead { font-size: clamp(1.06rem, 1.6vw, 1.25rem); color: var(--soft); max-width: 62ch; }
.muted { color: var(--dim); }
.small { font-size: .88rem; }
.center { text-align: center; }
.eyebrow {
  font: 700 .74rem/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan);
  display: inline-flex; align-items: center; gap: .7em; margin-bottom: var(--s4);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.paper .eyebrow { color: #0b62d6; }
.eyebrow.lime { color: var(--lime); } .eyebrow.orange { color: var(--orange); }
.paper .eyebrow.orange { color: #c2410c; }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.row.spread { justify-content: space-between; }
.grid { display: grid; gap: var(--s5); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- buttons ---------- */
.btn {
  --bg: rgba(255,255,255,.06); --fg: var(--text); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 46px;
  padding: .7em 1.25em; border-radius: 12px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  font: 700 1rem/1.1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 3px 0 0 rgba(0,0,0,.45); transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 0 rgba(0,0,0,.45); border-color: var(--cyan); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 0 rgba(0,0,0,.45); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { --bg: var(--lime); --fg: #0b1100; --bd: #d6ff8a; box-shadow: 0 3px 0 0 #5d8a10; }
.btn-primary:hover { border-color: #fff; box-shadow: 0 5px 0 0 #5d8a10; }
.btn-primary:active { box-shadow: 0 1px 0 0 #5d8a10; }
.btn-hot { --bg: var(--orange); --fg: #1a0800; --bd: #ffb27a; box-shadow: 0 3px 0 0 #9a3e00; }
.btn-hot:hover { border-color: #fff; box-shadow: 0 5px 0 0 #9a3e00; }
.btn-cyan { --bg: var(--cyan); --fg: #001a20; --bd: #a8f5ff; box-shadow: 0 3px 0 0 #0a7f90; }
.btn-ghost { --bg: transparent; box-shadow: none; }
.btn-ghost:hover { box-shadow: none; }
.btn-sm { min-height: 36px; padding: .45em .85em; font-size: .9rem; border-radius: 10px; }
.btn-lg { min-height: 56px; padding: .85em 1.6em; font-size: 1.08rem; border-radius: 14px; }
.paper .btn { --bg: #fff; --fg: var(--paper-ink); --bd: #cfc6b2; box-shadow: 0 3px 0 0 #b9ae95; }
.paper .btn:hover { border-color: #0b62d6; }
.paper .btn-primary { --bg: var(--paper-ink); --fg: #fff; --bd: var(--paper-ink); box-shadow: 0 3px 0 0 #000; }
.paper .btn-hot { --bg: var(--orange); --fg: #1a0800; --bd: #c2410c; box-shadow: 0 3px 0 0 #9a3e00; }
.arr { transition: transform .15s ease; }
.btn:hover .arr, a:hover > .arr { transform: translateX(3px); }
.link { color: var(--cyan); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.paper .link { color: #0b55bb; }

/* ---------- chips & tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .4em; font: 700 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: .5em .7em; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--soft); background: rgba(255,255,255,.03);
}
.chip.lime { color: var(--lime); border-color: rgba(182,255,59,.4); }
.chip.cyan { color: var(--cyan); border-color: rgba(43,228,255,.4); }
.chip.orange { color: var(--orange); border-color: rgba(255,122,31,.45); }
.chip.pink { color: var(--pink); border-color: rgba(255,79,154,.45); }
.paper .chip { color: var(--paper-soft); border-color: #cdc3ad; background: #fff; }
.paper .chip.lime { color: #3b6b00; border-color: #9fd36b; }
.paper .chip.orange { color: #b23a00; border-color: #f2a874; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--header-h);
  background: rgba(7, 10, 22, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 46px; height: 36px; object-fit: contain; }
.brand b { font: 800 1.16rem/1 var(--display); letter-spacing: -.01em; }
.brand small { display: block; font: 700 .6rem/1 var(--mono); letter-spacing: .2em; color: var(--lime); text-transform: uppercase; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: var(--s3); }
.nav a { text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--soft); padding: .55em .65em; border-radius: 9px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--lime); }
.header-cta { margin-left: auto; display: flex; gap: var(--s2); align-items: center; }
.passport-pill { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; font: 700 .85rem/1 var(--mono); color: var(--amber); border: 1px solid rgba(255,201,61,.4); background: rgba(255,201,61,.08); padding: .55em .8em; border-radius: 999px; min-height: 38px; }
.menu-toggle { display: none; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-cta .hide-sm { display: none; }
}
.drawer {
  position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100dvh - var(--header-h)); overflow: auto;
  background: var(--ink-1); border-bottom: 1px solid var(--line); padding: var(--s4) var(--gutter) var(--s6); z-index: 60;
  display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.drawer a { text-decoration: none; padding: .85em 1em; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-weight: 700; }
.drawer a small { display: block; font-weight: 500; color: var(--dim); font-size: .8rem; }
@media (min-width: 1081px) { .menu { display: none; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink-0); border-top: 1px solid var(--line); padding-block: var(--s8) calc(var(--s6) + env(safe-area-inset-bottom, 0px)); color: var(--soft); font-size: .93rem; }
.footer-grid { display: grid; gap: var(--s6); grid-template-columns: 1.4fr repeat(3, 1fr); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font: 700 .72rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: var(--s4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-motto { font: 800 1.6rem/1.05 var(--display); color: var(--text); margin: var(--s4) 0; }
.footer-base { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; color: var(--dim); font-size: .82rem; }

/* ---------- breadcrumbs, page heads ---------- */
.crumbs { font: 400 .8rem/1.4 var(--mono); color: var(--dim); margin-bottom: var(--s4); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5em; }
.crumbs li + li::before { content: "/"; margin-right: .5em; color: var(--line-strong); }
.crumbs a { text-decoration: none; color: var(--soft); }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.page-head { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 5vw, 56px); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-head .lead { margin-top: var(--s3); }
.page-head::after {
  content: ""; position: absolute; right: -10%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, var(--cyan)) 22%, transparent), transparent 65%);
}
.page-head > .wrap { position: relative; z-index: 1; }

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(120% 90% at 70% 10%, #18205a 0%, var(--ink-1) 55%, var(--ink-0) 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6); align-items: center; padding-block: clamp(36px, 6vw, 72px) clamp(28px, 4vw, 48px); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.7rem); line-height: .96; }
.hero h1 .l1 { display: block; white-space: nowrap; }
.hero h1 .l2 { color: var(--lime); display: block; }
.hero h1 .l3 { -webkit-text-stroke: 1.5px var(--cyan); color: transparent; display: block; }
.hero .lead { color: var(--soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s5); font: 400 .82rem/1.4 var(--mono); color: var(--dim); list-style: none; padding: 0; }
.hero-facts li::before { content: "▸ "; color: var(--lime); }
.campus { position: relative; }
.campus svg { width: 100%; height: auto; display: block; overflow: visible; }
.campus-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); opacity: .9; }
.campus .bld { cursor: pointer; }
.campus .bld:focus { outline: none; }
.campus .bld .hit { fill: transparent; }
.campus .bld .label rect { fill: var(--ink-0); stroke: var(--line-strong); transition: stroke .15s, fill .15s; }
.campus .bld .label text { fill: var(--text); font: 700 17px var(--body); }
.campus .bld .label .k { fill: var(--lime); font: 700 11px var(--mono); letter-spacing: .12em; }
.campus .bld:hover .label rect, .campus .bld:focus-visible .label rect { stroke: var(--lime); fill: #1a2410; }
.campus .bld:focus-visible .shape { filter: drop-shadow(0 0 10px var(--lime)); }
.campus .bld .shape { transition: transform .2s ease; transform-box: fill-box; transform-origin: 50% 100%; }
.campus .bld:hover .shape { transform: translateY(-4px); }
.campus-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s3); justify-content: center; }
.campus-links a { font: 700 .74rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; text-decoration: none; color: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: .65em .9em; }
.campus-links a:hover { color: var(--lime); border-color: var(--lime); }
@media (prefers-reduced-motion: no-preference) {
  .blink { animation: blink 3.2s steps(1) infinite; }
  .blink.b2 { animation-delay: -1.1s; } .blink.b3 { animation-delay: -2.3s; }
  .belt { animation: belt 1.6s linear infinite; }
  .spin { animation: spin 9s linear infinite; transform-box: fill-box; transform-origin: center; }
  .float { animation: float 5s ease-in-out infinite; transform-box: fill-box; }
  .beam { animation: beam 4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
  .drone { animation: drone 11s ease-in-out infinite; }
}
@keyframes blink { 0%, 100% { opacity: 1; } 45% { opacity: .25; } 55% { opacity: 1; } }
@keyframes belt { to { stroke-dashoffset: -24; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes beam { 50% { opacity: .35; transform: scaleY(.92); } }
@keyframes drone { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(120px, -18px); } 60% { transform: translate(260px, 8px); } 80% { transform: translate(140px, 14px); } }

/* ---------- marquee strip ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--ink-0); overflow: hidden; }
.ticker ul { display: flex; gap: var(--s6); list-style: none; margin: 0; padding: 14px 0; width: max-content; font: 700 clamp(1rem, 2vw, 1.35rem)/1 var(--display); }
.ticker li { display: flex; align-items: center; gap: var(--s6); white-space: nowrap; }
.ticker li::after { content: "✦"; color: var(--orange); font-size: .8em; }
.ticker li:nth-child(3n+1) { color: var(--lime); }
.ticker li:nth-child(3n+2) { color: var(--cyan); }
@media (prefers-reduced-motion: no-preference) { .ticker ul { animation: tick 38s linear infinite; } }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- reasons (editorial) ---------- */
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 0; border-top: 2px solid var(--paper-ink); }
.reason { padding: var(--s5) var(--s5) var(--s5) 0; border-bottom: 1px solid #d6cdb8; }
.reason .num { font: 700 .78rem/1 var(--mono); color: #c2410c; letter-spacing: .1em; }
.reason h3 { margin-top: var(--s3); font-size: 1.35rem; }
.reason p { color: var(--paper-soft); margin: 0; }

/* ---------- lab selector ---------- */
.labs { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s5); align-items: stretch; }
@media (max-width: 900px) { .labs { grid-template-columns: 1fr; } }
.lab-tabs { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 900px) { .lab-tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; } }
.lab-tab {
  --accent: var(--cyan); text-align: left; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--soft);
  font: 700 .98rem/1.2 var(--body); cursor: pointer; text-decoration: none; scroll-snap-align: start; flex: none;
}
.lab-tab .n { font: 700 .7rem/1 var(--mono); color: var(--dim); width: 22px; }
.lab-tab .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
.lab-tab[aria-selected="true"], .lab-tab:hover { color: #fff; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.lab-panel {
  --accent: var(--cyan); border-radius: var(--r-lg); border: 1px solid var(--line-strong); padding: clamp(20px, 3vw, 36px); position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--ink-2)), var(--ink-1) 70%);
  display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: var(--s5);
}
@media (max-width: 600px) { .lab-panel { grid-template-columns: 1fr; } }
.lab-panel h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.lab-panel .bot-art { align-self: end; }
.lab-panel ul { margin: var(--s4) 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lab-panel li::before { content: "→ "; color: var(--accent); font-weight: 800; }

/* ---------- cards ---------- */
.card {
  --accent: var(--cyan); position: relative; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--ink-2); text-decoration: none; color: inherit; overflow: hidden;
}
a.card { transition: transform .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .k { font: 700 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.card h3 { margin: 0; }
.card p { color: var(--soft); margin: 0; }
.card .foot { margin-top: auto; padding-top: var(--s3); display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.paper .card { background: #fff; border-color: #ddd3bf; }
.paper .card p { color: var(--paper-soft); }
.paper .card .k { color: #0b55bb; }
.card.stripe::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }

/* ---------- project windows (featured games) ---------- */
.windows { display: grid; gap: var(--s5); grid-template-columns: repeat(12, 1fr); }
.window { grid-column: span 4; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); background: var(--ink-0); text-decoration: none; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s; }
.window:first-child { grid-column: span 8; grid-row: span 2; }
.window:hover { transform: translateY(-3px); border-color: var(--lime); }
@media (max-width: 900px) { .window, .window:first-child { grid-column: span 12; grid-row: auto; } }
.window .bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font: 700 .7rem/1 var(--mono); color: var(--dim); }
.window .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.window .bar i:nth-child(1) { background: var(--red); } .window .bar i:nth-child(2) { background: var(--amber); } .window .bar i:nth-child(3) { background: var(--lime); }
.window .bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window .shot { aspect-ratio: 16 / 10; background: var(--ink-2); overflow: hidden; }
.window:first-child .shot { flex: 1; aspect-ratio: auto; min-height: 260px; }
.window .shot img { width: 100%; height: 100%; object-fit: cover; }
.window .meta { padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.window .meta b { font: 800 1.1rem/1.1 var(--display); }
.window .meta small { display: block; color: var(--dim); font-size: .8rem; margin-top: 2px; }

/* ---------- arcade cabinet ---------- */
.cabinet-head { background: linear-gradient(180deg, #170a33 0%, var(--ink-1) 100%); border-bottom: 1px solid var(--line); }
.marquee-sign {
  font: 800 clamp(2.6rem, 8vw, 6rem)/.9 var(--display); letter-spacing: -.02em; color: #fff;
  text-shadow: 0 0 18px rgba(255,79,154,.9), 0 0 42px rgba(255,79,154,.5); margin: 0;
}
.marquee-sign em { font-style: normal; color: var(--amber); text-shadow: 0 0 18px rgba(255,201,61,.85); }
.arcade-tools { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-top: var(--s5); }
@media (max-width: 640px) { .arcade-tools { grid-template-columns: 1fr; } }
.search { position: relative; }
.search input { width: 100%; min-height: 54px; padding: 0 16px 0 48px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--ink-0); color: var(--text); font: 600 1.05rem var(--body); }
.search input:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(43,228,255,.25); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--dim); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.filter { flex: none; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--soft); font: 700 .88rem var(--body); text-decoration: none; cursor: pointer; }
.filter[aria-pressed="true"], .filter[aria-current="true"] { background: var(--amber); color: #1d1300; border-color: var(--amber); }
.filter:hover { border-color: var(--amber); color: #fff; }
.filter[aria-pressed="true"]:hover, .filter[aria-current="true"]:hover { color: #1d1300; }
.filter .c { font: 700 .7rem var(--mono); opacity: .7; }
.games { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.game {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--ink-2);
  border: 1px solid var(--line); position: relative; transition: transform .15s ease, border-color .15s;
}
.game:hover, .game:focus-within { transform: translateY(-3px); border-color: var(--amber); }
.game .shot { aspect-ratio: 16 / 10; background: #0d1230; position: relative; overflow: hidden; }
.game .shot img { width: 100%; height: 100%; object-fit: cover; }
.game .shot .ph { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.4rem var(--display); color: var(--dim); text-align: center; padding: 12px; }
.game .badge-feat { position: absolute; top: 10px; left: 10px; }
.game .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game h3 { font-size: 1.2rem; margin: 0; }
.game h3 a { text-decoration: none; }
.game h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.game p { color: var(--soft); font-size: .92rem; margin: 0; }
.game .play { position: relative; z-index: 2; margin-top: auto; }
.game .where { font: 400 .74rem/1.3 var(--mono); color: var(--dim); }
.empty { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: var(--s6); text-align: center; color: var(--soft); }
.empty h3 { color: var(--text); }
.paper .empty { border-color: #c9bea6; color: var(--paper-soft); }
.paper .empty h3 { color: var(--paper-ink); }

/* game detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s6); align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.screen { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); background: var(--ink-0); aspect-ratio: 16 / 10; }
.screen img, .screen iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.factbox { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); background: var(--ink-2); }
.factbox dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .93rem; }
.factbox dt { font: 700 .72rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.factbox dd { margin: 0; }
.qr { background: #fff; border-radius: 14px; padding: 10px; width: 156px; }
.qr img { width: 136px; height: 136px; image-rendering: pixelated; }
.versions { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line-strong); }
.versions li { padding: 0 0 var(--s4) var(--s4); position: relative; }
.versions li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-1); border: 2px solid var(--amber); }
.versions li.current::before { background: var(--amber); }

/* TV mode */
.tv body, body.tv { font-size: 20px; }
body.tv .site-header, body.tv .site-footer, body.tv .no-tv { display: none; }
.tv-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); padding: 28px; }
.tv-card { background: var(--ink-2); border: 2px solid var(--line-strong); border-radius: 22px; padding: 18px; display: grid; grid-template-columns: 1fr 120px; gap: 16px; align-items: center; text-decoration: none; }
.tv-card:focus { outline: 4px solid var(--amber); outline-offset: 4px; }
.tv-card h2 { font-size: 2rem; margin: 0 0 6px; }
.tv-card img.q { background: #fff; padding: 6px; border-radius: 10px; width: 120px; height: 120px; image-rendering: pixelated; }

/* ---------- programs ---------- */
.program-list { border-top: 2px solid var(--paper-ink); }
.program-row { display: grid; grid-template-columns: 56px minmax(0, 3fr) minmax(0, 4fr) auto; gap: var(--s5); align-items: center; padding: var(--s5) 0; border-bottom: 1px solid #d6cdb8; text-decoration: none; color: inherit; }
.program-row:hover h3 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.program-row .ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--paper-ink); color: var(--accent, var(--lime)); }
.program-row .ico svg { width: 28px; height: 28px; }
.program-row h3 { margin: 0 0 4px; font-size: 1.5rem; }
.program-row p { margin: 0; color: var(--paper-soft); }
@media (max-width: 760px) { .program-row { grid-template-columns: 48px 1fr; } .program-row .ico { width: 48px; height: 48px; } .program-row > :nth-child(3), .program-row > :nth-child(4) { grid-column: 2; } }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font: 700 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-dot.on { color: #2f7d00; } .status-dot.ask { color: #b25a00; }
.dark .status-dot.on, .ink-2 .status-dot.on { color: var(--lime); }

/* ---------- journey ---------- */
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; position: relative; }
@media (max-width: 900px) { .journey { grid-template-columns: 1fr; } }
.journey li { list-style: none; padding: var(--s5); border-left: 1px solid var(--line); position: relative; }
.journey li::before { counter-increment: step; content: "0" counter(step); font: 700 .8rem/1 var(--mono); color: var(--lime); display: block; margin-bottom: var(--s3); }
.journey h3 { font-size: 1.15rem; }
.journey p { color: var(--soft); font-size: .93rem; margin: 0; }

/* ---------- worlds ---------- */
.world-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.world-hero .bg { position: absolute; inset: 0; z-index: 0; }
.world-hero .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.world-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink-1) 15%, rgba(10,14,31,.55) 60%, rgba(10,14,31,.2)); }
.world-hero .wrap { position: relative; z-index: 1; padding-block: clamp(56px, 10vw, 128px); }
.galaxy-door {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 0; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-strong);
  background: radial-gradient(90% 120% at 100% 0%, #3a1d7a 0%, #110b2e 45%, var(--ink-0) 100%);
}
@media (max-width: 860px) { .galaxy-door { grid-template-columns: 1fr; } }
.galaxy-door .txt { padding: clamp(24px, 4vw, 56px); }
.galaxy-door .pic { position: relative; min-height: 260px; }
.galaxy-door .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- forms ---------- */
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--dim); }
.paper .field .hint { color: var(--paper-soft); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=number], input[type=search], input[type=datetime-local], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--ink-0); color: var(--text);
  font: 500 1rem/1.4 var(--body);
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(43,228,255,.22); }
.paper input, .paper select, .paper textarea { background: #fff; color: var(--paper-ink); border-color: #c9bea6; }
.paper input:focus, .paper select:focus, .paper textarea:focus { border-color: #0b62d6; box-shadow: 0 0 0 3px rgba(11,98,214,.2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--lime); flex: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); margin: 0; }
.paper fieldset { border-color: #d6cdb8; }
legend { font-weight: 700; padding: 0 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: var(--r); padding: var(--s4) var(--s5); border: 1px solid var(--line-strong); background: var(--ink-2); }
.notice.ok { border-color: rgba(182,255,59,.5); background: rgba(182,255,59,.08); }
.notice.err { border-color: rgba(255,90,82,.6); background: rgba(255,90,82,.1); }
.notice.info { border-color: rgba(43,228,255,.45); background: rgba(43,228,255,.07); }
.paper .notice { background: #fff; border-color: #d6cdb8; }
.paper .notice.ok { background: #effbe1; border-color: #8ccf4b; }
.paper .notice.err { background: #fdecea; border-color: #e0786f; }
.paper .notice.info { background: #e8f3ff; border-color: #8cb8ef; }
.form-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.contact-alt { display: grid; gap: var(--s3); }
.contact-alt a { font-weight: 700; }

/* ---------- bots ---------- */
.crew { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.bot-card { --accent: var(--cyan); border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--ink-2)), var(--ink-2)); padding: var(--s4); text-align: center; text-decoration: none; display: flex; flex-direction: column; gap: 6px; align-items: center; }
a.bot-card:hover { border-color: var(--accent); }
.bot-card .bot-art { width: 120px; height: 120px; }
.bot-card b { font: 800 1.2rem/1 var(--display); }
.bot-card small { color: var(--soft); }
.bot-art { width: 100%; max-width: 180px; aspect-ratio: 1; object-fit: contain; }
.bot-art svg { width: 100%; height: 100%; }
.voice { font-style: italic; color: var(--soft); border-left: 3px solid var(--accent, var(--lime)); padding-left: var(--s3); }

/* ---------- minigame shell ---------- */
.mg-shell { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s5); align-items: start; }
@media (max-width: 900px) { .mg-shell { grid-template-columns: 1fr; } }
.mg-stage { border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--ink-0); padding: var(--s4); }
.mg-side { display: grid; gap: var(--s4); }
.levels { display: flex; flex-wrap: wrap; gap: 6px; }
.levels button { min-width: 46px; min-height: 42px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--soft); font: 700 .9rem var(--mono); cursor: pointer; }
.levels button[aria-current="true"] { border-color: var(--lime); color: #fff; background: rgba(182,255,59,.12); }
.levels button.done::after { content: " ✓"; color: var(--lime); }
.grid-board { display: grid; gap: 4px; width: 100%; max-width: 520px; margin: 0 auto; user-select: none; }
.cell { aspect-ratio: 1; border-radius: 8px; background: #111839; border: 1px solid #1f2a5c; display: grid; place-items: center; position: relative; }
.cell.wall { background: repeating-linear-gradient(45deg, #2a1a10, #2a1a10 6px, #3b2414 6px, #3b2414 12px); border-color: #5a3418; }
.cell.goal::after { content: "★"; color: var(--amber); font-size: clamp(14px, 4vw, 30px); text-shadow: 0 0 12px var(--amber); }
.cell.path { background: #13304a; }
.cell .robot { position: absolute; inset: 12%; transition: transform .25s ease; }
.cell.crash { background: #4a1414; }
.blocks { display: flex; flex-wrap: wrap; gap: 6px; min-height: 60px; padding: 10px; border-radius: 12px; border: 1.5px dashed var(--line-strong); align-items: flex-start; }
.block { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: 10px; font: 700 .9rem var(--mono); border: 0; cursor: pointer; color: #001; }
.block.F { background: var(--lime); } .block.L { background: var(--cyan); } .block.R { background: var(--sky); } .block.loop { background: var(--amber); }
.block .x { opacity: .6; }
.loop-group { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px 6px; border-radius: 12px; border: 2px solid var(--amber); }
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-sliders { display: grid; gap: var(--s3); }
.stat-row { display: grid; grid-template-columns: 90px 1fr 56px; gap: 10px; align-items: center; }
.stat-row input[type=range] { width: 100%; accent-color: var(--orange); min-height: 32px; }
.stat-row output { font: 700 1.1rem var(--mono); text-align: right; }
.rates { display: grid; gap: 8px; }
.rate { display: grid; grid-template-columns: 90px 1fr 50px; gap: 8px; align-items: center; font-size: .9rem; }
.rate .bar { height: 14px; border-radius: 7px; background: #1a2147; overflow: hidden; position: relative; }
.rate .bar i { position: absolute; inset: 0 auto 0 0; background: var(--sky); border-radius: 7px; transition: width .4s ease; }
.rate .bar .band { position: absolute; top: -3px; bottom: -3px; border: 2px solid var(--lime); border-radius: 4px; }
.rate.pass .bar i { background: var(--lime); } .rate.fail .bar i { background: var(--red); }
.signals { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.signal { border-radius: 12px; border: 2px solid var(--line-strong); background: #0f1534; padding: 6px; display: grid; gap: 4px; justify-items: center; cursor: pointer; color: var(--text); font: 700 .74rem var(--mono); min-height: 96px; }
.signal svg { width: 52px; height: 52px; }
.signal[data-label="0"] { border-color: var(--cyan); background: rgba(43,228,255,.1); }
.signal[data-label="1"] { border-color: var(--pink); background: rgba(255,79,154,.1); }
.signal.locked { cursor: default; border-style: dashed; }
.signal.right { box-shadow: 0 0 0 3px var(--lime); } .signal.wrong { box-shadow: 0 0 0 3px var(--red); }
.feature-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-toggles button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--soft); font: 700 .86rem var(--body); cursor: pointer; }
.feature-toggles button[aria-pressed="true"] { background: var(--violet); color: #fff; border-color: var(--violet); }
.feedback { border-radius: var(--r); padding: var(--s4); border: 1px solid var(--line); background: var(--ink-2); min-height: 56px; }
.feedback.ok { border-color: var(--lime); }
.feedback.bad { border-color: var(--red); }

/* ---------- stamp ceremony ---------- */
.ceremony { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(3,5,12,.78); padding: 16px; }
.ceremony .box { background: var(--paper); color: var(--paper-ink); border-radius: 26px; padding: 28px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.stamp-mark { width: 150px; height: 150px; margin: 0 auto 12px; }
@media (prefers-reduced-motion: no-preference) {
  .ceremony .stamp-mark { animation: thunk .55s cubic-bezier(.2, 1.6, .4, 1) both; }
}
@keyframes thunk { 0% { transform: scale(2.4) rotate(-18deg); opacity: 0; } 60% { transform: scale(.92) rotate(-6deg); opacity: 1; } 100% { transform: scale(1) rotate(-8deg); } }

/* ---------- passport ---------- */
.passport { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s5); align-items: start; }
@media (max-width: 900px) { .passport { grid-template-columns: 1fr; } }
.pp-card { --frame: var(--line-strong); --plate: var(--ink-0); --plate-fg: var(--text); --theme: var(--ink-2);
  border-radius: 26px; padding: var(--s5); background: var(--theme); border: 3px solid var(--frame); position: relative; overflow: hidden; }
.pp-card .avatar { width: 140px; height: 140px; margin: 0 auto; }
.pp-card .plate { margin: var(--s4) auto 0; text-align: center; background: var(--plate); color: var(--plate-fg); border-radius: 12px; padding: 10px 14px; font: 800 1.35rem/1.1 var(--display); max-width: 260px; }
.pp-card .rank { text-align: center; font: 700 .76rem var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--lime); margin-top: 10px; }
.pp-card .bal { display: flex; justify-content: center; gap: 8px; margin-top: var(--s4); font: 700 1.2rem var(--mono); color: var(--amber); }
.pp-tag { display: inline-block; font: 700 .68rem var(--mono); text-transform: uppercase; letter-spacing: .1em; padding: .4em .6em; border-radius: 6px; background: var(--orange); color: #1a0800; }
.stamps { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.stamp { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 10px; border: 2px dashed var(--line-strong); color: var(--dim); font: 700 .66rem/1.2 var(--mono); text-transform: uppercase; }
.stamp.got { border: 3px solid var(--accent, var(--lime)); color: var(--text); background: color-mix(in srgb, var(--accent, var(--lime)) 14%, transparent); transform: rotate(-6deg); }
.stamp small { display: block; font-weight: 400; text-transform: none; color: var(--dim); margin-top: 3px; }
.workshop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 420px; }
.workshop .slot { aspect-ratio: 1; border-radius: 14px; border: 1.5px dashed var(--line-strong); display: grid; place-items: center; background: #0d1230; cursor: pointer; color: var(--dim); font: 700 .7rem var(--mono); }
.workshop .slot svg { width: 72%; height: 72%; }
.meter { height: 10px; border-radius: 6px; background: #1a2147; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); border-radius: 6px; }

/* ---------- shop ---------- */
.shop-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.item { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--ink-2); padding: var(--s4); display: flex; flex-direction: column; gap: 8px; }
.item .preview { aspect-ratio: 4 / 3; border-radius: 14px; background: #0d1230; display: grid; place-items: center; overflow: hidden; }
.item .preview svg { width: 70%; height: 80%; }
.item .price { font: 700 1rem var(--mono); color: var(--amber); }
.item.owned { border-color: rgba(182,255,59,.5); }

/* ---------- learn ---------- */
.course-card .cover { aspect-ratio: 16 / 8; border-radius: 14px; overflow: hidden; background: var(--ink-0); margin-bottom: 8px; }
.lesson-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 900px) { .lesson-shell { grid-template-columns: 1fr; } }
.outline { position: sticky; top: calc(var(--header-h) + 16px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); background: var(--ink-2); font-size: .92rem; }
@media (max-width: 900px) { .outline { position: static; } }
.outline ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.outline a { display: flex; gap: 8px; text-decoration: none; padding: 8px 10px; border-radius: 10px; color: var(--soft); }
.outline a[aria-current="page"] { background: rgba(182,255,59,.1); color: #fff; }
.outline a.done::before { content: "✓"; color: var(--lime); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: var(--s4); }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: var(--s3); }
.steps > li::before { content: counter(s); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--lime); color: #0b1100; font: 800 1.1rem var(--display); }
.mission-card { border-radius: var(--r-lg); padding: var(--s5); background: linear-gradient(135deg, rgba(255,122,31,.16), rgba(255,122,31,.02)); border: 1px solid rgba(255,122,31,.4); }
.quiz { display: grid; gap: var(--s4); }
.quiz fieldset { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); cursor: pointer; min-height: 48px; }
.opt:has(input:checked) { border-color: var(--lime); background: rgba(182,255,59,.08); }
.opt input { accent-color: var(--lime); width: 20px; height: 20px; }
.video-frame { aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-0); border: 1px solid var(--line); position: relative; }
.video-frame video, .video-frame iframe, .video-frame img { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.video-frame .poster-note { position: absolute; left: 12px; bottom: 12px; }
.console { border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: linear-gradient(180deg, #0c1230, #070a19); padding: var(--s5); position: relative; overflow: hidden; }
.console::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); pointer-events: none; }
.console .k { font: 700 .7rem var(--mono); color: var(--lime); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- events ---------- */
.event-big { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s6); align-items: start; }
@media (max-width: 900px) { .event-big { grid-template-columns: 1fr; } }
.when { font: 800 clamp(1.5rem, 3vw, 2.2rem)/1.1 var(--display); }
.occ-list { display: grid; gap: 10px; }
.occ { display: grid; grid-template-columns: 84px 1fr auto; gap: var(--s4); align-items: center; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink-2); text-decoration: none; }
.occ .date { text-align: center; border-radius: 12px; background: var(--ink-0); padding: 8px; font: 700 .72rem var(--mono); text-transform: uppercase; color: var(--lime); }
.occ .date b { display: block; font: 800 1.8rem/1 var(--display); color: #fff; }
.occ.cancelled { opacity: .6; }

/* ---------- tables (admin, partners) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 700 .7rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); background: var(--ink-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100dvh - var(--header-h)); }
@media (max-width: 860px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-nav { border-right: 1px solid var(--line); padding: var(--s4); background: var(--ink-0); display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 860px) { .admin-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); } }
.admin-nav a { text-decoration: none; padding: 10px 12px; border-radius: 10px; color: var(--soft); font-weight: 600; white-space: nowrap; }
.admin-nav a[aria-current="page"], .admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-main { padding: var(--s5) var(--gutter); min-width: 0; }
.admin-main h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); background: var(--ink-2); }
.panel + .panel { margin-top: var(--s4); }
.sortable li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink-0); margin-bottom: 6px; }
.sortable li.dragging { opacity: .5; }
.sortable .grip { cursor: grab; color: var(--dim); font: 700 1.1rem var(--mono); }
.pill-status { font: 700 .66rem var(--mono); text-transform: uppercase; padding: .35em .55em; border-radius: 6px; }
.pill-status.published, .pill-status.working, .pill-status.confirmed, .pill-status.active { background: rgba(182,255,59,.16); color: var(--lime); }
.pill-status.draft, .pill-status.unverified, .pill-status.waitlisted, .pill-status.new, .pill-status.interest { background: rgba(255,201,61,.16); color: var(--amber); }
.pill-status.unavailable, .pill-status.cancelled, .pill-status.revoked, .pill-status.archived { background: rgba(255,90,82,.16); color: var(--red); }
.pill-status.read { background: rgba(90,168,255,.16); color: var(--sky); }
dialog { border: 1px solid var(--line-strong); border-radius: 20px; background: var(--ink-1); color: var(--text); padding: var(--s5); width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 300; background: var(--ink-0); border: 1px solid var(--lime); color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
.toast.err { border-color: var(--red); }

/* ---------- media slots ---------- */
.media-slot { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-0); }
.media-slot video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .no-print, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .pp-card, .card, .panel { break-inside: avoid; border-color: #999; background: #fff !important; color: #000; }
  .stamp.got { color: #000; background: none; }
  a { text-decoration: none; }
  .section { padding-block: 16px; }
  .printable { color: #000; }
}

@media (max-width: 440px) {
  .brand small { display: none; }
  .brand b { font-size: 1.02rem; }
  .brand img { width: 38px; height: 30px; }
  .site-header .wrap { gap: 8px; }
  .header-cta { gap: 6px; }
  .passport-pill { padding: .5em .65em; }
  .passport-pill .pp-label { display: none; }
}
.search input[type=search] { padding-left: 48px; }
[tabindex="-1"]:focus { outline: none; }
@media (max-width: 900px) { .lesson-shell .outline { order: 2; } }

/* ---------- community / expansion ---------- */
.community { background: radial-gradient(70% 60% at 15% 0%, rgba(43,228,255,.16), transparent 60%), radial-gradient(60% 60% at 90% 100%, rgba(255,122,31,.18), transparent 60%), linear-gradient(180deg, #0b1238, var(--ink-1)); border-block: 1px solid var(--line); overflow: hidden; }
.community-head { max-width: 860px; margin: 0 auto var(--s7); text-align: center; }
.community-head .eyebrow { justify-content: center; }
.community-head h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
.community-head .lead { margin-inline: auto; }
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 900px) { .paths { grid-template-columns: 1fr; } }
.path-panel { border-radius: 28px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--ink-2)), var(--ink-2) 55%); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.path-panel:hover { transform: translateY(-4px); box-shadow: 0 30px 70px -40px var(--accent); }
.path-art { aspect-ratio: 520 / 340; position: relative; }
.path-art svg, .path-art .media-slot, .path-art video { width: 100%; height: 100%; display: block; }
.path-body { padding: clamp(20px, 3vw, 34px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.path-body h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.path-body p { color: var(--soft); margin: 0; }
.path-body .tags { list-style: none; padding: 0; margin: 4px 0 8px; }
.path-body .btn { align-self: flex-start; margin-top: auto; }
.family-strip { margin-top: var(--s5); display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: center; padding: 18px 22px; border-radius: 20px; background: var(--paper); color: var(--paper-ink); text-decoration: none; border: 2px solid transparent; }
.family-strip:hover { border-color: var(--lime); }
.family-strip .pin { width: 52px; height: 52px; border-radius: 14px; background: var(--paper-ink); color: var(--lime); display: grid; place-items: center; }
.family-strip b { font: 800 1.3rem/1.1 var(--display); display: block; }
.family-strip small { color: var(--paper-soft); font-size: .95rem; }
.family-strip .btn { --bg: var(--paper-ink); --fg: #fff; --bd: var(--paper-ink); box-shadow: 0 3px 0 0 #000; }
@media (max-width: 640px) { .family-strip { grid-template-columns: auto 1fr; } .family-strip .btn { grid-column: 1 / -1; justify-self: start; } }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 2.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
  .pulse.p1 { animation-delay: -.9s; } .pulse.p2 { animation-delay: -1.7s; }
  .float.f2 { animation-delay: -1.6s; } .float.f3 { animation-delay: -3.1s; }
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }

/* nav dropdown */
.navmenu { position: relative; }
.navmenu > summary { list-style: none; cursor: pointer; font-weight: 600; font-size: .93rem; color: var(--soft); padding: .55em .65em; border-radius: 9px; }
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu > summary::after { content: " ▾"; font-size: .75em; }
.navmenu[open] > summary, .navmenu > summary:hover, .navmenu.current > summary { color: #fff; background: rgba(255,255,255,.07); }
.navmenu.current > summary { box-shadow: inset 0 -2px 0 var(--lime); }
.navmenu .panel-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; min-width: 290px; padding: 8px; border-radius: 14px; background: var(--ink-1); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0,0,0,.5); display: grid; gap: 2px; }
.navmenu .panel-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.navmenu .panel-menu a small { display: block; color: var(--dim); font-weight: 500; font-size: .8rem; }
.navmenu .panel-menu a:hover { background: rgba(255,255,255,.06); }
.drawer .group { grid-column: 1 / -1; font: 700 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 10px 4px 2px; }
.nav a, .navmenu > summary { white-space: nowrap; padding: .55em .55em; font-size: .92rem; }
.nav { gap: 0; }
@media (max-width: 1279px) { .nav { display: none; } .menu-toggle { display: inline-flex; } .header-cta .hide-sm { display: none; } }
@media (min-width: 1280px) { .menu { display: none; } }
@media (max-width: 1279px) and (min-width: 1081px) { .menu { display: block; } }

/* locations */
.area-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.loc-list { display: grid; gap: var(--s4); }
.loc-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: start; padding: var(--s5); border-radius: var(--r-lg); background: #fff; border: 1px solid #ddd3bf; }
@media (max-width: 720px) { .loc-card { grid-template-columns: 1fr; } }
.loc-card h3 { margin: 4px 0 6px; font-size: 1.35rem; }
.loc-card .where { font: 700 .74rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #0b55bb; }
.loc-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0 0; font-size: .94rem; }
.loc-card dt { font-weight: 700; color: var(--paper-ink); }
.loc-card dd { margin: 0; color: var(--paper-soft); }
.loc-card .act { display: grid; gap: 8px; justify-items: stretch; min-width: 220px; }
.area-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: end; margin: var(--s7) 0 var(--s4); padding-bottom: 12px; border-bottom: 2px solid var(--paper-ink); }
.area-head:first-child { margin-top: 0; }
.area-head h2 { margin: 0; }

/* partner hub & expansion */
.hub { display: grid; gap: var(--s5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .hub { grid-template-columns: 1fr; } }
.hub .card { padding: var(--s6); }
.hub .card h2 { font-size: 1.6rem; margin: 0; }
.asset-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.asset { border-radius: var(--r-lg); padding: var(--s5); background: var(--ink-2); border: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.asset .ic { width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center; color: var(--ink-0); background: var(--accent, var(--lime)); }
.asset h3 { font-size: 1.15rem; margin: 2px 0 6px; }
.asset p { margin: 0; color: var(--soft); font-size: .95rem; }
.asset a { font-weight: 700; }
.choice { display: grid; gap: var(--s5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .choice { grid-template-columns: 1fr; } }
.choice .card { padding: var(--s6); }
.choice .card h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.formats { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.example { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; }
a.example:hover { border-color: var(--accent, var(--cyan)); }
.example img, .example .art { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; background: #0d1230; }
.example .art svg { width: 64px; height: 64px; margin: 0 auto; display: block; }
.example b { display: block; }
.example small { color: var(--soft); }
