/* Institute of Artificial Intelligence. Brand: navy #002961, crimson #b7011a, black. */

@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  font-weight: 100 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Devanagari for the Nepali page (Noto Sans Devanagari, SIL Open Font License). It joins both
   families for Devanagari characters only, so mixed Nepali and English text needs no extra rules. */
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/noto-sans-devanagari.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; size-adjust: 106%;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/noto-sans-devanagari.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; size-adjust: 106%;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}

:root {
  --bg: #04070f;
  --bg-1: #070c18;
  --bg-2: #0b1324;
  --line: rgba(150, 172, 214, .14);
  --line-2: rgba(150, 172, 214, .26);
  --text: #e9eef8;
  --muted: #9aa6bd;
  --muted-2: #5f6b85;
  --red: #ff2d4b;
  --red-ui: #c8102e;
  --red-hover: #e0193a;
  --red-ink: #ff6476;
  --blue: #7e9cf0;
  --paper: #f2f0ea;
  --ink: #06122b;
  --ink-muted: #4a5571;
  --paper-line: rgba(6, 18, 43, .14);
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --edge: clamp(1.1rem, 4.5vw, 4rem);
  --max: 88rem;
  --header: 4rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --cut: .55rem;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 1rem);
}
html.locked { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: rgba(255, 45, 75, .38); color: #fff; }
:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: #fff; color: var(--ink); padding: .75rem 1rem; font-weight: 600; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--edge), var(--max)); margin-inline: auto; }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 500; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(2.35rem, 7.4vw, 5.25rem); letter-spacing: -.052em; line-height: .96; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); letter-spacing: -.02em; line-height: 1.2; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--muted-2); }
.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font: 500 .7rem/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.dot { flex: none; width: .45rem; height: .45rem; background: var(--red); box-shadow: 0 0 10px rgba(255, 45, 75, .85); }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.35vw, 1.17rem); line-height: 1.6; max-width: 36rem; text-wrap: pretty; }
.lead + .lead { margin-top: 1rem; }
.small, .fine { font: 400 .74rem/1.6 var(--mono); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --c: var(--red-ui);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3rem; padding: .8rem 1.25rem; border: 0;
  color: #fff; font: 600 .95rem/1.1 var(--font); letter-spacing: -.01em; white-space: nowrap;
  /* Chamfered corners drawn with gradients, so the focus outline is never clipped. */
  background:
    linear-gradient(135deg, transparent var(--cut), var(--c) var(--cut)) top left / 51% 100% no-repeat,
    linear-gradient(-45deg, transparent var(--cut), var(--c) var(--cut)) bottom right / 51% 100% no-repeat;
  transition: transform .2s var(--ease), filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --c: var(--red-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { --c: #2a3348; color: var(--muted); cursor: not-allowed; }
.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-sm { min-height: 2.5rem; padding: .55rem .95rem; font-size: .85rem; }
.btn-wide { width: 100%; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .7rem 1rem; border: 1px solid var(--line-2); background: transparent;
  font: 500 .9rem/1.2 var(--font); text-align: center; transition: border-color .2s, background .2s;
}
.btn-line:hover { border-color: var(--text); background: rgba(255, 255, 255, .03); }
.text-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; font-weight: 500; color: var(--text); }
.text-link span { transition: transform .25s var(--ease); }
.text-link:hover span { transform: translateX(4px); }
.link-button { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .2em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; }

/* ---------- Header ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
  /* A soft shade at the top keeps the menu readable over the moving scene. */
  background: linear-gradient(rgba(4, 7, 15, .92), rgba(4, 7, 15, .55) 70%, rgba(4, 7, 15, 0));
}
.nav[data-scrolled="true"], .nav[data-menu="open"] {
  background: rgba(4, 7, 15, .86);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
/* A backdrop filter makes the header the containing block for the fixed full-screen menu, which
   then collapses to a thin strip. While the menu is open the header is solid instead. */
.nav[data-menu="open"] { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav-inner { height: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; min-width: 0; }
.brand-tile {
  flex: none; display: grid; place-items: center; background: #fff; padding: .28rem .42rem;
  clip-path: polygon(.35rem 0, 100% 0, 100% calc(100% - .35rem), calc(100% - .35rem) 100%, 0 100%, 0 .35rem);
}
.brand-tile img { width: 2.6rem; height: auto; }
.brand-word { font: 600 .7rem/1.18 var(--mono); letter-spacing: -.01em; color: var(--text); }
.nav-links { display: none; gap: clamp(1rem, 2.2vw, 2.1rem); font-size: .95rem; font-weight: 500; color: #dfe5f1; }
.nav-links a { position: relative; transition: color .2s; padding-block: .6rem; text-shadow: 0 1px 10px rgba(0, 0, 0, .9); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .3rem; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: .6rem; flex: none; }
.status { display: none; align-items: center; gap: .55rem; font: 500 .72rem/1 var(--mono); letter-spacing: .04em; color: #dfe5f1; padding: .5rem 0; text-shadow: 0 1px 10px rgba(0, 0, 0, .9); }
.status:hover { color: var(--text); }
.lang-switch {
  flex: none; display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.5rem; padding: 0 .65rem;
  border: 1px solid var(--line-2); background: rgba(4, 7, 15, .55);
  font: 600 .74rem/1 var(--mono); letter-spacing: .06em; color: #dfe5f1; white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.lang-switch:hover { color: var(--text); border-color: var(--muted); }
/* On the English page "नेपाली" uses the device's own Devanagari font, so English visitors never
   download the Devanagari web font for one word. */
.lang-switch[lang="ne"], .lang-link[lang="ne"] { font-family: "Nirmala UI", "Kohinoor Devanagari", "Noto Sans Devanagari", Mangal, system-ui, sans-serif; letter-spacing: 0; }
.lang-switch[lang="ne"] { font-size: .9rem; font-weight: 500; }
.menu-btn { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); padding: 0; }
.menu-icon, .menu-icon::before { display: block; width: 1.05rem; height: 1px; background: var(--text); transition: transform .3s var(--ease); }
.menu-icon { position: relative; transform: translateY(-3px); }
.menu-icon::before { content: ""; position: absolute; top: 6px; }
.menu-btn[aria-expanded="true"] .menu-icon { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(-6px) rotate(-90deg); }
.menu {
  position: fixed; inset: calc(var(--header) + env(safe-area-inset-top)) 0 0; z-index: 49;
  background: var(--bg); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu nav { display: grid; padding-top: 1rem; }
.menu nav a {
  display: flex; align-items: baseline; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line);
  font-size: clamp(1.7rem, 8vw, 2.6rem); letter-spacing: -.04em; line-height: 1.1;
  animation: menu-in .5s var(--ease) both;
}
.menu nav a:nth-child(2) { animation-delay: 40ms; } .menu nav a:nth-child(3) { animation-delay: 80ms; }
.menu nav a:nth-child(4) { animation-delay: 120ms; } .menu nav a:nth-child(5) { animation-delay: 160ms; }
.menu nav span { font: 500 .72rem var(--mono); color: var(--red-ink); letter-spacing: .06em; }
.menu-foot { font: .72rem/1.6 var(--mono); color: var(--muted); padding-top: 1.5rem; }
.menu-foot a { text-decoration: underline; text-underline-offset: .2em; }
@keyframes menu-in { from { opacity: 0; transform: translateY(.75rem); } }

/* ---------- Story: sticky particle stage with chapters scrolling over it ---------- */
.story { position: relative; }
.stage {
  position: sticky; top: 0; z-index: 0; overflow: hidden; pointer-events: none;
  height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh;
  background:
    radial-gradient(60rem 40rem at 72% 30%, rgba(0, 41, 97, .32), transparent 70%),
    radial-gradient(40rem 30rem at 15% 90%, rgba(183, 1, 26, .1), transparent 70%),
    var(--bg);
}
.stage::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
}
.stage::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--bg)); }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-canvas[hidden] { display: none; }
.scrim { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); pointer-events: none; }
.fig {
  position: absolute; right: var(--edge); top: calc(var(--header) + env(safe-area-inset-top) + 1rem);
  display: grid; justify-items: end; gap: .4rem; text-align: right;
  opacity: 0; transition: opacity .6s var(--ease);
  font: 500 .66rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #c9d2e3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
}
.stage[data-scene="room"] .fig, .stage[data-scene="studio"] .fig, .stage[data-scene="deploy"] .fig { opacity: 1; }
.fig-id { color: var(--red-ink); }
.fig-caption { white-space: nowrap; }

