/* VICE6 · "Vice night" (dark) / "Vice day" (light)
   Palette from GTA VI's Vice City key art: sunset orange, neon pink, dusk purple, ocean turquoise.
   Perf rules: compositor-only motion (transform/opacity); the aurora only drifts on desktop;
   off-screen cards skip rendering (content-visibility); no web fonts, no framework. */

/* ---------- tokens ---------- */
:root {
  --bg: #140f2b;
  --ink: #fbf6ff;
  --ink-2: rgba(246, 238, 255, 0.8);
  --ink-3: rgba(246, 238, 255, 0.64);
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(28, 18, 58, 0.74);
  --glass-top: rgba(255, 255, 255, 0.1);
  --glass-edge: rgba(255, 255, 255, 0.13);
  --glass-hi: rgba(255, 255, 255, 0.2);
  --glass-solid: rgba(26, 18, 56, 0.94);
  --head: rgba(20, 13, 44, 0.62);
  --well: rgba(8, 4, 26, 0.36);
  --tray: rgba(8, 4, 26, 0.42);
  --tray-blur: blur(14px) saturate(140%);
  --well-edge: rgba(255, 255, 255, 0.06);
  --shadow: 0 22px 44px -26px rgba(4, 1, 18, 0.95);
  --hot: #ff3d9a;   /* Vice neon pink */
  --teal: #2ee6d6;  /* Vice ocean */
  --ok: #47e08f;
  --mid: #ffb547;
  --bad: #ff4d5e;
  --chip-on: #fbf6ff;
  --chip-on-ink: #1a1238;
  --sky: linear-gradient(180deg, #0c0920 0%, #1b1240 30%, #391b5b 58%, #78296d 82%, #c13f6e 100%);
  --blob-1: rgba(255, 61, 154, 0.42);
  --sun-a: 0.95;
  --palm: #07051a;
  --palm-2: #1d0f3a;
  --city: #26103f;
  --win: #ffbf66;
  --win-a: 0.8;
  --stars-a: 0.9;
  --sea: linear-gradient(180deg, #5c2266 0%, #2b1546 32%, #110a28 100%);
  --glint: rgba(255, 186, 104, 0.8);
  --dusk: linear-gradient(180deg, rgba(6, 3, 22, 0.8), rgba(6, 3, 22, 0.35) 60%, transparent);
  --hz: 22vh;
  --cityh: clamp(84px, 15vh, 170px);
  --sun: clamp(210px, 42vmin, 500px);
  --sun-x: 66%;
  /* GTA VI logo gradient, sampled from the official "VI": royal blue -> violet -> magenta -> coral -> orange -> amber */
  --logo: linear-gradient(180deg, #3d55e8 0%, #8247dc 28%, #d94bb0 52%, #ff6f7d 72%, #ff9d4a 90%, #ffb84e 100%);
  --logo-fill: linear-gradient(160deg, #3d55e8 -20%, #8247dc 12%, #d94bb0 48%, #ff6f7d 80%, #ff9d4a 112%);
  /* Typography per Apple HIG: the platform's system font (SF Pro on Apple, Segoe UI Variable on Windows, Roboto on Android).
     Zero bytes to download, no flash of unstyled text; optical sizes (Text vs Display) are chosen by size automatically. */
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --r: 24px;
  --hh: 64px;
  --ctl: 44px;
  --edge: inset 0 0 0 1px var(--glass-edge);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #fbeef4; --ink: #23163f; --ink-2: rgba(35, 22, 63, 0.76); --ink-3: rgba(35, 22, 63, 0.56); --line: rgba(35, 22, 63, 0.09);
  --glass: rgba(255, 255, 255, 0.72); --glass-top: rgba(255, 255, 255, 0.55); --glass-edge: rgba(255, 255, 255, 0.85); --glass-hi: #fff; --glass-solid: rgba(255, 249, 252, 0.95);
  --head: rgba(255, 245, 250, 0.68); --well: rgba(35, 22, 63, 0.07); --well-edge: rgba(35, 22, 63, 0.06); --shadow: 0 22px 40px -26px rgba(120, 41, 109, 0.5);
  --hot: #e0237f; --teal: #07857d; --ok: #0f9a55; --mid: #a86400; --bad: #d4243b; --chip-on: #23163f; --chip-on-ink: #fff;
  --sky: linear-gradient(180deg, #ffeedd 0%, #ffd6dc 38%, #f8b9d8 68%, #cfa9f2 100%);
  --blob-1: rgba(255, 61, 154, 0.26); --sun-a: 1; --palm: rgba(150, 92, 190, 0.34); --palm-2: rgba(170, 120, 210, 0.22); --city: rgba(140, 90, 185, 0.22); --tray: rgba(96, 56, 88, 0.48); --win-a: 0; --stars-a: 0; --sea: linear-gradient(180deg, #f7b2cf 0%, #d0a3ec 45%, #a08ce8 100%); --glint: rgba(255, 255, 255, 0.85); --dusk: linear-gradient(180deg, rgba(110, 50, 140, 0.4), transparent 70%);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hh) + 20px); interpolate-size: allow-keywords; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 17px/1.47 var(--font); letter-spacing: -0.01em; font-optical-sizing: auto; font-kerning: normal;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 99; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); }
.skip:focus { left: 10px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--hot); color: #fff; }

/* ---------- backdrop: Vice City sunset, fixed on its own layer ----------
   Back to front: sky, stars, aurora, dusk, sun + glow, skyline + windows + sea + glint, palms, grain.
   Parallax: scroll-driven (native scroll timeline) and pointer-driven (desktop). Transform/opacity only. */
.bg { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; overflow: hidden; pointer-events: none; transform: translateZ(0); background: var(--sky);
  --city-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 170' width='1200' height='170'%3E%3Cpath d='M0 170V31h18V170zM18 170V79h57V170zM75 170V75h58V170zM133 170V84h32V170zM165 170V120h51V170zM216 170V80h52V170zM222 80v-6h26v6zM268 170V39h49V170zM272 39v-8h41v8z M276 31v-7h33v7zM291.5 24v-12h2v0zM291.5 24v-12h2v12zM322 170V102h45V170zM367 170V103h20V170zM387 170V134h18V170zM405 170V102h44V170zM449 170V102h49V170zM498 170V79h39V170zM540 170V128h37V170zM577 170V48h25V170zM585 48v-23h2v23zM602 170V104h51V170zM656 170V78h35V170zM691 170V124h21V170zM712 170V106h35V170zM747 170V106h30V170zM777 170V78h35V170zM812 170V106h33V170zM845 170V108h47V170zM892 170V77h41V170zM933 170V126h25V170zM963 170V99h55V170zM969 99v-6h28v6zM1018 170V127h57V170zM1075 170V110h20V170zM1095 170V96h47V170zM1101 96v-6h24v6zM1142 170V97h47V170zM1148 97v-6h24v6zM1189 170V98h11V170z'/%3E%3C/svg%3E");
  --win-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 170' width='1200' height='170'%3E%3Cpath d='M4 147h3v4h-3zM22 87h3v4h-3zM50 87h3v4h-3zM57 87h3v4h-3zM29 114h3v4h-3zM57 132h3v4h-3zM64 150h3v4h-3zM22 159h3v4h-3zM50 159h3v4h-3zM107 119h3v4h-3zM121 119h3v4h-3zM79 128h3v4h-3zM100 128h3v4h-3zM121 146h3v4h-3zM158 137h3v4h-3zM144 155h3v4h-3zM183 155h3v4h-3zM234 97h3v4h-3zM255 97h3v4h-3zM220 106h3v4h-3zM227 115h3v4h-3zM248 115h3v4h-3zM255 115h3v4h-3zM255 124h3v4h-3zM234 142h3v4h-3zM248 151h3v4h-3zM255 151h3v4h-3zM248 160h3v4h-3zM279 47h3v4h-3zM286 47h3v4h-3zM300 56h3v4h-3zM286 65h3v4h-3zM307 65h3v4h-3zM307 119h3v4h-3zM279 137h3v4h-3zM286 155h3v4h-3zM354 110h3v4h-3zM371 138h3v4h-3zM378 147h3v4h-3zM430 110h3v4h-3zM437 119h3v4h-3zM416 137h3v4h-3zM437 146h3v4h-3zM409 155h3v4h-3zM437 155h3v4h-3zM467 128h3v4h-3zM481 137h3v4h-3zM460 146h3v4h-3zM467 146h3v4h-3zM502 114h3v4h-3zM509 150h3v4h-3zM530 150h3v4h-3zM544 136h3v4h-3zM565 145h3v4h-3zM588 65h3v4h-3zM581 83h3v4h-3zM595 83h3v4h-3zM581 101h3v4h-3zM588 119h3v4h-3zM613 112h3v4h-3zM620 112h3v4h-3zM641 121h3v4h-3zM627 139h3v4h-3zM627 157h3v4h-3zM634 157h3v4h-3zM660 104h3v4h-3zM660 113h3v4h-3zM660 122h3v4h-3zM681 140h3v4h-3zM660 149h3v4h-3zM695 141h3v4h-3zM723 114h3v4h-3zM716 132h3v4h-3zM723 141h3v4h-3zM730 141h3v4h-3zM758 141h3v4h-3zM802 86h3v4h-3zM802 104h3v4h-3zM781 149h3v4h-3zM823 132h3v4h-3zM837 132h3v4h-3zM816 150h3v4h-3zM823 159h3v4h-3zM877 143h3v4h-3zM917 85h3v4h-3zM924 94h3v4h-3zM924 112h3v4h-3zM917 148h3v4h-3zM917 157h3v4h-3zM995 134h3v4h-3zM1002 134h3v4h-3zM974 152h3v4h-3zM1043 135h3v4h-3zM1064 144h3v4h-3zM1036 153h3v4h-3zM1050 153h3v4h-3zM1079 136h3v4h-3zM1099 104h3v4h-3zM1127 131h3v4h-3zM1167 132h3v4h-3zM1146 141h3v4h-3zM1160 159h3v4h-3z'/%3E%3C/svg%3E");
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 400' width='600' height='400'%3E%3Cg fill='white'%3E%3Ccircle cx='128' cy='163' r='1.0' fill-opacity='0.39'/%3E%3Ccircle cx='426' cy='244' r='1.1' fill-opacity='0.49'/%3E%3Ccircle cx='9' cy='91' r='0.9' fill-opacity='0.44'/%3E%3Ccircle cx='492' cy='235' r='0.7' fill-opacity='0.39'/%3E%3Ccircle cx='63' cy='64' r='0.6' fill-opacity='0.82'/%3E%3Ccircle cx='442' cy='365' r='0.6' fill-opacity='0.43'/%3E%3Ccircle cx='268' cy='19' r='1.2' fill-opacity='0.64'/%3E%3Ccircle cx='265' cy='304' r='0.6' fill-opacity='0.60'/%3E%3Ccircle cx='291' cy='106' r='1.2' fill-opacity='0.62'/%3E%3Ccircle cx='433' cy='260' r='0.9' fill-opacity='0.37'/%3E%3Ccircle cx='155' cy='288' r='0.9' fill-opacity='0.65'/%3E%3Ccircle cx='430' cy='280' r='0.6' fill-opacity='0.72'/%3E%3Ccircle cx='432' cy='84' r='1.1' fill-opacity='0.44'/%3E%3Ccircle cx='321' cy='374' r='1.2' fill-opacity='0.46'/%3E%3Ccircle cx='389' cy='125' r='1.1' fill-opacity='0.76'/%3E%3Ccircle cx='269' cy='257' r='0.6' fill-opacity='0.63'/%3E%3Ccircle cx='216' cy='75' r='1.0' fill-opacity='0.47'/%3E%3Ccircle cx='9' cy='379' r='1.3' fill-opacity='0.47'/%3E%3Ccircle cx='442' cy='299' r='0.6' fill-opacity='0.53'/%3E%3Ccircle cx='328' cy='124' r='1.3' fill-opacity='0.95'/%3E%3Ccircle cx='27' cy='173' r='0.8' fill-opacity='0.54'/%3E%3Ccircle cx='444' cy='49' r='0.9' fill-opacity='0.96'/%3E%3Ccircle cx='6' cy='50' r='1.0' fill-opacity='0.60'/%3E%3Ccircle cx='175' cy='315' r='0.9' fill-opacity='0.51'/%3E%3Ccircle cx='518' cy='68' r='0.8' fill-opacity='0.51'/%3E%3Ccircle cx='130' cy='299' r='0.8' fill-opacity='0.95'/%3E%3Ccircle cx='544' cy='363' r='0.9' fill-opacity='0.50'/%3E%3Ccircle cx='377' cy='128' r='1.0' fill-opacity='0.99'/%3E%3Ccircle cx='68' cy='231' r='1.3' fill-opacity='0.41'/%3E%3Ccircle cx='337' cy='119' r='0.6' fill-opacity='0.72'/%3E%3Ccircle cx='498' cy='164' r='1.1' fill-opacity='0.99'/%3E%3Ccircle cx='296' cy='37' r='1.2' fill-opacity='0.65'/%3E%3Ccircle cx='501' cy='382' r='0.8' fill-opacity='0.93'/%3E%3Ccircle cx='339' cy='284' r='1.4' fill-opacity='0.56'/%3E%3Ccircle cx='32' cy='274' r='1.2' fill-opacity='0.58'/%3E%3Ccircle cx='595' cy='82' r='0.5' fill-opacity='0.38'/%3E%3Ccircle cx='98' cy='285' r='0.8' fill-opacity='0.73'/%3E%3Ccircle cx='87' cy='301' r='1.2' fill-opacity='0.42'/%3E%3Ccircle cx='83' cy='299' r='0.9' fill-opacity='0.75'/%3E%3Ccircle cx='105' cy='370' r='1.3' fill-opacity='0.41'/%3E%3Ccircle cx='454' cy='303' r='0.5' fill-opacity='0.95'/%3E%3Ccircle cx='446' cy='174' r='0.5' fill-opacity='0.49'/%3E%3Ccircle cx='173' cy='87' r='1.0' fill-opacity='0.62'/%3E%3Ccircle cx='328' cy='240' r='0.8' fill-opacity='0.69'/%3E%3Ccircle cx='345' cy='354' r='0.7' fill-opacity='0.82'/%3E%3Ccircle cx='534' cy='66' r='1.0' fill-opacity='0.37'/%3E%3Ccircle cx='529' cy='152' r='0.5' fill-opacity='0.57'/%3E%3Ccircle cx='443' cy='241' r='1.3' fill-opacity='0.46'/%3E%3Ccircle cx='80' cy='131' r='1.1' fill-opacity='0.92'/%3E%3Ccircle cx='247' cy='375' r='1.0' fill-opacity='0.45'/%3E%3Ccircle cx='192' cy='167' r='1.0' fill-opacity='0.70'/%3E%3Ccircle cx='350' cy='142' r='1.0' fill-opacity='0.93'/%3E%3Ccircle cx='468' cy='103' r='0.5' fill-opacity='1.00'/%3E%3Ccircle cx='265' cy='37' r='1.0' fill-opacity='0.91'/%3E%3Ccircle cx='125' cy='131' r='1.2' fill-opacity='0.35'/%3E%3Ccircle cx='571' cy='32' r='0.7' fill-opacity='0.44'/%3E%3Ccircle cx='295' cy='21' r='1.1' fill-opacity='0.41'/%3E%3Ccircle cx='77' cy='63' r='0.8' fill-opacity='0.75'/%3E%3Ccircle cx='322' cy='395' r='0.7' fill-opacity='0.38'/%3E%3Ccircle cx='499' cy='33' r='0.6' fill-opacity='0.74'/%3E%3Ccircle cx='306' cy='77' r='1.0' fill-opacity='0.67'/%3E%3Ccircle cx='549' cy='258' r='1.0' fill-opacity='0.98'/%3E%3Ccircle cx='180' cy='306' r='0.6' fill-opacity='0.37'/%3E%3Ccircle cx='278' cy='288' r='1.1' fill-opacity='0.64'/%3E%3Ccircle cx='28' cy='253' r='0.5' fill-opacity='0.48'/%3E%3Ccircle cx='429' cy='396' r='0.8' fill-opacity='0.70'/%3E%3Ccircle cx='474' cy='257' r='1.0' fill-opacity='0.78'/%3E%3Ccircle cx='165' cy='159' r='0.9' fill-opacity='0.72'/%3E%3Ccircle cx='314' cy='164' r='0.5' fill-opacity='0.70'/%3E%3Ccircle cx='93' cy='148' r='1.0' fill-opacity='0.76'/%3E%3C/g%3E%3C/svg%3E"); }
.bg > * { position: absolute; }
.bg-sky { left: 0; top: 0; right: 0; bottom: 0; background: radial-gradient(70% 45% at 8% 0%, rgba(155, 107, 255, 0.28), transparent 70%), radial-gradient(60% 40% at 100% 20%, var(--blob-1), transparent 70%); }
.bg-stars { left: 0; top: 0; right: 0; height: 70%; background: var(--stars) 0 0 / 600px 400px repeat; opacity: var(--stars-a);
  -webkit-mask: linear-gradient(#000 30%, transparent); mask: linear-gradient(#000 30%, transparent); }
.bg-dusk { left: 0; top: 0; right: 0; bottom: 0; background: var(--dusk); opacity: 0; }
.bg-sunwrap { left: var(--sun-x); bottom: var(--hz); width: 0; height: 0; }
.bg-glow { position: absolute; left: calc(var(--sun) * -1.6); top: calc(var(--sun) * -1.9); width: calc(var(--sun) * 3.2); height: calc(var(--sun) * 2.6); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 150, 70, 0.5), rgba(255, 61, 154, 0.2) 45%, transparent); }
.bg-sun { position: absolute; left: calc(var(--sun) / -2); top: calc(var(--sun) * -0.66); width: var(--sun); height: var(--sun); border-radius: 50%; opacity: var(--sun-a);
  background: linear-gradient(180deg, #ffe08a 0%, #ffb347 30%, #ff7a45 55%, #ff3d9a 85%);
  -webkit-mask: linear-gradient(180deg, #000 0 50%, transparent 50% 53%, #000 53% 59%, transparent 59% 63%, #000 63% 68%, transparent 68% 73%, #000 73%);
          mask: linear-gradient(180deg, #000 0 50%, transparent 50% 53%, #000 53% 59%, transparent 59% 63%, #000 63% 68%, transparent 68% 73%, #000 73%); }
.bg-land { left: 0; right: 0; bottom: 0; height: calc(var(--hz) + var(--cityh)); }
.bg-land > div { position: absolute; left: 0; right: 0; }
.bg-city, .bg-win { top: 0; height: var(--cityh); background: var(--city);
  -webkit-mask: var(--city-mask) repeat-x left bottom / auto 100%; mask: var(--city-mask) repeat-x left bottom / auto 100%; }
.bg-win { background: var(--win); opacity: var(--win-a); -webkit-mask-image: var(--win-mask); mask-image: var(--win-mask); }
.bg-sea { top: var(--cityh); bottom: 0; overflow: hidden; background: var(--sea); box-shadow: inset 0 1px 0 rgba(255, 214, 170, 0.45); }
.bg-glint { position: absolute; left: var(--sun-x); top: 2px; width: calc(var(--sun) * 1.15); height: 80%; translate: -50% 0;
  background: repeating-linear-gradient(180deg, var(--glint) 0 2px, transparent 2px 9px);
  -webkit-mask: radial-gradient(ellipse 50% 100% at 50% 0, #000 15%, transparent 70%); mask: radial-gradient(ellipse 50% 100% at 50% 0, #000 15%, transparent 70%); }
.bg-palms { bottom: -60px; height: min(86vh, 840px); width: auto; aspect-ratio: 520 / 700; color: var(--palm); }
.bg-palms-l { left: -4vw; }
.bg-palms-r { right: -4vw; scale: -1 1; }
@media (max-width: 760px) {
  :root { --hz: 17vh; --sun-x: 70%; --sun: clamp(190px, 58vw, 300px); }
  .bg-palms { height: 62vh; }
  .bg-palms-l { left: -16vw; } .bg-palms-r { right: -18vw; }
}

/* Light parallax (desktop only): three layers move, driven by the native scroll timeline (off the main thread).
   No pointer tracking, no looping animations, no blend modes. */
@supports (animation-timeline: scroll()) {
  /* desktop / laptop only: phones and tablets keep a still background */
  @media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    .bg-sunwrap, .bg-palms, .bg-dusk { animation-timing-function: linear; animation-fill-mode: both; animation-duration: auto; animation-timeline: scroll(root); }
    .bg-sunwrap { animation-name: sun-set; }
    .bg-palms { animation-name: px-palms; }
    .bg-dusk { animation-name: dusk; }
  }
}
@keyframes sun-set { to { translate: 0 calc(var(--sun) * 0.4); } }
@keyframes px-palms { to { translate: 0 -60px; } }
@keyframes dusk { to { opacity: 1; } }

/* ---------- glass primitives ---------- */
.glass, .row, .glass-panel, .faq details, .pg {
  background: linear-gradient(165deg, var(--glass-top), transparent 46%), var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}
/* No live blur on content: scrolling never re-blurs. Real blur is reserved for the header, toolbar and sheet. */

/* ---------- header ---------- */
.top { position: -webkit-sticky; position: sticky; top: 0; z-index: 40; background: var(--head); border-bottom: 1px solid transparent; transition: border-color 0.25s, box-shadow 0.25s; view-transition-name: top; }
.top::after, .rail::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 22px; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: linear-gradient(var(--head), transparent); }
.top.stuck::after { opacity: 1; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .top { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); } }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .top { background: var(--glass-solid); } }
.top-row { display: flex; align-items: center; gap: 14px; height: var(--hh); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; min-height: 44px; border-radius: 12px; }
.brand-sun { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #ffd66b, #ff8a3d 50%, #ff3d9a);
  -webkit-mask: linear-gradient(#000 0 54%, transparent 54% 61%, #000 61% 71%, transparent 71% 78%, #000 78%); mask: linear-gradient(#000 0 54%, transparent 54% 61%, #000 61% 71%, transparent 71% 78%, #000 78%); }
.brand-name { font: italic 900 21px/1 var(--display); letter-spacing: -0.03em; text-transform: uppercase; color: var(--ink); }
.brand-name b { font-weight: inherit; padding-right: 0.06em; background: var(--logo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { position: relative; display: block; flex: 1 1 auto; max-width: 520px; margin: 0 auto; }
.search svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; transition: stroke 0.2s; }
.search input { width: 100%; height: var(--ctl); padding: 0 44px 0 44px; border-radius: 999px; border: 0; background: var(--well); color: var(--ink);
  font: 400 16px var(--font); -webkit-appearance: none; appearance: none; box-shadow: var(--edge), inset 0 1px 2px rgba(0, 0, 0, 0.18); transition: box-shadow 0.25s, background-color 0.2s; }
.search input::placeholder { color: var(--ink-3); text-overflow: ellipsis; }
.search input:focus { outline: none; background: var(--glass-solid); box-shadow: inset 0 0 0 1.5px var(--hot), 0 0 0 4px rgba(255, 61, 154, 0.22), 0 8px 30px -10px rgba(255, 61, 154, 0.5); }
.search input:focus ~ svg, .search:focus-within svg { stroke: var(--hot); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; background: var(--ink-3)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 7l6 6M13 7l-6 6' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/20px no-repeat; }
.search kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); min-width: 22px; padding: 2px 6px; border-radius: 7px; border: 1px solid var(--line); font: 600 12px var(--font); color: var(--ink-3); text-align: center; transition: opacity 0.15s; }
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { opacity: 0; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* platform toggle: brand pill slides under the active console */
.plat { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: var(--ctl); padding: 0; border-radius: 999px; background: var(--well); box-shadow: var(--edge); }
.plat::before { content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
  background: linear-gradient(180deg, #2f7bff, #0050c8); box-shadow: 0 8px 18px -8px rgba(0, 80, 200, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.5s var(--spring), background 0.3s, box-shadow 0.3s; }
:root[data-platform='xbox'] .plat::before { transform: translateX(100%); background: linear-gradient(180deg, #23b123, #0e7a0e); box-shadow: 0 8px 18px -8px rgba(16, 124, 16, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.plat button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: var(--ctl); padding: 0 16px; border: 0; border-radius: 999px; background: transparent; line-height: 1;
  color: var(--ink-2); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; transition: color 0.25s, transform 0.15s var(--ease); }
.plat button[aria-checked='true'] { color: #fff; }
.plat button:active { transform: scale(0.94); }
.plat .mark { width: 18px; height: 18px; }
.icon-btn { display: grid; place-items: center; width: var(--ctl); height: var(--ctl); padding: 0; border-radius: 50%; border: 0; box-shadow: var(--edge); background: var(--well); cursor: pointer; touch-action: manipulation; transition: transform 0.2s var(--spring), border-color 0.2s; }
.icon-btn:active { transform: scale(0.9) rotate(-20deg); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .icon-btn:hover, .plat:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); } }
.t-moon { display: none; }
:root[data-theme='light'] .t-sun { display: none; } :root[data-theme='light'] .t-moon { display: block; }
@media (max-width: 760px) {
  :root { --hh: 60px; }
  .top-row { gap: 8px; }
  .brand-name { display: none; }
  .search { max-width: none; }
  .search input { padding: 0 12px 0 40px; }
  .search svg { left: 13px; }
  .search kbd { display: none; }
  .plat button span { display: none; }
  .plat button { width: 44px; padding: 0; }
  .plat .mark { width: 19px; height: 19px; }
}

/* ---------- hero ---------- */
.hero { padding-top: 40px; padding-bottom: 18px; }
.kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px; height: 32px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--well); box-shadow: var(--edge); line-height: 1; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kicker b { color: var(--ink); }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.dot::after { content: ''; position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(1); opacity: 0.6; } to { transform: scale(3); opacity: 0; } }
.hero h1 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.86; font-size: clamp(54px, 10.5vw, 128px); }
.h-a { display: block; color: var(--ink); }
.h-b { display: block; padding-right: 0.1em; background: var(--logo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { margin: 18px 0 18px; max-width: 600px; font-size: 17px; color: var(--ink-2); text-wrap: pretty; }

/* "How to enter (?)" trigger + popover */
.help { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.help::after { content: ''; position: absolute; left: -6px; right: -6px; top: -12px; bottom: -12px; } /* 44pt hit area */
.help i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--well); box-shadow: var(--edge); color: var(--ink); font: 800 11px/1 var(--font); font-style: normal; text-decoration: none; }
@media (hover: hover) { .help:hover { color: var(--ink); } }
.pop { position: fixed; inset: auto; margin: 0; width: min(340px, calc(100vw - 24px)); padding: 16px 16px 14px; border: 0; border-radius: 20px; color: var(--ink);
  background: var(--glass-solid); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 24px 60px -18px rgba(0, 0, 0, 0.7); display: none; }
.pop.open { display: block; z-index: 80; }
.pop:popover-open { display: block; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .pop { background: var(--head); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); } }
@media (prefers-reduced-motion: no-preference) { .pop:popover-open, .pop.open { animation: pop-in 0.18s var(--ease); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
.pop-h { margin: 0 0 4px; font: 700 17px/1.3 var(--display); }
.pop-f { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.pop .howto { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0; list-style: none; }
.pop .howto .chev { display: none; }
.pop .howto .step { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; }
.pop .howto .step + .chev + .step { border-top: 1px solid var(--line); }
.pop .howto .keys { grid-column: 3; grid-row: 1; justify-content: flex-end; }
.pop .howto .lbl { grid-column: 2; grid-row: 1; margin: 0; font-size: 15px; }
.pop .howto .k { --s: 34px; }

/* how-to strip */
.howto { list-style: none; margin: 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 20px; border-radius: var(--r); }
.howto .step { display: flex; align-items: center; gap: 8px; }
.howto .keys { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.howto .k { --s: 38px; }
.howto .num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--logo-fill); color: #fff; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.howto .lbl { margin-left: 2px; font-size: 14.5px; font-weight: 650; }
.howto .chev svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plus { font-style: normal; font-weight: 800; color: var(--ink-3); margin: 0 1px; }
@media (max-width: 640px) {
  .hero { padding-top: 22px; padding-bottom: 12px; }
  .kicker { margin-bottom: 12px; font-size: 12px; }
  .hero h1 { font-size: clamp(50px, 16vw, 72px); }
  .sub { font-size: 15px; margin: 12px 0 14px; }
  .howto { display: grid; grid-template-columns: 1fr; gap: 0; width: 100%; padding: 4px 14px; }
  .howto .chev { display: none; }
  .howto .step { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; }
  .howto .step + .chev + .step { border-top: 1px solid var(--line); }
  .howto .keys { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  .howto .lbl { grid-column: 2; grid-row: 1; margin: 0; font-size: 15px; }
  .howto .k { --s: 34px; }
}

/* ---------- browse ----------
   Desktop / console (HIG sidebar): sticky rail with search, "Show" and "Categories"; results stay beside it.
   Phones / tablets (HIG toolbar + sheet): sticky search + Filters button; filters open in a bottom sheet. */
.top-gap { flex: 1 1 auto; }
.search-link { display: none; }
@media (max-width: 719px) { .top .search { display: none; } .top .search-link { display: grid; margin-left: auto; } }
.browse { position: relative; display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 8px; }
@media (max-width: 1023px) { .browse { grid-template-columns: 236px minmax(0, 1fr); gap: 20px; } }
.rail { position: -webkit-sticky; position: sticky; top: calc(var(--hh) + 16px); display: flex; flex-direction: column; gap: 10px;
  max-height: calc(100vh - var(--hh) - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 4px; margin: -4px; }
.rail::-webkit-scrollbar { display: none; }
.toolbar { position: relative; display: flex; gap: 8px; }
.toolbar .search { flex: 1 1 auto; max-width: none; margin: 0; }
.side { display: flex; flex-direction: column; padding: 6px; border-radius: 20px; background: linear-gradient(165deg, var(--glass-top), transparent 46%), var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-hi), var(--shadow); }
.sg + .sg { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.sg h2 { margin: 6px 10px 4px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.si { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 14px; background: transparent;
  color: var(--ink); font: 600 15px/1.2 var(--font); text-align: left; text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: background-color 0.18s, color 0.18s, opacity 0.18s, transform 0.15s var(--ease); }
.si svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--hot); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.si span { flex: 1 1 auto; min-width: 0; }
.si b { font-size: 14px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.si[data-empty] { opacity: 0.45; }
.si[aria-pressed='true'], .si[aria-current='page'] { background: var(--logo-fill); color: #fff; opacity: 1; text-shadow: 0 1px 2px rgba(40, 10, 60, 0.35); }
.si[aria-pressed='true'] svg, .si[aria-current='page'] svg { stroke: #fff; }
.si[aria-pressed='true'] b, .si[aria-current='page'] b { color: rgba(255, 255, 255, 0.85); }
.si:active { transform: scale(0.98); }
@media (hover: hover) { .si:not([aria-pressed='true']):not([aria-current='page']):hover { background: var(--glass-top); } }
@media (pointer: fine) { .si { min-height: 36px; border-radius: 12px; } }
@media (max-height: 600px) and (min-width: 720px) { .sg h2 { display: none; } }
.list[data-cat]:not([data-cat='all']) .cat { display: none; }
/* switch (HIG toggle): 51x31 track, 27pt thumb */
.sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 10px 0 12px; border-radius: 14px; font: 600 15px/1.2 var(--font); cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw i { position: relative; flex: 0 0 auto; width: 51px; height: 31px; border-radius: 999px; background: var(--well); box-shadow: inset 0 0 0 1px var(--glass-edge); transition: background 0.25s; }
.sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--spring); }
.sw input:checked + i { background: var(--logo-fill); box-shadow: none; }
.sw input:checked + i::after { transform: translateX(20px); }
.sw input:focus-visible + i { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (pointer: fine) { .sw { min-height: 40px; } }
.count-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: var(--ctl); margin-bottom: -6px; }
.count { margin: 0 4px 0 0; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.count b { color: var(--ink); font-weight: 700; }
.toks { display: contents; }
/* applied-filter tokens: each one removable on its own */
.tok { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 12px; border: 0; border-radius: 999px; background: var(--well); box-shadow: var(--edge);
  color: var(--ink); font: 600 13px/1 var(--font); cursor: pointer; touch-action: manipulation; transition: background-color 0.18s, transform 0.15s var(--ease); }
.tok::after { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; } /* 44pt hit area */
.tok svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; }
.tok-all { padding: 0 12px; background: transparent; box-shadow: none; color: var(--hot); }
.tok:active { transform: scale(0.96); }
@media (hover: hover) { .tok:hover { background: var(--glass-top); } .tok:hover svg { stroke: var(--ink); } }

/* Phones: search + a scrolling scope bar (HIG scope bar; Baymard: avoid a separate filter screen when options are few) */
@media (max-width: 719px) {
  html { scroll-padding-top: calc(var(--hh) + 112px); }
  .browse { display: block; padding-top: 0; }
  .rail { top: var(--hh); z-index: 30; gap: 8px; max-height: none; overflow: visible; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left))); padding: 8px max(16px, env(safe-area-inset-left)); transition: background-color 0.25s; }
  .rail.stuck { background: var(--head); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .rail.stuck { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); } }
  .rail.stuck::after { opacity: 1; }
  body:has(.rail.stuck) .top::after { opacity: 0; }
  .side { flex-direction: row; align-items: center; gap: 6px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left))); padding: 4px max(16px, env(safe-area-inset-left)); border-radius: 0; background: none; box-shadow: none;
    overflow-x: auto; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 20px), transparent); mask: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 20px), transparent); }
  .side::-webkit-scrollbar { display: none; }
  .sg { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
  .sg h2, .si svg, .si b { display: none; }
  .sg + .sg { margin: 0; padding: 0 0 0 8px; border-top: 0; border-left: 1px solid var(--line); }
  .si, .sw { position: relative; flex: 0 0 auto; width: auto; min-height: 36px; border-radius: 999px; background: var(--well); box-shadow: var(--edge); font-size: 14px; white-space: nowrap; }
  .si { padding: 0 14px; gap: 6px; }
  .si::before, .sw::before { content: ''; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; } /* 44pt hit area */
  .si[aria-pressed='true'], .si[aria-current='page'] { box-shadow: none; }
  .sw { gap: 8px; padding: 0 4px 0 12px; }
  .sw i { width: 40px; height: 28px; } .sw i::after { width: 24px; height: 24px; } .sw input:checked + i::after { transform: translateX(12px); }
}

/* ---------- list ---------- */
.list { min-width: 0; padding-bottom: 28px; }
.sec { margin-top: 18px; }
.sec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 14px; }
.sec-h h2 { margin: 0; font: italic 900 clamp(28px, 3.6vw, 38px)/1 var(--display); letter-spacing: -0.04em; text-transform: uppercase; }
.sec-h p { flex-basis: 100%; margin: 4px 0 0; font-size: 15px; color: var(--ink-3); }
.rows { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); grid-auto-rows: 1fr; }
.rows-missing { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* card */
.row { position: relative; display: flex; flex-direction: column; padding: 16px; border-radius: var(--r); isolation: isolate; box-shadow: inset 0 1px 0 var(--glass-hi);
  min-width: 0;
  transition: transform 0.3s var(--ease), border-color 0.2s; }
@media (hover: hover) {
  .row:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.24); }
}
.row:has(h3 a:focus-visible) { border-color: var(--hot); box-shadow: 0 0 0 2px var(--hot); }
/* Card anatomy (HIG boxes/layout): most important first, one surface (background + hairline, no drop shadow),
   no nested boxes, consistent 4 / 12 / 16 spacing, footer pinned so cards in a row line up. */
.row-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-right: 48px; }
.row h3 { margin: 0; font: 700 19px/1.25 var(--display); letter-spacing: -0.015em; padding-right: 48px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row h3 a { text-decoration: none; outline: none; }
.row h3 a::after { content: ''; position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 1; border-radius: var(--r); } /* whole card is the link */
.eff { margin: 4px 0 0; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.rows-codes .eff, .rows-fakes .eff { min-height: 2.8em; } /* reserve two lines so code rows line up across cards */
.row .eff { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .tray { margin-top: 12px; }
.row-foot { display: flex; align-items: center; flex-wrap: nowrap; min-width: 0; gap: 4px 12px; margin: auto 0 0; padding-top: 12px; font-size: 13px; line-height: 1.3; color: var(--ink-3); }
.cat { font-size: 13px; font-weight: 600; color: var(--teal); }
.unl { display: inline-flex; align-items: flex-start; gap: 6px; min-width: 0; }
.unl > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-foot .badge, .row-foot .cat { flex: 0 0 auto; }
.how { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.how .unl > span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.how .unl svg { margin-top: 3px; }
.unl svg, .tray-empty svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.note { margin: 12px 0 0; padding: 10px 12px; border-radius: calc(var(--r) - 12px); background: rgba(255, 181, 71, 0.12); font-size: 13px; line-height: 1.4; color: var(--ink); }
.r-fake .note { background: rgba(255, 77, 94, 0.1); }
.r-fake h3 a { text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 2px; }
.r-notfound h3 { font-size: 17px; }
.r-notfound .eff { font-size: 14px; }
.list[data-cat]:not([data-cat='all']) .row-foot:not(:has(.unl)) { display: none; }
@media (max-width: 640px) {
  :root { --r: 20px; }
  .rows { gap: 12px; }
  .row { padding: 14px; }
}

/* tray: the recessed well the controller buttons sit in */
.tray { position: relative; z-index: 2; margin-top: 4px; padding: 10px; border-radius: calc(var(--r) - 16px); background: var(--tray); border: 0;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22), inset 0 -1px 0 rgba(255, 255, 255, 0.05); pointer-events: none; }
/* smoky glass: a blurred dark backdrop behind the buttons, in both themes */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tray:not(.tray-empty) { -webkit-backdrop-filter: var(--tray-blur); backdrop-filter: var(--tray-blur); }
}
.tray-empty { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px dashed var(--glass-edge); background: transparent; box-shadow: none; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.seq { --gap: 6px; display: flex; flex-wrap: wrap; gap: var(--gap); }

/* keys: real-controller glyphs, sized to fit the sequence on one line where possible */
.k { --s: 38px; position: relative; display: inline-block; vertical-align: middle; width: var(--s); height: var(--s); flex: 0 0 auto; }
.k .g { width: 100%; height: 100%; overflow: visible; }
.k-shoulder { width: calc(var(--s) * 1.45); }
.seq-lg { --gap: 8px; }
.seq-lg .k { --s: 52px; }
@supports (width: 1cqi) {
  .tray { container-type: inline-size; }
  .seq .k { --s: clamp(24px, calc((100cqi - 9 * var(--gap)) / 10), 38px); }
  .seq-lg .k { --s: clamp(28px, calc((100cqi - 9 * var(--gap)) / 10), 56px); }
}
.g.xb { display: none; }
:root[data-platform='xbox'] .g.xb { display: block; }
:root[data-platform='xbox'] .g.ps { display: none; }
@media (prefers-reduced-motion: no-preference) {
  /* "entering the code": each key presses in turn */
  .play .k { animation: enter 0.42s calc(var(--i, 0) * 110ms) both; }
  :root[data-swap] .k .g { animation: swap 0.26s var(--ease) calc(var(--i, 0) * 15ms) both; }
}
@container (max-width: 380px) { .seq { --gap: 4px; } }
/* big code on narrow screens: two even rows of large keys instead of one row of tiny ones */
@container (max-width: 460px) {
  .seq-lg { display: grid; grid-template-columns: repeat(var(--h, 4), max-content); --gap: 8px; }
  .seq-lg .k { --s: clamp(30px, calc((100cqi - 4 * var(--gap)) / 5), 56px); }
}
@keyframes enter {
  0% { opacity: 0.32; transform: none; animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1); }
  35% { opacity: 1; transform: translateY(1.5px) scale(0.9); animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.3); }
  100% { opacity: 1; transform: none; }
}
@keyframes swap { from { opacity: 0; transform: scale(0.82); } }

/* actions */
.act { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--ctl); padding: 0 18px; border-radius: 999px; border: 0; box-shadow: var(--edge); line-height: 1;
  background: var(--well); color: var(--ink); font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; touch-action: manipulation;
  transition: transform 0.18s var(--spring), background-color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .act:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); background: var(--glass-top); } }
.act:active { transform: scale(0.93); }
.act-hot { background: var(--logo-fill); color: #fff; box-shadow: 0 10px 24px -12px var(--hot); }
.act-copy { z-index: 3; }
.act-icon { position: absolute; top: 6px; right: 6px; width: var(--ctl); height: var(--ctl); padding: 0; background: transparent; box-shadow: none; color: var(--ink-2); }
@media (hover: hover) { .act-icon:hover { background: var(--well); box-shadow: none; color: var(--ink); } }
.act-copy .ic-done { display: none; color: var(--ok); }
.act-copy.done .ic-copy { display: none; }
.act-copy.done .ic-done { display: block; animation: swap 0.4s var(--spring); }
.act-copy.done { box-shadow: inset 0 0 0 1.5px var(--ok); }
.act-block { width: 100%; height: 48px; margin-top: 16px; }
.act-lg { height: 54px; padding: 0 28px; font-size: 16px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px 0 3px; line-height: 1; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge i { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; }
.b-confirmed { color: var(--ok); background: rgba(71, 224, 143, 0.14); } .b-confirmed i { background: var(--ok); }
.b-unconfirmed { color: var(--mid); background: rgba(255, 181, 71, 0.15); } .b-unconfirmed i { background: var(--mid); }
.b-notfound { color: var(--ink-3); background: var(--well); } .b-notfound i { background: var(--ink-3); }
.b-fake { color: var(--bad); background: rgba(255, 77, 94, 0.14); } .b-fake i { background: var(--bad); }
.empty { padding: 56px 0; text-align: center; color: var(--ink-2); }

/* scroll-in reveal (native scroll timelines; no JS) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .row, .faq details { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@keyframes rise { from { opacity: 0; translate: 0 22px; scale: 0.97; } }

/* ---------- FAQ ---------- */
.faq { padding-top: 44px; padding-bottom: 60px; content-visibility: auto; contain-intrinsic-size: auto 900px; }
.faq h2 { margin: 0 0 16px; font: italic 900 clamp(28px, 3.6vw, 40px)/1 var(--display); letter-spacing: -0.04em; text-transform: uppercase; }
.faq-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); align-items: start; }
.faq details { border-radius: 18px; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; min-height: 52px; cursor: pointer; list-style: none; font-weight: 600; font-size: 17px; border-radius: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--well); font-size: 20px; line-height: 1; color: var(--hot); transition: transform 0.3s var(--spring); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq p { margin: 0; padding: 0 18px 18px; font-size: 16px; color: var(--ink-2); }
.faq a, .prose a, .d-src a, .crumbs a { color: var(--teal); }
@supports selector(::details-content) {
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}

/* ---------- detail ---------- */
.hero-d { padding-bottom: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 14px; color: var(--ink-3); }
.crumbs a { display: inline-block; padding: 12px 0; margin: -12px 0; text-decoration: none; font-weight: 600; }
.h-d { margin: 0; font: italic 900 clamp(40px, 7vw, 80px)/0.92 var(--display); letter-spacing: -0.045em; text-transform: uppercase; text-wrap: balance; }
.d-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.d-meta .eff { font-size: 17px; }
.d-answer { max-width: 760px; margin: 12px 0 0; font-size: 17px; color: var(--ink-2); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.glass-panel { --r: 32px; padding: 20px; border-radius: var(--r); }
@media (max-width: 640px) { .glass-panel { padding: 16px; } .d-main .tray { padding: 12px; } }
.d-main .tray { padding: 14px; }
.d-words { margin: 12px 0 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.d-alt { margin-top: 18px; }
.d-alt p { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.d-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.d-act .act-copy { position: relative; height: 48px; padding: 0 22px; background: var(--logo-fill); color: #fff; box-shadow: 0 10px 24px -12px var(--hot); }
.d-act .act-copy .ic-done { color: #fff; }
.d-how { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.d-how .howto { background: var(--well); border-color: var(--well-edge); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.d-label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.d-unlock { margin: 0 0 20px; font-size: 15px; color: var(--ink-2); }
.d-unlock b { color: var(--ink); }
.d-src { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.d-src li { padding: 5px 0; }
.d-src a { text-decoration: none; font-weight: 600; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.pg { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 16px; border-radius: 18px; text-decoration: none; font-weight: 700; transition: transform 0.3s var(--spring), border-color 0.2s; }
.pg small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.pg svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--hot); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pg-next { justify-content: flex-end; text-align: right; grid-column: 2; }
@media (hover: hover) { .pg:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.28); } }
.detail-1 { max-width: 760px; padding-bottom: 56px; }
.prose { font-size: 16px; color: var(--ink-2); }
.prose ul { padding-left: 20px; }

/* ---------- footer, to-top, toast ---------- */
.foot { padding: 30px 0 max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--head); font-size: 13px; color: var(--ink-3); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-bottom: 10px; }
.foot-row a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.foot p { max-width: 780px; }
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45; display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; border: 0; background: var(--logo-fill); color: #fff; cursor: pointer; box-shadow: 0 12px 28px -10px var(--hot);
  opacity: 0; transform: translateY(14px) scale(0.85); transition: opacity 0.25s var(--ease), transform 0.35s var(--spring); pointer-events: none; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:active { transform: scale(0.9); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60; padding: 11px 18px; border-radius: 999px; background: var(--chip-on); color: var(--chip-on-ink);
  font-size: 14px; font-weight: 700; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.6); opacity: 0; transform: translate(-50%, 16px) scale(0.95); transition: opacity 0.2s, transform 0.35s var(--spring); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- controller mode (console browsers / gamepad) ---------- */
.padbar { position: fixed; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 50; display: flex; justify-content: center; pointer-events: none; }
.padbar-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 10px 20px; border-radius: 999px; background: var(--glass-solid); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }
.padbar span { display: inline-flex; align-items: center; gap: 7px; }
.padbar .k { --s: 28px; }
.padbar b { font-weight: inherit; }
:root[data-input='pad'] { scroll-padding-bottom: 96px; }
:root[data-input='pad'] body { padding-bottom: 80px; }
:root[data-input='pad'] .to-top { bottom: 90px; }
:root[data-input='pad'] .si:focus { outline-offset: 2px; }
:root[data-input='pad'] :focus-visible, :root[data-input='pad'] :focus { outline: 4px solid var(--hot); outline-offset: 4px; }
:root[data-input='pad'] .row h3 a:focus { outline: none; }
:root[data-input='pad'] .row:focus-within { transform: translateY(-2px); box-shadow: 0 0 0 4px var(--hot); }
:root[data-input='pad'] .search input:focus { outline: none; }

/* ---------- page transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 0.18s var(--ease) both vt-out; }
  ::view-transition-new(root) { animation: 0.32s var(--ease) both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- user preferences ---------- */
@media (prefers-contrast: more) {
  :root { --ink-2: var(--ink); --ink-3: var(--ink); --glass-edge: var(--ink-2); --line: rgba(255, 255, 255, 0.3); }
  .glass, .row, .glass-panel, .faq details, .pg, .top, .fbar.stuck { background: var(--glass-solid) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-transparency: reduce) {
  .top, .fbar.stuck, .glass, .row, .glass-panel, .faq details, .pg { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--glass-solid); }
}
@media print { .bg, .top, .fbar, .to-top, .act-copy, .padbar { display: none !important; } body { background: #fff; color: #000; } }
