/* 3D home page: DOM layer over the WebGL canvas. */

@font-face {
  font-family: "Departure Mono";
  src: url("../fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/MonaSansVF.woff2") format("woff2");
  font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap;
}

/* metric-matched stand-in for the big name while Mona Sans loads (same width, ascent and descent as the
   900 / 125 % cut): the font swap does not move the name */
@font-face {
  font-family: "Mona Fallback";
  src: local("Arial Black"), local("ArialBlack");
  size-adjust: 104.1%; ascent-override: 104.7%; descent-override: 30.74%; line-gap-override: 0%;
}

:root {
  --bg: #05070b;
  --bg-deep: #020308;
  --navy: #0b1220;
  --text: #e9d4aa;
  --gold: #d6b06a;
  --gold-b: #f3d9a4;
  --gold-d: #8a6a2f;
  --muted: #9a8f7a;
  --line: rgba(233, 212, 170, .18);
  --line-2: rgba(233, 212, 170, .42);
  --glass: rgba(8, 12, 20, .55);
  --mono: "Departure Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Mona Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --fs: clamp(11px, 0.22vw + 8.6px, 13.5px);       /* body blocks (reference: 11–14 px) */
  --fs-s: clamp(10px, 0.14vw + 8.4px, 11.5px);     /* small print */
  --ls: .04em;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --gl: max(clamp(16px, 3.4vw, 56px), env(safe-area-inset-left, 0px));
  --gr: max(clamp(16px, 3.4vw, 56px), env(safe-area-inset-right, 0px));
  --hd-pad: clamp(12px, 2vw, 28px);
  --pill-h: 44px;
  --top: calc(var(--sat) + var(--hd-pad) + var(--pill-h) + clamp(14px, 3vh, 34px)); /* content starts below header */
  --bot: calc(var(--sab) + clamp(16px, 4.5vh, 48px));
  --ind-w: 34px;                                   /* right-edge indicator lane */
  --shadow: 0 1px 14px rgba(2, 3, 8, .9), 0 0 2px rgba(2, 3, 8, .75);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-width: none;
  overflow-x: hidden;
}
html::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--fs);
  line-height: 1.55;
  letter-spacing: var(--ls);
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
p, h1, h2, h3, ol, ul, dl { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3 { font-weight: 400; font-size: inherit; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(214, 176, 106, .35); color: var(--gold-b); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.vh, .hero-h1, .st-h {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- canvas + spacer */
#gl {
  position: fixed; left: 0; top: 0; z-index: 0;
  width: 100vw; height: 100vh; height: 100lvh;
  display: block; background: var(--bg);
  touch-action: pan-y;
}
.spacer {
  position: relative; z-index: -1; pointer-events: none;
  height: calc(var(--pages, 13) * 100vh);
  height: calc(var(--pages, 13) * 100lvh);   /* lvh: URL-bar show/hide does not change document height */
}

/* ---------------------------------------------------------------- skip link */
.skip {
  position: fixed; z-index: 100; left: var(--gl); top: calc(var(--sat) + 8px);
  padding: 12px 18px; border-radius: 999px; background: var(--gold); color: var(--bg);
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip:focus, .skip:focus-visible { transform: none; outline-color: var(--gold-b); }

/* ---------------------------------------------------------------- loading line (covers nothing) */
.pre {
  position: fixed; left: 0; right: 0; top: 0; z-index: 90; height: 2px;
  pointer-events: none; overflow: hidden;
  transition: opacity .8s var(--ease), visibility 0s linear .8s;
  animation: pre-safety .6s linear 6s forwards;   /* CSS-only safety net if no JS runs */
}
.pre i { display: block; height: 100%; background: linear-gradient(90deg, transparent, var(--gold-d) 30%, var(--gold-b)); transform-origin: 0 50%; transform: scaleX(.04); transition: transform .35s var(--ease); box-shadow: 0 0 8px var(--gold); }
.pre-done .pre, body.is-ready .pre, body.no-webgl .pre { opacity: 0; visibility: hidden; }
@keyframes pre-safety { to { opacity: 0; visibility: hidden; } }
html.js .pre { animation-delay: 12s; }   /* JS runs: ui.js hides it (ready, or no progress for 4-6 s) */
/* the canvas shows only once the engine draws real frames (its warm-up passes stay invisible) */
#gl { opacity: 0; transition: opacity .45s var(--ease); }
body.is-ready #gl { opacity: 1; }

/* ---------------------------------------------------------------- header */
.hd {
  position: fixed; z-index: 40; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--sat) + var(--hd-pad)) var(--gr) 0 var(--gl);
  pointer-events: none;
}
.hd > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--text); text-shadow: var(--shadow); font-size: var(--fs-s); letter-spacing: .14em;
}
.brand-mark { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 0 10px rgba(214, 176, 106, .35)); }
.hd-r { display: flex; align-items: center; gap: clamp(8px, 1.2vw, 16px); min-width: 0; }

.pill {
  position: relative; isolation: isolate;
  display: flex; align-items: center; height: var(--pill-h);
  padding: 0 4px; border-radius: 999px;
  border: 1px solid rgba(233, 212, 170, .62);
  background: rgba(8, 12, 20, .45);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(233, 212, 170, .06), inset 0 -10px 18px -12px rgba(243, 217, 164, .35),
              0 0 22px -6px rgba(214, 176, 106, .45);
}
.pill::after { /* soft glow underneath, like the reference */
  content: ""; position: absolute; z-index: -1; left: 14%; right: 14%; bottom: -14px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(243, 217, 164, .55), rgba(214, 176, 106, .22) 45%, rgba(122, 92, 255, .10) 75%, transparent);
  filter: blur(6px); pointer-events: none;
}
.pill-a {
  display: inline-flex; align-items: center;
  height: 100%; padding: 0 clamp(10px, 1.3vw, 18px); border-radius: 999px;
  font-size: var(--fs-s); letter-spacing: .1em; color: var(--text); white-space: nowrap;
  transition: color .2s, text-shadow .2s;
}
.pill-a:hover, .pill-a[aria-current="page"] { color: var(--gold-b); text-shadow: 0 0 12px rgba(243, 217, 164, .7); }
.pill-line { width: clamp(14px, 1.9vw, 36px); height: 1px; background: var(--text); opacity: .7; flex: none; }
.pill-menu { display: none; gap: 10px; }
/* Hikâye is secondary: dimmer, after a thin divider */
.pill-div { width: 1px; height: 18px; margin: 0 6px 0 clamp(8px, 1vw, 14px); background: var(--line-2); flex: none; }
.pill-story { color: var(--muted); }
/* First screen: the four destinations are the buttons in the page, so the pill shows only Hikâye (no
   frame). Once the visitor scrolls into the journey (.hd.is-nav, ui.js) the frame and the four names fade
   in; hidden items keep their place (no movement) and are not focusable (visibility). */
