/* ASTRA pitch deck + guided demo.
   Layout: seven full-height slides; the Earth/Orbit switch re-themes everything.
   Earth = daylight paper and ink. Orbit = cabin at night. Amber is the only accent and means "check". */
:root {
  --bg: #f3f5f2; --surface: #ffffff; --ink: #10201c; --muted: #5a6964; --line: #d5dcd8;
  --accent: #b45f06; --accent-soft: #fbe9d0; --ok: #1f7a5a; --ok-soft: #dcf1e8;
  --band: #cfe3da; --device: #16211e; --screen: #02060b; --screen-ink: #eaf3ef;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1); --t: 700ms var(--ease);
}
[data-mode="orbit"] {
  --bg: #070d14; --surface: #0f1822; --ink: #e9eef4; --muted: #93a1b2; --line: #223041;
  --accent: #ffb347; --accent-soft: #3a2a10; --ok: #5fd3a6; --ok-soft: #10382c;
  --band: #173246; --device: #1d2835;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); transition: background var(--t), color var(--t); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.8rem); line-height: 1.01; letter-spacing: -.038em; font-weight: 650; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3.9vw, 3rem); line-height: 1.06; letter-spacing: -.028em; font-weight: 640; text-wrap: balance; }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: max(20px, 4vw); }
.eyebrow, .k, .n, .where, .w-label, .st, .chip, .tag { font: 600 .72rem/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.eyebrow { color: var(--accent); margin-bottom: 14px; }
.fine { color: var(--muted); font-size: .84rem; margin-top: 16px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; margin-top: 22px; }

/* Header */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px max(20px, 4vw);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transition: background var(--t), border-color var(--t); }
.mark { font: 700 1rem var(--mono); letter-spacing: .32em; color: var(--ink); text-decoration: none; }
.chip { padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.switch { display: flex; padding: 3px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.switch button { border: 0; background: none; padding: 7px 16px; border-radius: 99px; font-size: .9rem; color: var(--muted); transition: background .3s, color .3s; }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.btn { border: 0; background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 99px; font-weight: 600; transition: transform .25s var(--ease), box-shadow .25s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--ink) 70%, transparent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 17px 30px; font-size: 1.08rem; background: var(--accent); color: #fff; }
[data-mode="orbit"] .btn-lg { color: #1a1204; }
.btn-lg span { display: inline-block; transition: transform .3s var(--ease); margin-left: 6px; } .btn-lg:hover span { transform: translateX(5px); }
.btn-ghost { border: 1px solid var(--line); background: none; border-radius: 99px; padding: 10px 16px; font-size: .9rem; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; font-size: .95rem; }

/* Slides */
.slide { min-height: calc(100svh - 58px); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(56px, 8vh, 96px); scroll-margin-top: 58px; }
.slide.band { background: var(--surface); border-block: 1px solid var(--line); transition: background var(--t), border-color var(--t); }
.block-head { max-width: 46em; margin-bottom: 36px; min-width: 0; }
.block-head p:last-child:not(.eyebrow) { color: var(--muted); margin-top: 16px; font-size: 1.08rem; }

/* 01 hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero > * { min-width: 0; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.hero-stage { display: grid; justify-items: center; gap: 22px; }
.stage-note { color: var(--muted); font-size: .95rem; max-width: 26em; text-align: center; min-height: 4.4em; }
.watch { position: relative; width: 218px; height: 262px; border-radius: 62px; background: var(--device); padding: 14px;
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08); transition: background var(--t); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1.2deg); } }
.watch::before, .watch::after { content: ""; position: absolute; left: 50%; translate: -50% 0; width: 132px; height: 60px; background: var(--line); z-index: -1; transition: background var(--t); }
.watch::before { top: -44px; border-radius: 18px 18px 0 0; } .watch::after { bottom: -44px; border-radius: 0 0 18px 18px; }
.watch-crown { position: absolute; right: -7px; top: 74px; width: 9px; height: 38px; border-radius: 4px; background: var(--device); }
.watch-screen { height: 100%; border-radius: 50px; background: var(--screen); color: var(--screen-ink); display: grid; align-content: center; justify-items: center; gap: 6px; text-align: center; padding: 14px; }
.w-label { color: #8fa39b; }
.w-value { font-size: 1rem; color: #b9c7c1; } .w-value b { font-size: 3.4rem; line-height: 1; color: #fff; letter-spacing: -.04em; font-weight: 600; }
.w-range { font: .74rem var(--mono); color: #8fa39b; }
.w-verdict { margin-top: 6px; padding: 6px 12px; border-radius: 99px; font-size: .8rem; font-weight: 600; background: #4a2f08; color: #ffc46b; transition: background .5s, color .5s; }
[data-mode="orbit"] .w-verdict { background: #0e3a2c; color: #7be0b6; }

/* 02 problem */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trio article { border-top: 2px solid var(--ink); padding-top: 18px; }
.big { display: block; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 650; letter-spacing: -.04em; line-height: 1; color: var(--accent); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.trio p, .moments p, .layer p { color: var(--muted); font-size: .98rem; margin-top: 8px; }

/* 03 chart */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 3vw, 30px); min-width: 0; transition: background var(--t), border-color var(--t); }
.chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.k { color: var(--muted); display: block; margin-bottom: 4px; } .v { font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .84rem; color: var(--muted); align-items: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot-band { background: var(--band); border-radius: 3px; } .dot-pt { background: var(--muted); } .dot-now { background: var(--accent); }
#chart { width: 100%; height: auto; display: block; max-height: 42vh; }
#chart .band { fill: var(--band); transition: all var(--t); }
#chart .grid { stroke: var(--line); stroke-width: 1; } #chart text { fill: var(--muted); font: 11px var(--mono); }
#chart .pt { fill: var(--muted); transition: cy var(--t), opacity .4s; } #chart .now { fill: var(--accent); }
#chart .now-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .5; transform-origin: center; transform-box: fill-box; animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(.6); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
.day-row { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-items: center; margin-top: 14px; }
.day-row label { font: .84rem var(--mono); color: var(--muted); } .day-row label b { color: var(--ink); }
.day-row input { width: 100%; accent-color: var(--accent); }
.mix { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.mix span { display: block; height: 100%; width: 10%; background: var(--ok); border-radius: 99px; transition: width .35s; }
.mix-label { grid-column: 1 / -1; font-size: .88rem; color: var(--muted); }

/* 04 moments */
.moments { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.moments li { border-top: 2px solid var(--ink); padding-top: 16px; }
.n { color: var(--accent); display: block; margin-bottom: 10px; }
.launch-card { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; padding: clamp(22px, 3.4vw, 36px); border-radius: 24px; background: var(--ink); color: var(--bg); }
.launch-card h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); letter-spacing: -.02em; } .launch-card p { opacity: .72; margin-top: 6px; max-width: 34em; }

/* 05 signals */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters button { border: 1px solid var(--line); background: none; border-radius: 99px; padding: 8px 15px; font-size: .9rem; color: var(--muted); }
.filters button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sig { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface); display: grid; gap: 6px; align-content: start; transition: opacity .35s, transform .35s var(--ease), background var(--t), border-color var(--t); }
.sig:hover { transform: translateY(-3px); }
.sig.off { display: none; }
.sig h3 { font-size: .98rem; } .sig p { font-size: .86rem; color: var(--muted); }
.tag.today { color: var(--ok); } .tag.research { color: var(--accent); } .tag.external { color: var(--muted); }
[data-mode="orbit"] .sig.grav { opacity: .38; } [data-mode="orbit"] .sig.grav h3 { text-decoration: line-through; }

/* 06 layers, 07 status */
.layers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.layer { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: var(--surface); display: flex; flex-direction: column; transition: background var(--t), border-color var(--t), transform .35s var(--ease); }
.layer:hover { transform: translateY(-4px); }
.layer .n { font-size: 1.5rem; letter-spacing: 0; } .where { margin-top: auto; padding-top: 18px; color: var(--muted); }
.offline { margin-top: 22px; padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 14px 14px 0; font-size: .98rem; }
.status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.status ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: .96rem; display: grid; gap: 6px; }
.st { display: inline-block; padding: 6px 11px; border-radius: 99px; }
.st-ok { background: var(--ok-soft); color: var(--ok); } .st-mid { background: var(--accent-soft); color: var(--accent); } .st-no { border: 1px solid var(--line); color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 28px 44px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s, transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ================= GUIDED DEMO ================= */
.xp { position: fixed; inset: 0; z-index: 50; background: var(--bg); color: var(--ink); display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 24px; align-items: center;
  padding: 44px max(20px, 4vw) 24px; overflow: auto; transition: background var(--t), color var(--t); animation: xpIn .5s var(--ease); }
@keyframes xpIn { from { opacity: 0; transform: scale(1.02); } }
.xp-progress { position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--line); } .xp-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s var(--ease); }
.xp-close { position: absolute; top: 14px; right: max(20px, 4vw); border: 0; background: none; color: var(--muted); font: 600 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.coach h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
.coach-body { color: var(--muted); margin-top: 14px; font-size: 1.05rem; min-height: 6.2em; }
.coach-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.coach > * { animation: none; } .coach.swap > :not(.coach-actions):not(.fine) { animation: fade .5s both; }
.stage { display: flex; align-items: center; justify-content: center; gap: 0; min-width: 0; }

/* Watch (sized in em so it scales as one piece) */
.xwatch { font-size: 10px; position: relative; flex: none; width: 20em; height: 24em; border-radius: 5.6em; background: var(--device); padding: 1.3em;
  box-shadow: 0 3em 6em -2.8em rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); transition: background var(--t); }
.xwatch::before, .xwatch::after { content: ""; position: absolute; left: 50%; translate: -50% 0; width: 12.4em; height: 5.4em; background: var(--line); z-index: -1; transition: background var(--t); }
.xwatch::before { top: -4em; border-radius: 1.6em 1.6em 0 0; } .xwatch::after { bottom: -4em; border-radius: 0 0 1.6em 1.6em; }
.xw-crown { position: absolute; right: -.65em; top: 6.6em; width: .85em; height: 3.4em; border-radius: .4em; background: var(--device); }
.xw-screen { height: 100%; border-radius: 4.5em; background: var(--screen); color: var(--screen-ink); display: grid; place-items: center; text-align: center; overflow: hidden; }
.xw-in { display: grid; gap: .55em; justify-items: center; padding: 1.2em; animation: fade .45s both; }
.xw-k { font: 600 1.02em var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #8fa39b; }
.xw-big { font-size: 4.8em; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.xw-s { font-size: 1.3em; color: #c6d3cd; line-height: 1.3; } .xw-s b { color: #fff; }
.xw-pill { font-size: 1.15em; font-weight: 600; padding: .45em .9em; border-radius: 9em; background: #0e3a2c; color: #7be0b6; } .xw-pill.warn { background: #4a2f08; color: #ffc46b; }
.heart { font-size: 2.2em; color: #ff5a6e; animation: beat .9s infinite; } @keyframes beat { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.28); } 36% { transform: scale(1); } }
.wave { width: 15em; height: 3em; } .wave polyline { fill: none; stroke: #ff5a6e; stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 260; animation: wave 1.8s linear infinite; }
@keyframes wave { from { stroke-dashoffset: 260; } to { stroke-dashoffset: -260; } }
.spin { width: 3.4em; height: 3.4em; border-radius: 50%; border: .35em solid #1e2e2a; border-top-color: #7be0b6; animation: spin .9s linear infinite; } @keyframes spin { to { rotate: 360deg; } }
.orbit-ring { width: 6em; height: 6em; border-radius: 50%; border: 1px solid #3b4d63; position: relative; animation: spin 5s linear infinite; }
.orbit-ring::after { content: ""; position: absolute; top: -.4em; left: 50%; width: .8em; height: .8em; margin-left: -.4em; border-radius: 50%; background: #ffb347; }
.xwatch.buzz { animation: buzz .5s 3; } @keyframes buzz { 20% { translate: -3px 0; } 40% { translate: 3px 0; } 60% { translate: -2px 0; } 80% { translate: 2px 0; } }

/* Data link */
.xlink { flex: none; width: clamp(36px, 6vw, 90px); height: 2px; background: var(--line); position: relative; }
.xlink i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); opacity: 0; }
.xlink.on i { animation: packet 1.1s linear infinite; } .xlink.on i:nth-child(2) { animation-delay: .36s; } .xlink.on i:nth-child(3) { animation-delay: .72s; }
@keyframes packet { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }

/* Phone */
.xphone { flex: none; width: 322px; height: min(664px, calc(100svh - 96px)); border-radius: 48px; background: var(--device); padding: 11px; position: relative; display: grid; grid-template-rows: auto 1fr auto;
  box-shadow: 0 40px 80px -36px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.08); transition: background var(--t); }
.notch { position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 88px; height: 25px; border-radius: 99px; background: #000; z-index: 3; }
.ph-status { display: flex; justify-content: space-between; padding: 13px 26px 8px; font: 600 .74rem var(--sans); background: var(--bg); border-radius: 38px 38px 0 0; transition: background var(--t); }
.ph-status span:last-child { font: 600 .62rem var(--mono); letter-spacing: .12em; color: var(--accent); padding-top: 2px; }
.ph-view { position: relative; overflow: hidden; background: var(--bg); transition: background var(--t); }
.ph-tabs { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 10px 8px 16px; font-size: .68rem; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 38px 38px; transition: background var(--t), border-color var(--t); }
.ph-tabs span.on { color: var(--ink); font-weight: 700; }
.scr { position: absolute; inset: 0; padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 11px; overflow-y: auto; transition: transform .6s cubic-bezier(.3,.8,.2,1), opacity .45s; }
.scr.enter { transform: translateX(100%); } .scr.leave { transform: translateX(-30%); opacity: 0; }
.s-k { font: 600 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.s-t { font-size: 1.4rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.12; }
.s-sub { font-size: .88rem; color: var(--muted); }
.splash { margin: auto 0; text-align: center; display: grid; gap: 10px; } .splash .logo { font: 700 1.7rem var(--mono); letter-spacing: .4em; padding-left: .4em; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 12px 14px; display: grid; gap: 9px; font-size: .9rem; transition: background var(--t), border-color var(--t); }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; } .row span:first-child { color: var(--muted); } .row b { font-variant-numeric: tabular-nums; }
.row b.flash { animation: flash 1s; } @keyframes flash { from { color: var(--accent); transform: scale(1.12); } }
.perm { display: flex; justify-content: space-between; color: var(--muted); transition: color .3s; } .perm::after { content: "…"; } .perm.ok { color: var(--ink); } .perm.ok::after { content: "✓"; color: var(--ok); font-weight: 700; }
.cta { margin-top: auto; border: 0; border-radius: 99px; padding: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .95rem; flex: none; }
.hot { animation: hot 1.7s infinite; } @keyframes hot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 75%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.opt { text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 13px 14px; font-size: .95rem; transition: border-color .2s, transform .2s; }
.opt:hover { border-color: var(--ink); transform: translateX(3px); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tile { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 11px 12px; display: grid; gap: 2px; transition: background var(--t), border-color .4s; }
.tile .tl { font: 600 .6rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile .tv { font-size: 1.45rem; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; } .tile .tv small { font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tile .ts { font-size: .7rem; color: var(--muted); } .tile.wait .tv { opacity: .25; } .tile.got { animation: got .7s; } .tile.flag { border-color: var(--accent); } .tile.flag .ts { color: var(--accent); font-weight: 600; }
@keyframes got { from { border-color: var(--ok); transform: scale(1.05); } }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5a6e; margin-right: 5px; animation: beat .9s infinite; }
.pbar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; } .pbar i { display: block; height: 100%; width: 0; background: var(--ok); }
.banner { border-radius: 14px; padding: 11px 13px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: .9rem; animation: fade .5s both; }
.flagcard { border-radius: 16px; padding: 13px 14px; background: var(--accent-soft); display: grid; gap: 4px; font-size: .88rem; animation: fade .6s .3s both; } .flagcard b { color: var(--accent); }
.mini { width: 100%; height: auto; } .mini .mb { fill: var(--band); opacity: 0; animation: fade 1s 2.9s both; } .mini .md { fill: var(--muted); opacity: 0; animation: pop .4s both; } .mini line { stroke: var(--line); }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } } .mini .md { transform-box: fill-box; transform-origin: center; }
.tog { display: flex; justify-content: space-between; align-items: center; } .tog-sw { width: 54px; height: 32px; border-radius: 99px; background: var(--line); position: relative; transition: background .4s; flex: none; }
.tog-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .4s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.3); } .tog-sw.on { background: var(--accent); } .tog-sw.on::after { transform: translateX(22px); }
.exam { display: grid; gap: 8px; }
.exam-row { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 9px 12px; font-size: .84rem; display: grid; gap: 5px; }
.exam-row .top { display: flex; justify-content: space-between; gap: 8px; } .exam-row .src { font: .64rem var(--mono); color: var(--muted); }
.exam-row .val { font-weight: 600; } .exam-row .q { font: .64rem var(--mono); color: var(--ok); text-align: right; } .exam-row .q.warn { color: var(--accent); }
.prog { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; } .prog i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .9s linear; }
.finder { height: 120px; border-radius: 16px; background: #0b1512; position: relative; overflow: hidden; display: grid; place-items: center; flex: none; animation: fade .4s both; }
.finder::before { content: ""; width: 74px; height: 96px; border-radius: 50%; border: 2px dashed #7be0b6; } .finder::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: #7be0b6; box-shadow: 0 0 12px #7be0b6; animation: scan 1.4s ease-in-out infinite alternate; }
@keyframes scan { from { top: 10%; } to { top: 90%; } } .finder span { position: absolute; bottom: 6px; font: .62rem var(--mono); color: #7be0b6; letter-spacing: .08em; }
.cause { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; display: grid; gap: 5px; font-size: .84rem; }
.cause b { font-size: .94rem; } .cause .why { color: var(--muted); } .cause .srcline { font: .64rem var(--mono); color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; } .meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; width: 0; transition: width .9s var(--ease); }
.next { border-radius: 14px; padding: 11px 12px; background: var(--accent-soft); font-size: .86rem; } .next b { display: block; color: var(--accent); font: 600 .64rem var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.bub { max-width: 88%; padding: 10px 13px; border-radius: 18px; font-size: .9rem; animation: fade .4s both; } .bub.me { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; }
.bub.ai { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; min-height: 2.6em; } .bub.ai sup { color: var(--accent); font-weight: 700; }
.cites { display: grid; gap: 6px; } .cite { font: .66rem var(--mono); color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 7px 9px; animation: fade .5s both; } .cite b { color: var(--accent); }
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl-list li { position: relative; padding: 0 0 14px 24px; font-size: .88rem; opacity: 0; animation: fade .5s both; } .tl-list li small { display: block; color: var(--muted); font-size: .74rem; }
.tl-list li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); } .tl-list li.pend::before { background: none; border: 2px solid var(--accent); }
.tl-list li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); } .tl-list li:last-child::after { display: none; }
.fade { animation: fade .45s both; } @keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; } .trio, .moments, .status { grid-template-columns: 1fr; } .layers { grid-template-columns: 1fr 1fr; }
  .chip-quiet, .bar .switch { display: none; }
  .xp { grid-template-columns: 1fr; align-items: start; gap: 14px; padding-top: 40px; }
  .coach h2 { font-size: 1.35rem; } .coach-body { font-size: .92rem; min-height: 0; margin-top: 8px; } .coach-actions { margin-top: 12px; } .coach .fine { display: none; }
  .xwatch { font-size: 5.2px; margin-right: -14px; z-index: 2; align-self: flex-start; margin-top: 30px; } .xlink { display: none; }
  .xphone { width: 286px; height: 560px; }
}
@media (max-width: 520px) { .layers { grid-template-columns: 1fr; } body { font-size: 16px; } .btn-sm { padding: 8px 13px; } }
@media (max-width: 520px) {
  .xp-close, .xp-restart { min-height: 44px; top: 6px; }
}
@media (max-width: 900px) {
  .xp { height: 100dvh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; align-items: stretch; padding: calc(54px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(76px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow: hidden; }
  .coach { min-width: 0; }
  .coach .eyebrow { margin-bottom: 6px; }
  .coach h2 { font-size: 1.3rem; line-height: 1.15; }
  .coach-body { font-size: .92rem; line-height: 1.4; margin-top: 8px; min-height: 0; }
  .coach-actions { position: fixed; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); margin: 0; z-index: 10; }
  .coach-actions .btn { width: 100%; min-height: 48px; font-size: 1rem; }
  .stage { container-type: size; min-height: 0; height: 100%; flex-direction: row; gap: 10px; padding: 0; align-items: center; }
  .xwatch { margin: 0; align-self: center; }
  .xp-close, .xp-restart { top: max(4px, env(safe-area-inset-top)); min-height: 44px; }
  .xp-close { right: max(16px, env(safe-area-inset-right)); }
  .xp-restart { left: max(16px, env(safe-area-inset-left)); right: auto !important; }
}
@media (max-width: 900px) and (max-height: 560px) and (orientation: landscape) {
  .xp { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: minmax(0, 1fr); gap: 20px; padding-top: 50px; padding-bottom: 70px; }
  .coach { align-self: center; max-height: 100%; overflow-y: auto; }
  .coach-actions { right: 54%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; }
}

/* Fixes after visual check */
.scr > * { flex-shrink: 0; }
.watch { margin-block: 48px; }

/* Guided demo: 16-measure list, baseline line, small restart link */
.mlist { gap: 2px; padding: 9px 12px; font-size: .74rem; }
.mlist .row.off span:first-child, .mlist .row.off b { opacity: .38; }
.mini .mp { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: 0; animation: fade 1s 2.7s both; }
.xp-restart { position: absolute; top: 14px; right: calc(max(20px, 4vw) + 230px); border: 0; background: none; color: var(--muted); font: 600 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* Guided demo: flagged measures, pairing list, guided photo */
.mlist .row.out span:first-child, .mlist .row.out b { color: var(--accent); font-weight: 600; }
.mlist .perm { font-size: .78rem; }
.mlist .row b { text-align: right; }
.finder.big { height: 190px; margin-top: 4px; } .finder.big::before { width: 104px; height: 138px; }
.finder.done::after { animation: none; opacity: 0; } .finder.done::before { border-style: solid; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; flex: none; }
.cmp div { height: 170px; border-radius: 14px; background: #0b1512; position: relative; display: grid; place-items: center; overflow: hidden; }
.cmp div::before { content: ""; width: 78px; height: 104px; border-radius: 50%; background: #2a3b35; }
.cmp div:last-child::before { width: 84px; background: #33473f; }
.cmp span { position: absolute; bottom: 7px; font: .56rem var(--mono); color: #7be0b6; letter-spacing: .06em; }
