/* NEETsirJEE — site styles
   Look: "night school notebook". Ink-dark sections alternate with warm paper ones. Headings are set in a
   real serif, text in a quiet grotesque, labels in mono. Hairline rules do the work boxes used to do:
   sharp corners, few containers, a strict grid and room to breathe. Orange is the only loud colour. */

@property --sc { syntax: '<color>'; inherits: true; initial-value: #5CC8FF; }

:root {
  --ink: #0B1222;          /* dark sections */
  --ink-2: #121B30;
  --ink-3: #1B2640;
  --paper: #F3ECDF;        /* light sections */
  --paper-2: #E9E0CF;
  --on-dark: #F3ECDF;
  --on-dark-2: #A3ABBC;
  --on-paper: #141A2A;
  --on-paper-2: #5B6274;
  --rule-dark: rgba(243,236,223,.16);
  --rule-paper: rgba(20,26,42,.18);
  --orange: #EE6B1F;
  --orange-2: #FF8A3D;
  --amber: #FFB45E;
  --red: #D9342B;
  --green: #2E9E68;
  --physics: #5CC8FF;
  --chemistry: #FF9A3D;
  --biology: #4BE3A0;

  /* kept for the in-app phone screens and older page parts */
  --night: var(--ink); --navy: #14213D; --navy-2: #1C2B4F; --navy-3: #26385F;
  --cream: var(--on-dark); --muted: var(--on-dark-2); --muted-ink: var(--on-paper-2);
  --line: var(--rule-dark); --line-ink: var(--rule-paper); --glow: rgba(238,107,31,.3);

  --serif: 'Fredoka', 'Baloo 2', ui-rounded, system-ui, sans-serif;   /* rounded display face for headings */
  --italic: 'Fraunces', Georgia, serif;                                 /* the orange italic accent words */
  --sans: 'Nunito Sans', 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --display: var(--serif); --accent: var(--italic); --body: var(--sans);

  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --wrap: 1240px;
  --section: clamp(84px, 11vw, 148px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--ink); color: var(--on-dark); font: 400 17px/1.62 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
::selection { background: var(--orange); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.04; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.2vw, 5.6rem); }
h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.12; letter-spacing: -.01em; }
h4 { font-size: 1.3rem; line-height: 1.15; }
p { margin: 0; }
.sir, em.sir { font-family: var(--italic); font-style: italic; font-weight: 800; color: var(--orange); letter-spacing: -.01em; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 500 .74rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.lede { font-size: clamp(1.06rem, 1.35vw, 1.22rem); line-height: 1.55; color: var(--on-dark-2); max-width: 34rem; }
.muted { color: var(--on-dark-2); }

/* ---------- buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 26px; border: 1px solid transparent; border-radius: 2px;
  font: 600 .98rem var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.btn-primary { background: var(--orange); color: #160A02; }
.btn-primary::after { content: "→"; font-weight: 500; transition: transform .25s var(--ease); }
.btn-primary:hover { background: var(--orange-2); }
.btn-primary:hover::after { transform: translateX(4px); }
.btn-primary svg { display: none; }
.btn-line, .btn-glass, .btn-ghost, .btn-ink { background: transparent; color: inherit; border-color: currentColor; }
.btn-line:hover, .btn-glass:hover, .btn-ghost:hover, .btn-ink:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.paper .btn-line:hover, .paper .btn-glass:hover, .paper .btn-ghost:hover, .paper .btn-ink:hover { background: var(--on-paper); color: var(--paper); border-color: var(--on-paper); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font: 600 .95rem var(--sans); text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid currentColor; width: fit-content; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- navigation: logo and the two tabs ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--ink); }
.nav { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50; transition: transform .45s var(--ease), background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(11,18,34,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom-color: var(--rule-dark); }
.nav.hide { transform: translateY(-105%); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.nav-logo img { height: 34px; width: auto; }
.nav-tabs { display: flex; gap: 28px; margin-left: auto; }
.nav-tabs a { position: relative; padding: 8px 0; text-decoration: none; font: 600 .95rem var(--sans); color: var(--on-dark-2); white-space: nowrap; transition: color .2s; }
.nav-tabs a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-tabs a:hover { color: var(--on-dark); }
.nav-tabs a[aria-current="page"] { color: var(--on-dark); }
.nav-tabs a[aria-current="page"]::after, .nav-tabs a:hover::after { transform: scaleX(1); }
@media (max-width: 600px) {
  .nav-inner { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 12px; }
  .nav-logo img { height: 28px; }
  .nav-tabs { width: 100%; margin: 6px 0 0; gap: 0; border-top: 1px solid var(--rule-dark); }
  .nav-tabs a { flex: 1; text-align: center; padding: 12px 0; font-size: .9rem; }
  .nav-tabs a + a { border-left: 1px solid var(--rule-dark); }
  .nav { background: rgba(11,18,34,.94); border-bottom-color: var(--rule-dark); }
}

/* ---------- page background: plain ink with a little grain ---------- */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--ink); }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; }
body::after { content: ""; position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- paper sections ---------- */
.paper { position: relative; background: var(--paper); color: var(--on-paper); --rule: var(--rule-paper); }
.paper .eyebrow { color: #B5520E; }
.paper .muted, .paper .lede, .paper p.muted { color: var(--on-paper-2); }
.paper .sir { color: #C5520C; }
.paper ::selection { color: var(--paper); }

/* section header: a label on the left, the heading across the rest (on wide screens) */
.sec { padding-block: var(--section); }
.sec-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px; align-items: start; margin-bottom: clamp(40px, 6vw, 80px); }
.sec-head .eyebrow { padding-top: .9em; }
.sec-head p { margin-top: 22px; max-width: 38rem; color: var(--on-dark-2); font-size: 1.1rem; }
.paper .sec-head p { color: var(--on-paper-2); }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; gap: 16px; } .sec-head .eyebrow { padding-top: 0; } }