.pill { transition: border-color .35s, background-color .35s, box-shadow .35s; }
.pill::after { transition: opacity .35s; }
.pill-main { transition: opacity .35s var(--ease), visibility 0s; }
.hd:not(.is-nav) .pill { border-color: transparent; background-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hd:not(.is-nav) .pill::after { opacity: 0; }
.hd:not(.is-nav) .pill-main { opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s; }
.hd:not(.is-nav) .pill-story { text-shadow: var(--shadow); }
.pill-burger { position: relative; width: 14px; height: 7px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; flex: none; transition: transform .25s var(--ease); }
.pill-menu[aria-expanded="true"] .pill-burger { transform: scaleY(.3); }

/* narrow screens: the four pill items become one "Menü" button with a small glass dropdown (ui.js) */
.hd-r { position: relative; }
.nav-dd {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 2;
  width: max-content; min-width: 220px; max-width: calc(100vw - var(--gl) - var(--gr));
  padding: 6px; border-radius: 18px;
  border: 1px solid rgba(233, 212, 170, .32);
  background: rgba(8, 12, 20, .8);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .9), 0 0 30px -12px rgba(214, 176, 106, .35);
  visibility: hidden; opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .16s, transform .22s var(--ease), visibility 0s linear .22s;
}
.nav-dd.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .16s, transform .22s var(--ease); }
.nav-dd li + li { border-top: 1px solid rgba(233, 212, 170, .08); }
/* in-scene stops: a secondary group under the main destinations */
.nav-dd-sub { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(233, 212, 170, .22); }
.nav-dd .nav-dd-sub :is(a, button) { color: var(--muted); min-height: 40px; }
.nav-dd .nav-dd-sub :is(a, button):hover { color: var(--gold-b); }
.nav-dd :is(a, button) {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; width: 100%;
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  font-size: var(--fs-s); letter-spacing: .1em; color: var(--text); text-align: left; white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-dd :is(a, button):hover { color: var(--gold-b); background: rgba(214, 176, 106, .08); }
.nav-dd .arr { opacity: .55; transition: opacity .2s, transform .25s var(--ease); }
.nav-dd :is(a, button):hover .arr { opacity: 1; transform: translateX(3px); }
.nav-dd [aria-current="page"] { color: var(--gold-b); text-shadow: 0 0 10px rgba(243, 217, 164, .5); }
.nav-dd [aria-current="page"] .arr { opacity: 1; }
@media (max-width: 760px) {
  .pill-full { display: none; }
  /* phones: first screen = "Hikâye" text link; in the journey = the Menü button (Hikâye is in its list) */
  .hd.is-nav .pill-story { display: none; }
  .hd.is-nav .pill-menu { display: inline-flex; animation: pill-in .35s var(--ease); }
}
@keyframes pill-in { from { opacity: 0; } }

.lang { display: flex; align-items: center; height: var(--pill-h); font-size: var(--fs-s); }
.lang button {
  min-width: 36px; height: 44px; padding: 0 4px; border-radius: 8px; color: var(--muted);
  letter-spacing: .12em; text-shadow: var(--shadow); transition: color .2s;
}
.lang button[aria-pressed="true"] { color: var(--gold-b); text-shadow: 0 0 10px rgba(214, 176, 106, .6), var(--shadow); }
.lang button:hover { color: var(--text); }
.lang-sep { color: var(--line-2); }

/* ---------------------------------------------------------------- overlays (shared) */
main { display: block; }
main:focus { outline: none; }
.ov {
  position: fixed; inset: 0; z-index: 10;
  pointer-events: none; visibility: hidden;
  --o: 0; --y: 0px;
}
.ov.is-on { visibility: visible; }
/* opacity on the layers (not the section) so glass children keep their backdrop blur */
.ov > * { opacity: var(--o); translate: 0 var(--y); }
/* Performance (same look): --o / --y change every frame while an overlay fades; without their own
   compositor layer the blurred text-shadows / drop-shadow filters were repainted every frame over the
   live canvas. Own layers (will-change) -> opacity/translate are compositor-only.
   A glass element (backdrop-filter) must not sit inside such a layer: will-change: opacity makes the
   ancestor its backdrop root and the blur of the canvas disappears (verified on the real GPU). So the
   two blocks holding glass (strategies menu with the ask box, outro with the buttons) fade their pieces
   individually instead: text pieces on their own layers, the glass pieces themselves without a layer. */
.ov > * { will-change: opacity, translate; }
.ov > :is(.st-menu, .out-scroll) { opacity: 1; translate: none; will-change: auto; }
.st-menu > :not(.ask), .ask > .ask-hint, .ask > .ask-form,
.out-scroll > :not(.out-main), .out-main > :not(.out-ctas), .out-ctas > * { opacity: var(--o); translate: 0 var(--y); }
.st-menu > :not(.ask), .ask > .ask-hint, .out-scroll > :not(.out-main), .out-main > :not(.out-ctas) { will-change: opacity, translate; }
.ask.is-open .ask-bubble { opacity: var(--o); translate: 0 var(--y); }
/* Pre-paint (ui.js): every overlay is painted once (at an invisible opacity, nothing covers the page any
   more) so its first real appearance does not pay for layout / font rasterisation / filter setup in the
   middle of a scroll. The first screen is not touched. */
body.ov-warm .ov:not(.ov-intro) { visibility: visible !important; }
body.ov-warm .ov:not(.ov-intro) > *, body.ov-warm .st-menu > *, body.ov-warm .ask > *, body.ov-warm .out-scroll > *,
body.ov-warm .out-main > *, body.ov-warm .out-ctas > * { opacity: .004 !important; }
body.ov-warm .lab-run.is-off { visibility: visible !important; opacity: .004 !important; }   /* run B painted once too */
.ov a, .ov button, .ov input, .ov .scrollable { pointer-events: auto; }
.ov:not(.is-on) * { pointer-events: none !important; }

.ov p, .ov h2, .ov h3, .ov li { text-shadow: var(--shadow); }
.k { color: var(--gold); display: flex; align-items: center; gap: 10px; }
.k::before { content: ""; width: 18px; height: 1px; background: var(--gold); box-shadow: 0 0 8px var(--gold); flex: none; }
.lead { color: var(--text); opacity: .86; }
.ttl { font-size: clamp(22px, 2.3vw, 38px); line-height: 1.12; letter-spacing: .02em; color: var(--text); text-shadow: 0 0 22px rgba(214, 176, 106, .22), var(--shadow); }
.arr { color: var(--gold); }

.chip {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 7px 14px; min-height: 32px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(8, 12, 20, .5);
  color: var(--gold-b); font-size: var(--fs-s); letter-spacing: .08em; line-height: 1.35;
  text-shadow: none;
}
.chip-line { background: transparent; border-color: rgba(214, 176, 106, .55); color: var(--gold); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); flex: none; animation: blink 2.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------- first screen (intro) */
/* Everything is placed in viewport units against the candle ring of the first 3D frame (ring centre at
   38.8 % of the height, radius ~15 % on wide screens; centre ~41.7 %, top ~33 % on portrait screens), so
   it is laid out at first paint and never moves when scripts, fonts or the 3D arrive: the name is
   centred by its cap height, the text block and the buttons have fixed slots, the hint sits at the bottom.
   The 3D dust word reads the name's box and places itself there (intro scene). */
:root { --ilk-min-h: 560px; }
.ilk { position: absolute; inset: 0; }
.ilk-ad {
  /* metrics of this cut (900, 125 %): baseline at .885 em from the top of a 1-em line box, cap .73 em */
  --ad-c: 38.8vh;
  position: absolute; left: 0; right: 0; top: calc(var(--ad-c) - .52em);
  margin: 0; text-align: center; white-space: nowrap; pointer-events: none;
  font-family: "Mona Sans", "Mona Fallback", var(--sans); font-weight: 900; font-stretch: 125%; font-style: normal;
  font-size: min(21.3vw, 36vh); line-height: 1; letter-spacing: 0; text-transform: none;
  color: var(--gold-b);
  background: linear-gradient(180deg, var(--gold-b) 18%, var(--gold) 62%, var(--gold-d) 118%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none !important;
  /* the class arrives only once the dust letters have landed (intro scene): a soft fade from there */
  transition: opacity .6s cubic-bezier(.4, 0, .6, 1);
}
/* the 3D scene drew the name in dust at this place: the HTML name stays in the layout and the
   accessibility tree, only its paint goes */
html.toz-hazir body:not(.no-webgl) .ilk-ad { opacity: 0; }
/* wide screens: the candles stand in front of the name. While the HTML name still covers the forming dust
   (until the hand-over), a soft window over the three candles fades in, driven by the intro scene from its
   own rendered time once the candles are lit (inline --ilk-hole 0..1, intro.js): the window has its full
   size from the start and only its depth grows, with a wide feather, so it never shows as a dark hole or a
   hard-edged dot. Window = the candle group's projected area in the first 3D frame (x +-5.3 %, y 31-47 % of
   the height, centre 39.1 %). Plain view: no window. */
@media (min-aspect-ratio: 4/5) {
  .ilk-ad {
    --ilk-hole: 0;
    -webkit-mask-image: radial-gradient(5.8vh 9.6vh at 50% calc(.52em + .3vh), rgba(0, 0, 0, calc(1 - var(--ilk-hole))) 38%, #000 100%);
    mask-image: radial-gradient(5.8vh 9.6vh at 50% calc(.52em + .3vh), rgba(0, 0, 0, calc(1 - var(--ilk-hole))) 38%, #000 100%);
  }
  body.no-webgl .ilk-ad { -webkit-mask-image: none; mask-image: none; }
}
/* static emblem in the 3D ring's place (portrait only): visible at first paint and in the plain view, fades
   out while the 3D canvas fades in. Its geometry is the projection of the first 3D frame on portrait screens
   (camera of the intro scene at local 0, aspect <= 0.6): ring centre at 41.98 % of the height, ring radius
   8.39 % (centre line), so the cross-fade reads as one object (the 3D ring does not scale in on portrait). */
.ilk-amblem { display: none; }
@media (max-aspect-ratio: 4/5) {
  .ilk-amblem {
    display: block; position: absolute; left: 50%; top: calc(41.98vh - 9.397vh);
    width: 18.794vh; height: 18.794vh; transform: translateX(-50%); pointer-events: none;
    transition: opacity .45s var(--ease);
  }
  body.is-ready:not(.no-webgl) .ilk-amblem { opacity: 0; }
}
/* a panel link pressed before the panel code has arrived (inline script): acknowledged at once */
.ilk-a.is-acilir, .pill-a.is-acilir { position: relative; overflow: hidden; cursor: progress; border-color: var(--gold-b); }
.ilk-a.is-acilir::after, .pill-a.is-acilir::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 40%;
  background: var(--gold-b); box-shadow: 0 0 8px var(--gold); animation: acilir 1s cubic-bezier(.6, 0, .3, 1) infinite;
}
@keyframes acilir { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
.ilk-txt {
  position: absolute; left: var(--gl); right: var(--gr); top: 61vh; height: 58px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.ilk-desc {
  font-size: clamp(13px, .42vw + 8.5px, 17px); letter-spacing: .14em; line-height: 1.35;
  color: var(--text); text-shadow: var(--shadow);
}
.ilk-status {
  display: block; max-width: 100%; white-space: nowrap;   /* one line always: full text wide, short text on phones */
  font-size: var(--fs-s); letter-spacing: .1em; line-height: 1.4; color: var(--gold-b); text-shadow: var(--shadow);
}
.ilk-status .chip-dot { display: inline-block; vertical-align: .12em; margin-right: 10px; }
.ilk-status .st-kisa { display: none; }   /* display:none: the hidden variant is not read by screen readers */
.ilk-nav {
  position: absolute; left: var(--gl); right: var(--gr); top: calc(61vh + 70px);
  display: flex; justify-content: center; gap: 12px;
}
.ilk-a {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: clamp(140px, 12.4vw, 196px); height: 52px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(233, 212, 170, .7); background: #0b1220;
  color: var(--gold-b); font-size: clamp(11.5px, .2vw + 9.4px, 13.5px); letter-spacing: .1em; white-space: nowrap;
  box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .9);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .2s, background-color .2s;
}
.ilk-a:hover { transform: translateY(-2px); border-color: var(--gold-b); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .95), 0 0 22px -6px rgba(214, 176, 106, .7); }
.ilk-a:active { transform: translateY(0); }
.ilk-a:focus-visible { outline: 2px solid var(--gold-b); outline-offset: 3px; border-radius: 999px; }
.ilk-a-gold { background: linear-gradient(180deg, var(--gold-b), var(--gold)); border-color: var(--gold-b); color: #120d05; }
.ilk-a-gold:hover { background: linear-gradient(180deg, #fbe7bd, var(--gold-b)); }
.intro-hint {
  position: absolute; left: 50%; bottom: var(--bot); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; white-space: nowrap;
  pointer-events: none;
}
.intro-line { position: relative; width: 1px; height: clamp(30px, 5vh, 56px); background: var(--line); overflow: hidden; }
.intro-line i { position: absolute; left: -1px; top: 0; width: 3px; height: 40%; background: linear-gradient(transparent, var(--gold-b)); box-shadow: 0 0 8px var(--gold); animation: hint-run 2s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes hint-run { from { transform: translateY(-110%); } to { transform: translateY(260%); } }
.intro-k { font-size: var(--fs-s); letter-spacing: .3em; padding-left: .3em; color: var(--text); text-shadow: var(--shadow); }

/* portrait (phones, portrait tablets): the name sits ABOVE the ring centre, its lower part may pass
   behind the top of the ring (ring top ~33 %); text, buttons and hint stack up from the bottom */
@media (max-aspect-ratio: 4/5) {
  /* the y tail ends ~11 px above the ring's outer top (33.15 % of the height on portrait screens): clear of
     the static emblem and, in 3D, of the ring and the candle wicks. Descender bottom = top + 1.055 em */
  .ilk-ad { font-size: min(27vw, 15vh); top: calc(33.15vh - 1.055em - 11px); }
  /* fixed slot (description + one status line), top-aligned: a shorter text never moves the lines above */
  .ilk-txt { top: auto; height: var(--txt-h); bottom: calc(var(--bot) + var(--hint-h) + 14px + var(--nav-h) + 14px); justify-content: flex-start; gap: 8px; }
  .ilk-nav { top: auto; bottom: calc(var(--bot) + var(--hint-h) + 14px); }
}
/* phones: 2 x 2 grid of full-width buttons */
.ilk { --hint-h: calc(clamp(30px, 5vh, 56px) + 10px + 1.55 * var(--fs-s)); --nav-h: 52px; --txt-h: 44px; }
@media (max-width: 700px) {
  .ilk { --nav-h: calc(2 * 50px + 10px); }
  .ilk-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; margin: 0 auto; }
  .ilk-a { width: auto; height: 50px; padding: 0 8px; font-size: 12px; letter-spacing: .08em; }
  .ilk-desc { font-size: 13px; letter-spacing: .1em; }
  .ilk-status { font-size: 11px; letter-spacing: .06em; }
  .ilk-status .st-uzun { display: none; }
  .ilk-status .st-kisa { display: inline; }
}
@media (max-width: 370px) {
  .ilk-a { font-size: 11.5px; letter-spacing: .05em; }
  .ilk-desc { font-size: 12px; letter-spacing: .07em; }
  .ilk-status { font-size: 10.5px; letter-spacing: .04em; }
}
/* short landscape screens (phones turned sideways, small laptop windows): compact, hint without line */
@media (max-height: 560px) and (min-aspect-ratio: 4/5) {
  .ilk-ad { --ad-c: 36vh; font-size: min(21.3vw, 30vh); }
  .ilk-txt { top: 58vh; gap: 6px; height: 46px; }
  .ilk-nav { top: calc(58vh + 54px); }
  .ilk-a { height: 44px; }
  .intro-line { display: none; }
}

/* ---------------------------------------------------------------- hero */
.ngl-head { display: none; }
.hero-block {
  position: absolute; left: 63vw; top: 50%; transform: translateY(-42%);
  width: min(30vw, 400px);
  display: grid; gap: 1.05em;
}
.hero-block .k { margin-bottom: .1em; }
.lab-all {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font-size: var(--fs-s); letter-spacing: .08em; color: var(--gold); text-shadow: var(--shadow);
  transition: color .2s;
}
.lab-all .arr { transition: transform .25s var(--ease); }
.lab-all:hover { color: var(--gold-b); }
.lab-all:hover .arr { transform: translateX(4px); }

/* ---------------------------------------------------------------- strategies */
.st-cap {
  position: absolute; left: var(--gl); top: calc(var(--top) + 5vh);
  width: min(30vw, 420px);
}
.st-kick { display: flex; align-items: center; gap: 14px; color: var(--gold); }
.st-kick::before { content: ""; width: 18px; height: 1px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.st-swap { transition: opacity .14s linear, transform .14s var(--ease); will-change: opacity, transform; } /* own layer: no layer churn per swap */
.st-swap.is-swap { opacity: 0; transform: translateY(6px); }
.st-name {
  margin: .22em 0 .18em;
  font-family: var(--sans); font-weight: 800; font-stretch: 112%;
  font-size: clamp(40px, 4.6vw, 80px); line-height: .95; letter-spacing: .01em;
  color: var(--text);
  background: linear-gradient(180deg, var(--gold-b) 10%, var(--gold) 70%, var(--gold-d) 120%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 16px rgba(2, 3, 8, .85)) drop-shadow(0 0 22px rgba(214, 176, 106, .18));
  text-shadow: none !important;
}
.st-tag { color: var(--text); max-width: 34ch; min-height: 3.1em; }
.st-ticks { display: flex; margin: 14px 0 0 -10px; }
.st-tick { width: 40px; height: 44px; display: grid; place-items: center; }
.st-tick i { width: 18px; height: 2px; background: var(--line-2); border-radius: 2px; transition: background .25s, width .25s var(--ease), box-shadow .25s; }
.st-tick:hover i { background: var(--text); }
.st-tick.is-active i { width: 28px; background: var(--gold-b); box-shadow: 0 0 10px var(--gold); }
.st-grid { display: none; }

.st-menu {
  position: absolute; left: var(--gl); bottom: var(--bot);
  width: min(30vw, 360px); min-width: 280px;
}
.st-menu-t { color: var(--text); margin-bottom: 6px; }
.st-links :is(button, a) {
  display: inline-flex; align-items: center; gap: 12px; min-height: 30px; padding: 2px 0;
  color: var(--text); text-shadow: var(--shadow); transition: color .2s, transform .25s var(--ease);
}
.st-links :is(button, a):hover { color: var(--gold-b); transform: translateX(4px); }
.st-notes {
  position: absolute; right: calc(var(--gr) + var(--ind-w)); bottom: var(--bot);
  max-width: min(32ch, 26vw); text-align: right; display: grid; gap: 6px;
  font-size: var(--fs-s); color: var(--muted);
}

/* ask pill */
.ask { position: relative; margin-top: 18px; }
.ask-form {
  position: relative; display: flex; align-items: center; height: 44px;
  border-radius: 999px; border: 1px solid rgba(233, 212, 170, .5);
  background: rgba(8, 12, 20, .42);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 0 18px -6px rgba(214, 176, 106, .4);
  transition: border-color .2s, box-shadow .2s;
}
.ask-form:focus-within { border-color: var(--gold); box-shadow: 0 0 22px -4px rgba(214, 176, 106, .6); }
.ask-in {
  flex: 1; min-width: 0; height: 100%; padding: 0 4px 0 20px; border: 0; background: transparent;
  font-size: var(--fs);
  color: var(--text); outline: none; pointer-events: auto;
}
@supports (-webkit-touch-callout: none) { .ask-in { font-size: 16px; } } /* >= 16px: no iOS zoom on focus */
.ask-in::placeholder { color: var(--text); opacity: .75; }
.ask-go { width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--gold); transition: color .2s, transform .2s var(--ease); }
.ask-go:hover { color: var(--gold-b); transform: translateX(2px); }
.ask-hint { margin: 8px 0 0 20px; font-size: var(--fs-s); color: var(--muted); }
.ask-bubble {
  position: absolute; left: 0; bottom: calc(100% + 12px); z-index: 5;
  width: min(380px, calc(100vw - var(--gl) - var(--gr)));
  padding: 16px 44px 16px 18px; border-radius: 18px;
  background: rgba(8, 12, 20, .72);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(233, 212, 170, .28);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .9), 0 0 30px -12px rgba(214, 176, 106, .35);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .3s var(--ease), visibility 0s linear .3s;
}
.ask.is-open .ask-bubble { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease); }
.ask-a { min-height: 1.5em; color: var(--text); text-shadow: none !important; }
.ask-x { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; color: var(--muted); font-size: 20px; line-height: 1; }
.ask-x:hover { color: var(--gold-b); }

/* ---------------------------------------------------------------- core */
.core-head, .core-list { position: absolute; left: var(--gl); width: min(31vw, 450px); }
.core-head { top: var(--top); display: grid; gap: 12px; }
.core-list {
  bottom: var(--bot); counter-reset: none;
  border-top: 1px solid var(--line);
}
.core-list li {
  display: grid; grid-template-columns: 3.2ch 1fr; gap: 0 14px; align-items: baseline;
  padding: clamp(7px, 1.2vh, 12px) 0; border-bottom: 1px solid var(--line);
}
.core-list .n { color: var(--gold); text-shadow: 0 0 10px rgba(214, 176, 106, .45); }
.core-list h3 { color: var(--text); }
.core-list p { color: var(--muted); font-size: var(--fs-s); line-height: 1.5; margin-top: 2px; }

/* ---------------------------------------------------------------- test lab */
.lab-wrap {
  position: absolute; left: 50%; bottom: var(--bot); transform: translateX(-50%);
  width: min(1360px, calc(100vw - var(--gl) - var(--gr) - 2 * var(--ind-w)));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 24px;
  /* run switch (top-left), the two run blocks and the "more" link (bottom-right) share the "run" cell */
  grid-template-areas: "head head steps steps" "run run run run";
}
.lab-head { grid-area: head; display: grid; gap: 8px; }
.lab-head .lead { max-width: 52ch; }
.lab-steps { grid-area: steps; align-self: end; justify-self: end; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.lab-steps li { position: relative; display: inline-flex; align-items: center; color: var(--text); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(8, 12, 20, .35); font-size: var(--fs-s); white-space: nowrap; }
.lab-steps li + li { margin-left: 30px; }
.lab-steps li + li::before { content: "→"; position: absolute; left: -22px; color: var(--gold); text-shadow: 0 0 8px rgba(214, 176, 106, .6); }
.lab-runs {
  grid-area: run; justify-self: start; align-self: start; z-index: 1;
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(8, 12, 20, .4);
}
.lab-runs [role="tab"] {
  min-height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: var(--fs-s); letter-spacing: .07em; line-height: 1.2; white-space: nowrap;
  color: var(--text); opacity: .72; text-shadow: var(--shadow);
  transition: color .2s, opacity .2s, background .2s, box-shadow .2s;
}
.lab-runs [role="tab"]:hover { opacity: 1; color: var(--gold-b); }
.lab-runs [aria-selected="true"] {
  opacity: 1; color: var(--gold-b); background: rgba(214, 176, 106, .14);
  box-shadow: inset 0 0 0 1px rgba(214, 176, 106, .6), 0 0 16px -6px rgba(214, 176, 106, .6);
  text-shadow: 0 0 10px rgba(243, 217, 164, .45), var(--shadow);
}
.lab-runs [role="tab"]:focus-visible { outline-offset: 1px; border-radius: 999px; }
.lab-run { grid-area: run; display: grid; gap: 14px; align-content: start; min-width: 0; transition: opacity .22s linear; }
.lab-run.is-off { opacity: 0; visibility: hidden; transition: none; }
/* the tag sits at the right end of the switch row */
.lab-tag { display: flex; justify-content: flex-end; align-items: center; min-height: 38px; }
.lab-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); container-type: inline-size; }
.lab-stats.is-6 { grid-template-columns: repeat(6, 1fr); }
.lab-stats li { display: grid; gap: 6px; padding: 16px 16px 14px; align-content: start; min-width: 0; }
.lab-stats.is-6 li { padding: 16px 14px 14px; }
.lab-stats li + li { border-left: 1px solid var(--line); }
.lab-stats .n {
  font-family: var(--sans); font-weight: 700; font-stretch: 110%; letter-spacing: 0;
  font-size: clamp(32px, 3.4vw, 58px); line-height: 1; white-space: nowrap;
  color: var(--gold); text-shadow: 0 0 24px rgba(214, 176, 106, .35), var(--shadow);
}
/* six columns: the size follows the row width so "723 / 723" and "+1.029 USD" stay on one line */
.lab-stats.is-6 .n { font-size: clamp(18px, 3.7cqi - 7px, 44px); }
.lab-stats .n .u { font-size: .42em; font-weight: 600; letter-spacing: .04em; font-stretch: 100%; }
.lab-stats .l { color: var(--text); font-size: var(--fs-s); opacity: .85; }
.lab-note { font-size: var(--fs-s); color: var(--muted); max-width: min(150ch, calc(100% - 320px)); }
.lab-all { justify-self: start; min-height: 34px; margin-top: -8px; }
.lab-more {
  grid-area: run; justify-self: end; align-self: end; z-index: 1;
  display: inline-flex; align-items: center; gap: 12px; min-height: 34px;
  font-size: var(--fs-s); letter-spacing: .08em; color: var(--gold); text-shadow: var(--shadow);
  transition: color .2s;
}
.lab-more .arr { transition: transform .25s var(--ease); }
.lab-more:hover { color: var(--gold-b); }
.lab-more:hover .arr { transform: translateX(4px); }
/* not enough width for switch + tag on one row: the switch gets its own row */
@media (max-width: 960px) {
  .lab-wrap { grid-template-areas: "head head steps steps" "runs runs runs runs" "run run run run"; }
  .lab-runs { grid-area: runs; }
  .lab-tag { justify-content: flex-start; min-height: 0; }
}

/* ---------------------------------------------------------------- outro + footer */
.out-scroll {
  position: absolute; inset: var(--top) calc(var(--gr) + var(--ind-w)) 0 var(--gl);
  overflow-y: auto; overscroll-behavior: auto; scrollbar-width: none;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6vh;
  padding-bottom: calc(var(--sab) + 22px);
  pointer-events: auto;
}
.out-scroll::-webkit-scrollbar { display: none; }
.out-main { display: grid; gap: 18px; justify-items: start; max-width: 560px; margin-top: 6vh; }
.out-main .ttl { font-size: clamp(26px, 3vw, 48px); }
.out-main .lead { max-width: 44ch; }
.out-ctas {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px;
  width: max-content; max-width: calc(100vw - var(--gl) - var(--gr) - var(--ind-w) - 8px);
}
/* quieter third control: a text link next to the two buttons */
.out-dev {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px;
  color: var(--text); letter-spacing: .1em; white-space: nowrap; text-shadow: var(--shadow);
  transition: color .2s;
}
.out-dev span:first-child { text-decoration: underline; text-decoration-color: rgba(214, 176, 106, .45); text-underline-offset: 6px; text-decoration-thickness: 1px; }
.out-dev .arr { transition: transform .25s var(--ease); }
.out-dev:hover { color: var(--gold-b); }
.out-dev:hover .arr { transform: translateX(4px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  border: 1px solid rgba(233, 212, 170, .55); background: rgba(8, 12, 20, .45);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--text); letter-spacing: .1em; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s, transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 24px -6px rgba(214, 176, 106, .6); }
.btn-gold { background: linear-gradient(180deg, var(--gold-b), var(--gold)); color: #120d05; border-color: var(--gold-b); box-shadow: 0 0 26px -8px rgba(214, 176, 106, .8); }
.btn-gold .arr { color: #120d05; }
.totop { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted); }
.totop:hover { color: var(--gold-b); }

.ft { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 14px; font-size: var(--fs-s); }
.ft-risk { color: var(--text); opacity: .8; max-width: 120ch; text-transform: none; letter-spacing: .02em; line-height: 1.6; }
.ft-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.ft-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-shadow: var(--shadow); }
.ft-links a:hover { color: var(--gold-b); text-decoration: underline; text-underline-offset: 4px; }
.ft-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; color: var(--muted); }

/* ---------------------------------------------------------------- right-edge indicator */
.ind {
  position: fixed; z-index: 30; right: max(6px, env(safe-area-inset-right, 0px)); top: 50%;
  width: var(--ind-w); height: clamp(220px, 44vh, 420px); transform: translateY(-50%);
  --p: 0;
}
.ind-track { position: absolute; right: 16px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.ind-thumb {
  /* moved with transform, not `top` (set every frame: no layout / repaint): 88% of the track = 88/12 of
     the thumb's own height */
  position: absolute; left: -1px; width: 3px; height: 12%; top: 0;
  transform: translateY(calc(var(--p) * 733.3333%)); will-change: transform;
  border-radius: 3px; background: var(--gold-b);
  box-shadow: 0 0 10px var(--gold), 0 0 2px var(--gold-b);
}
.ind-dots { position: absolute; inset: 0; }
.ind-dots li { position: absolute; right: 0; top: calc(var(--at) * 88% + 6%); transform: translateY(-50%); }
.ind-dot { position: relative; display: grid; place-items: center; width: var(--ind-w); height: 34px; }
.ind-dot i { width: 5px; height: 5px; border-radius: 50%; background: rgba(233, 212, 170, .45); transform: translateX(0); transition: background .2s, box-shadow .2s, transform .2s; }
.ind-dot.is-active i { background: var(--gold-b); box-shadow: 0 0 8px var(--gold); }
.ind-dot:hover i { transform: scale(1.5); background: var(--text); }
.ind-lab {
  position: absolute; right: calc(100% + 4px); top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; font-size: var(--fs-s); color: var(--text); text-shadow: var(--shadow);
  padding: 4px 10px; border-radius: 999px; background: rgba(8, 12, 20, .6); border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.ind-dot:hover .ind-lab, .ind-dot:focus-visible .ind-lab { opacity: 1; transform: translate(0, -50%); }
@media (pointer: coarse) {
  .ind { pointer-events: none; height: clamp(160px, 28vh, 300px); }
  .ind-lab { display: none; }
}

/* ---------------------------------------------------------------- noscript */
.nos { position: relative; z-index: 50; max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; display: grid; gap: 16px; background: var(--bg); }
.nos h2 { font-size: 28px; line-height: 1.15; color: var(--gold-b); }
.nos-risk { text-transform: none; color: var(--muted); font-size: 12px; }
.nos a { color: var(--gold); text-decoration: underline; }

/* ================================================================ PORTRAIT / PHONE ================ */
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  :root { --ind-w: 14px; --top: calc(var(--sat) + var(--hd-pad) + var(--pill-h) + 14px); --bot: calc(var(--sab) + 16px); }
  .brand { gap: 8px; }
  .brand-txt { font-size: 11px; letter-spacing: .1em; }
  .ind { right: max(1px, env(safe-area-inset-right, 0px)); }
  .ind-track { right: 7px; }
  .ind-dot { height: 28px; }

  /* hero: lower third */
  .hero-block {
    left: var(--gl); right: calc(var(--gr) + 6px); top: auto; bottom: calc(var(--bot) + 2vh);
    width: auto; max-width: 560px; transform: none; gap: .85em;
  }

  /* strategies: caption under header, compact menu at the bottom; centre stays free */
  .st-cap { left: var(--gl); right: var(--gr); top: var(--top); width: auto; }
  .st-name { font-size: clamp(30px, 9.5vw, 56px); margin: .14em 0 .12em; }
  .st-tag { min-height: 0; max-width: 40ch; }
  .st-ticks { margin: 0 0 0 -8px; }
  .st-tick { width: min(40px, calc((100vw - 2 * var(--gl)) / 9)); height: 44px; }
  .st-tick i { width: 14px; }
  .st-tick.is-active i { width: 22px; }
  .st-menu { left: var(--gl); right: var(--gr); width: auto; min-width: 0; bottom: var(--bot); }
  .st-menu-t { display: none; }
  .st-links {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gr)) 0 0; padding-right: var(--gr);
    pointer-events: auto; -webkit-mask: linear-gradient(90deg, #000 85%, transparent); mask: linear-gradient(90deg, #000 85%, transparent);
  }
  .st-links::-webkit-scrollbar { display: none; }
  .st-links li { flex: none; }
  .st-links :is(button, a) {
    min-height: 44px; padding: 0 14px; gap: 8px; border-radius: 999px; border: 1px solid var(--line);
    background: rgba(8, 12, 20, .45); font-size: var(--fs-s); white-space: nowrap;
  }
  .st-links :is(button, a):hover { transform: none; }
  .ask { margin-top: 10px; }
  .ask-hint { margin: 6px 0 0 18px; }
  .st-notes {
    left: var(--gl); right: calc(var(--gr) + var(--ind-w)); max-width: none; text-align: left;
    bottom: calc(var(--bot) + 44px + 10px + 44px + 26px + 14px); gap: 2px; font-size: 10px;
  }

  /* core: title on top, horizontal snap row of cards at the bottom */
  .core-head { left: var(--gl); right: var(--gr); width: auto; top: var(--top); gap: 8px; }
  .core-head .lead { max-width: 40ch; }
  .core-list {
    left: 0; right: 0; width: auto; bottom: var(--bot); border: 0;
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 0 var(--gr) 0 var(--gl); scroll-padding: 0 var(--gl);
    pointer-events: auto;
  }
  .core-list::-webkit-scrollbar { display: none; }
  /* the list items are glass on phones: fade them one by one (see .ov > * above), no layer on the list */
  .ov > .core-list { opacity: 1; translate: none; will-change: auto; }
  .core-list > li { opacity: var(--o); translate: 0 var(--y); }
  .core-list li {
    flex: 0 0 78vw; max-width: 380px; scroll-snap-align: start;
    grid-template-columns: 1fr; gap: 6px; align-content: start; padding: 14px 16px 16px;
    border: 1px solid var(--line); border-radius: 16px;
    background: rgba(8, 12, 20, .55);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  }

  /* test lab: lower half, two-column stats */
  .lab-wrap {
    left: var(--gl); right: var(--gr); width: auto; transform: none;
    grid-template-columns: 1fr 1fr; gap: 10px;
    grid-template-areas: "head head" "steps steps" "runs runs" "run run" "more more";
  }
  .lab-steps { justify-self: start; flex-wrap: nowrap; }
  .lab-steps li { padding: 5px 8px; font-size: 10px; letter-spacing: .02em; }
  .lab-steps li + li { margin-left: 20px; }
  .lab-steps li + li::before { left: -15px; }
  .lab-runs { grid-area: runs; justify-self: stretch; margin: -4px 0; }   /* 44 px tabs, same footprint as the old 36 px */
  .lab-runs [role="tab"] { flex: 1 1 auto; min-height: 44px; padding: 0 10px; font-size: 10px; letter-spacing: .03em; }
  .lab-run { gap: 10px; }
  .lab-tag { justify-content: flex-start; min-height: 0; }
  .lab-tag .chip { font-size: 9.5px; letter-spacing: .03em; padding: 5px 11px; min-height: 28px; }
  .lab-stats { grid-template-columns: 1fr 1fr; }
  .lab-stats li { padding: 12px 10px 10px 0; }
  .lab-stats li + li { border-left: 0; }
  .lab-stats li:nth-child(even) { border-left: 1px solid var(--line); padding-left: 12px; }
  .lab-stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lab-stats .n { font-size: clamp(28px, 8.4vw, 46px); }
  /* run A: 3 x 2 */
  .lab-stats.is-6 { grid-template-columns: repeat(3, 1fr); }
  .lab-stats.is-6 li:nth-child(n) { padding: 10px 6px 8px 0; border-left: 0; border-top: 0; gap: 5px; }
  .lab-stats.is-6 li:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); padding-left: 10px; }
  .lab-stats.is-6 li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .lab-stats.is-6 .n { font-size: clamp(16px, 6.9cqi - 3px, 40px); }
  .lab-stats.is-6 .l { font-size: 9.5px; letter-spacing: .02em; line-height: 1.4; }
  .lab-note { font-size: 10px; line-height: 1.45; max-width: none; }
  .lab-more { grid-area: more; justify-self: start; align-self: auto; min-height: 44px; margin: -7px 0; font-size: 10px; }
  .lab-all { min-height: 44px; font-size: 10px; margin: -13px 0 -7px; }
  /* phones: the block must stay below the 3D banner (free area y 0.08-0.50). The kicker repeats the banner
     right above it and the lead says in words what the three step chips show, so both give way here
     (the heading stays for screen readers). */
  @media (max-width: 760px) {
    body:not(.no-webgl) .lab-wrap { grid-template-areas: "steps steps" "runs runs" "run run" "more more"; }
    body:not(.no-webgl) .lab-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  }
  /* short phones: the block would cover the 3D banner (the scene lifts / shrinks the banner above the block's
     top, see testlab.js): the step chips (they repeat what the run switch and tag say) give way and the
     long note is set tighter */
  @media (max-width: 760px) and (max-height: 700px) {
    body:not(.no-webgl) .lab-wrap { grid-template-areas: "runs runs" "run run" "more more"; gap: 8px; }
    body:not(.no-webgl) .lab-steps { display: none; }
    .lab-note { font-size: 9.5px; line-height: 1.38; }
    .lab-stats.is-6 li:nth-child(n) { padding-top: 7px; padding-bottom: 6px; }
  }

  /* outro: content starts low (3D visible above), the whole column scrolls if needed */
  .out-scroll { left: var(--gl); right: var(--gr); justify-content: flex-start; gap: 34px; padding-top: 22vh; }
  .out-main { margin-top: 0; gap: 14px; }
  .out-main .ttl { font-size: clamp(24px, 7vw, 40px); }
  .out-ctas { width: 100%; max-width: none; }
  .btn { flex: 1 1 auto; padding: 0 18px; }
  .out-dev { min-height: 44px; padding: 0 2px; }
  .ft-meta { flex-direction: column; }
}

