/* X — an edge product.
   One system: tokens below, one button pair (primary / secondary), one card, radius scale 12 / 20.
   Host screens are built to fit a 16:9 screen-share with no scrolling (1280x720 and up). */
:root {
  --bg: #F7F6FF;
  --bg2: #FFFFFF;
  --glass: #FFFFFF;
  --glass-2: #EEEBFF;
  --line: #E2DFF5;
  --line-2: #8A85B5;
  --text: #16143A;
  --muted: #5A5880;          /* 8.4:1 on --bg */
  --violet: #5B3FE0;
  --blue: #4A2FC9;
  --good: #0F7A50;
  --bad: #C8334F;
  --gold: #FFE7A8;
  --iris: #16143A;
  --cta: #5B3FE0;
  --a0: #5B3FE0; --a0b: #5B3FE0;   /* A violet  */
  --a1: #50E39D; --a1b: #116644;   /* B green */
  --a2: #FFD83D; --a2b: #795007;   /* C yellow */
  --a3: #FF676F; --a3b: #A52137;   /* D red */
  --r-sm: 12px;
  --r: 20px;
  --font: "Anek Latin", "Anek Malayalam", "Noto Sans Malayalam", system-ui, sans-serif;
  font-family: var(--font);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--text); -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { min-height: 100dvh; overflow-x: hidden; background: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--violet); }
.hidden { display: none !important; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Space + horizon arc (from the edge identity) ---------- */
 .space { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.horizon { position: absolute; left: 50%; top: 85vh; width: 190vw; height: 190vw; transform: translateX(-50%); border-radius: 50%; border-top: 2px solid #CFC7FF; }
/* ---------- Layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.center { justify-content: center; text-align: center; }
.stack > * + * { margin-top: 14px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; max-width: 1168px; margin: 0 auto; }

/* ---------- Brand lockup: X by edge ---------- */
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.product { font-weight: 800; font-size: 28px; letter-spacing: -.5px; line-height: 1;
  background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(155, 134, 255, .45)); }
.lockup .by { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }
.lockup .edge-mark { height: 28px; width: auto; filter: drop-shadow(0 0 10px rgba(123, 92, 255, .45)); }
.lockup.sm .product { font-size: 22px; } .lockup.sm .edge-mark { height: 20px; }
.edge-foot { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; padding: 28px 0 32px; }
.edge-foot img { height: 20px; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.4px; }
h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; line-height: 1.55; }
.iris { background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 2.6px; text-transform: uppercase; color: var(--muted); }

/* ---------- The one card ---------- */
.card { background: linear-gradient(180deg, var(--glass-2), var(--glass-2)); border: 1px solid var(--line); border-radius: var(--r); padding: 24px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);  }
.card.lift { transition: transform .2s, border-color .2s; } .card.lift:hover { transform: translateY(-2px); border-color: var(--line-2); }
.card.feature { border-color: var(--line-2);  }

/* ---------- The one button pair ---------- */
.btn { min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 20px; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--glass-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); white-space: nowrap;
  transition: transform .12s, filter .15s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); background: var(--glass-2); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--cta); border-color: var(--glass-2); color: #fff;  }