/* ---------- hero: words on the left, one simulation playing on the right, the chapter row below ---------- */
.hero { position: relative; min-height: min(900px, 100svh); padding-top: calc(72px + env(safe-area-inset-top, 0px)); display: grid; grid-template-rows: 1fr auto; overflow: hidden; border-bottom: 1px solid var(--rule-dark); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; position: relative; z-index: 3; pointer-events: none; }
.hero-copy { display: grid; gap: 26px; padding-block: 56px; pointer-events: auto; }
.hero h1 { font-size: clamp(2.8rem, 5vw, 5rem); line-height: .98; }
.hero h1 .sir { display: block; }
.hero .link-arrow { color: var(--on-dark-2); margin-top: 6px; }
.hero .link-arrow:hover { color: var(--on-dark); }

/* the simulation: no frame, it simply lives in the right part of the hero and fades into the page */
.hero-sim { --sc: var(--chemistry); position: absolute; top: 0; right: 0; bottom: 0; width: 64%; z-index: 1; touch-action: pan-y; cursor: grab; transition: --sc 1s var(--ease);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%); mask-image: linear-gradient(90deg, transparent 0, #000 26%); }
.hero-sim[data-subject="physics"] { --sc: var(--physics); }
.hero-sim[data-subject="biology"] { --sc: var(--biology); }
.hero-sim[data-subject="brand"] { --sc: var(--orange); }
.hero-sim.dragging { cursor: grabbing; }
#lab-canvas { position: absolute; inset: 0 0 120px; width: 100%; height: calc(100% - 120px); }
.lab-word { position: absolute; inset: 0 0 120px; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.lab-word span { font: 700 min(22vw, 20rem)/1 var(--serif); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px color-mix(in oklab, var(--sc) 30%, transparent); opacity: .7; white-space: nowrap; }
.lab-word span.in { animation: wordIn 1.1s var(--ease) both; }
@keyframes wordIn { from { opacity: 0; letter-spacing: .04em; } to { opacity: .7; letter-spacing: -.04em; } }
.lab-fallback { position: absolute; inset: 20% 20% 30%; width: 60%; opacity: 0; }
.hero-sim.no-gl .lab-fallback { opacity: .9; }
.lab-notes { position: absolute; inset: 0 0 120px; z-index: 2; pointer-events: none; }
.lab-notes svg { position: absolute; inset: 0; overflow: visible; }
.lab-notes .lead { fill: none; stroke: var(--amber); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0; transition: opacity .25s; }
.lab-notes .pin { fill: var(--ink); stroke: var(--amber); stroke-width: 1.5; opacity: 0; transition: opacity .25s; }
.lab-notes .note { position: absolute; left: 0; top: 0; font: 700 1.02rem/1 'Kalam', var(--serif); color: var(--amber); white-space: nowrap; opacity: 0; transition: opacity .25s; text-shadow: 0 1px 10px var(--ink); }
/* caption: what is playing, set like a figure caption */
.lab-caption { position: absolute; right: max(20px, calc((100vw - var(--wrap)) / 2 + 20px)); bottom: 150px; width: min(330px, 42%); z-index: 3; display: grid; gap: 6px; pointer-events: none; padding-top: 14px; border-top: 1px solid var(--rule-dark); }
.lab-kicker { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 500 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.lab-kicker b { font-weight: 500; color: var(--sc); }
.lab-kicker #lab-subject { color: var(--on-dark); }
.lab-title { font: 600 1.7rem/1.1 var(--serif); letter-spacing: -.01em; }
.lab-tip { font: 700 1.02rem/1.3 'Kalam', var(--serif); color: var(--amber); }
.lab-try { font: 500 .8rem var(--sans); color: var(--on-dark-2); }
.lab-try::before { content: "↻ "; color: var(--sc); }
/* the chapter row: every simulation listed, the playing one fills its line */
.hero-index { position: relative; z-index: 3; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: end; padding-bottom: 34px; }
.hero-index-label { font: 500 .68rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); padding-bottom: 20px; }
.sim-index { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
.sim-item { display: grid; gap: 3px; text-align: left; padding: 0 14px 0 0; background: none; border: 0; color: var(--on-dark-2); }
.sim-bar { position: relative; display: block; height: 2px; background: var(--rule-dark); margin-bottom: 12px; overflow: hidden; }
.sim-bar i { position: absolute; inset: 0; background: var(--sc, var(--orange)); transform-origin: left; transform: scaleX(var(--p, 0)); }
.sim-item[aria-current="true"] .sim-bar i { background: var(--orange); }
.sim-n { font: 500 .68rem var(--mono); letter-spacing: .1em; }
.sim-t { font: 600 1.02rem/1.15 var(--serif); color: var(--on-dark); opacity: .55; transition: opacity .3s; }
.sim-s { font: 500 .62rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.sim-item:hover .sim-t, .sim-item[aria-current="true"] .sim-t { opacity: 1; }
.sim-item[aria-current="true"] .sim-n { color: var(--orange); }

@media (max-width: 960px) {
  .hero { min-height: 0; grid-template-rows: auto auto auto; padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
  .hero-sim { position: relative; inset: auto; width: 100%; height: 360px; order: 0; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
  #lab-canvas, .lab-word, .lab-notes { inset: 0; height: 100%; }
  .lab-word span { font-size: 38vw; }
  .lab-caption { right: auto; left: var(--gutter); bottom: 10px; width: calc(100% - 2 * var(--gutter)); border-top: 0; padding-top: 0; }
  .lab-title { font-size: 1.35rem; }
  .lab-tip { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-block: 26px 36px; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.8rem); }
  .hero-actions .btn { flex: 1 1 200px; }
  .hero-index { grid-template-columns: 1fr; gap: 12px; padding-bottom: 28px; }
  .hero-index-label { padding-bottom: 0; }
  .sim-item { padding-right: 6px; }
  .sim-t, .sim-s { display: none; }
  .sim-n { font-size: .6rem; }
}
@media (max-width: 960px) and (min-width: 600px) { .hero-sim { height: 440px; } }
@media (max-width: 600px) { .hero { padding-top: calc(104px + env(safe-area-inset-top, 0px)); } .hero-sim { height: 320px; } }

/* ---------- story: follow one enquiry ---------- */
.story { position: relative; padding-block: var(--section); }
.story-intro { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px; margin-bottom: clamp(48px, 7vw, 96px); }
.story-intro .eyebrow { padding-top: .9em; }
.story-intro h2 { grid-column: 2; }
.story-intro p { grid-column: 2; margin-top: -2px; color: var(--on-dark-2); font-size: 1.12rem; max-width: 38rem; }
.story-intro .eyebrow { grid-row: 1 / span 2; }
@media (max-width: 860px) { .story-intro { grid-template-columns: 1fr; gap: 16px; } .story-intro h2, .story-intro p { grid-column: 1; } .story-intro .eyebrow { grid-row: auto; padding-top: 0; } }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.story-track { position: relative; }
.lead-path { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--rule-dark); }
.lead-path .fill { position: absolute; inset: 0 0 auto 0; height: 0; background: var(--orange); }
.lead-path .spark { position: absolute; left: 50%; top: 0; width: 9px; height: 9px; margin: -4px 0 0 -4.5px; background: var(--orange); }
.act-head { position: relative; padding: 72px 0 24px 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; border-bottom: 1px solid var(--rule-dark); }
.act-head:first-child { padding-top: 0; }
.act-head .label { font: 500 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.act-head h3 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); margin-top: 8px; }
.act-head img { width: clamp(96px, 12vw, 150px); height: auto; }
.scene { position: relative; padding: 46px 0 46px 44px; display: grid; gap: 14px; border-bottom: 1px solid var(--rule-dark); opacity: .42; transition: opacity .5s var(--ease); }
.scene.is-active { opacity: 1; }
.scene::before { content: ""; position: absolute; left: -4px; top: 54px; width: 9px; height: 9px; background: var(--ink); border: 1px solid var(--on-dark-2); transition: background .3s, border-color .3s; }
.scene.is-active::before { background: var(--orange); border-color: var(--orange); }
.scene .num { font: 500 .74rem var(--mono); letter-spacing: .1em; color: var(--orange); }
.scene h4 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
.scene p { color: var(--on-dark-2); font-size: 1.04rem; max-width: 32rem; }
.scene .tags { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tag { font: 500 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); }
.tag::before { content: "— "; color: var(--orange); }
.scene .ui-slot { display: none; }
.device-col { position: sticky; top: calc(50vh - 330px); height: 660px; display: grid; place-items: center; }
.device { position: relative; width: 320px; height: 650px; border-radius: 46px; padding: 10px; background: #05080F; box-shadow: 0 0 0 1px var(--rule-dark), 0 50px 90px -40px rgba(0,0,0,.9); }
.device::before { content: ""; position: absolute; top: 20px; left: 50%; width: 86px; height: 24px; margin-left: -43px; border-radius: 20px; background: #05080F; z-index: 3; }
.device-screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--paper); }
.device-screen .ui { position: absolute; inset: 0; opacity: 0; transform: translateY(12px); transition: opacity .45s var(--ease), transform .55s var(--ease); pointer-events: none; }
.device-screen .ui.on { opacity: 1; transform: none; }
.device-glow { display: none; }
@media (max-width: 960px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .device-col { display: none; }
  .story-track, .scene { min-width: 0; }
  .scene { padding: 34px 0 34px 28px; opacity: 1; }
  .scene::before { top: 42px; }
  .act-head { padding-left: 28px; grid-template-columns: minmax(0, 1fr); }
  .act-head img { width: 96px; order: -1; }
  .act-head h3 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .scene .ui-slot { display: block; margin-top: 8px; max-width: 100%; }
  .scene .ui-slot .ui { position: relative; border-radius: 18px; overflow: hidden; max-width: 380px; box-shadow: 0 0 0 1px var(--rule-dark); }
}


/* ---------- the in-app phone screens (app UI keeps soft corners) (shared by sticky phone + mobile inline) ---------- */
.ui { color: var(--navy); font-size: 14px; line-height: 1.4; display: flex; flex-direction: column; background: var(--paper); }
.ui-top { padding: 54px 20px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ui-slot .ui-top { padding-top: 22px; }
.ui-top h5 { margin: 0; font-family: var(--sans); font-weight: 600; font-size: 1.28rem; }
.ui-top .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--red)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.ui-body { padding: 4px 16px 20px; display: grid; gap: 10px; align-content: start; flex: 1; }
.u-card { background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 1px 0 var(--line-ink), 0 8px 20px -14px rgba(20,33,61,.35); display: grid; gap: 8px; }
.u-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.u-k { color: var(--muted-ink); font-size: .78rem; font-weight: 600; }
.u-v { font-weight: 800; }
.u-h { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; }
.u-sub { color: var(--muted-ink); font-size: .8rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: #F3EBD8; font-weight: 700; font-size: .78rem; }
.chip.on { background: var(--navy); color: var(--cream); }
.chip.ok { background: rgba(47,183,116,.14); color: #17784A; }
.chip.warn { background: rgba(240,122,26,.16); color: #A04C06; }
.chip.bad { background: rgba(224,48,44,.12); color: #A61F1B; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: #D6D2C6; position: relative; flex: none; transition: background .4s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .45s var(--ease); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }
.u-btn { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 14px; font-weight: 800; font-size: .88rem; background: var(--navy); color: var(--cream); }
.u-btn.alt { background: #F3EBD8; color: var(--navy); }
.u-btn.go { background: var(--orange); color: #fff; }
.u-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.u-profile { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; }
.u-photo { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(160deg, #F6C58E, #D9844A); position: relative; overflow: hidden; }
.u-photo::before { content: ""; position: absolute; left: 50%; top: 22%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: #7A3E1D; }
.u-photo::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 44px; height: 30px; margin-left: -22px; border-radius: 50% 50% 0 0; background: var(--navy); }
.u-photo.masked { filter: blur(5px) saturate(.4); }
.u-bubble { max-width: 82%; padding: 10px 12px; border-radius: 16px; font-size: .86rem; background: #fff; box-shadow: 0 1px 0 var(--line-ink); }
.u-bubble.me { justify-self: end; background: var(--navy); color: var(--cream); border-bottom-right-radius: 6px; }
.u-bubble.them { border-bottom-left-radius: 6px; }
.u-alert { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 14px 30px -14px rgba(20,33,61,.45); }
.u-alert .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.u-alert .ic.wa { background: #22B35E; }
.u-alert .ic.app { background: var(--orange); }
.u-stamp { justify-self: center; transform: rotate(-8deg); border: 3px solid var(--green); color: #17784A; padding: 6px 16px; border-radius: 12px; font-family: var(--sans); font-weight: 700; font-size: 1.3rem; letter-spacing: .04em; }
.cal { display: grid; grid-template-columns: 30px repeat(5, 1fr); gap: 4px; font-size: .7rem; }
.cal .d { text-align: center; font-weight: 800; color: var(--muted-ink); padding-bottom: 2px; }
.cal .d.today { color: var(--orange); }
.cal .t { color: var(--muted-ink); font-size: .64rem; padding-top: 2px; }
.cal .c { height: 30px; border-radius: 8px; background: #F3EBD8; }
.cal .c.b { background: var(--navy); }
.cal .c.r { background: var(--red); }
.cal .c.o { background: var(--orange); }
.cal .c.g { background: var(--green); }
.u-bar { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 6px; }
.u-bar i { flex: 1; border-radius: 8px 8px 4px 4px; background: #E9DEC4; transform-origin: bottom; }
.u-bar i.hi { background: linear-gradient(var(--orange), var(--red)); }
.u-bar-l { display: flex; gap: 8px; font-size: .66rem; color: var(--muted-ink); }
.u-bar-l span { flex: 1; text-align: center; }
.big-n { font-family: var(--sans); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.u-meter { height: 8px; border-radius: 8px; background: #EFE6D2; overflow: hidden; }
.u-meter i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--red), var(--orange)); }
.u-list { display: grid; gap: 8px; }
.u-li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; }
.u-ini { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .78rem; color: #fff; background: var(--navy-3); }
.u-ini.r { background: var(--red); } .u-ini.o { background: var(--orange); } .u-ini.g { background: #3F7FD9; }
.u-dots { display: flex; gap: 6px; align-items: center; color: var(--muted-ink); font-size: .74rem; }
.u-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.u-chart { width: 100%; height: 96px; }


/* ---------- the logo builds itself (Blender frames), playing in place ---------- */
.sirseq { position: relative; padding-block: var(--section); border-top: 1px solid var(--rule-dark); }
.sirseq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; }
.sirseq-copy { display: grid; gap: 22px; }
.sirseq h2 { font-size: clamp(2.4rem, 4.8vw, 4.4rem); }
.sirseq p { color: var(--on-dark-2); font-size: 1.1rem; max-width: 30rem; }
.hero-stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; justify-self: center; }
.hero-stage canvas { width: 100%; height: 100%; }
.hero-stage .fallback { position: absolute; inset: 10%; width: 80%; opacity: 0; }
.hero-stage.no-seq .fallback { opacity: 1; }
@media (max-width: 960px) { .sirseq-grid { grid-template-columns: minmax(0, 1fr); } .hero-stage { order: -1; width: min(86%, 420px); } }

/* ---------- close: pick a course ---------- */
.close { padding-block: var(--section); border-top: 1px solid var(--rule-dark); }
.close .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px 24px; }
.close .eyebrow { padding-top: .9em; grid-row: 1 / span 4; align-self: start; }
.close h2 { max-width: 16ch; }
.close p { color: var(--on-dark-2); font-size: 1.1rem; max-width: 38rem; }
.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-dark); margin-top: 18px; }
.picker a { display: grid; gap: 6px; padding: 26px 24px 26px 0; text-decoration: none; border-bottom: 1px solid var(--rule-dark); transition: color .2s; }
.picker a + a { padding-left: 24px; border-left: 1px solid var(--rule-dark); }
.picker b { font: 600 2.2rem/1 var(--serif); }
.picker span { font: 500 .74rem var(--mono); letter-spacing: .08em; color: var(--on-dark-2); }
.picker a:hover b { color: var(--orange); }
.replay { justify-self: start; background: none; border: 0; padding: 0; color: var(--on-dark-2); font: 600 .9rem var(--sans); display: inline-flex; gap: 8px; align-items: center; }
.replay:hover { color: var(--on-dark); }
@media (max-width: 860px) { .close .wrap { grid-template-columns: 1fr; } .close .eyebrow { grid-row: auto; padding-top: 0; } .picker { grid-template-columns: 1fr; } .picker a + a { padding-left: 0; border-left: 0; } }

/* ---------- about + founders (paper) ---------- */
.about { padding-block: var(--section); }
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.about-copy { display: grid; gap: 22px; }
.about-copy p { font-size: 1.1rem; max-width: 36rem; }
.why-sir { display: grid; gap: 14px; padding-top: 22px; border-top: 2px solid var(--on-paper); }
.why-sir img { width: min(320px, 80%); height: auto; }
.why-sir .big { font: 600 clamp(2.4rem, 4vw, 3.4rem)/1 var(--serif); }
.why-sir p { color: var(--on-paper-2); }
.founders { margin-top: clamp(64px, 9vw, 120px); display: grid; gap: 28px; }
.founders-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--rule-paper); }
.founders-head h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.f-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.f-card { display: grid; gap: 8px; }
.f-photo { aspect-ratio: 4 / 5; background: var(--paper-2); display: grid; place-items: center; color: var(--on-paper-2); font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.f-photo img { width: 100%; height: 100%; object-fit: cover; }
.f-card h4 { font-size: 1.25rem; margin-top: 6px; }
.f-card p { font-size: .9rem; color: var(--on-paper-2); }
.placeholder-note { font: 500 .72rem var(--mono); letter-spacing: .06em; color: #B5520E; }
@media (max-width: 960px) { .about-grid { grid-template-columns: 1fr; } .f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- FAQ: a ruled list ---------- */
.faq { padding-block: var(--section); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq-side { display: grid; gap: 22px; position: sticky; top: 110px; }
.faq-list { border-top: 1px solid var(--rule-paper); }
.faq details { border-bottom: 1px solid var(--rule-paper); }
.faq summary { list-style: none; cursor: pointer; padding: 26px 48px 26px 0; position: relative; font: 600 1.35rem/1.25 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 22px; font: 300 1.8rem/1 var(--sans); color: #C5520C; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 48px 28px 0; color: var(--on-paper-2); max-width: 44rem; }
.faq:not(.paper) .faq-list, .faq:not(.paper) details { border-color: var(--rule-dark); }
.faq:not(.paper) details p { color: var(--on-dark-2); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } .faq-side { position: static; } }

/* ---------- sign-off + footer ---------- */
.signoff { padding-block: var(--section); text-align: center; border-top: 1px solid var(--rule-dark); }
.signoff .wrap { display: grid; justify-items: center; gap: 32px; }
.signoff h2 { font-size: clamp(2.8rem, 8vw, 7rem); line-height: .95; letter-spacing: -.035em; }
.signoff .mark { width: clamp(120px, 16vw, 190px); }
.footer { border-top: 1px solid var(--rule-dark); padding-block: 64px calc(36px + env(safe-area-inset-bottom, 0px)); color: var(--on-dark-2); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 6fr) repeat(2, minmax(0, 3fr)); gap: 40px; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand img { height: 34px; width: auto; }
.footer h5 { font: 500 .7rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark); margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--on-dark); }
.footer-base { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font: 500 .72rem var(--mono); letter-spacing: .08em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- inner pages ---------- */
.page-hero { padding-block: calc(150px + env(safe-area-inset-top, 0px)) clamp(64px, 8vw, 110px); border-bottom: 1px solid var(--rule-dark); }
.page-hero .wrap { display: grid; gap: 24px; }
.page-hero h1 { max-width: 15ch; }
.page-hero .lede { max-width: 40rem; }
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 90px); align-items: center; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-dark-2); font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.photo img + .ph { display: none; }
.figcap { margin-top: 10px; font: 500 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-2); }

/* feature lists: three columns of ruled items, no boxes */
.feature-block { padding-block: var(--section); border-top: 1px solid var(--rule-dark); }
.feature-block .head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 16px 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.feature-block .head .eyebrow { grid-row: 1 / span 2; padding-top: .9em; }
.feature-block .head p { color: var(--on-dark-2); font-size: 1.1rem; max-width: 38rem; }
.paper.feature-block, .feature-block.paper { border-top: 0; }
.paper .feature-block .head p, .feature-block.paper .head p { color: var(--on-paper-2); }
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; row-gap: 44px; }
.feat { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--rule-dark); }
.paper .feat { border-top-color: var(--rule-paper); }
.feat .ic { width: 28px; height: 28px; color: var(--orange); }
.feat .ic svg { width: 26px; height: 26px; stroke-width: 1.6; }
.feat h3 { font-size: 1.4rem; }
.feat p { color: var(--on-dark-2); font-size: .98rem; }
.paper .feat p { color: var(--on-paper-2); }
.feat .soon { font: 500 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.paper .feat .soon { color: #B5520E; }
@media (max-width: 960px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feature-block .head { grid-template-columns: 1fr; } .feature-block .head .eyebrow { grid-row: auto; padding-top: 0; } }
@media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; row-gap: 32px; } }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; padding: 0; margin: 0; }
.flow li { list-style: none; padding-top: 18px; border-top: 1px solid var(--rule-dark); display: grid; gap: 8px; }
.flow li::before { counter-increment: step; content: "0" counter(step); font: 500 .72rem var(--mono); color: var(--orange); }
.flow li b { font: 600 1.3rem var(--serif); }
.flow li span { color: var(--on-dark-2); }

/* plans */
.plan-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 90px); align-items: start; }
.plan { position: relative; display: grid; gap: 24px; padding-top: 28px; border-top: 2px solid var(--orange); }
.plan .price { font: 600 clamp(2.6rem, 6vw, 4.4rem)/1 var(--serif); }
.plan .price small { font: 500 .8rem var(--mono); letter-spacing: .08em; color: var(--on-dark-2); }
.plan ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule-dark); }
.plan li { padding: 14px 0 14px 30px; border-bottom: 1px solid var(--rule-dark); position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; top: 14px; color: var(--orange); font-weight: 700; }
.plan .ribbon { position: absolute; top: -13px; right: 0; background: var(--orange); color: #160A02; font: 500 .66rem var(--mono); letter-spacing: .12em; padding: 6px 10px; }
.side-card { display: grid; gap: 18px; padding-top: 28px; border-top: 1px solid var(--rule-dark); }
.fees-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fees-table th, .fees-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--rule-dark); }
.fees-table th { font: 500 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.fees-table td:last-child { text-align: right; font-family: var(--serif); font-size: 1.15rem; }
@media (max-width: 960px) { .plan-wrap { grid-template-columns: 1fr; } }

/* teacher cards: a photograph, then the facts on ruled lines */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 44px 28px; }
.t-card { display: grid; grid-template-rows: auto 1fr; }
.t-card .t-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-2); }
.t-card .t-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.t-card:hover .t-photo img { transform: scale(1.03); }
.t-card .t-photo .chip { position: absolute; top: 12px; left: 12px; }
.t-card .t-body { display: grid; gap: 8px; align-content: start; padding-top: 16px; }
.t-card h3 { font-size: 1.55rem; }
.t-card .meta { font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); }
.t-card .fee { font: 600 1.35rem var(--serif); padding-top: 10px; border-top: 1px solid var(--rule-dark); margin-top: 6px; }
.t-card .fee small { font: 500 .7rem var(--mono); letter-spacing: .06em; color: var(--on-dark-2); }
.t-card .btn { width: 100%; margin-top: 8px; }
.paper .t-card .meta, .paper .t-card .fee small { color: var(--on-paper-2); }
.paper .t-card .fee { border-top-color: var(--rule-paper); }
.sample-flag { font: 500 .72rem var(--mono); letter-spacing: .06em; color: var(--amber); }
.paper .sample-flag { color: #B5520E; }

/* chips (also used inside the phone screens) */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 2px; background: #F3EBD8; color: var(--on-paper); font: 600 .74rem var(--sans); }
.chip.on { background: var(--navy); color: var(--cream); }
.chip.ok { background: #DCF1E4; color: #17603C; }
.chip.warn { background: #FBE3CF; color: #8F420A; }
.chip.bad { background: #F6D6D3; color: #8E1C18; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- dialog + fields ---------- */
.enquiry { border: 0; padding: 0; border-radius: 4px; width: min(560px, calc(100vw - 24px)); background: var(--paper); color: var(--on-paper); box-shadow: 0 40px 120px -20px rgba(0,0,0,.8); }
.enquiry::backdrop { background: rgba(6,10,20,.78); }
.enquiry form { padding: 30px; display: grid; gap: 18px; }
.enquiry h3 { font-size: 1.9rem; }
.enquiry .eyebrow { color: #B5520E; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font: 600 .88rem var(--sans); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 2px; border: 1px solid rgba(20,26,42,.28); background: #FFFDF8; color: var(--on-paper); width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(238,107,31,.18); }
.field select option { background: #FFFDF8; color: var(--on-paper); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .f-row { grid-template-columns: 1fr; } }
.enquiry .done { padding: 44px 30px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.x-btn { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 2px; background: transparent; color: var(--on-paper); font-size: 1.6rem; line-height: 1; }
.x-btn:hover { background: var(--paper-2); }

/* ---------- reveal motion: content is visible by default; JS adds .rv before animating ---------- */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}

/* the phone mock-up: clip the sliding app screens to the screen's rounded corners */
.device-screen { isolation: isolate; clip-path: inset(0 round 37px); }
.device-screen .ui { height: 100%; }
/* phones: the headline comes first, then the simulation, then the chapter row (PRD mobile layout) */
@media (max-width: 960px) {
  .hero-grid { order: 0; }
  .hero-sim { order: 1; }
  .hero-index { order: 2; }
  .hero-copy { padding-block: 26px 10px; }
}
/* long FAQ questions wrap instead of running under the + sign on small phones */
.faq summary { overflow-wrap: anywhere; }
@media (max-width: 400px) { .faq summary { font-size: 1.15rem; padding-right: 40px; } }
.faq summary::after { right: 0; width: 28px; height: 28px; line-height: 28px; text-align: center; transform-origin: 50% 50%; }
.faq details[open] summary::after { transform: none; content: "−"; }
