:root {
  --bg: #08070a;
  --card: rgba(24, 20, 27, 0.8);
  --card-2: rgba(32, 27, 36, 0.86);
  --line: rgba(255, 255, 255, 0.075);
  --text: #f5f1f4;
  --muted: #a39ca6;
  --dim: #9d96a3;
  --ember: #ff6a3d;
  --ember-soft: rgba(255, 106, 61, 0.42);
  --gold: #ffc24a;
  --cool: #6fd3ff;
  --heat: linear-gradient(180deg, #fff4c8 0%, #ffc24a 16%, #ff7a1f 34%, #e0245e 56%, #7a1fa2 78%, #24104f 100%);
  --r-lg: 24px;
  --r-md: 18px;
  --font: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --t-label: 0.8125rem;   /* 13px */
  --t-body: 0.875rem;     /* 14px */
  --t-h: clamp(0.875rem, 0.6rem + 0.35vw, 1rem);
  --t-big: clamp(1.75rem, 1rem + 1.1vw, 2.25rem);
  --t-display: clamp(2.5rem, 1.2rem + 2.6vw, 3.75rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 300; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h2, p, dl, dd, figure { margin: 0; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 12px; }

/* ---------- stage (desktop composition) ---------- */
.stage {
  position: relative;
  width: 100%;
  height: max(100svh, 860px);
  min-height: 860px;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 55% 42%, rgba(80, 30, 70, 0.22), transparent 70%),
    radial-gradient(40% 40% at 8% 90%, rgba(255, 106, 61, 0.07), transparent 70%),
    var(--bg);
  isolation: isolate;
  --g: 12px;            /* one gap for every card edge in the bottom band */
  --band-l: 30.4%;      /* bottom band: timeline + metabolic + gradient + symmetry */
  --band-w: 44.2%;
  --band-bottom: 97%;   /* every bottom card ends on this line */
  --band-top: calc(var(--band-bottom) - max(17.6%, 158px));
  --cfg-top: calc(var(--band-bottom) - max(21.2%, 200px));
  --side: max(140px, calc((var(--band-w) - 20.6% - 2 * var(--g)) / 2));
}
.stage::after { /* sensor grain */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .32; mix-blend-mode: soft-light;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.stage > * { position: absolute; z-index: 2; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 20px 40px -20px rgba(0,0,0,.7);
  --pad: clamp(14px, 1.3vw, 20px);
  padding: var(--pad);
  overflow: hidden;
}
.card h2 { font-size: var(--t-h); font-weight: 400; letter-spacing: -.005em; line-height: 1.2; }
.ic-title { display: flex; align-items: center; gap: 10px; }
.hi { width: 20px; height: 20px; color: var(--text); }
.big { font-size: var(--t-big); font-weight: 200; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: var(--t-label); font-weight: 300; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.more { position: absolute; top: calc(var(--pad) - 3px); right: calc(var(--pad) - 6px); width: 28px; height: 24px; display: flex; gap: 3px; align-items: center; justify-content: center; border-radius: 8px; }
.more i { width: 3px; height: 3px; border-radius: 50%; background: var(--text); }
.more:hover { background: rgba(255,255,255,.06); }
.arrow { position: absolute; top: calc(var(--pad) - 8px); right: calc(var(--pad) - 8px); width: 34px; height: 34px; display: grid; place-items: center; }
.arrow svg { width: 18px; height: 18px; position: relative; }
.arrow::before { content: ""; position: absolute; inset: -18px -22px -26px -14px; background: radial-gradient(closest-side, var(--ember-soft), transparent); filter: blur(6px); }
.unit-ic { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-label); color: var(--muted); }
.unit-ic svg { width: 18px; height: 18px; color: var(--text); }
.tag { display: inline-flex; align-items: center; height: 36px; padding: 0 18px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); font-size: var(--t-body); }
.tag.sm { height: 32px; padding: 0 14px; font-size: var(--t-label); }

/* 1 brand */
.brand { left: 2.4%; top: 3.6%; display: flex; gap: 10px; align-items: center; }
.logo { width: 48px; height: 48px; border-radius: 15px; background: rgba(255,255,255,.07); border: 1px solid var(--line); position: relative; backdrop-filter: blur(10px); }
.logo i { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.78); top: 11px; left: 11px; }
.logo i + i { top: 18px; left: 17px; background: rgba(255,214,190,.5); }
.crumb { height: 44px; display: flex; align-items: center; padding: 0 20px 0 16px; border-radius: 999px; background: rgba(255,255,255,.055); border: 1px solid var(--line); font-size: var(--t-label); color: var(--text); }
.crumb .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); margin-right: 12px; }
.muted-i { color: var(--muted); font-style: italic; }