.chapter {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: end;
  padding: calc(var(--header) + env(safe-area-inset-top) + 1.5rem) 0 calc(2rem + env(safe-area-inset-bottom));
}
.chapter-copy { position: relative; max-width: 34rem; }
.chapter-copy::before {
  /* Scrim so text stays readable over the particles on small screens. */
  content: ""; position: absolute; z-index: -1; inset: -4rem calc(-1 * var(--edge)) -2rem;
  background: linear-gradient(to top, var(--bg) 58%, rgba(4, 7, 15, 0));
}
.chapter h2 { font-size: clamp(2.3rem, 9vw, 4.9rem); margin: 1rem 0 1.1rem; }
.chapter p:not(.eyebrow) { color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.6; max-width: 32rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.4rem; }
.chips li { font: 500 .7rem/1 var(--mono); letter-spacing: .04em; color: var(--text); border: 1px solid var(--line-2); padding: .5rem .6rem; background: rgba(4, 7, 15, .6); }
html.js .chapter-copy, html.js .hero-grid, html.js .scroll-cue, html.js .hero .hud { transition: opacity .7s var(--ease), transform .9s var(--ease); }
html.js .chapter-text:not(.is-active) .chapter-copy { opacity: .12; transform: translateY(1.2rem); }

/* Hero */
.hero { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
.hud {
  position: absolute; left: var(--edge); right: var(--edge); top: calc(var(--header) + env(safe-area-inset-top) + .9rem);
  display: flex; justify-content: space-between; gap: 1rem;
  font: 500 .66rem/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: #b4bfd3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
}
.hud-right { display: flex; align-items: center; gap: .75rem; }
.sound-btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.4rem; padding: 0 .7rem;
  background: rgba(4, 7, 15, .7); border: 1px solid rgba(150, 172, 214, .4); color: #dfe5f1;
  font: 500 .64rem/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.sound-btn[hidden] { display: none; }
.sound-btn:hover { color: var(--text); border-color: var(--muted); }
.sound-btn[aria-pressed="true"] { color: var(--text); border-color: rgba(255, 100, 118, .7); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: .75rem; }
.eq i { width: 2px; height: 100%; background: currentColor; transform-origin: bottom; transform: scaleY(.3); }
.sound-btn[aria-pressed="true"] .eq i { background: var(--red); animation: eq .8s ease-in-out infinite alternate; }
.sound-btn[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; }
.sound-btn[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.55s; }
.sound-btn[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { to { transform: scaleY(1); } }
.nav-sound { display: none !important; }
.hud b, .menu-foot b, .footer b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.hide-sm { display: none; }
.hero-grid { display: grid; gap: 1.5rem; position: relative; }
.hero-grid::before {
  content: ""; position: absolute; z-index: -1; inset: -5rem calc(-1 * var(--edge)) -2rem;
  background: linear-gradient(to top, var(--bg) 60%, rgba(4, 7, 15, 0));
}
.hero-title { font-size: clamp(2.9rem, 13vw, 9rem); font-weight: 500; line-height: .86; letter-spacing: -.065em; margin-top: 1rem; }
.hero-title > span { display: block; overflow: hidden; white-space: nowrap; padding-bottom: .14em; margin-bottom: -.14em; }
.hero-title > span > span { display: block; }
.hero-title .l2 { color: var(--text); padding-left: .55em; text-shadow: 0 0 60px rgba(126, 156, 240, .18); }
.hero-title b { color: var(--red); font-weight: inherit; text-shadow: 0 0 24px rgba(255, 45, 75, .6); }
html.js .hero-title > span > span { animation: rise 1.25s cubic-bezier(.16, .84, .2, 1) both .25s; }
html.js .hero-title .l2 > span { animation-delay: .42s; }
html.js .hero-title b { display: inline-block; animation: ignite 1.6s ease-out both 1.25s; }
html.js .hero .eyebrow, html.js .hero-side, html.js .hero .hud, html.js .scroll-cue { animation: fade-up 1.1s var(--ease) both .9s; }
html.js .hero-side { animation-delay: 1.05s; }
html.js .hero .hud { animation-delay: 1.4s; }
@keyframes rise { from { transform: translateY(110%) skewY(6deg); } }
@keyframes ignite { 0% { opacity: 0; text-shadow: none; } 30% { opacity: 1; text-shadow: 0 0 60px #ff2d4b, 0 0 120px rgba(255, 45, 75, .8); } 100% { text-shadow: 0 0 24px rgba(255, 45, 75, .6); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(.9rem); } }

/* Live HUD over the particle field */
.readout {
  position: absolute; right: var(--edge); top: calc(var(--header) + env(safe-area-inset-top) + 2.4rem);
  display: none; flex-direction: column; align-items: flex-end; gap: .35rem;
  font: 500 .64rem/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: #9aa6bd;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
}
.readout b { color: #e9eef8; font-weight: 500; font-variant-numeric: tabular-nums; }
.rail { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); display: none; gap: 1.6rem; padding: 0; }
.rail::before { content: ""; position: absolute; left: .2rem; top: .4rem; bottom: .4rem; width: 1px; background: var(--line-2); }
.rail::after { content: ""; position: absolute; left: .2rem; top: .4rem; width: 1px; height: calc((100% - .8rem) * var(--rail, 0)); background: var(--red); box-shadow: 0 0 8px var(--red); }
.rail li { position: relative; display: flex; align-items: center; gap: .6rem; font: 500 .6rem var(--mono); color: var(--muted-2); letter-spacing: .06em; }
.rail li::before { content: ""; width: 5px; height: 5px; margin-left: calc(.2rem - 2px); background: var(--bg); border: 1px solid var(--line-2); transition: background .3s, border-color .3s, box-shadow .3s; }
.rail li[data-active] { color: var(--text); }
.rail li[data-active]::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 10px var(--red); }
dialog.no-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; margin: 0; width: 100%; height: 100%; background: rgba(2, 4, 10, .86); }
dialog.no-modal .sheet-inner { width: 100%; }
.hero-side { display: grid; gap: 1.25rem; }
.next-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .9rem; align-items: baseline;
  border: 1px solid var(--line-2); background: rgba(7, 12, 24, .72); padding: .85rem 1rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .25s, background .25s;
}
.next-card:hover { border-color: rgba(255, 100, 118, .55); background: rgba(11, 19, 36, .85); }
.next-k { font: 600 .66rem/1 var(--mono); color: var(--red-ink); letter-spacing: .06em; text-transform: uppercase; }
.next-t { font-weight: 600; letter-spacing: -.01em; }
.next-s { font: 500 .68rem/1 var(--mono); color: var(--text); white-space: nowrap; }
.next-m { grid-column: 2 / -1; font: .72rem/1.5 var(--mono); color: var(--muted); }
.scroll-cue { display: none; align-items: center; gap: 1rem; margin-top: 2rem; font: 500 .66rem/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); }
.scroll-cue i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding-block: clamp(4.5rem, 11vw, 9rem); background: var(--bg); }
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.2rem, 5vw, 3.75rem); }
.section-head h2 { margin-top: 1rem; }
html.js .reveal { opacity: 0; transform: translateY(1.4rem); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }

/* Try it */
.try { border-top: 1px solid var(--line); }
.try-grid { display: grid; gap: 2.5rem; align-items: center; }
.try-copy h2 { margin: 1rem 0 1.4rem; }
.console {
  position: relative; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #0b1426, #070d1a);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .4);
}
.console::before, .console::after { content: ""; position: absolute; width: 18px; height: 18px; border: 1px solid var(--red-ink); pointer-events: none; }
.console::before { left: -6px; top: -6px; border-width: 1px 0 0 1px; }
.console::after { right: -6px; bottom: -6px; border-width: 0 1px 1px 0; }
.console-bar { display: flex; align-items: center; gap: .45rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); font: .68rem/1 var(--mono); color: var(--muted-2); }
.console-bar i { width: .5rem; height: .5rem; border-radius: 50%; background: #26314a; }
.console-bar i:first-child { background: var(--red-ui); }
.console-bar span { margin-left: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-live { margin-left: auto !important; color: #47d39a; }
.console-body { display: grid; gap: 1.4rem; padding: clamp(1.1rem, 3vw, 1.9rem); }
.choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices legend, .console .k { display: block; padding: 0; margin-bottom: .6rem; font: 500 .66rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.choices label { display: inline-block; margin: 0 .35rem .35rem 0; position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choices span {
  display: inline-grid; place-items: center; min-width: 4.6rem; min-height: 2.75rem; padding: 0 1rem;
  border: 1px solid var(--line-2); font: 500 .9rem var(--mono); transition: background .2s, border-color .2s;
}
.choices label:hover span { border-color: var(--muted); }
.choices input:checked + span { background: var(--red-ui); border-color: var(--red-ui); color: #fff; }
.choices input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.prompt { font-size: clamp(1.3rem, 3.2vw, 1.75rem); letter-spacing: -.025em; line-height: 1.25; }
.prompt strong { color: var(--red-ink); font-weight: 500; }
.caret { display: inline-block; width: .5em; height: 1em; margin-left: .2em; vertical-align: -.12em; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tokens { display: flex; flex-wrap: wrap; gap: .35rem; }
.tokens li { font: 500 .82rem/1 var(--mono); padding: .45rem .55rem; border: 1px solid var(--line-2); background: #0e182c; white-space: pre; }
.tokens li:last-child { border-color: rgba(255, 100, 118, .6); color: var(--red-ink); background: rgba(255, 45, 75, .08); }
.scores { display: grid; gap: .55rem; }
.scores li { display: grid; grid-template-columns: 4.6rem 1fr 2.8rem; align-items: center; gap: .75rem; font: 500 .85rem var(--mono); color: var(--muted); }
.scores li > :last-child { text-align: right; }
.scores .bar { height: .45rem; background: #17223a; overflow: hidden; }
.scores .fill { display: block; height: 100%; width: 0; background: var(--blue); transition: width .7s var(--ease); }
.scores li[data-lead="true"] { color: var(--text); }
.scores li[data-lead="true"] .fill { background: var(--red); box-shadow: 0 0 12px rgba(255, 45, 75, .7); }
.console-note { margin-top: .75rem; font: .68rem/1.4 var(--mono); color: var(--muted-2); }

/* Demo */
.demo { border-top: 1px solid var(--line); background: radial-gradient(50rem 30rem at 85% 0%, rgba(0, 41, 97, .35), transparent 70%), var(--bg); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.facts div { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 .64rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: .55rem; }
.facts dd { font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }
.countdown { font-family: var(--mono) !important; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.demo-grid { display: grid; gap: 2.25rem; margin-top: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.agenda li { display: grid; grid-template-columns: 3.2rem 1fr; gap: .25rem 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.agenda li:last-child { border-bottom: 1px solid var(--line); }
.agenda .t { font: 500 .8rem/1.6 var(--mono); color: var(--red-ink); }
.agenda h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
.agenda p { color: var(--muted); margin-top: .3rem; font-size: .96rem; }
.agenda .d { grid-column: 2; font: .7rem/1 var(--mono); color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-top: .35rem; }
.takeaway { border: 1px solid var(--line-2); background: var(--bg-1); padding: clamp(1.25rem, 3vw, 1.9rem); display: grid; gap: 1.25rem; }
.takeaway ul { display: grid; gap: .8rem; }
.takeaway li { position: relative; padding-left: 1.5rem; color: var(--text); }
.takeaway li::before { content: "+"; position: absolute; left: 0; top: -.05rem; font: 600 1rem var(--mono); color: var(--red-ink); }

/* Courses: light "paper" section in the brand navy */
.paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.paper .eyebrow, .paper .fine, .paper .small { color: var(--ink-muted); }
.paper h2 em { color: #8b93a6; }
.paper .lead { color: var(--ink-muted); }
.paper :focus-visible { outline-color: var(--red-ui); }
.catalog-status { font: .78rem/1.5 var(--mono); color: var(--ink-muted); margin-bottom: 1rem; }
.catalog-status:empty { display: none; }
.course-list { border-top: 1px solid var(--ink); }
.course {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 1rem .9rem;
  grid-template-areas: "num main" "num meta" "num buy";
  padding: 1.75rem 0; border-bottom: 1px solid var(--paper-line);
}
.course-num { grid-area: num; font: 600 .85rem/1.6 var(--mono); color: var(--red-ui); }
.course-main { grid-area: main; min-width: 0; }
.course-tag { font: 500 .66rem/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-muted); }
.course h3 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); letter-spacing: -.035em; line-height: 1.08; margin: .45rem 0 .55rem; color: var(--ink); }
.course-sum { color: var(--ink-muted); max-width: 40rem; }
.outline-toggle {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; margin-top: .35rem;
  background: none; border: 0; padding: 0; color: var(--ink);
  font: 500 .74rem var(--mono); letter-spacing: .05em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: .3em;
}
.outline { margin-top: .3rem; padding: 1rem 0 .25rem; border-top: 1px dashed var(--paper-line); }
.outline p { color: var(--ink); font-weight: 500; margin-bottom: .6rem; }
.outline li { position: relative; padding: .3rem 0 .3rem 1.4rem; color: var(--ink-muted); }
.outline li::before { content: "→"; position: absolute; left: 0; font: .85rem var(--mono); color: var(--red-ui); }
.outline .note { margin-top: .6rem; font: .74rem/1.5 var(--mono); color: var(--ink-muted); font-weight: 400; }
.course-meta { grid-area: meta; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .75rem 1rem; font-size: .92rem; color: var(--ink); align-content: start; }
.course-meta b { display: block; font: 500 .62rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .2rem; }
.course-buy { grid-area: buy; display: grid; gap: .8rem; justify-items: start; align-content: start; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .55rem; }
.price strong { font-size: 1.65rem; font-weight: 600; letter-spacing: -.035em; color: var(--ink); line-height: 1.1; }
.price s { color: var(--ink-muted); font-size: 1rem; text-decoration-thickness: 1.5px; }
.price .badge { order: -1; font: 600 .68rem/1 var(--mono); letter-spacing: .04em; color: #fff; background: var(--red-ui); padding: .32rem .45rem; }
.price .until { flex-basis: 100%; font: .68rem/1.4 var(--mono); color: var(--red-ui); }
.price .tba { font-size: 1.1rem; font-weight: 500; color: var(--ink-muted); }
.seat-note { font: .7rem/1.4 var(--mono); color: var(--ink-muted); }
.seat-note[data-low="true"] { color: var(--red-ui); }
.paper .btn-line { border-color: rgba(6, 18, 43, .3); color: var(--ink); }
.paper .btn-line:hover { border-color: var(--ink); background: rgba(6, 18, 43, .04); }
.paper .fine { margin-top: 1.5rem; max-width: 46rem; }
.paper a:not(.btn) { text-decoration: underline; text-underline-offset: .2em; }

/* How we teach */
.method { border-top: 1px solid var(--line); }
.rows { border-top: 1px solid var(--line-2); }
.rows li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .45rem 1rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.rows .n { grid-row: span 2; font: 500 .8rem/1.6 var(--mono); color: var(--red-ink); }
.rows p { color: var(--muted); }

/* About */
.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; gap: 3rem; align-items: start; }
.about-copy h2 { margin: 1rem 0 1.5rem; }
.aims { border: 1px solid var(--line-2); background: var(--bg-1); padding: clamp(1.25rem, 3vw, 2rem); }
.aims ol { margin-top: 1rem; border-top: 1px solid var(--line); }
.aims li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .75rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.5; }
.aims li:last-child { border-bottom: 0; padding-bottom: 0; }
.aims span { font: 500 .78rem/1.9 var(--mono); color: var(--red-ink); }
.partner {
  margin-top: clamp(3rem, 7vw, 5rem); padding: clamp(1.4rem, 4vw, 3rem); display: grid; gap: 1.5rem; align-items: end;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(135deg, rgba(0, 41, 97, .45), rgba(4, 7, 15, .2));
}
.partner h3 { font-size: clamp(1.5rem, 3.4vw, 2.6rem); letter-spacing: -.045em; margin: .9rem 0 .8rem; max-width: 40rem; }
.partner p:not(.eyebrow) { color: var(--muted); max-width: 44rem; }
.partner .btn { justify-self: start; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; gap: 2.25rem; }
.faq-grid h2 { margin-top: 1rem; }
.faq-list { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem); font-weight: 500; letter-spacing: -.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1.1rem; font: 400 1.3rem var(--mono); color: var(--red-ink); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.35rem; max-width: 44rem; }
.faq details a, .prose a { text-decoration: underline; text-underline-offset: .2em; }

/* Closing call to action */
.cta { overflow: hidden; border-top: 1px solid var(--line); padding-block: clamp(5rem, 13vw, 11rem); }
.cta-word {
  position: absolute; right: -2vw; bottom: -6vw; z-index: 0; pointer-events: none; user-select: none;
  font: 700 clamp(10rem, 42vw, 40rem)/.8 var(--font); letter-spacing: -.08em;
  color: transparent; -webkit-text-stroke: 1px rgba(150, 172, 214, .16);
}
.cta-inner { position: relative; z-index: 1; display: grid; gap: 1.5rem; }
.cta h2 { font-size: clamp(2.9rem, 10vw, 8.5rem); line-height: .9; letter-spacing: -.06em; max-width: 14ch; }

/* 404 */
.lost { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; padding-top: calc(var(--header) + 3rem); }
.lost h1 { font-size: clamp(2.8rem, 9vw, 7rem); letter-spacing: -.06em; line-height: .92; margin: 1.2rem 0 1.4rem; }
.lost .actions { margin-top: 2rem; }

/* Footer */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--bg); padding: 3.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); font-size: .92rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 1rem; }
.footer-brand p { color: var(--muted); }
.footer nav, .footer-grid > div:last-child { display: grid; gap: .55rem; align-content: start; }
.footer nav a, .footer-grid > div:last-child a { color: var(--muted); padding-block: .2rem; transition: color .2s; }
.footer nav a:hover, .footer-grid a:hover { color: var(--text); }
.footer .eyebrow { margin-bottom: .35rem; color: var(--muted-2); }
.footer-grid > div:last-child p:not(.eyebrow) { font: .72rem/1.6 var(--mono); color: var(--muted-2); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font: .7rem/1.6 var(--mono); color: var(--muted-2); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a, .footer-links button { color: var(--muted); font: inherit; }

/* ---------- Booking sheet ---------- */
dialog.sheet {
  padding: 0; border: 0; background: transparent; color: var(--text);
  width: 100%; max-width: 100%; height: auto; max-height: 100%;
  margin: auto 0 0; overflow: visible;
}
dialog.sheet::backdrop { background: rgba(2, 4, 10, .74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.sheet[open] { animation: sheet-in .45s var(--ease); }
@keyframes sheet-in { from { transform: translateY(2.5rem); opacity: 0; } }
.sheet-inner {
  background: var(--bg-2); border-top: 1px solid var(--line-2);
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 var(--edge) calc(1.75rem + env(safe-area-inset-bottom));
}
.sheet-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0 calc(-1 * var(--edge)); padding: .85rem var(--edge); background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.sheet-head .eyebrow { min-width: 0; }
.close { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); padding: 0; }
.close:hover { border-color: var(--text); }
.sheet h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -.04em; line-height: 1.05; margin: 1.25rem 0 1rem; }
.prose { display: grid; gap: 1rem; color: var(--muted); padding-bottom: .5rem; }
.sheet-summary { display: grid; gap: .3rem; color: var(--muted); font-size: .95rem; margin-bottom: 1.25rem; }
.form { display: grid; gap: 1.05rem; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 1.05rem; }
.field { display: grid; gap: .45rem; font-size: .88rem; color: var(--muted); }
.field .opt { color: var(--muted-2); font: .7rem var(--mono); }
.field input, .field select {
  width: 100%; min-height: 3.1rem; padding: .75rem .85rem; border-radius: 0;
  font-size: 16px; /* 16px keeps iOS Safari from zooming into the field */
  color: var(--text); background: #060b16; border: 1px solid var(--line-2);
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239aa6bd' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
}
.field input:focus, .field select:focus { outline: 2px solid var(--red-ink); outline-offset: 0; border-color: transparent; }
.field input::placeholder { color: var(--muted-2); }
.session-pick { display: grid; gap: .5rem; }
.session-pick label { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; align-items: center; padding: .85rem; border: 1px solid var(--line-2); cursor: pointer; }
.session-pick input { width: 1.15rem; height: 1.15rem; accent-color: var(--red-ui); grid-row: span 2; }
.session-pick label:has(input:checked) { border-color: var(--red-ink); background: rgba(255, 45, 75, .06); }
.session-pick label[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.session-pick small { font: .72rem/1.4 var(--mono); color: var(--muted); }
.price-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .9rem 0; border-block: 1px solid var(--line); }
.price-line span { font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); }
.price-line strong { font-size: 1.35rem; letter-spacing: -.03em; font-weight: 600; text-align: right; }
.price-line s { color: var(--muted); font-size: .95rem; font-weight: 400; margin-right: .4rem; }
.price-line .badge { font: 600 .66rem/1 var(--mono); background: var(--red-ui); color: #fff; padding: .25rem .4rem; margin-right: .45rem; vertical-align: .2rem; }
.form-note { font-size: .82rem; color: var(--muted); }
.form-note button { color: var(--text); }
.form-error { color: #ffb3bc; background: rgba(255, 45, 75, .1); border-left: 2px solid var(--red); padding: .7rem .85rem; font-size: .92rem; }
.confirm { display: grid; gap: 1.1rem; }
.confirm:focus { outline: none; }
.confirm .tick { width: 3rem; height: 3rem; display: grid; place-items: center; background: rgba(71, 211, 154, .12); color: #47d39a; border: 1px solid rgba(71, 211, 154, .4); }
.ref { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem .9rem; border: 1px dashed var(--line-2); font: 500 .85rem/1.4 var(--mono); overflow-wrap: anywhere; }
.ref button { flex: none; background: none; border: 1px solid var(--line-2); min-height: 2.5rem; padding: 0 .75rem; font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.confirm dl { display: grid; gap: .65rem; }
.confirm dl div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; }
.confirm dt { font: .66rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); }
.confirm-actions { display: grid; gap: .6rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 520px) {
  .hide-sm { display: inline; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .confirm-actions { grid-template-columns: 1fr 1fr; }
  .confirm-actions .btn { grid-column: 1 / -1; }
}
@media (min-width: 640px) {
  dialog.sheet { margin: auto; width: min(40rem, 100% - 2rem); }
  dialog.sheet[open] { animation-name: dialog-in; }
  .sheet-inner { border: 1px solid var(--line-2); max-height: 90vh; max-height: 90dvh; padding-inline: 2rem; }
  .sheet-head { margin-inline: -2rem; padding-inline: 2rem; }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
  .agenda li { grid-template-columns: 4rem 1fr auto; }
  .agenda .d { grid-column: 3; grid-row: 1; margin-top: .3rem; }
  .rows li { grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.25fr); align-items: baseline; }
  .rows .n { grid-row: auto; }
}
@keyframes dialog-in { from { transform: translateY(1rem) scale(.98); opacity: 0; } }
@media (min-width: 900px) {
  :root { --header: 4.5rem; }
  .nav-links { display: flex; }
  .menu-btn, .menu { display: none !important; }
  .chapter-text { align-content: center; }
  .chapter-copy::before { display: none; }
  .scrim { background: linear-gradient(90deg, rgba(4, 7, 15, .9) 0%, rgba(4, 7, 15, .62) 32%, rgba(4, 7, 15, 0) 58%); }
  .stage[data-scene="room"] .scrim, .stage[data-scene="studio"] .scrim, .stage[data-scene="deploy"] .scrim { opacity: 1; }
  .fig { top: auto; bottom: 2.25rem; }
  .hero { align-content: end; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem); align-items: end; column-gap: 3rem; }
  .hero-grid::before { inset: -6rem calc(-1 * var(--edge)) -2rem; background: linear-gradient(to top, rgba(4, 7, 15, .92) 30%, rgba(4, 7, 15, 0)); }
  .hero-title { font-size: min(8.4vw, 9.5rem); }
  .hero-title .l2 { padding-left: 1.1em; }
  .scroll-cue { display: flex; }
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); align-items: end; column-gap: 3rem; }
  .try-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 5rem; }
  .facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .demo-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 4rem; }
  .takeaway { position: sticky; top: calc(var(--header) + 1.5rem); }
  .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; }
  .partner { grid-template-columns: minmax(0, 1fr) auto; }
  .faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 5rem; }
  .course {
    grid-template-columns: 3.5rem minmax(0, 1.55fr) minmax(0, 1fr) 14rem;
    grid-template-areas: "num main meta buy"; column-gap: 2rem; padding: 2.2rem 0;
  }
  .course-meta { grid-template-columns: 1fr; }
  .course-buy { justify-items: end; text-align: right; }
  .price { justify-content: flex-end; }
  .rows li { padding: 2rem 0; }
}
@media (min-width: 1100px) {
  .status { display: inline-flex; }
  .readout { display: flex; }
  .nav-sound:not([hidden]) { display: inline-flex !important; }
  .hero-sound { display: none !important; }
}
@media (min-width: 1240px) {
  .rail { display: grid; }
}
@media (max-height: 640px) and (max-width: 899px) {
  .hero .lead { font-size: .97rem; }
  .next-card { display: none; }
}

/* Grid children may shrink below their content width, so nothing pushes the page sideways. */
.hero-grid > *, .try-grid > *, .demo-grid > *, .about-grid > *, .faq-grid > *, .section-head > *, .partner > * { min-width: 0; }
@media (max-width: 899px) {
  .try-grid, .demo-grid, .about-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
}
.hud span { white-space: nowrap; }
@media (max-width: 379px) {
  .hud > span:first-child { display: none; }
  .hud { justify-content: flex-end; }
  .nav-inner { gap: .5rem; }
  .nav-actions { gap: .4rem; }
  .brand { gap: .5rem; }
  .brand-word { font-size: .62rem; }
  .btn-sm { padding-inline: .75rem; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.js .reveal, html.js .chapter-text:not(.is-active) .chapter-copy { opacity: 1; transform: none; }
  html.js .hero-title > span > span, html.js .hero-title b { animation: none; }
}

/* ---------- Nepali page (/ne/) ---------- */
/* Devanagari letters join along a top line and carry vowel signs above and below it, so Nepali
   text needs more line height, no tight or wide letter spacing, and slightly larger small labels. */
html:lang(ne) body { line-height: 1.7; }
html:lang(ne) :is(h1, h2, h3) { letter-spacing: -.01em; line-height: 1.28; }
html:lang(ne) h2 { font-size: clamp(2.05rem, 6.2vw, 4.4rem); line-height: 1.2; }
html:lang(ne) .chapter h2 { font-size: clamp(2rem, 7.4vw, 4.1rem); }
html:lang(ne) .hero-title { line-height: 1.12; letter-spacing: -.02em; }
/* Each hero line hides its overflow for the rising animation. Generous padding inside that box keeps
   vowel signs above and below the line (ि ँ ु) from being cut, whatever font metrics a browser uses. */
html:lang(ne) .hero-title > span { padding-block: .22em .32em; margin-block: -.22em -.32em; }
html:lang(ne) :is(.cta h2, .lost h1) { line-height: 1.16; letter-spacing: -.02em; }
html:lang(ne) .cta h2 { font-size: clamp(2.5rem, 8vw, 6.6rem); max-width: 16ch; }
html:lang(ne) :is(.partner h3, .course h3, .sheet h2) { letter-spacing: -.01em; line-height: 1.3; }
html:lang(ne) .menu nav a { letter-spacing: -.01em; line-height: 1.35; font-size: clamp(1.5rem, 7vw, 2.3rem); }
html:lang(ne) :is(.lead, .chapter p:not(.eyebrow), .agenda p, .rows p, .faq p, .prose p, .course-sum, .outline li) { line-height: 1.75; }
html:lang(ne) :is(.eyebrow, .fig, .hud, .readout, .next-k, .scroll-cue, .chips li, .facts dt, .agenda .d, .course-tag,
  .course-meta b, .outline-toggle, .price-line span, .confirm dt, .ref button, .choices legend, .console .k, .sound-btn,
  .menu nav span, .rail li, .brand-word) { letter-spacing: .01em; }
html:lang(ne) :is(.eyebrow, .facts dt, .course-tag, .course-meta b, .choices legend, .console .k, .next-k, .agenda .d,
  .price-line span, .confirm dt, .outline-toggle) { font-size: .8rem; }
html:lang(ne) :is(.small, .fine, .catalog-status, .next-m, .console-note, .seat-note, .price .until, .session-pick small) { font-size: .8rem; line-height: 1.65; }
html:lang(ne) .brand-word { line-height: 1.3; }

/* Small phones: the header shows the logo without the name, so the language switch, the booking
   button and the menu all fit. The hero repeats the full name just below. */
@media (max-width: 429px) {
  .nav .brand-word { display: none; }
}

/* Nepali: labels set with a line height of 1 leave no room for vowel signs above and below the
   line, so they get a taller line box. */
html:lang(ne) :is(.btn, .btn-line, .chips li, .tokens li, .next-k, .next-s, .sound-btn, .facts dt, .agenda .d,
  .price .badge, .price-line span, .ref button, .field .opt, .lang-switch, .course-num, .rail li, .choices legend, .console .k) { line-height: 1.45; }
html:lang(ne) .nav-links a { white-space: nowrap; }
/* Nepali menu labels are longer, so the header's "free demo" shortcut (it repeats the first menu
   item) waits for wider screens before it appears. */
@media (min-width: 1100px) and (max-width: 1299px) {
  html:lang(ne) .status { display: none; }
}