.btn.primary:hover { filter: brightness(1.1);  }
.btn.big { min-height: 56px; padding: 14px 28px; font-size: 18px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.icon { width: 44px; padding: 0; font-size: 18px; }
.btn .kbd { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--glass-2); opacity: .8; }
.link-btn { background: none; border: 0; padding: 10px 8px; min-height: 44px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.link-btn.danger { color: var(--bad); }

/* ---------- Fields ---------- */
.input, select.input, textarea.input { width: 100%; min-height: 48px; background: var(--bg2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { border-color: var(--violet); outline: 3px solid var(--violet); outline-offset: 2px; }
select.input option { background: var(--bg2); }
textarea.input { resize: vertical; min-height: 96px; }
label.lbl, .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 7px; letter-spacing: .6px; }
.pin-input { font-size: 30px !important; text-align: center; letter-spacing: 10px; font-weight: 800; min-height: 64px !important; }
.error { color: var(--bad); font-weight: 600; min-height: 1.3em; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #fff; color: var(--bg); padding: 12px 20px; border-radius: var(--r-sm); font-weight: 700; z-index: 60;  animation: toast-in .3s ease; }
@keyframes toast-in { from { transform: translate(-50%, 14px); opacity: 0; } }

/* Connection banner */
.conn { position: fixed; top: 0; left: 50%; transform: translate(-50%, -110%); z-index: 70; padding: 10px 18px; border-radius: 0 0 14px 14px; background: var(--gold); color: #2a1d00; font-weight: 700; font-size: 14px; transition: transform .3s; }
.conn.show { transform: translate(-50%, 0); }
.conn.wake { top: auto; bottom: 16px; border-radius: 14px; width: max-content; max-width: calc(100vw - 32px); text-align: center; transform: translate(-50%, 140%); }
.conn.wake.show { transform: translate(-50%, 0); }

/* ---------- Answer tiles ---------- */
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.6vh, 16px); }
.ans { --c: var(--a0); --cb: var(--a0b);
  position: relative; display: flex; align-items: center; gap: 16px; border: 1px solid var(--glass-2); border-radius: var(--r);
  padding: 14px 20px; min-height: clamp(60px, 11vh, 120px); text-align: left; font-size: clamp(17px, min(2vw, 3.4vh), 28px); font-weight: 700; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, var(--cb) -20%, var(--c) 55%, color-mix(in srgb, var(--c) 72%, #000) 120%);

  transition: transform .14s, opacity .3s, filter .3s, box-shadow .3s; animation: tile-in .4s cubic-bezier(.2,1.3,.4,1) both; }
.ans::before { content: ""; position: absolute; inset: 0 0 55% 0; background: linear-gradient(180deg, var(--glass-2), transparent); pointer-events: none; }
.ans:nth-child(2) { animation-delay: .05s; } .ans:nth-child(3) { animation-delay: .1s; } .ans:nth-child(4) { animation-delay: .15s; }
@keyframes tile-in { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.ans .key { flex: none; width: clamp(38px, 6vh, 50px); height: clamp(38px, 6vh, 50px); border-radius: var(--r-sm); background: var(--glass-2); border: 1px solid var(--glass-2); display: grid; place-items: center; font-weight: 800; font-size: .8em; position: relative; z-index: 1; }
.ans .label { position: relative; z-index: 1; flex: 1; overflow-wrap: anywhere;  }
.ans.c0 { --c: var(--a0); --cb: var(--a0b); } .ans.c1 { --c: var(--a1); --cb: var(--a1b); }
.ans.c2 { --c: var(--a2); --cb: var(--a2b); } .ans.c3 { --c: var(--a3); --cb: var(--a3b); }
button.ans { cursor: pointer; }
button.ans:hover { transform: translateY(-2px); }
button.ans:active { transform: scale(.98); }
.ans.dim { opacity: .5; filter: saturate(.35) brightness(.85); }
.ans.chosen {  }
.ans.right {  }
.ans .stat { position: relative; z-index: 1; text-align: right; line-height: 1.05; }
.ans .stat b { display: block; font-size: 1.25em; font-weight: 800; }
.ans .stat small { font-size: .55em; font-weight: 600; opacity: .9; }
.ans .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--glass-2); transition: width 1.1s cubic-bezier(.2,.9,.3,1); }
.ans.mini { min-height: 56px; font-size: 17px; padding: 10px 14px; animation: none; }
.ans.mini .key { width: 36px; height: 36px; }

/* ---------- Host stage: fits one screen, never scrolls ---------- */
.stage { height: 100dvh; min-height: 560px; display: grid; grid-template-rows: auto 1fr; padding: clamp(12px, 2.2vh, 22px) clamp(16px, 2.4vw, 32px); gap: clamp(10px, 2vh, 20px); overflow: hidden; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; }
.stage-top .mid { flex: 1; display: flex; justify-content: center; }
.stage-body { min-height: 0; display: flex; flex-direction: column; gap: clamp(10px, 2vh, 20px); }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.steps { display: flex; gap: 6px; max-width: 420px; width: 100%; }
.steps i { flex: 1; height: 6px; border-radius: 99px; background: var(--glass-2); }
.steps i.done { background: rgba(170,160,255,.55); }
.steps i.now { background: var(--cta);  }
.qtext { font-size: clamp(24px, min(3.6vw, 6.2vh), 54px); font-weight: 800; text-align: center; margin: 0 auto; max-width: 1180px; line-height: 1.16; letter-spacing: -.6px; text-wrap: balance; }
.statusbar { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 60px); }
.timer { --p: 100%; --s: clamp(72px, 13vh, 112px); width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; font-size: calc(var(--s) * .38); font-weight: 800; position: relative;
  background: conic-gradient(from 0deg, #c4b8ff, var(--violet), var(--blue) var(--p), var(--glass-2) 0);  }
.timer::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #211e5c, var(--bg)); }
.timer span { position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.timer.urgent { animation: pulse .5s ease-in-out infinite alternate; }
.timer.urgent span { color: var(--bad); }
@keyframes pulse { to { transform: scale(1.06);  } }
.counter { text-align: center; }
.counter b { display: block; font-size: clamp(36px, 8vh, 72px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.counter > span { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.stage .answers { flex: 1; min-height: 0; grid-auto-rows: 1fr; }

/* Lobby */
.join-panel { display: grid; grid-template-columns: 1fr auto; gap: clamp(20px, 4vw, 48px); align-items: center; max-width: 1000px; width: 100%; margin: 0 auto; padding: clamp(18px, 3vh, 30px) clamp(20px, 3vw, 36px); }
.join-steps { display: grid; gap: 6px; font-size: clamp(16px, 2.6vh, 20px); }
.join-steps b { color: var(--text); }
.bigpin { font-size: clamp(56px, min(10vw, 15vh), 128px); font-weight: 800; letter-spacing: .12em; line-height: 1; font-variant-numeric: tabular-nums;
  background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(123,92,255,.55)); }
.qr { width: clamp(130px, 24vh, 200px); height: clamp(130px, 24vh, 200px); border-radius: 18px; background: #fff; padding: 10px;  }
.players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-content: flex-start; max-width: 1100px; width: 100%; margin: 0 auto; overflow: auto; min-height: 0; flex: 1; padding: 4px; }
.player-chip { min-height: 44px; padding: 8px 16px; border-radius: var(--r-sm); background: var(--glass-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 18px; animation: pop .45s cubic-bezier(.2,1.6,.4,1); cursor: pointer; transition: border-color .2s, opacity .2s, color .2s; }
.player-chip:hover { border-color: var(--bad); color: var(--bad); }
.player-chip.off { opacity: .4; }
@keyframes pop { from { transform: scale(.3) translateY(10px); opacity: 0; } }
.empty-lobby { flex: 1; display: grid; place-items: center; color: var(--muted); font-size: 18px; }
.dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* Get ready */
.ready { flex: 1; display: grid; place-items: center; text-align: center; }
.countdown { font-size: clamp(90px, 24vh, 220px); font-weight: 800; line-height: 1; background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 40px rgba(123,92,255,.7)); }
.countdown.tick { animation: zoom .9s ease both; }
@keyframes zoom { from { transform: scale(1.7); opacity: 0; } 30% { transform: scale(1); opacity: 1; } to { transform: scale(.92); } }
.progress { height: 6px; border-radius: 99px; background: var(--glass-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--cta); border-radius: 99px; }
.loader { width: min(520px, 80vw); margin: 22px auto 0; }
.loader > i { animation: fill 3s linear forwards; }
@keyframes fill { to { width: 100%; } }

/* Reveal */
.explain { max-width: 980px; margin: 0 auto; padding: 14px 20px; display: flex; gap: 12px; align-items: flex-start; font-size: clamp(15px, 2.4vh, 20px); }
.explain .ico { font-size: 1.3em; line-height: 1.2; }

/* Leaderboard */
.board { max-width: 820px; width: 100%; margin: 0 auto; }
.board .line { display: flex; align-items: center; gap: 14px; padding: clamp(8px, 1.5vh, 14px) 18px; border-radius: 16px; margin-bottom: clamp(6px, 1.2vh, 10px); font-size: clamp(17px, 3vh, 24px); font-weight: 700;
  background: linear-gradient(90deg, var(--glass-2), var(--glass-2)); border: 1px solid var(--line); animation: slide .5s cubic-bezier(.2,1.2,.4,1) both; }
.board .line:first-child { border-color: rgba(255, 211, 107, .55); background: linear-gradient(90deg, rgba(255, 211, 107, .18), var(--glass-2)); }
.board .rk { width: 1.9em; height: 1.9em; flex: none; border-radius: var(--r-sm); background: var(--glass-2); display: grid; place-items: center; font-size: .8em; }
.board .line:first-child .rk { background: var(--gold); color: var(--bg); }
.board .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .move { font-size: .62em; font-weight: 800; color: var(--good); }
.board .fire { font-size: .62em; color: var(--gold); }
.board .pts { font-variant-numeric: tabular-nums; }
@keyframes slide { from { transform: translateY(14px); opacity: 0; } }

/* Podium */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 2vw, 20px); flex: 1; min-height: 0; }
.podium .step { width: min(230px, 28vw); text-align: center; display: flex; flex-direction: column; justify-content: flex-end; }
.podium .who { opacity: 0; animation: fade-up .6s ease forwards; }
.podium .p3 .who { animation-delay: .9s; } .podium .p2 .who { animation-delay: 1.9s; } .podium .p1 .who { animation-delay: 3.2s; }
.podium .medal { font-size: clamp(30px, 6vh, 46px); }
.podium .nm { font-size: clamp(18px, 3.4vh, 26px); font-weight: 800; overflow-wrap: anywhere; }
.podium .block { margin-top: 10px; border-radius: 18px 18px 6px 6px; display: grid; place-items: center; font-size: clamp(34px, 7vh, 56px); font-weight: 800; color: #fff;
  border: 1px solid var(--glass-2); transform-origin: bottom; animation: rise 1s cubic-bezier(.2,1.3,.4,1) both;  }
.podium .p1 .block { height: clamp(120px, 30vh, 240px); background: linear-gradient(180deg, #ffe39a, #f3b43c); color: #3a2600; animation-delay: 2.6s;  }
.podium .p2 .block { height: clamp(90px, 22vh, 170px); background: linear-gradient(180deg, #ecebff, #aaa5dc); color: #1b1846; animation-delay: 1.4s; }
.podium .p3 .block { height: clamp(66px, 16vh, 124px); background: linear-gradient(180deg, #a48dff, #5a43d6); animation-delay: .4s; }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.reactions { position: fixed; right: 30px; bottom: 0; width: 140px; height: 75vh; pointer-events: none; overflow: hidden; z-index: 20; }
.reactions span { position: absolute; bottom: -50px; font-size: 42px; animation: floatUp 3.2s ease-out forwards; }
@keyframes floatUp { 30% { transform: translateY(-22vh) scale(1.15); } to { transform: translateY(-75vh) scale(.9); opacity: 0; } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

/* Sound toggles: one small cluster, bottom-left, out of the way of every screen's actions */

/* ---------- Teacher library / editor / login ---------- */
.quiz-item { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 18px 20px; }
.quiz-item .thumb { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 22px; font-weight: 800; background: var(--cta);  }
.qcard { padding: clamp(16px, 3vw, 28px); scroll-margin-top: 140px; }
.optrow { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.optrow .mark { width: 48px; height: 48px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--glass-2); cursor: pointer; display: grid; place-items: center; font-weight: 800; transition: all .2s; }
.optrow .mark.k0 { color: var(--a0b); } .optrow .mark.k1 { color: var(--a1b); } .optrow .mark.k2 { color: var(--a2b); } .optrow .mark.k3 { color: var(--a3b); }
.optrow .mark.on { background: #E3F6EC; border-color: var(--good); color: var(--good); }
.sticky-bar { position: sticky; top: 0; z-index: 10; background: rgba(13,12,43,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--glass-2); border-top-color: #b3a3ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-orb { width: 56px; height: 56px; flex: none; border-radius: 50%; background: conic-gradient(from 0deg, #fff, var(--violet), var(--blue), #e6c4ff, #fff);  animation: spin 3s linear infinite paused; }
.ai-orb.busy { animation-play-state: running; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-layout {
  width: min(100%, 960px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
}
.auth-intro h1 { margin: 8px 0 16px; font-size: clamp(36px, 5vw, 68px); line-height: 1; }
.auth-intro p { color: var(--muted); max-width: 32ch; }
.auth-intro a { display: inline-flex; align-items: center; min-height: 44px; }
.auth { width: 100%; min-width: 0; gap: 18px; }
@media (max-width: 720px) {
  .auth-layout { max-width: 440px; grid-template-columns: minmax(0, 1fr); }
  .auth-intro { grid-row: 2; }
  .auth-intro h1, .auth-intro p { display: none; }
}
.auth h2 { margin: 2px 0 0; }
.g-btn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  display: flex;
  justify-content: center;
  border-radius: 12px;
  overflow: clip;
}
.g-btn > div { flex: 0 0 auto; }
.g-btn:focus-within { outline: 2px solid var(--text); outline-offset: 3px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.who { color: var(--muted); font-size: 14px; font-weight: 600; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Landing ---------- */
.hero { text-align: center; padding: clamp(24px, 6vh, 64px) 0 clamp(28px, 5vh, 48px); }
.hero-product { font-size: clamp(72px, 13vw, 150px); font-weight: 800; letter-spacing: -4px; line-height: .95; margin: 12px 0 16px;
  background: var(--iris); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 40px rgba(123, 92, 255, .5)); animation: shimmer 8s linear infinite; }
@keyframes shimmer { to { background-position: 200% 0; } }
.hero-enter > * { animation: fade-up .7s cubic-bezier(.2,.8,.2,1) both; }
.hero-enter > *:nth-child(2) { animation-delay: .08s; } .hero-enter > *:nth-child(3) { animation-delay: .16s; } .hero-enter > *:nth-child(4) { animation-delay: .24s; }
.landing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; margin: 0 auto; }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.ticks li::before { content: "✓"; color: var(--good); font-weight: 800; }

/* ---------- Player (phone) ---------- */
.phone { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 12px 16px 16px; gap: 14px; }
.phone .answers { grid-template-columns: 1fr; flex: 1; gap: 12px; }
.phone .ans { min-height: 72px; font-size: 19px; }
.status-big { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; text-align: center; }
.status-big > * { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.emoji-bar { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.emoji-bar button { min-width: 48px; min-height: 48px; background: var(--glass-2); border: 1px solid var(--line); border-radius: 14px; font-size: 24px; cursor: pointer; transition: transform .1s; }
.emoji-bar button:active { transform: scale(1.25); }
.result-badge { font-size: 76px; line-height: 1; animation: pop .6s cubic-bezier(.2,1.8,.4,1); }
.score-big { font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wait-orb { width: 110px; height: 110px; margin: 0 auto 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #a48dff 30%, #3f6bff 70%, #1a1660);  animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) scale(1.04); } }

@media (max-width: 760px) {
  .landing-grid { grid-template-columns: 1fr; }
  .landing-grid .join-card { order: -1; }      /* students first on phones */
  .hero { padding: 8px 0 20px; }
  .hero-product { font-size: 72px; margin: 6px 0 8px; }
  .hero .lede { display: none; }
  .topbar { padding: 12px 16px; }
  .product { font-size: 22px; } .lockup .edge-mark { height: 20px; }
  .answers { grid-template-columns: 1fr; }
  .join-panel { grid-template-columns: 1fr; text-align: center; }
  .join-panel .qr { margin: 0 auto; }
  .stage { height: auto; min-height: 100dvh; overflow: visible; }
  .quiz-item { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .podium .who { opacity: 1; } }


h1, h2, h3, .lockup .product { font-family: Sora, var(--font); }
:lang(ml) { font-size: 1.08em; line-height: 1.65; }
.pin, .bigpin, .timer, .pts, .progress, #qTime, #rScore { font-variant-numeric: tabular-nums; }
.lockup .product, .hero-product { background: none; color: var(--text); }
.lockup .product::before { content: ""; display: inline-block; width: .47em; height: .47em; margin-right: .15em; vertical-align: .45em; background: #F5A524; clip-path: polygon(50% 0, 63% 38%, 100% 50%, 63% 62%, 50% 100%, 37% 62%, 0 50%, 37% 38%); }
.edge-mark { color: var(--muted); height: auto; font-weight: 800; }
.card, .input, input, textarea, select { background: var(--bg2); }
.input, input, textarea, select { border-color: var(--line-2); }
.btn, .link-btn { min-height: 48px; }
.btn.primary { background: var(--violet); color: white; }
.btn.primary:hover, .btn.primary:active { background: var(--blue); filter: none; }
.quiz-item .thumb { color: white; }
.toast { color: var(--text); border: 1px solid var(--line); }
.ans { background: var(--c); border: 1px solid transparent; }
.ans::before { content: none; }
.ans.c1, .ans.c2, .ans.c3 { color: var(--text); }
.ans .key { background: none; border: 1px solid currentColor; }
.ans .bar { background: none; border-bottom: 4px solid currentColor; }
.ans.dim { opacity: 1; }
.ans.chosen, .ans.right { outline: 3px solid var(--violet); outline-offset: 2px; }
.phone #answers .ans { min-height: 64px; }
#qText { font-size: 22px; }
#answerStatus { min-height: 1.4em; margin: 0; }
.common-mistake { display: block; font-size: .76em; color: inherit; }
.flash-good .space { background: #E3F6EC; }
.flash-bad .space { background: #FDE8EC; }

#vEditor .sticky-bar { background: var(--bg2); border-bottom: 1px solid var(--line); }
#vEditor .topbar { max-width: 904px; flex-wrap: wrap; }
.editor-body { max-width: 904px; padding: 32px 24px 90px; }
.editor-heading h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); }
.editor-heading p { color: var(--muted); margin: 6px 0 0; }
#quizTitle { font-size: 20px; font-weight: 700; }
.qcard h3 { margin: 0; }
.qcard .optrow { grid-template-columns: 48px minmax(0, 1fr); }
.qcard .optrow .mark:not(.on) { color: var(--text); }
@media (max-width: 560px) {
  #vEditor .topbar { gap: 8px; }
  #edSummary { order: 3; flex-basis: 100%; font-size: 13px; }
  #vEditor .topbar .btn { padding-inline: 10px; }
  .editor-body { padding: 20px 16px 80px; }
}

/* Home keeps the join action centered. Quiz colors are reserved for play. */
.home { display: flex; flex-direction: column; min-height: 100dvh; background: radial-gradient(ellipse at 50% 38%, #EEEBFF, transparent 62%), var(--bg); }
.home .topbar { width: min(100%, 1120px); }
.home-host { background: var(--bg2); }
.home-host span { color: var(--violet); }
.home-main { flex: 1; display: grid; place-items: center; padding: 18px 16px 28px; }
.home-join { width: min(100%, 440px); padding: clamp(20px, 5vw, 40px); background: #fff; border: 1px solid var(--line); border-radius: 24px; text-align: center; }
.home-spark { display: block; margin: 0 auto 16px; }
.home-join h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin: 0; }
.home-intro { color: var(--muted); font-size: 17px; margin: 10px auto 24px; max-width: 30ch; }
.home-pin-form { text-align: left; }
.home-pin-form .pin-input { letter-spacing: .35em; }
.home-pin-form .btn { margin-top: 12px; }
.home-pin-form .btn span { margin-left: 8px; }
.home-note { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.home-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 12px 16px 20px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 480px) {
  .home-main { align-items: start; padding-top: 22px; }
  .home-join { border-radius: 18px; }
}

/* Daylight surfaces for the entrance, teacher workspace and shared stage. */
:root { --line-2: #716C9B; --arc: #CFC7FF; --accent: #F5A524; }
.home { background: #F7F6FF; }
.home-main { position: relative; isolation: isolate; overflow: hidden; }
.home-join { position: relative; border-top: 4px solid var(--violet); box-shadow: 0 24px 60px #16143a12; }
.home-join .btn { justify-content: space-between; }
.home-pin-form .pin-input { background: var(--bg); }
.join-spark, .wait-spark { display: block; margin: 0 auto 10px; }
.student-ui :is(#sJoin, #sLocked, #sWait, #sFinal, #sResult) > div { max-width: 440px; margin-inline: auto; }
#sJoin .card { text-align: left; padding: 22px; border-top: 4px solid var(--violet); }
#sJoin h2 { text-align: center; margin: 0 0 6px; }
#sJoin .error:empty, #answerStatus:empty, #rPick:empty { display: none; }
#sQuestion #qText { margin: 8px 0 4px; line-height: 1.25; text-align: left; }
#sQuestion #answers { grid-auto-rows: minmax(64px, auto); flex: 0; }
#sQuestion .ans { padding: 10px 12px; border-radius: 14px; }
#sQuestion .ans.c0 { background: #5B3FE0; color: white; }
#sQuestion .ans.c1 { background: #0E7C86; color: white; }
#sQuestion .ans.c2 { background: #F5A524; color: var(--text); border-color: #C98410; }
#sQuestion .ans.c3 { background: #C2367A; color: white; }
#sQuestion .ans .key { background: none; color: inherit; }
#sQuestion .ans.dim { filter: none; opacity: 1; }
#sQuestion .ans[aria-pressed="true"] { outline: 3px solid var(--violet); outline-offset: 2px; }
.student-ui #rStreak { color: var(--text) !important; }
.teacher-ui .auth { box-shadow: 0 24px 60px #16143a12; border-color: var(--line); border-top: 4px solid var(--violet); }
.teacher-ui .auth-intro { padding: 22px 0; }
.teacher-ui .auth-intro a { color: var(--violet); }
.teacher-ui .quiz-item { border-left: 4px solid var(--arc); }
.teacher-ui .quiz-item .thumb { background: var(--glass-2); color: var(--violet); }
.teacher-ui .stage { background: var(--bg); }
.teacher-ui .stage .ans { color: var(--text); background: #fff; border: 1px solid var(--line-2); border-inline-start: 7px solid var(--c); min-height: 0; }
.teacher-ui .stage .ans.right { background: #E3F6EC; outline: none; border-color: var(--good); }
.teacher-ui .stage .ans .key { color: var(--text); background: var(--glass-2); border: 0; }
.teacher-ui .stage .ans .bar { border-color: var(--violet); }
.teacher-ui .stage .ans .label { font-size: clamp(20px, 2.2vw, 29px); }
.teacher-ui .stage .common-mistake { color: var(--text); }
.teacher-ui .stage .join-panel { border-top: 5px solid var(--violet); }
.teacher-ui .stage .btn .kbd { border-color: currentColor; }
.calm-toggle[aria-pressed="true"] { background: var(--glass-2); border-color: var(--violet); }
html[data-calm="true"] *, html[data-calm="true"] *::before, html[data-calm="true"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (max-width: 480px) {
  .home-main { align-items: center; }
  .student-ui .phone > header { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 720px) {
  .teacher-ui .auth-intro { grid-row: 1; padding: 0; text-align: center; }
  .teacher-ui .auth-layout { gap: 10px; }
}


/* Spark identity: petrol surfaces, seafoam actions and copper details. */
:root {
  color-scheme: dark;
  --bg: #102426;
  --bg2: #173033;
  --glass: #193639;
  --glass-2: #214044;
  --line: #36595B;
  --line-2: #7EAAA7;
  --text: #ECF6EE;
  --muted: #B5D0CA;
  --violet: #A1E6CD;
  --blue: #B9F1DE;
  --cta: #A1E6CD;
  --iris: #ECF6EE;
  --arc: #376166;
  --accent: #F0B58D;
  --good: #97E7C1;
  --bad: #FFB3A3;
  --gold: #F0B58D;
  --a0: #89D4C0; --a0b: #A1E6CD;
  --a1: #A5C6F1; --a1b: #C0D8F5;
  --a2: #E2B87C; --a2b: #F0CFAA;
  --a3: #E6A19B; --a3b: #F3BBB6;
  --font: "Source Sans 3", "Anek Malayalam", "Noto Sans Malayalam", sans-serif;
  --heading: "Instrument Serif", "Anek Malayalam", "Noto Sans Malayalam", serif;
}
h1, h2, h3, .qtext, .lockup .product { font-family: var(--heading); letter-spacing: -.035em; }
.lockup .product::before { background: var(--accent); }
.horizon { border-color: var(--arc); }
.home, .teacher-ui .login {
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 12% 90%, #23484A, transparent 56%),
    repeating-linear-gradient(135deg, transparent 0 61px, #90C9BD12 62px, transparent 63px);
}
.home-join {
  width: min(100%, 960px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(24px, 6vw, 74px);
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  text-align: left;
}
.join-heading { border-left: 2px solid var(--accent); padding: 12px 0 12px clamp(18px, 4vw, 38px); }
.home-join h1 { font-size: clamp(40px, 7vw, 80px); max-width: 10ch; line-height: .99; }
.home-spark { width: 44px; height: 44px; margin: 0 0 20px; }
.home-intro { margin: 16px 0 0; }
.join-entry {
  min-width: 0;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--violet);
  border-radius: 12px 12px 28px 12px;
  padding: clamp(18px, 4vw, 32px);
}
.join-entry-title { margin: 0 0 18px; font-size: 24px; }
.home-note { text-align: left; }
.btn.primary, .btn.primary:hover, .btn.primary:active { color: #102426; }
.teacher-ui .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
.teacher-ui .auth-intro { border-inline-start: 2px solid var(--accent); padding: 16px 0 16px 24px; }
.teacher-ui .auth-intro h1 { max-width: 13ch; }
.teacher-ui .auth, #sJoin .card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--violet);
  border-radius: 12px 12px 28px 12px;
  box-shadow: none;
}
.teacher-ui .auth:has(#fName:not(.hidden)) { border-top-color: var(--accent); }
.teacher-ui #authSubmit { color: var(--text); background: #24524C; border-color: var(--violet); }
.teacher-ui .auth:has(#fName:not(.hidden)) #authSubmit { background: #48372C; border-color: var(--accent); }
.teacher-ui #vLibrary .wrap { padding-top: 24px; }
.teacher-ui .quiz-item .thumb { background: #24524C; color: var(--violet); }
.teacher-ui .quiz-item { border-left-color: var(--arc); }
.teacher-ui .stage, .flash-good .space, .flash-bad .space { background: var(--bg); }
.teacher-ui .stage .join-panel { border-top: 3px solid var(--accent); }
:is(#sQuestion, .teacher-ui .stage) .ans.c0 { --tile: #1C403A; --tile-edge: var(--a0); }
:is(#sQuestion, .teacher-ui .stage) .ans.c1 { --tile: #263C50; --tile-edge: var(--a1); }
:is(#sQuestion, .teacher-ui .stage) .ans.c2 { --tile: #43392B; --tile-edge: var(--a2); }
:is(#sQuestion, .teacher-ui .stage) .ans.c3 { --tile: #463033; --tile-edge: var(--a3); }
:is(#sQuestion, .teacher-ui .stage) .ans:is(.c0, .c1, .c2, .c3) {
  background: var(--tile);
  color: var(--text);
  border: 1px solid var(--tile-edge);
  border-inline-start-width: 4px;
  border-radius: 10px;
}
:is(#sQuestion, .teacher-ui .stage) .ans:is(.right, .chosen, [aria-pressed="true"]) { border-color: var(--text); }
.ans.mini { background: var(--bg2); color: var(--text); border-color: var(--line-2); }
.student-ui .phone > header { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.toast, .conn { background: var(--glass-2); color: var(--text); border: 1px solid var(--arc); }
.conn { border-color: var(--accent); }
.optrow .mark.on { background: #24524C; border-color: var(--good); color: var(--good); }
.board .line:first-child, .podium :is(.p1, .p2, .p3) .block { background: var(--glass-2); color: var(--text); border-color: var(--line-2); }
.ai-orb { background: var(--glass-2); }
@media (max-width: 720px) {
  .home-join, .teacher-ui .auth-layout { grid-template-columns: minmax(0, 1fr); }
  .home-join { max-width: 480px; gap: 22px; }
  .home-join h1 { max-width: 13ch; }
  .teacher-ui .auth-intro { border: 0; padding: 0; }
}

.lockup .product { font-size: clamp(17px, 3vw, 25px); letter-spacing: .045em; white-space: nowrap; }
.lockup.sm .product { font-size: 16px; }

/* Editorial typography and a full-width classroom image below the join row. */
.home-main { grid-template-rows: auto auto; align-content: center; gap: clamp(26px, 5vw, 48px); }
.home-join h1, .teacher-ui .auth-intro h1, .teacher-ui .auth h2, .teacher-ui .editor-heading h1 {
  font-weight: 400;
  letter-spacing: -.025em;
}
.home-join h1 { max-width: 12ch; }
.qtext, #sQuestion #qText, .join-entry-title, .qcard h3 {
  font-family: var(--font);
  font-weight: 700;
}
.home-classroom { width: min(100%, 960px); margin: 0; overflow: hidden; border-radius: 12px 12px 28px 12px; border: 1px solid var(--line); }
.classroom-photo { display: block; width: 100%; aspect-ratio: 3.4; height: auto; object-fit: cover; object-position: center 56%; }
@media (max-width: 720px) {
  .home-classroom { width: min(100%, 480px); }
  .classroom-photo { aspect-ratio: 2; }
}

/* S.P.A.R.K. is a typographic signature, with no accompanying symbol. */
.lockup .product {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  letter-spacing: .035em;
  line-height: 1;
  color: var(--text);
}
.lockup .product::before { content: none; }
.lockup.sm .product { font-size: clamp(21px, 4vw, 28px); }
.edge-type { text-transform: lowercase; font-weight: 700; letter-spacing: 0; }

.settings-menu { position: relative; z-index: 35; }
.teacher-ui > .settings-menu { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
.settings-menu > summary { list-style: none; }
.settings-menu > summary::-webkit-details-marker { display: none; }
.settings-panel { position: absolute; right: 0; top: calc(100% + 8px); display: grid; gap: 8px; width: min(225px, 80vw); padding: 10px; box-shadow: 0 8px 24px #0005; }
.teacher-ui .settings-panel { top: auto; bottom: calc(100% + 8px); }
.settings-panel .btn { width: 100%; justify-content: space-between; text-align: left; }
.settings-panel .btn[aria-pressed]::after { content: "Off"; color: var(--muted); }
.settings-panel .btn[aria-pressed="true"]::after { content: "On"; color: var(--text); }
.explain-label { font-size: .72em; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.streak-count { font-size: .68em; color: var(--muted); }
.emoji-bar button { padding: 0 12px; font-size: 15px; font-weight: 600; border-radius: 8px; }
.emoji-bar button:active { transform: scale(.97); }
.reactions { width: 200px; }
.reactions span { font-size: 17px; line-height: 1.2; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 9px; background: var(--bg2); color: var(--text); white-space: nowrap; }
.result-badge { font-family: var(--font); font-size: clamp(34px, 8vw, 54px); font-weight: 600; }

/* Presentation UI uses a single quiet ink ramp. Color belongs to class data. */
:root {
  --bg: #171D1E;
  --bg2: #202728;
  --glass: #232A2B;
  --glass-2: #2A3334;
  --line: #3D4848;
  --line-2: #839894;
  --text: #EBF0EC;
  --muted: #B6C5C0;
  --r: 16px;
  --r-sm: 8px;
  --ui-ease: cubic-bezier(.22, .61, .36, 1);
}
.home, .teacher-ui .login { background: var(--bg); }
.space .horizon { border-color: var(--line); }
.home-join { gap: clamp(24px, 5vw, 64px); }
.join-heading, .teacher-ui .auth-intro { border: 0; padding-inline-start: 0; }
.join-entry, .teacher-ui .auth, #sJoin .card, .teacher-ui .stage .join-panel { border: 1px solid var(--line); border-radius: var(--r); }
.home-pin-form .btn.primary, .teacher-ui #authSubmit, .teacher-ui .auth:has(#fName:not(.hidden)) #authSubmit { background: var(--violet); border-color: transparent; color: var(--bg); }
.eyebrow, .lbl, .or, .explain-label { text-transform: none; letter-spacing: 0; }
.teacher-ui .quiz-item { border: 1px solid var(--line); }
.teacher-ui .quiz-item .thumb { background: var(--glass-2); color: var(--text); }
.teacher-ui .stage .ans:is(.c0, .c1, .c2, .c3) { background: var(--bg2); border: 1px solid var(--line-2); }
.teacher-ui #revealAnswers .ans.right { border-color: var(--good); }
.teacher-ui #revealAnswers .bar { transform-origin: left; animation: reveal-grow .36s var(--ui-ease) both; }
@keyframes reveal-grow { from { transform: scaleX(0); } }
.ans .bar { transition: none; }
.ai-orb, .wait-orb, .hero-product, .timer.urgent { animation: none; }
.card, .btn, .input, .optrow .mark { transition: background-color .15s var(--ui-ease), border-color .15s var(--ui-ease), color .15s var(--ui-ease); }
.card:hover, .btn:hover { transform: none; }
.settings-panel, .home .landing-enter { animation: settle-in .28s var(--ui-ease) both; }
.home-join.hero-enter > * { animation: settle-in .28s var(--ui-ease) both; }
.home-join.hero-enter .join-entry, .home .home-classroom { animation-delay: .08s; }
@keyframes settle-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.teacher-overview { width: min(100% - 32px, 1040px); margin: auto; padding-block: 48px 24px; }
.teacher-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.teacher-pitch h1 { font: 400 clamp(44px, 6vw, 72px)/.98 var(--heading); max-width: 11ch; margin: 0; }
.teacher-pitch p { max-width: 38ch; color: var(--muted); font-size: 18px; margin: 16px 0 24px; }
.reveal-example { border: 1px solid var(--line); background: var(--bg2); border-radius: var(--r); padding: 24px; }
.sample-label { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.reveal-example h2 { font: 600 22px/1.2 var(--font); letter-spacing: 0; margin: 0 0 20px; }
.example-bars { display: grid; gap: 12px; margin: 0; }
.example-bars dt { font-weight: 600; }
.example-bars dt span { color: var(--good); }
.example-bars dd { display: grid; grid-template-columns: 1fr 2ch; align-items: center; gap: 12px; margin: 4px 0 0; font-variant-numeric: tabular-nums; text-align: right; }
.example-bars meter { width: 100%; height: 12px; accent-color: var(--violet); }
.teacher-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.teacher-steps h2 { font: 600 20px/1.2 var(--font); letter-spacing: 0; margin: 0 0 4px; }
.teacher-steps p { color: var(--muted); margin: 0; }
@media (max-width: 720px) {
  .teacher-overview { padding-top: 24px; }
  .teacher-hero, .teacher-steps { grid-template-columns: 1fr; }
  .teacher-steps { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .home .landing-enter, .home-join.hero-enter > *, .teacher-ui #revealAnswers .bar, .settings-panel { animation: none; }
}

/* Product homepage. The join form stays a plain GET to the player route. */
.product-main { width: min(calc(100% - 48px), 1120px); margin-inline: auto; }
.product-nav, .product-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-nav > a:not(.btn) { font-weight: 600; }
.product-hero, .product-flow, .product-join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 72px); padding-block: clamp(44px, 8vw, 96px); }
.product-flow, .product-join { border-top: 1px solid var(--line); }
.product-copy h1, .product-copy h2 { font-weight: 400; line-height: 1; margin: 0; }
.product-copy h1 { max-width: 12ch; font-size: clamp(48px, 7.7vw, 92px); }
.product-copy h2 { font-size: clamp(36px, 5vw, 56px); }
.product-copy p { color: var(--muted); max-width: 42ch; font-size: clamp(16px, 2vw, 20px); margin: 16px 0 0; }
.product-actions { margin-top: 24px; }
.product-photo { margin: 0; overflow: hidden; border-radius: var(--r); }
.product-photo img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; object-position: 53% 50%; }
.product-steps { margin: 24px 0 0; padding-inline-start: 24px; display: grid; gap: 16px; }
.product-steps li { padding-inline-start: 6px; }
.product-steps li::marker { color: var(--accent); font-variant-numeric: tabular-nums; }
.product-steps strong { font-size: 17px; }
.product-steps p { font-size: 16px; margin-top: 2px; }
.product-flow .reveal-example h3 { font-family: var(--font); font-size: 22px; letter-spacing: 0; margin: 0 0 18px; }
.product-join { scroll-margin-top: 18px; }
.product-join .join-entry { max-width: 384px; width: 100%; justify-self: start; }
@media (max-width: 720px) {
  .product-main { width: calc(100% - 32px); }
  .product-hero, .product-flow, .product-join { grid-template-columns: 1fr; padding-block: 36px; }
  .product-photo img { aspect-ratio: 16 / 9; }
}
@media (max-width: 480px) {
  .product-home .topbar { align-items: flex-start; gap: 8px; }
  .product-nav { justify-content: flex-end; gap: 6px 10px; }
  .product-nav .btn { padding-inline: 10px; }
}

/* Motion starts once, with static content available before observation. */
@media (prefers-reduced-motion: no-preference) {
  .product-hero :is(h1, .product-copy > p, .product-actions, .product-photo),
  .product-in-view > * { animation: product-arrive .5s var(--ui-ease) both; }
  .product-hero .product-copy > p { animation-delay: 60ms; }
  .product-hero .product-actions { animation-delay: 120ms; }
  .product-hero .product-photo, .product-in-view > :nth-child(2) { animation-delay: 150ms; }
  .product-flow .example-meter { position: relative; display: block; appearance: none; background: var(--glass-2); border-radius: 99px; overflow: hidden; }
  .product-flow .example-meter::-webkit-meter-bar { background: var(--glass-2); border: 0; }
  .product-flow .example-meter::-webkit-meter-optimum-value { background: var(--violet); transform-origin: left center; }
  .product-flow .example-meter::-moz-meter-bar { background: var(--violet); transform-origin: left center; }
  .product-in-view .example-meter::-webkit-meter-optimum-value { animation: product-bar .65s var(--ui-ease) both; }
  .product-in-view .example-meter::-moz-meter-bar { animation: product-bar .65s var(--ui-ease) both; }
  .product-in-view .example-bars > :nth-child(2) .example-meter::-webkit-meter-optimum-value { animation-delay: 80ms; }
  .product-in-view .example-bars > :nth-child(3) .example-meter::-webkit-meter-optimum-value { animation-delay: 160ms; }
}
@keyframes product-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes product-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; width: min(calc(100% - 32px), 1120px); margin-inline: auto; padding-block: 20px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; }
.site-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-links a { color: var(--text); }
.info-content { width: min(calc(100% - 32px), 700px); margin-inline: auto; padding-block: 44px 64px; }
.info-content h1 { font-size: clamp(42px, 7vw, 72px); font-weight: 400; margin: 0 0 20px; }
.info-content h2 { font: 600 22px/1.2 var(--font); letter-spacing: 0; margin: 28px 0 8px; }
.info-content :is(p, ol) { font-size: 17px; color: var(--muted); }
.info-content li + li { margin-top: 8px; }
.info-content .policy-status { color: var(--accent); font-weight: 600; }
.product-flow-copy { display: block; }
.product-flow-copy .product-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
@media (max-width: 720px) { .product-flow-copy .product-steps { grid-template-columns: 1fr; } }
.account-policy { margin: 0; color: var(--muted); font-size: 14px; }