/* phones: smaller header pill so brand mark + pill + TR/EN fit 360 px */
@media (max-width: 420px) {
  :root { --hd-pad: 12px; }
  .hd { gap: 8px; }
  .brand { gap: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-txt { font-size: 10px; letter-spacing: .06em; }
  .pill-a { padding: 0 10px; font-size: 10px; letter-spacing: .06em; }
  .pill-line { width: 14px; }
  .lang { font-size: 10px; }
  .lang button { min-width: 32px; padding: 0 2px; }
}
@media (max-width: 370px) {
  .pill-a { padding: 0 8px; letter-spacing: .03em; }
  .pill-line { width: 10px; }
  .lab-stats .n { font-size: 26px; }
}
/* short landscape screens (phones turned sideways) */
@media (max-height: 520px) and (min-aspect-ratio: 4/5) {
  .core-list p { display: none; }
  .st-name { font-size: 34px; }
  .hero-block { gap: .6em; }
}

/* ================================================================ NO-WEBGL: plain scrolling page ==== */
body.no-webgl {
  background:
    radial-gradient(90% 60% at 80% 0%, rgba(214, 176, 106, .12), transparent 60%),
    radial-gradient(70% 50% at 0% 40%, rgba(122, 92, 255, .06), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--bg) 40%, var(--bg-deep) 100%);
  background-attachment: fixed;
}
body.no-webgl #gl, body.no-webgl .spacer { display: none; }
body.no-webgl .hd { background: linear-gradient(180deg, rgba(5, 7, 11, .92), rgba(5, 7, 11, .6) 70%, transparent); padding-bottom: 12px; }
body.no-webgl main {
  max-width: 1120px; margin: 0 auto;
  padding: 0 calc(var(--gr) + var(--ind-w)) calc(var(--sab) + 40px) var(--gl);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(72px, 14vh, 150px);
}
body.no-webgl .ov { position: relative; inset: auto; visibility: visible; pointer-events: auto; }
body.no-webgl .ov > *, body.no-webgl .st-menu > *, body.no-webgl .ask > *, body.no-webgl .out-scroll > *,
body.no-webgl .out-main > *, body.no-webgl .out-ctas > *, body.no-webgl .core-list > li { opacity: 1; translate: none; will-change: auto; }
body.no-webgl .ov :is(.hero-block, .st-cap, .st-menu, .st-notes, .core-head, .core-list, .lab-wrap, .out-scroll) {
  position: relative; inset: auto; left: auto; right: auto; top: auto; bottom: auto; transform: none; width: auto; max-width: none; min-width: 0;
}
/* the first screen keeps its own layout as the top of the plain page: one full-bleed viewport */
body.no-webgl .ov-intro {
  height: 100vh; height: 100svh; min-height: var(--ilk-min-h);
  width: 100vw; margin-left: calc(-1 * (max(0px, (100vw - 1120px) / 2) + var(--gl)));
}
/* (portrait phones keep the 3D layout in the plain view too: the static emblem fills the ring's place,
   so the buttons never move when the view switches) */