/* 2 title */
.title { left: 3.2%; top: 14.2%; }
.display { font-size: var(--t-display); font-weight: 300; line-height: 1.02; letter-spacing: -.025em; }
.date { margin-top: 18px; font-size: var(--t-body); color: var(--muted); }

/* 3 tools */
.tools { left: 10.6%; top: 42%; display: grid; grid-template-columns: repeat(2, 46px); gap: 8px; }
.tool { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.055); border: 1px solid var(--line); transition: background .2s; }
.tool svg { width: 20px; height: 20px; }
.tool:hover { background: rgba(255,255,255,.1); }
.tool[aria-pressed="true"] { background: var(--ember); color: #1a0a05; border-color: transparent; box-shadow: 0 8px 26px -8px rgba(255,106,61,.7); }

/* 4 top nav */
.topnav { left: 40.4%; top: 5.2%; display: flex; gap: 8px; align-items: center; }
.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(20,16,22,.6); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.round svg { width: 18px; height: 18px; }
.corner { right: 2.4%; top: 6%; left: auto; }
.tabs { display: flex; gap: 8px; align-items: center; }
.tab { height: 44px; padding: 0 20px; border-radius: 999px; font-size: var(--t-label); color: var(--muted); background: rgba(20,16,22,.84); border: 1px solid var(--line); backdrop-filter: blur(12px); transition: color .2s, background .2s; }
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { color: var(--text); background: #3a3239; border-color: rgba(255,255,255,.16); }
.tab-pair { display: inline-flex; border-radius: 999px; background: rgba(20,16,22,.86); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.tab-pair .tab { background: none; border: 0; backdrop-filter: none; }
.tab-pair .bright { color: var(--text); }
.tab-pair .tab[aria-pressed="true"] { background: #3a3239; }

/* 5 face */
.face { left: 0; top: 0; width: 100%; height: 100%; margin: 0; z-index: 1; overflow: hidden; container-type: size; }
/* cover box: keeps the 4:3 scan filling the stage while overlays stay pinned to the face */
.face-in { position: absolute; left: 57%; top: 0; height: 85cqh; aspect-ratio: 4 / 3; transform: translateX(-58%); }
/* anonymous dark figure; only the face relief carries heat color (both layers live in one image) */
.face-in > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, #000 76%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, #000 76%, transparent); mask-composite: intersect; }
.face-in > .heat { filter: saturate(.95) brightness(.92); transition: filter .6s ease; }
.face::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8,7,10,.55), transparent 32%), linear-gradient(0deg, rgba(8,7,10,.6), transparent 30%); }
.stage[data-palette="arctic"] .face-in > .heat { filter: hue-rotate(185deg) saturate(1.15) brightness(1.02); }
.stage[data-palette="white"] .face-in > .heat { filter: grayscale(1) contrast(1.15) brightness(1.05); }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.lines path { stroke: rgba(255,255,255,.62); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lines .lead { stroke: rgba(255,255,255,.8); }
.mk { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -50%); border: 1.5px dotted rgba(255,255,255,.85); border-radius: 3px; background: rgba(255,255,255,.06); }
.mk.sm { width: 22px; height: 22px; }
.mk.hot { border-color: #fff2c0; box-shadow: 0 0 18px rgba(255,194,74,.55); }
.mk[data-t]::after { content: attr(data-t); position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); padding: 3px 7px; border-radius: 999px; background: rgba(12,9,14,.78); font-size: 12px; font-weight: 400; color: var(--text); white-space: nowrap; }
.pt { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); box-shadow: 0 0 8px #fff; }
.node { position: absolute; width: 30px; height: 30px; border-radius: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.node svg { width: 14px; height: 14px; }
.matrix { position: absolute; width: 24%; height: 15%; background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.4px); background-size: 7px 7px; -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent); }
.mapped { position: absolute; transform: translate(-50%,-50%); display: flex; gap: 8px; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(14,10,16,.62); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(10px); font-size: var(--t-label); white-space: nowrap; }
.mapped b { font-weight: 400; display: inline-block; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--gold); border-left-color: var(--gold); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* heat scale (added detail) */
.scale { left: 31.6%; top: 13.5%; height: 24%; width: 60px; display: grid; grid-template-rows: auto 1fr auto 1fr auto auto; justify-items: start; padding-left: 18px; font-size: 12px; color: var(--text); }
.scale .bar { position: absolute; left: 0; top: 4px; bottom: 26px; width: 6px; border-radius: 6px; background: var(--heat); box-shadow: 0 0 16px rgba(255,122,31,.35); transition: background .4s; }
.scale > span { padding: 1px 6px; margin-left: -6px; border-radius: 999px; background: rgba(8,7,10,.6); }
.scale em { font-style: normal; color: var(--text); margin-top: 8px; white-space: nowrap; padding: 2px 8px; margin-left: -8px; border-radius: 999px; background: rgba(8,7,10,.72); }
.stage[data-palette="arctic"] .scale .bar { background: linear-gradient(180deg, #e9fbff, #6fd3ff 30%, #2a7bd6 60%, #18245e); }
.stage[data-palette="white"] .scale .bar { background: linear-gradient(180deg, #fff, #8a8a8a 55%, #161616); }

.hemo { left: 85.2%; top: 55.6%; text-shadow: 0 1px 8px rgba(0,0,0,.8); display: flex; flex-direction: column; gap: 3px; font-size: var(--t-body); padding-left: 12px; border-left: 1.5px solid #fff; }
.hemo small { font-size: var(--t-label); color: var(--muted); }

/* 7 pulse */
.c-pulse { left: 21.2%; top: 43.4%; width: 19.4%; min-width: 220px; height: 12.6%; min-height: 118px; }
.c-pulse .unit-ic, .c-breath .unit-ic { position: absolute; left: var(--pad); bottom: var(--pad); }
.c-pulse .big, .c-breath .big { position: absolute; right: var(--pad); bottom: calc(var(--pad) - 2px); }
/* 8 breathing */
.c-breath { left: 69.4%; top: 26%; width: 14%; min-width: 170px; height: 13%; min-height: 124px; }

/* 9 signal */
.c-signal { left: 84.4%; top: 23.2%; width: 14.4%; min-width: 190px; height: 28.6%; min-height: 268px; }
.chip-ic { width: 24px; height: 24px; border-radius: 7px; background: #fff; color: #120c10; display: grid; place-items: center; }
.chip-ic svg { width: 16px; height: 16px; stroke-width: 1.8; }
.wave { position: absolute; left: 0; right: -14px; top: 20%; width: calc(100% + 14px); height: 38%; overflow: visible; }
.wave .dots { stroke: rgba(255,255,255,.8); stroke-width: 2.6; stroke-dasharray: 0.1 7; }
.wave .solid { stroke: url(#hot); stroke-width: 2.4; }
.wave .mark { stroke: rgba(255,255,255,.7); stroke-dasharray: 3 4; }
.wave .knob { fill: rgba(255,255,255,.22); stroke: rgba(255,255,255,.55); stroke-width: 1; }
.wave .hotk { fill: #fff; stroke: none; }
.w-delta { position: absolute; left: 66%; top: 21%; font-size: 12px; color: var(--muted); }
.w-cap { position: absolute; left: var(--pad); top: 55%; font-size: 12px; color: var(--muted); }
.w-formula { position: absolute; right: var(--pad); top: 61%; font-size: 12px; color: var(--muted); font-style: italic; }
.stats { position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 6px; }
.stats dt { font-size: 12px; color: var(--muted); margin-bottom: 6px; white-space: nowrap; }
.stats dd { display: flex; align-items: baseline; font-size: clamp(1.4rem, .9rem + .8vw, 1.85rem); font-weight: 200; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats small { font-size: 12px; color: var(--muted); margin-left: 3px; font-weight: 300; }

/* 10 thermal load */
.c-load { left: 1.4%; top: calc(var(--band-bottom) - max(30.8%, 284px)); width: calc(var(--band-l) - 1.4% - var(--g)); min-width: 320px; height: max(30.8%, 284px);
  background: radial-gradient(90% 70% at 30% 100%, rgba(255,106,61,.16), transparent 70%), linear-gradient(160deg, rgba(40,30,38,.9), rgba(18,15,20,.86)); }
.c-load::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -6px; height: 10px; border-radius: 10px; background: linear-gradient(90deg, transparent, rgba(255,106,61,.55), transparent); filter: blur(4px); }
.trio { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 18px; font-size: var(--t-label); }
.trio dt { color: var(--muted); margin-bottom: 3px; font-size: 12px; }
.trio dd { font-size: var(--t-body); font-weight: 400; }
.trio .mid { padding-top: 14px; text-align: center; } .trio .right { padding-top: 34px; text-align: right; }
.gauge { position: absolute; left: 7%; right: 7%; bottom: 46px; aspect-ratio: 300 / 160; max-height: 58%; margin: 0 auto; }
.gauge svg { width: 100%; height: 100%; }
.g-dots { stroke: rgba(255,255,255,.55); stroke-width: 2.4; stroke-dasharray: 0.1 12; }
.g-solid { stroke: #fff; stroke-width: 2.2; }
.g-k { fill: rgba(255,255,255,.4); stroke: none; } .g-k.dim { fill: rgba(255,255,255,.22); }
.pill-btn { position: absolute; left: 50%; top: 58%; transform: translate(-50%,-50%); height: 40px; padding: 0 20px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.3); font-size: var(--t-body); white-space: nowrap; transition: background .2s; }
.pill-btn:hover { background: rgba(255,255,255,.12); }
.g-labels { position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); display: flex; justify-content: space-between; font-size: var(--t-label); }
.g-labels span:nth-child(2) { transform: translateY(-8px); }
.dim { color: var(--dim); }

/* 11 timeline */
.timeline { left: var(--band-l); top: calc(var(--band-top) - var(--g) - 70px); width: var(--band-w); height: 70px;
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; grid-template-rows: 16px 30px; grid-template-areas: "label label code speedl" "play track track speed";
  column-gap: 14px; row-gap: 6px; align-items: center; padding: 8px 14px 10px; border-radius: 18px; background: rgba(10,8,12,.62); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.t-label { grid-area: label; font-size: 12px; line-height: 16px; color: var(--muted); }
.t-track { grid-area: track; position: relative; height: 3px; margin: 0 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
.t-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 63.6%; border-radius: 3px; background: linear-gradient(90deg, rgba(255,255,255,.3), var(--ember)); }
.t-dot { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); }
.t-dot.ember { background: var(--ember); }
.t-head { position: absolute; top: 50%; left: 63.6%; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); transform: translate(-50%,-50%); box-shadow: 0 0 12px var(--gold); }
.t-play { grid-area: play; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); transition: background .2s; }
.t-play:hover { background: rgba(255,255,255,.14); }
.t-play svg { width: 14px; height: 14px; }
.t-play .ico-play { display: none; fill: currentColor; }
.t-play[aria-pressed="false"] .ico-play { display: block; } .t-play[aria-pressed="false"] .ico-pause { display: none; }
.t-code { grid-area: code; justify-self: end; font-size: 12px; line-height: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.t-speed-l { grid-area: speedl; justify-self: end; font-size: 12px; line-height: 16px; color: var(--muted); }
.t-speed { grid-area: speed; justify-self: end; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(255,255,255,.05); }
.t-speed button { min-width: 30px; height: 26px; border-radius: 8px; font-size: 12px; color: var(--muted); transition: color .2s, background .2s; }
.t-speed button:hover { color: var(--text); }
.t-speed button[aria-pressed="true"] { color: #140c08; background: #fff; }

/* 12 metabolic */
.c-meta { left: var(--band-l); top: var(--band-top); width: calc(var(--band-w) - 2 * var(--side) - 2 * var(--g)); height: calc(var(--band-bottom) - var(--band-top)); }
.ribbon { position: absolute; left: -30%; top: -60%; width: 90%; height: 160%; border-radius: 50%; border: 18px solid rgba(255,106,61,.2); filter: blur(10px); transform: rotate(-24deg); pointer-events: none; }
.c-meta .tag { position: absolute; left: var(--pad); top: calc(var(--pad) + 30px); height: 32px; }
.ticks { position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--pad) + 40px); height: 26px; display: flex; align-items: flex-end; justify-content: space-between; }
.tick-dots { position: absolute; left: 0; right: 0; bottom: 30px; height: 0; }
.tick-dots i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; transform: translateX(-50%); }
.tick-dots i.e { background: var(--ember); box-shadow: 0 0 8px var(--ember); } .tick-dots i.r { background: none; border: 1.5px solid var(--ember); }
.ticks i { width: 1.5px; border-radius: 2px; background: rgba(255,255,255,.75); }
.ticks i.peak { background: var(--gold); }
.c-meta .big.left { position: absolute; left: var(--pad); bottom: calc(var(--pad) - 2px); }

/* 13 skin gradient */
.c-grad, .c-sym { --pad: 14px; top: var(--band-top); width: var(--side); height: max(94px, calc(var(--band-bottom) - var(--band-top) - 52px - var(--g))); }
.c-grad { left: calc(var(--band-l) + var(--band-w) - 2 * var(--side) - var(--g)); display: flex; flex-direction: column; }
.muted-h { color: var(--muted); font-size: var(--t-label) !important; }
.strong { font-size: var(--t-body); font-weight: 400; margin-top: 2px; }
.dtrack { display: flex; gap: 9px; align-items: center; margin-top: auto; }
.dtrack i { width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.dtrack i.dim { background: rgba(255,255,255,.35); }
.dtrack i.ring { background: none; border: 1.5px solid #fff; width: 8px; height: 8px; }

/* 14 symmetry */
.c-sym { left: calc(var(--band-l) + var(--band-w) - var(--side)); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.glowtop::before { content: ""; position: absolute; left: 30%; top: -40%; width: 70%; height: 80%; background: radial-gradient(closest-side, rgba(255,106,61,.38), transparent); filter: blur(8px); pointer-events: none; }
.c-sym .big.l { display: flex; flex-direction: column; gap: 4px; }
.c-sym .big.l small { margin: 0; }
.c-sym .big.l .n small { margin-left: 2px; }
.c-sym .big.l > small { white-space: nowrap; }
.radar { flex: none; width: 44px; height: 44px; position: relative; color: rgba(255,255,255,.8); }
.radar circle { stroke-width: 1; }

/* 16 dock */
.dock { left: calc(var(--band-l) + var(--band-w) - var(--side) - var(--g) / 2); top: calc(var(--band-top) + max(94px, calc(var(--band-bottom) - var(--band-top) - 52px - var(--g))) + var(--g)); display: flex; align-items: center; transform: translateX(-50%); z-index: 4; }
.scan { white-space: nowrap; height: 52px; padding: 0 26px 0 20px; display: flex; gap: 12px; align-items: center; border-radius: 999px; background: #050406; border: 1px solid rgba(255,255,255,.1); font-size: var(--t-body); font-weight: 400; box-shadow: 0 18px 40px -12px rgba(0,0,0,.9); position: relative; z-index: 2; }
.ring-ic { width: 18px; height: 18px; border-radius: 50%; border: 2px dotted #fff; }
.stage.scanning .ring-ic { animation: spin 2s linear infinite; border-color: var(--gold); }
.seg { margin-left: -14px; height: 48px; padding: 0 12px 0 22px; display: flex; gap: 6px; align-items: center; border-radius: 0 999px 999px 0; background: linear-gradient(90deg, #8c8590, #5c5560); }
.sun { width: 40px; height: 40px; border-radius: 50%; background: #050406; display: grid; place-items: center; }
.sun svg { width: 18px; height: 18px; }
.sun[aria-pressed="true"] { background: var(--ember); color: #160905; }
.grid-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.grid-ic svg { width: 20px; height: 20px; fill: #fff; stroke: none; }

/* 17 core temp */
.core { left: 79.6%; top: calc(var(--cfg-top) - 20px - 82px); width: 18.8%; display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: center; }
.core .big { font-size: var(--t-big); grid-column: 1; text-align: right; }
.core .cap { grid-column: 1; text-align: right; font-size: var(--t-label); color: var(--muted); margin-top: 4px; }
.orb-tile { grid-column: 2; grid-row: 1 / span 2; width: 82px; height: 82px; border-radius: 22px; background: var(--card-2); border: 1px solid var(--line); position: relative; display: grid; place-items: center; overflow: hidden; }
.orb { position: absolute; width: 62px; height: 62px; border-radius: 50%; background: conic-gradient(from 200deg, #ffc24a, #ff6a3d, #e0245e, transparent 70%, #ffc24a); -webkit-mask: radial-gradient(closest-side, transparent 68%, #000 72%, #000 92%, transparent 100%); mask: radial-gradient(closest-side, transparent 68%, #000 72%, #000 92%, transparent 100%); filter: drop-shadow(0 0 6px rgba(255,140,60,.9)); animation: spin 6s linear infinite; }
.orb-l { position: relative; font-size: 12px; font-weight: 400; }

/* 18 config */
.c-cfg { left: calc(var(--band-l) + var(--band-w) + var(--g)); top: var(--cfg-top); width: calc(98.6% - var(--band-l) - var(--band-w) - var(--g)); min-width: 280px; height: calc(var(--band-bottom) - var(--cfg-top)); display: flex; flex-direction: column; gap: 6px; }
.c-cfg h2 { margin-bottom: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; font-size: var(--t-label); }
.caps { margin-left: auto; color: var(--muted); letter-spacing: .06em; font-size: 12px; }
.step { display: flex; flex-direction: column; gap: 4px; } .step i { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.row.hl { margin-left: -6px; }
.pillrow { display: inline-flex; align-items: center; gap: 22px; height: 36px; padding: 0 12px; border-radius: 14px; background: rgba(255,255,255,.1); }
.pillrow i { width: 2px; height: 14px; background: #fff; border-radius: 2px; }
.sd { display: flex; gap: 12px; } .sd i { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.val { font-weight: 400; }
.pal { display: flex; gap: 6px; }
.pal button { width: 34px; height: 24px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); }
.pal [data-p="ironbow"] { background: linear-gradient(90deg, #24104f, #e0245e, #ff7a1f, #fff4c8); }
.pal [data-p="arctic"] { background: linear-gradient(90deg, #18245e, #2a7bd6, #6fd3ff, #e9fbff); }
.pal [data-p="white"] { background: linear-gradient(90deg, #111, #888, #fff); }
.pal [aria-checked="true"] { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- reflow: tablets in portrait, phones, short laptops ---------- */
/* overlay layout fit at its smallest card sizes (1240-1365 px wide, 680-900 px tall) */
@media (min-width: 1240px) and (min-height: 680px) {
  /* the Thermal Pulse card bottoms out at 190px wide: shrink its three readings with the viewport below 1366px */
  .stats dd { font-size: max(1.3rem, min(clamp(1.4rem, .9rem + .8vw, 1.85rem), calc(3.84vw - 27px))); }
  /* when Thermal Load sits at its 284px floor, the gauge shrinks so its arc stays clear of the readings above it */
  .gauge { max-height: min(58%, calc((100% - 168px) / .85)); }
}
@media (max-width: 1239px), (max-height: 679px) {
  .stage { height: auto; min-height: 100svh; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); align-content: start; }
  .stage > *:not(.sr-only) { position: relative; left: auto !important; top: auto !important; right: auto !important; width: auto !important; height: auto !important; min-width: 0 !important; transform: none; }
  .brand { grid-column: 1 / -1; }
  .stage > .corner { position: absolute !important; top: 22px !important; right: 16px !important; width: 46px !important; height: 46px !important; }
  .title { grid-column: 1 / -1; margin-top: 8px; }
  .topnav { grid-column: 1 / -1; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .tools { grid-column: 1 / -1; grid-template-columns: repeat(4, 46px); }
  .stage > .face { grid-column: 1 / -1; width: calc(100% + 32px) !important; margin: 0 -16px; aspect-ratio: 1 / 1; max-height: 720px; justify-self: center; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 14%, #000 82%, transparent); }
  .face::after { display: none; }
  .face-in { left: 50%; height: 100cqh; transform: translateX(-58%); }
  .face-in > .mapped { left: 77% !important; top: 68% !important; }
  .scale { grid-column: 1 / -1; display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; padding-left: 0; }
  .scale i { display: none; }
  .scale .bar { position: static; width: 120px; height: 6px; order: 0; background: linear-gradient(270deg, #fff4c8 0%, #ffc24a 16%, #ff7a1f 34%, #e0245e 56%, #7a1fa2 78%, #24104f 100%); }
  .scale em { margin: 0; order: -1; }
  .hemo { grid-column: 1 / -1; }
  .card { min-height: 128px; }
  .c-pulse, .c-breath { min-height: 130px !important; }
  .c-signal { grid-column: 1 / -1; min-height: 270px !important; }
  .c-load { grid-column: 1 / -1; min-height: 300px !important; }
  .timeline { grid-column: 1 / -1; min-height: 64px !important; }
  .c-meta { grid-column: 1 / -1; min-height: 170px !important; }
  .c-grad, .c-sym { min-height: 96px !important; }
    .core { grid-column: 1 / -1; justify-content: start; }
  .core .big, .core .cap { text-align: left; }
  .c-cfg { grid-column: 1 / -1; }
  .stage > .dock { position: fixed !important; left: 50% !important; top: auto !important; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%) !important; z-index: 10; }
}
@media (max-width: 1239px) and (min-width: 700px) {
  .stage { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stage > .face { grid-column: 1 / -1; aspect-ratio: 16 / 11; }
  .c-pulse, .c-breath, .c-grad, .c-sym { grid-column: span 2; }
}
@media (max-width: 699px) {
  .timeline { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-rows: 16px 30px 30px; grid-template-areas: "label label code" "play track track" "speedl speedl speed"; }
  .t-speed-l { justify-self: start; }
}
@media (max-width: 380px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .stats dd { font-size: 1.35rem; }
}


/* ---------- motion: entrance choreography (html.intro is set only without reduced motion) ---------- */
.ln { display: block; overflow: hidden; padding: 0 .06em .18em; margin: 0 -.06em -.18em; }
.ln > span { display: inline-block; }
.g-solid { stroke-dasharray: 1; }
.face-in > .mk { transition: border-color .6s var(--ease-out), background-color .6s var(--ease-out); }
.mk[data-t]::after { transition: opacity .5s var(--ease-out), translate .5s var(--ease-out); }
.face-in > .mk.seek { border-color: rgba(255,194,74,.95); background-color: rgba(255,194,74,.1); }
.face-in > .mk.seek::after { opacity: 0; translate: 0 6px; }
.intro .face-in > .mk.lock, .face-in > .mk.lock { animation: lock .9s var(--ease-out); }
.stage.live .matrix { animation: matrix-live 6s linear infinite; }
.stage.tracking .matrix { animation: matrix-drift 2.8s var(--ease-io) both; }
.stage.paused .matrix, .stage.paused .mapped .spin { animation-play-state: paused; }

@keyframes face-in { from { opacity: 0; scale: 1.05; } }
@keyframes in-rise { from { opacity: 0; translate: 0 18px; filter: blur(8px); } to { opacity: 1; translate: 0 0; filter: none; } }
@keyframes in-left { from { opacity: 0; translate: -18px 0; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: none; } }
@keyframes in-down { from { opacity: 0; translate: 0 -14px; } }
@keyframes in-fade { from { opacity: 0; } }
@keyframes in-line { from { translate: 0 110%; } }
@keyframes in-pop { 0% { opacity: 0; scale: .55; } 60% { opacity: 1; scale: 1.08; } 100% { opacity: 1; scale: 1; } }
@keyframes in-grow-y { from { scale: 1 0; } }
@keyframes in-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes in-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes in-spin { from { opacity: 0; rotate: -120deg; scale: .6; } }
@keyframes matrix-drift { from { background-position: 21px 14px; opacity: .35; } 50% { opacity: 1; } to { background-position: 0 0; opacity: 1; } }
@keyframes matrix-live { 0% { background-position: 0 0; opacity: 1; } 50% { opacity: .55; } 100% { background-position: 14px 7px; opacity: 1; } }
@keyframes lock { from { box-shadow: 0 0 0 0 rgba(255,194,74,.7); } to { box-shadow: 0 0 0 16px rgba(255,194,74,0); } }

.intro .face-in > .heat { animation: face-in 2s var(--ease-out) both; }
.intro .brand { animation: in-left .9s var(--ease-out) 120ms both; }
.intro .topnav .round { animation: in-down .8s var(--ease-out) 220ms both; }
.intro .tabs > :nth-child(1) { animation: in-down .8s var(--ease-out) 280ms both; }
.intro .tabs > :nth-child(2) { animation: in-down .8s var(--ease-out) 340ms both; }
.intro .tabs > :nth-child(3) { animation: in-down .8s var(--ease-out) 400ms both; }
.intro .corner { animation: in-down .8s var(--ease-out) 460ms both; }
.intro .ln > span { animation: in-line 1.1s var(--ease-out) 260ms both; }
.intro .ln + .ln > span { animation-delay: 370ms; }
.intro .date { animation: in-rise .9s var(--ease-out) 620ms both; }
.intro .tools .tool { animation: in-pop .7s var(--ease-out) both; }
.intro .tools .tool:nth-child(1) { animation-delay: 540ms; } .intro .tools .tool:nth-child(2) { animation-delay: 600ms; }
.intro .tools .tool:nth-child(3) { animation-delay: 660ms; } .intro .tools .tool:nth-child(4) { animation-delay: 720ms; }
.scale .bar { transform-origin: 50% 100%; }
.intro .scale .bar { animation: in-grow-y 1.2s var(--ease-out) 600ms both; }
.intro .scale > span, .intro .scale em { animation: in-fade .7s var(--ease-out) both; }
.intro .scale > span:nth-of-type(1) { animation-delay: 1250ms; } .intro .scale > span:nth-of-type(2) { animation-delay: 1050ms; }
.intro .scale > span:nth-of-type(3) { animation-delay: 850ms; } .intro .scale em { animation-delay: 1400ms; }
.intro .hemo { animation: in-left .9s var(--ease-out) 1650ms both; }

/* cards rise with a short blur, staggered left to right along the reading path */
.intro :is(.c-pulse, .c-breath, .c-signal, .c-load, .timeline, .c-meta, .c-grad, .c-sym, .c-cfg, .core, .dock) { animation: in-rise 1s var(--ease-out) both; }
.intro .c-pulse { animation-delay: 700ms; } .intro .c-load { animation-delay: 780ms; } .intro .c-breath { animation-delay: 840ms; }
.intro .c-signal { animation-delay: 920ms; } .intro .timeline { animation-delay: 1000ms; } .intro .c-meta { animation-delay: 1080ms; }
.intro .c-grad { animation-delay: 1160ms; } .intro .c-cfg { animation-delay: 1200ms; } .intro .c-sym { animation-delay: 1240ms; }
.intro .core { animation-delay: 1320ms; } .intro .dock { animation-delay: 1480ms; }

/* card internals */
.intro .wave { animation: in-wipe 1.5s var(--ease-io) 1250ms both; }
.intro .w-delta, .intro .w-cap, .intro .w-formula { animation: in-fade .8s var(--ease-out) 1900ms both; }
.intro .stats > div { animation: in-rise .8s var(--ease-out) both; }
.intro .stats > div:nth-child(1) { animation-delay: 1250ms; } .intro .stats > div:nth-child(2) { animation-delay: 1330ms; } .intro .stats > div:nth-child(3) { animation-delay: 1410ms; }
.intro .trio > div { animation: in-rise .8s var(--ease-out) both; }
.intro .trio > div:nth-child(1) { animation-delay: 950ms; } .intro .trio > div:nth-child(2) { animation-delay: 1030ms; } .intro .trio > div:nth-child(3) { animation-delay: 1110ms; }
.intro .g-dots { animation: in-fade 1s var(--ease-out) 1000ms both; }
.intro .g-solid { animation: in-draw 1.3s var(--ease-io) 1150ms both; }
.g-k { transform-box: fill-box; transform-origin: center; }
.intro .g-k { animation: in-pop .6s var(--ease-out) 1800ms both; }
.intro .g-k.dim { animation-delay: 1650ms; }
.intro .pill-btn { animation: in-pop .7s var(--ease-out) 1500ms both; }
.intro .g-labels span { animation: in-fade .8s var(--ease-out) 1600ms both; }
.intro .c-meta .tag { animation: in-fade .8s var(--ease-out) 1300ms both; }
.ticks i { transform-origin: 50% 100%; }
.intro .ticks i { animation: in-grow-y .8s var(--ease-out) both; animation-delay: calc(1280ms + var(--k, 0) * 26ms); }
.intro .tick-dots i { animation: in-pop .6s var(--ease-out) 1900ms both; }
.intro .dtrack i { animation: in-pop .5s var(--ease-out) both; }
.intro .dtrack i:nth-child(1) { animation-delay: 1380ms; } .intro .dtrack i:nth-child(2) { animation-delay: 1430ms; } .intro .dtrack i:nth-child(3) { animation-delay: 1480ms; }
.intro .dtrack i:nth-child(4) { animation-delay: 1530ms; } .intro .dtrack i:nth-child(5) { animation-delay: 1580ms; } .intro .dtrack i:nth-child(6) { animation-delay: 1630ms; } .intro .dtrack i:nth-child(7) { animation-delay: 1680ms; }
.intro .radar { animation: in-spin 1.1s var(--ease-out) 1450ms both; }
.intro .orb-tile { animation: in-pop .8s var(--ease-out) 1450ms both; }
.intro .c-cfg .row { animation: in-rise .8s var(--ease-out) both; }
.intro .c-cfg .row:nth-of-type(1) { animation-delay: 1330ms; } .intro .c-cfg .row:nth-of-type(2) { animation-delay: 1410ms; } .intro .c-cfg .row:nth-of-type(3) { animation-delay: 1490ms; }
.intro .t-dot { animation: in-pop .5s var(--ease-out) 1300ms both; }

/* face overlays: landmarks appear, then app.js walks them across the face until they lock */
.intro .lines { animation: in-fade 1s var(--ease-out) 1150ms both; }
.intro .face-in > :is(.mk, .pt, .node) { animation: in-pop .7s var(--ease-out) both; }
.intro .face-in > span:nth-of-type(1) { animation-delay: 1000ms; } .intro .face-in > span:nth-of-type(2) { animation-delay: 1060ms; }
.intro .face-in > span:nth-of-type(3) { animation-delay: 1120ms; } .intro .face-in > span:nth-of-type(4) { animation-delay: 1180ms; }
.intro .face-in > span:nth-of-type(5) { animation-delay: 1240ms; } .intro .face-in > span:nth-of-type(6) { animation-delay: 1080ms; }
.intro .face-in > span:nth-of-type(7) { animation-delay: 1140ms; } .intro .face-in > span:nth-of-type(8) { animation-delay: 1200ms; }
.intro .face-in > span:nth-of-type(9) { animation-delay: 1260ms; }
.intro .matrix { animation: in-fade 1s var(--ease-out) 1300ms both; }
.intro .mapped { animation: in-pop .8s var(--ease-out) 1250ms both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