body.no-webgl .ngl-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 36px; }
body.no-webgl .ngl-img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(135deg, #0b1220, #05070b); box-shadow: 0 30px 80px -40px rgba(214, 176, 106, .4); }
body.no-webgl .hero-h1 {
  position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: normal;
  font-size: clamp(30px, 6vw, 72px); line-height: 1.02; overflow-wrap: break-word; color: var(--text); text-shadow: 0 0 30px rgba(214, 176, 106, .25);
}
body.no-webgl .ngl-note { font-size: var(--fs-s); color: var(--muted); }
body.no-webgl .hero-block { max-width: 640px; }

body.no-webgl .st-h {
  position: static !important; width: auto; height: auto; margin: 0 0 22px; overflow: visible; clip: auto; clip-path: none; white-space: normal;
  font-size: clamp(22px, 2.6vw, 36px); color: var(--text);
}
body.no-webgl .st-cap { display: none; }
body.no-webgl .st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
body.no-webgl .st-grid li {
  display: grid; gap: 8px; align-content: start; padding: 18px 20px 20px; border-radius: 18px;
  border: 1px solid var(--line); background: rgba(8, 12, 20, .55);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
body.no-webgl .g-name { font-family: var(--sans); font-weight: 800; font-stretch: 112%; font-size: clamp(26px, 2.4vw, 34px); line-height: 1; color: var(--gold-b); letter-spacing: .01em; }
body.no-webgl .g-tag { color: var(--text); opacity: .86; }
body.no-webgl .st-notes { display: grid; text-align: left; margin: 22px 0 0; font-size: var(--fs-s); }
body.no-webgl .st-menu { margin-top: 44px; max-width: 420px; }
body.no-webgl .st-menu-t { display: block; }
body.no-webgl .st-links { display: block; -webkit-mask: none; mask: none; margin: 0; padding: 0; overflow: visible; }
body.no-webgl .st-links :is(button, a) { border: 0; background: none; padding: 2px 0; min-height: 44px; font-size: inherit; }

body.no-webgl .core-head { margin-bottom: 26px; }
body.no-webgl .core-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 32px; overflow: visible; padding: 0; border-top: 0; }
body.no-webgl .core-list li { flex: none; max-width: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; grid-template-columns: 3.2ch 1fr; padding: 14px 0; }

body.no-webgl .out-scroll { overflow: visible; padding: 0; gap: 80px; }
body.no-webgl .out-main { margin-top: 0; }
body.no-webgl .ind { display: block; }

/* ================================================================ reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .ov > *, .st-menu > *, .ask > *, .out-scroll > *, .out-main > *, .out-ctas > *, .core-list > li { translate: none !important; }
  .pre { animation: pre-safety .001s linear 6s forwards !important; }
  .intro-line i { animation: none; transform: translateY(60%); }
}

/* ================================================================ panel shell (first open) ======== */
/* shown at once when a panel opens before its own code has arrived (panels.js): the page is covered and
   inert, the close control is focused, a short "opening" line with a thin running bar */
.pn-shell {
  position: absolute; inset: 0; z-index: 1; pointer-events: auto;
  display: grid; place-items: center; background: var(--bg);
}
.pn-shell p { display: grid; justify-items: center; gap: 12px; font-size: var(--fs-s); letter-spacing: .18em; color: var(--text); }
.pn-shell i { position: relative; width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.pn-shell i::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: var(--gold-b); box-shadow: 0 0 8px var(--gold);
  animation: acilir 1s cubic-bezier(.6, 0, .3, 1) infinite;
}
.pn-shell[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .pn-shell i::after { animation: none; transform: translateX(70%); } }
