/* /preview/stats-api/ — Stats API page (preview, 5 Nov 2026). Only this page loads it; every class is sa-*.
   Builds on light.css tokens + motion.css (reveals, story stepping). Dark panels follow the homepage terminal
   look (inverse surface, hairline grid, mint for the one thing that matters, neutrals for the rest).
   No inline styles anywhere: stats.js only writes CSS custom properties and transforms via CSSOM. */

.sa {
  --sa-ink2: #d7ddd9;
  --sa-dim: #7e8a85;
  --sa-line: rgba(255, 255, 255, .08);
  --sa-glass: rgba(255, 255, 255, .035);
  --sa-ease: cubic-bezier(.16, 1, .3, 1);
  --sa-move: cubic-bezier(.2, 0, 0, 1);
  overflow-x: clip;
}
.sa :is(.h2, .h1, .h3) { text-wrap: balance; }

/* ================================================================ 1. Hero: live match panel */
.sa-hero { padding-top: 56px; }
@media (max-width: 560px) { .sa-hero { padding-top: 40px; } }
.sa-hero .hero-copy .body-lg { max-width: 540px; }
.sa-live { position: relative; isolation: isolate; gap: 14px; padding: 18px; }
.sa-live-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 70% at 85% 0%, rgba(71, 250, 190, .07), rgba(71, 250, 190, 0) 60%); }
.sa-live-field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .5; }
.sa-live-field[data-state="off"] { display: none; }

.sa-live-badge { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgba(131, 246, 200, .28); background: rgba(71, 250, 190, .08); color: var(--mint-on-inverse);
  font: 600 11px/1 var(--font-mono); letter-spacing: .9px; text-transform: uppercase; white-space: nowrap; }
.sa-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(71, 250, 190, .18); }
html.motion .sa-live-badge.is-live .sa-live-dot { animation: sa-blink 2s ease-in-out infinite; }
.sa-live-badge.is-ht { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: var(--on-inverse-muted); }
.sa-live-badge.is-ht .sa-live-dot { background: var(--on-inverse-muted); box-shadow: none; }
@keyframes sa-blink { 50% { opacity: .3; } }

.sa-match { position: relative; padding: 16px 18px 14px; border-radius: var(--radius-lg); color: var(--on-inverse);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--sa-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.sa-match-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.sa-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sa-team b { font: 600 15px/20px var(--font-sans); letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-team-away { justify-content: flex-end; text-align: right; }
.sa-crest { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12); background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .11), rgba(255, 255, 255, .05));
  font: 600 10px/1 var(--font-mono); letter-spacing: .4px; color: var(--sa-ink2); }
/* team logos: a fixed box, so nothing moves while a logo loads */
.sa-crest img { display: block; width: 24px; height: 24px; object-fit: contain; }
.sa-crest-xs { width: 22px; height: 22px; border: 0; background: none; }
.sa-crest-xs img { width: 18px; height: 18px; }
.sa-pane-match { display: inline-flex; align-items: center; gap: 8px; min-width: 0; letter-spacing: .6px; color: var(--on-inverse); white-space: nowrap; }
.sa-pane-match i { font-style: normal; color: var(--sa-dim); }
.sa-pane-match .sa-crest { width: 26px; height: 26px; }
.sa-pane-match .sa-crest img { width: 18px; height: 18px; }
.sa-clock { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sa-score { display: inline-flex; align-items: baseline; gap: 8px; font: 600 26px/28px var(--font-mono); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.sa-score i { font-style: normal; color: var(--sa-dim); font-weight: 400; }
.sa-minute { font: 500 12px/16px var(--font-mono); color: var(--mint-on-inverse); font-variant-numeric: tabular-nums; }

/* timeline: 0' -> HT, mint fill, one mark per event (home above, away below) */
.sa-timeline { position: relative; height: 30px; margin: 10px 0 2px; }
.sa-tl-track { position: absolute; left: 0; right: 0; top: 11px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.sa-tl-fill { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--sa-p, 1));
  background: linear-gradient(90deg, rgba(71, 250, 190, .15), var(--mint)); }
.sa-tl-marks { position: absolute; inset: 0; }
.sa-mark { position: absolute; top: 4px; width: 2px; height: 6px; margin-left: -1px; border-radius: 1px; background: var(--mint-on-inverse); }
.sa-mark.is-away { top: 15px; background: rgba(255, 255, 255, .55); }
.sa-mark.is-goal { top: 1px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px rgba(71, 250, 190, .8); }
.sa-tl-ticks { position: absolute; left: 0; right: 0; bottom: -2px; display: flex; justify-content: space-between; font: 500 9.5px/1 var(--font-mono); color: var(--sa-dim); }

.sa-rows { display: flex; flex-direction: column; margin-top: 6px; }
.sa-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, .055); }
.sa-row:first-child { border-top: 0; }
.sa-v { position: relative; isolation: isolate; display: inline-flex; font: 600 17px/22px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--on-inverse); }
.sa-v[data-side="a"] { justify-content: flex-end; color: var(--sa-ink2); }
.sa-lbl { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 500 11px/14px var(--font-mono); letter-spacing: .7px; text-transform: uppercase; color: var(--on-inverse-muted); text-align: center; }
.sa-bar { position: relative; display: block; width: 100%; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .06) calc(50% - 2px), transparent calc(50% - 2px), transparent calc(50% + 2px), rgba(255, 255, 255, .06) calc(50% + 2px)); }
.sa-seg { position: absolute; top: 0; height: 3px; border-radius: 2px; transition: transform 900ms var(--sa-ease); }
.sa-seg-h { left: 0; right: calc(50% + 2px); transform-origin: 100% 50%; transform: scaleX(var(--sa-h, 0)); background: linear-gradient(270deg, var(--mint), rgba(71, 250, 190, .35)); }
.sa-seg-a { right: 0; left: calc(50% + 2px); transform-origin: 0 50%; transform: scaleX(var(--sa-a, 0)); background: linear-gradient(90deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .22)); }
.sa-row[data-stat="shots"] { --sa-h: .73; --sa-a: .27; }
.sa-row[data-stat="sot"] { --sa-h: .75; --sa-a: .25; }
.sa-row[data-stat="corners"] { --sa-h: .71; --sa-a: .29; }
.sa-row[data-stat="cards"] { --sa-h: .33; --sa-a: .67; }
.sa-row[data-stat="xg"] { --sa-h: .77; --sa-a: .23; }
.sa-row.is-hit .sa-lbl { color: var(--on-inverse); }
.sa-row .sa-lbl { transition: color 600ms ease; }

/* rolling digits + flash (stats.js) */
.sa-roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.sa-roll > span { display: block; white-space: pre; }
.sa-roll > .sa-roll-in { position: absolute; left: 0; top: 0; }
.sa-v[data-side="a"] .sa-roll > .sa-roll-in { left: auto; right: 0; }
.sa-flash { position: absolute; inset: -2px -6px; z-index: -1; border-radius: 6px; background: var(--mint); opacity: 0; pointer-events: none; }

.sa-event { position: relative; height: 34px; margin-top: 8px; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.sa-event-in { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; font: 500 12.5px/1 var(--font-sans); color: var(--sa-ink2); white-space: nowrap; }
.sa-event-in b { font: 600 12px/1 var(--font-mono); color: var(--mint-on-inverse); font-variant-numeric: tabular-nums; }
.sa-event-in.is-goal { color: var(--on-inverse); }
.sa-event-in.is-goal::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px rgba(71, 250, 190, .9); }

/* the growing JSON */
.sa-json { position: relative; background: rgba(11, 12, 14, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sa-json-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-json-tag { flex: none; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .12); font: 500 11px/16px var(--font-mono); color: var(--on-inverse-muted); }
.sa-json pre { position: relative; font-size: 12px; line-height: 16.5px; overflow: hidden; padding: 12px 16px; }
.sa-jl { position: relative; display: block; white-space: pre; }
.sa-jl::before { content: ""; position: absolute; left: -16px; right: -16px; top: 0; bottom: 0; z-index: -1; background: linear-gradient(90deg, rgba(71, 250, 190, .16), rgba(71, 250, 190, 0) 70%); opacity: 0; }
.sa-jl.is-hit::before { animation: sa-line-hit 1400ms ease-out; }
.sa-json pre { isolation: isolate; }
@keyframes sa-line-hit { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.sa-jv { display: inline-block; }
/* every field is in the response from kick-off (value 0); a field waits dimmed until its first event lights it up */
.sa-jl { transition: opacity 700ms ease, color 700ms ease; }
.sa-jl.is-ghost { opacity: .34; }

@media (max-width: 560px) {
  .sa-live { padding: 14px; }
  .sa-match { padding: 14px 14px 12px; }
  .sa-team b { font-size: 13px; }
  .sa-score { font-size: 22px; }
  .sa-row { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
  .sa-v { font-size: 15px; }
  .sa-lbl { font-size: 10px; letter-spacing: .5px; }
  .sa-json pre { font-size: 11.5px; line-height: 17px; padding: 12px; }
  .sa-json .code-head { padding: 10px 12px; font-size: 12px; }
}
@media (max-width: 420px) {
  .sa-match-top { gap: 6px; align-items: start; }
  .sa-team, .sa-team-away { flex-direction: column; justify-content: flex-start; align-items: center; gap: 6px; text-align: center; }
  .sa-team-away > b { order: 2; }
  .sa-team b { max-width: 100%; font-size: 12.5px; line-height: 16px; }
  .sa-crest { width: 32px; height: 32px; }
  .sa-crest img { width: 22px; height: 22px; }
  .sa-seg-toggle .sa-crest img { width: 18px; height: 18px; }
  .sa-clock { padding-top: 2px; }
}

/* ================================================================ 2. Six sports: rail + 3D board */
.sa-sports-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 40px; align-items: center; }
.sa-rail { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.sa-sport { border-bottom: 1px solid var(--border); }
.sa-sport-btn { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; width: 100%; min-height: 56px; padding: 0 4px;
  border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink-muted); font: 600 17px/24px var(--font-sans); letter-spacing: -.2px; }
.sa-sport-btn:hover { color: var(--ink); }
.sa-sport-btn:focus-visible { outline-offset: -2px; border-radius: 8px; }
.sa-sport-num { font: 600 12px/1 var(--font-mono); letter-spacing: 1px; color: var(--ink-subtle); transition: color 300ms ease; }
.sa-sport.is-on .sa-sport-btn { color: var(--ink); }
.sa-sport.is-on .sa-sport-num { color: var(--mint-ink); }
.sa-sport-meter { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.sa-sport-meter i { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 127, 88, .4), var(--mint-ink)); transform-origin: 0 50%; transform: scaleX(0); }
.sa-sport.is-on .sa-sport-meter i { transform: scaleX(var(--sa-t, 1)); }
html:not(.motion) .sa-sport.is-on .sa-sport-meter i { transform: scaleX(1); }
.sa-sport-desc { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 420ms var(--sa-move), opacity 320ms ease; }
.sa-sport-desc > p { min-height: 0; overflow: hidden; margin: 0; padding: 0 4px 0 36px; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.sa-sport-desc > p::after { content: ""; display: block; height: 18px; }
.sa-rail.is-js .sa-sport:not(.is-on) .sa-sport-desc { grid-template-rows: 0fr; opacity: 0; }
.sa-more { max-width: 640px; }

/* the board (same camera, slab and tile language as art-scene.css; units are cqw of the figure) */
.sa-board { margin: 0; min-width: 0; container-type: inline-size; }
.sa-board figcaption { margin-top: 10px; padding: 0 4px; font-size: 13px; line-height: 20px; color: var(--ink-subtle); }
.sa-stage { --tilt: 34deg; --yaw: 0deg; --mono: var(--font-mono);
  position: relative; aspect-ratio: 16 / 10.2; overflow: hidden; border-radius: 20px; isolation: isolate;
  background:
    radial-gradient(80% 60% at 50% 0%, #252b2f 0%, rgba(37, 43, 47, 0) 62%),
    radial-gradient(60% 50% at 50% 100%, rgba(71, 250, 190, .07), rgba(71, 250, 190, 0) 70%),
    linear-gradient(180deg, #121518 0%, #0b0c0e 72%);
  color: #fff; box-shadow: 0 24px 48px -16px rgba(11, 12, 14, .3); user-select: none; -webkit-user-select: none; }
.sa-board-head { position: absolute; left: 4.2cqw; top: 3.8cqw; z-index: 2; display: flex; flex-direction: column; gap: .5cqw; max-width: 60cqw; }
.sa-board-head b { font: 650 2.6cqw/1.1 var(--font-sans); letter-spacing: -.03em; }
.sa-board-head > b + span { font-size: 1.55cqw; line-height: 1.3; color: #9aa4a0; }
.sa-board-hud { position: absolute; right: 4.2cqw; top: 3.6cqw; z-index: 2; display: inline-flex; align-items: center; gap: .9cqw;
  padding: .8cqw 1.3cqw; border-radius: 99px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09);
  font: 500 1.4cqw/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #9aa4a0; }
.sa-hud-dot { width: .8cqw; height: .8cqw; border-radius: 50%; background: var(--mint); box-shadow: 0 0 1cqw rgba(71, 250, 190, .7); }
.sa-board-head > b, .sa-board-head > span { transition: opacity 260ms ease, transform 420ms var(--sa-ease); }
.sa-stage.is-swap .sa-board-head > b, .sa-stage.is-swap .sa-board-head > span { opacity: 0; transform: translate3d(0, -.6cqw, 0); }
.sa-board-match { display: flex; align-items: center; gap: .9cqw; margin-top: .5cqw; font-size: 1.6cqw; line-height: 1.3; color: #c9d1cd; white-space: nowrap; }
.sa-board-match i { font-style: normal; color: #6f7a76; }
.sa-board-match .sa-crest { width: 3.8cqw; height: 3.8cqw; font-size: 1.15cqw; }
.sa-board-match .sa-crest img { width: 2.8cqw; height: 2.8cqw; }

.sa-scene { position: absolute; inset: 0; perspective: 110cqw; perspective-origin: 50% 8%; }
.sa-plane { position: absolute; left: 7cqw; width: 86cqw; top: 13cqw; height: 44cqw; transform-origin: 50% 100%;
  transform: rotateX(var(--tilt)) rotateZ(var(--yaw)); transform-style: preserve-3d;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 2.4cqw; padding: 2.8cqw;
  border-radius: 2cqw;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 100% 25%,
    radial-gradient(70% 90% at 50% 80%, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)),
    linear-gradient(0deg, #1c2124 0%, #15191c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 .25cqw 0 rgba(255, 255, 255, .07); }
/* slab edge facing the camera */
.sa-plane::after { content: ""; position: absolute; left: .4cqw; right: .4cqw; top: 100%; height: 1.6cqw; transform-origin: 50% 0; transform: rotateX(-90deg);
  border-radius: 0 0 1.4cqw 1.4cqw; background: linear-gradient(180deg, #2a3034, #101214); }

.sa-tile { position: relative; transform-style: preserve-3d; transform: translateZ(.6cqw); }
.sa-tile::before { content: ""; position: absolute; inset: 8% 4% -6% 4%; border-radius: 1.6cqw; background: rgba(0, 0, 0, .55); filter: blur(1.2cqw); transform: translateZ(-.55cqw); }
.sa-flip { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50%; }
.sa-face { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; align-items: start; gap: .4cqw 1cqw;
  padding: 1.8cqw 2cqw 1.6cqw; border-radius: 1.5cqw; overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: linear-gradient(180deg, #282d31 0%, #1a1d20 100%);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09); }
.sa-back { transform: rotateX(180deg); }
.sa-tl { font: 600 2.05cqw/1.15 var(--font-sans); letter-spacing: -.01em; color: #d7ddd9; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sa-tp { justify-self: end; padding: .35cqw .8cqw; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .12); font: 500 1.35cqw/1.1 var(--mono); color: #9aa4a0; white-space: nowrap; }
.sa-tv { grid-column: 1 / -1; align-self: end; display: flex; align-items: baseline; gap: .9cqw; font: 650 5.6cqw/1 var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.sa-tv i { font-style: normal; font-weight: 400; color: #5d6763; }
.sa-tv.is-m { font-size: 4.4cqw; }
.sa-tv.is-s { font-size: 3.6cqw; }
.sa-tv small { font: 500 1.5cqw/1 var(--font-sans); letter-spacing: 0; color: #9aa4a0; margin-left: .4cqw; }
/* the key stat of each sport: mint, like the value tile in the article scenes */
.sa-face.is-key { background: linear-gradient(180deg, #6dffd2 0%, #3fe8ae 100%); border-color: rgba(255, 255, 255, .35); }
.sa-face.is-key .sa-tl, .sa-face.is-key .sa-tv { color: #0b0c0e; }
.sa-face.is-key .sa-tv i, .sa-face.is-key .sa-tv small { color: #0d5a40; }
.sa-face.is-key .sa-tp { border-color: rgba(11, 12, 14, .2); color: #0d5a40; }
.sa-tile.is-key::before { background: rgba(71, 250, 190, .35); }
.sa-tile.is-key-was::before { background: rgba(0, 0, 0, .55); }
html.motion .sa-tile::before { transition: background-color 500ms ease; }

/* before the intro: tiles wait above the board, invisible */
html.motion .sa-board:not(.is-ready) .sa-tile { opacity: 0; }

@container (max-width: 560px) {
  .sa-stage { aspect-ratio: 4 / 5.3; }
  .sa-board-head { left: 5.5cqw; top: 5.5cqw; gap: 1cqw; }
  .sa-board-head b { font-size: 5.4cqw; }
  .sa-board-match { font-size: 3.1cqw; gap: 1.6cqw; margin-top: 1cqw; }
  .sa-board-match .sa-crest { width: 6.6cqw; height: 6.6cqw; font-size: 2.2cqw; }
  .sa-board-match .sa-crest img { width: 4.4cqw; height: 4.4cqw; }
  .sa-board-hud { right: 5.5cqw; top: 5.5cqw; font-size: 2.7cqw; padding: 1.4cqw 2.2cqw; gap: 1.4cqw; }
  .sa-hud-dot { width: 1.6cqw; height: 1.6cqw; }
  .sa-scene { perspective: 160cqw; perspective-origin: 50% 0%; }
  .sa-plane { left: 5cqw; width: 90cqw; top: 23cqw; height: 96cqw; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 3.2cqw; padding: 3.6cqw; border-radius: 3.4cqw; }
  .sa-face { padding: 3.2cqw 3.4cqw 3cqw; border-radius: 2.6cqw; gap: .8cqw 1.6cqw; }
  .sa-tl { font-size: 3.7cqw; }
  .sa-tp { font-size: 2.6cqw; padding: .7cqw 1.5cqw; }
  .sa-tv { font-size: 9.6cqw; gap: 1.6cqw; }
  .sa-tv.is-m { font-size: 7.6cqw; }
  .sa-tv.is-s { font-size: 6.2cqw; }
  .sa-tv small { font-size: 2.8cqw; }
  .sa-tile::before { border-radius: 3cqw; filter: blur(2.4cqw); }
}

@media (max-width: 899px) {
  .sa-sports-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sa-board { order: -1; }
}

/* ================================================================ 3. Story: match -> key -> request
   Re-uses motion.css .story (pinned 300vh on desktop, sticky stage on mobile, data-step from motion.js).
   The visual lives in .story-stage, right of the copy on desktop and in the sticky top half on mobile. */
.sa-story .story-stage { background:
  radial-gradient(50% 60% at 75% 50%, rgba(71, 250, 190, .06), rgba(71, 250, 190, 0) 70%),
  linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 100% 48px,
  var(--surface-inverse); }
.sa-flow { position: absolute; z-index: 0; top: 50%; right: max(24px, calc((100% - 1200px) / 2 + 24px)); width: min(452px, calc(100% - min(520px, 44%) - 120px)); height: 420px; transform: translateY(-50%); }
.sa-pane { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); border: 1px solid var(--sa-line);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06); color: var(--on-inverse);
  opacity: 0; transform: translate3d(0, 18px, 0) scale(.97); transition: opacity 600ms var(--sa-ease), transform 800ms var(--sa-ease); }
.sa-pane-3 { padding: 0; border: 0; background: none; box-shadow: none; justify-content: center; }
.sa-pane-2 { justify-content: center; }
.sa-story[data-step="0"] .sa-pane-1, .sa-story[data-step="1"] .sa-pane-2, .sa-story[data-step="2"] .sa-pane-3 { opacity: 1; transform: none; transition-delay: 120ms; }
.sa-story[data-step="1"] .sa-pane-1, .sa-story[data-step="2"] .sa-pane-2 { transform: translate3d(0, -18px, 0) scale(.97); }
.sa-pane-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 600 11px/16px var(--font-mono); letter-spacing: 1.1px; text-transform: uppercase; color: var(--on-inverse-muted); }
.sa-pane-min { color: var(--mint-on-inverse); }

.sa-pitch { display: block; width: 100%; height: auto; border-radius: 12px; background: rgba(255, 255, 255, .02); }
.sa-pitch-line { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.sa-ev { transition: opacity 600ms ease; }
.sa-ev-dot { fill: var(--mint); }
.sa-ev-dot.is-away { fill: #fff; }
.sa-ev-halo { fill: var(--mint); opacity: .22; transform-box: fill-box; transform-origin: center; }
html.motion .sa-ev-halo { animation: sa-pulse 2.2s var(--sa-ease) infinite; }
.sa-ev-path { fill: none; stroke: var(--mint); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .8; }
.sa-ev-path.is-away { stroke: rgba(255, 255, 255, .6); }
.sa-ev-card { fill: #e9c46a; }
@keyframes sa-pulse { 0% { opacity: .45; transform: scale(.4); } 70%, 100% { opacity: 0; transform: scale(1.6); } }

.sa-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sa-log li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); font-size: 13px; color: var(--sa-ink2);
  transition: opacity 500ms ease, transform 700ms var(--sa-ease), border-color 500ms ease, background-color 500ms ease; }
.sa-log b { font: 600 12px/1 var(--font-mono); color: var(--on-inverse-muted); font-variant-numeric: tabular-nums; }
.sa-log em { font: 500 11px/1 var(--font-mono); font-style: normal; color: var(--sa-dim); }
.sa-log li.is-key { border-color: rgba(131, 246, 200, .35); background: rgba(71, 250, 190, .07); }
.sa-log li.is-key b, .sa-log li.is-key em { color: var(--mint-on-inverse); }

.sa-keybuild { display: flex; align-items: center; justify-content: center; gap: 0; padding: 18px 0 4px; font: 600 15px/1 var(--font-mono); }
.sa-chip { padding: 9px 12px; border-radius: 9px; border: 1px solid rgba(131, 246, 200, .4); background: rgba(71, 250, 190, .08); color: var(--mint-on-inverse);
  transition: transform 800ms var(--sa-ease), border-color 500ms ease, background-color 500ms ease, color 500ms ease; }
.sa-plus { color: var(--mint-on-inverse); padding: 0 2px; transition: opacity 500ms ease, color 500ms ease; }
.sa-keyout { display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 6px 0 8px; font: 600 15px/1 var(--font-mono);
  transition: opacity 500ms ease, transform 700ms var(--sa-ease); }
.sa-ptable tbody tr { transition: opacity 500ms ease, transform 600ms var(--sa-ease); }
.sa-keyout code { font: inherit; color: var(--on-inverse-muted); }
.sa-keyout b { font-size: 30px; letter-spacing: -1px; color: var(--mint); text-shadow: 0 0 24px rgba(71, 250, 190, .35); }
.sa-ptable { width: 100%; border-collapse: collapse; font: 500 13px/18px var(--font-mono); font-variant-numeric: tabular-nums; }
.sa-ptable th, .sa-ptable td { padding: 9px 10px; text-align: right; border-top: 1px solid rgba(255, 255, 255, .07); }
.sa-ptable thead th { border-top: 0; font: 600 10.5px/14px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--sa-dim); }
.sa-ptable th:first-child { text-align: left; }
.sa-ptable tbody th { font: 500 13px/18px var(--font-sans); color: var(--on-inverse-muted); }
.sa-ptable td { color: var(--on-inverse); }
.sa-ptable tr.is-key th { color: var(--on-inverse); }
.sa-ptable td.is-hit { color: var(--mint); font-weight: 600; }
.sa-flow-code { width: 100%; background: rgba(11, 12, 14, .96); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(131, 246, 200, .08); }
.sa-flow-code pre { font-size: 12.5px; line-height: 20px; }
.sa-fl { display: block; white-space: pre; position: relative; transition: opacity 400ms ease, transform 500ms var(--sa-ease); }
.sa-fl-gap { height: 20px; }
.sa-fl:first-child { color: var(--sa-dim); }
.sa-fl.is-key { color: var(--on-inverse); }
.sa-fl.is-key::before { content: ""; position: absolute; left: -16px; right: -16px; top: 0; bottom: 0; z-index: -1; background: linear-gradient(90deg, rgba(71, 250, 190, .18), rgba(71, 250, 190, 0) 80%); border-left: 2px solid var(--mint); }
.sa-flow-code pre { isolation: isolate; }

/* step sequences: the items wait, then play in order when their step becomes active */
html.motion .sa-ev, html.motion .sa-log li { opacity: 0; }
html.motion .sa-log li { transform: translate3d(16px, 0, 0); }
html.motion .sa-story.is-seen[data-step="0"] :is(.sa-ev, .sa-log li) { opacity: 1; transform: none; }
html.motion .sa-story.is-seen[data-step="0"] :is(.sa-ev-1, .sa-log-1) { transition-delay: 380ms; }
html.motion .sa-story.is-seen[data-step="0"] :is(.sa-ev-2, .sa-log-2) { transition-delay: 1050ms; }
html.motion .sa-story.is-seen[data-step="0"] :is(.sa-ev-3, .sa-log-3) { transition-delay: 1700ms; }
html.motion .sa-log li.is-key { border-color: rgba(255, 255, 255, .06); background: rgba(255, 255, 255, .03); }
html.motion .sa-story.is-seen[data-step="0"] .sa-log li.is-key { border-color: rgba(131, 246, 200, .35); background: rgba(71, 250, 190, .07); transition-delay: 380ms, 380ms, 2300ms, 2300ms; }
html.motion .sa-chip { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--sa-ink2); }
html.motion .sa-chip-1 { transform: translate3d(-22px, 0, 0); }
html.motion .sa-chip-3 { transform: translate3d(22px, 0, 0); }
html.motion .sa-plus { opacity: 0; }
html.motion .sa-keyout { opacity: 0; transform: translate3d(0, 10px, 0); }
html.motion .sa-ptable tbody tr { opacity: 0; transform: translate3d(0, 6px, 0); }
html.motion .sa-story.is-seen[data-step="1"] .sa-chip { transform: none; border-color: rgba(131, 246, 200, .4); background: rgba(71, 250, 190, .08); color: var(--mint-on-inverse); transition-delay: 380ms, 1100ms, 1100ms, 1100ms; }
html.motion .sa-story.is-seen[data-step="1"] .sa-plus { opacity: 1; transition-delay: 900ms; }
html.motion .sa-story.is-seen[data-step="1"] .sa-keyout { opacity: 1; transform: none; transition-delay: 1300ms; }
html.motion .sa-story.is-seen[data-step="1"] .sa-ptable tbody tr { opacity: 1; transform: none; }
html.motion .sa-story.is-seen[data-step="1"] .sa-ptable tbody tr:nth-child(1) { transition-delay: 1700ms; }
html.motion .sa-story.is-seen[data-step="1"] .sa-ptable tbody tr:nth-child(2) { transition-delay: 1820ms; }
html.motion .sa-story.is-seen[data-step="1"] .sa-ptable tbody tr:nth-child(3) { transition-delay: 1940ms; }
html.motion .sa-fl { opacity: 0; transform: translate3d(8px, 0, 0); }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl { opacity: 1; transform: none; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(1) { transition-delay: 300ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(2) { transition-delay: 360ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(3) { transition-delay: 600ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(4) { transition-delay: 660ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(5) { transition-delay: 720ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(6) { transition-delay: 780ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(7) { transition-delay: 840ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(8) { transition-delay: 900ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(9) { transition-delay: 960ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(10) { transition-delay: 1020ms; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl:nth-child(11) { transition-delay: 1080ms; }
html.motion .sa-fl.is-key::before { opacity: 0; transition: opacity 700ms ease; }
html.motion .sa-story.is-seen[data-step="2"] .sa-fl.is-key::before { opacity: 1; transition-delay: 1300ms; }

/* desktop pinned: the copy column stays on the left, the panes sit centred on the right */
@media (min-width: 900px) and (max-height: 760px) { .sa-flow { height: 400px; } .sa-pane { gap: 10px; padding: 14px; } .sa-log li { height: 32px; } }
@media (min-width: 900px) and (max-width: 1099px) { .sa-flow { width: min(400px, calc(100% - min(520px, 44%) - 90px)); } .sa-flow-code pre { font-size: 11.5px; line-height: 18px; } }

/* mobile with motion: the stage is a 55vh sticky window (motion.css); the visual fills it */
@media (max-width: 899px) {
  html.motion .sa-flow { top: 16px; bottom: 34px; right: 16px; left: 16px; width: auto; height: auto; transform: none; max-width: 520px; margin: 0 auto; }
  html.motion .sa-pane { padding: 14px; gap: 10px; }
  html.motion .sa-pane-3 { padding: 0; }
  html.motion .sa-pitch { max-height: calc(55vh - 200px); }
  html.motion .sa-log { gap: 4px; }
  html.motion .sa-log li { height: 30px; font-size: 12px; }
  html.motion .sa-ptable th, html.motion .sa-ptable td { padding: 6px 8px; }
  html.motion .sa-keybuild { padding-top: 6px; font-size: 13px; }
  html.motion .sa-keyout b { font-size: 24px; }
  html.motion .sa-flow-code pre { font-size: 11px; line-height: 16px; padding: 10px 12px; }
  html.motion .sa-flow-code .code-head { padding: 9px 12px; font-size: 11.5px; }
  html.motion .sa-story .story-stage { min-height: 360px; }
}
@media (max-width: 899px) and (max-height: 700px) { html.motion .sa-log li:nth-child(3) { display: none; } html.motion .sa-ptable tbody tr:nth-child(2) { display: none; } }

/* without motion (reduced motion / no JS): the finished state, the request card under the copy */
html:not(.motion) .sa-story { display: flex; flex-direction: column-reverse; }
html:not(.motion) .sa-story .story-stage { position: relative; inset: auto; padding: 0 24px 72px; }
html:not(.motion) .sa-flow { position: relative; inset: auto; top: auto; right: auto; transform: none; width: auto; height: auto; max-width: 1200px; margin: 0 auto; }
html:not(.motion) .sa-pane { position: relative; inset: auto; opacity: 1; transform: none; display: none; }
html:not(.motion) .sa-pane-3 { display: flex; max-width: 560px; }
html:not(.motion) .sa-story .story-scrim { display: none; }
html:not(.motion) .sa-story .story-layer { padding-bottom: 32px; }

/* ================================================================ 4. Read the line: corners chart (terminal style) */
.sa-line .split { align-items: center; }
.sa-chart { flex: 1 1 560px; min-width: 0; margin: 0; padding: 18px 18px 14px; border-radius: var(--radius-xl); color: var(--on-inverse);
  background: linear-gradient(180deg, rgba(71, 250, 190, .06), transparent 40%), var(--surface-inverse);
  box-shadow: var(--shadow-lg); }
.sa-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.sa-seg-toggle { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.sa-seg-toggle button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--on-inverse-muted); font: 600 13px/1 var(--font-sans); cursor: pointer;
  transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease; }
.sa-seg-toggle button:hover { color: var(--on-inverse); }
.sa-seg-toggle button[aria-pressed="true"] { background: rgba(255, 255, 255, .1); color: var(--on-inverse); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.sa-chart-meta { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/16px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--on-inverse-muted); }
.sa-chart-live { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(71, 250, 190, .18); }
.sa-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 14px 2px 10px; }
.sa-key { display: inline-flex; align-items: center; gap: 7px; font: 500 11px/16px var(--font-mono); letter-spacing: .6px; text-transform: uppercase; color: var(--on-inverse-muted); white-space: nowrap; }
.sa-key b { font-weight: 600; letter-spacing: 0; color: var(--on-inverse); font-variant-numeric: tabular-nums; }
.sa-key.is-over b { color: var(--mint-on-inverse); }
.sa-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.sa-key.is-over i { background: var(--mint); box-shadow: 0 0 6px rgba(71, 250, 190, .6); }
.sa-key.is-under i { background: rgba(255, 255, 255, .22); }
.sa-key.is-line i { width: 14px; height: 0; border-radius: 0; border-top: 1.5px dashed rgba(255, 255, 255, .85); }
.sa-key.is-avg { margin-left: auto; }

.sa-plot { --sa-max: 16; position: relative; height: 240px; margin-right: 44px; }
.sa-grid { position: absolute; inset: 0 0 24px 0; }
.sa-gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(255, 255, 255, .07); }
.sa-gl em { position: absolute; left: calc(100% + 10px); top: -7px; font: 500 10px/14px var(--font-mono); font-style: normal; color: var(--border-strong); font-variant-numeric: tabular-nums; }
.sa-gl-0 { bottom: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.sa-gl-4 { bottom: 25%; } .sa-gl-8 { bottom: 50%; } .sa-gl-12 { bottom: 75%; } .sa-gl-16 { bottom: 100%; }
.sa-lineline { position: absolute; left: 0; right: 0; bottom: calc(24px + (100% - 24px) * 9.5 / 16); height: 0; z-index: 2; border-top: 1.5px dashed rgba(255, 255, 255, .85);
  transform-origin: 0 50%; }
.sa-line-tag { position: absolute; left: calc(100% + 4px); top: -9px; padding: 0 6px; height: 18px; border-radius: 4px; background: #fff; color: var(--ink); font: 600 11px/18px var(--font-mono); font-variant-numeric: tabular-nums; }
.sa-bars { position: absolute; inset: 0 0 0 0; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0; }
.sa-bc { position: relative; height: 100%; }
.sa-bc::before, .sa-bc::after { content: ""; position: absolute; left: 50%; bottom: 24px; width: min(26px, 46%); transform: translateX(-50%) scaleY(var(--sa-g, 1)); transform-origin: 50% 100%;
  height: calc((100% - 24px) * var(--v, 0) / 16); border-radius: 4px 4px 1px 1px;
  transition: height 760ms var(--sa-ease) calc(var(--i, 0) * 35ms), transform 1000ms var(--sa-ease) calc(var(--i, 0) * 60ms), opacity 500ms ease calc(var(--i, 0) * 35ms); }
.sa-bc::before { background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
.sa-bc::after { opacity: 0; background: linear-gradient(180deg, #6dffd2 0%, rgba(71, 250, 190, .42) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 18px rgba(71, 250, 190, .2); }
.sa-bc.is-over::after { opacity: 1; }
.sa-bar-v { position: absolute; left: 0; right: 0; bottom: calc(24px + (100% - 24px) * var(--v, 0) / 16 + 6px); text-align: center; font: 600 11px/14px var(--font-mono); color: var(--on-inverse-muted); font-variant-numeric: tabular-nums;
  opacity: var(--sa-gv, 1); transition: bottom 760ms var(--sa-ease) calc(var(--i, 0) * 35ms), color 400ms ease, opacity 500ms ease calc(var(--i, 0) * 60ms + 450ms); }
html.motion .sa-chart:not(.is-drawn) .sa-bc { --sa-g: 0; --sa-gv: 0; }
html.motion .sa-chart:not(.is-drawn) .sa-lineline { transform: scaleX(0); opacity: 0; }
.sa-lineline { transition: transform 1200ms var(--sa-ease) 350ms, opacity 400ms ease 350ms; }
.sa-bc.is-over .sa-bar-v { color: var(--mint-on-inverse); }
.sa-bx { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font: 500 10px/14px var(--font-mono); color: var(--border-strong); }
.sa-bc[data-v="0"] { --v: 0; } .sa-bc[data-v="1"] { --v: 1; } .sa-bc[data-v="2"] { --v: 2; } .sa-bc[data-v="3"] { --v: 3; }
.sa-bc[data-v="4"] { --v: 4; } .sa-bc[data-v="5"] { --v: 5; } .sa-bc[data-v="6"] { --v: 6; } .sa-bc[data-v="7"] { --v: 7; }
.sa-bc[data-v="8"] { --v: 8; } .sa-bc[data-v="9"] { --v: 9; } .sa-bc[data-v="10"] { --v: 10; } .sa-bc[data-v="11"] { --v: 11; }
.sa-bc[data-v="12"] { --v: 12; } .sa-bc[data-v="13"] { --v: 13; } .sa-bc[data-v="14"] { --v: 14; } .sa-bc[data-v="15"] { --v: 15; } .sa-bc[data-v="16"] { --v: 16; }
html:not(.sa-js) :is(.sa-bc[data-v="10"], .sa-bc[data-v="11"], .sa-bc[data-v="12"], .sa-bc[data-v="13"], .sa-bc[data-v="14"])::after { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .sa-bc:hover .sa-bar-v { color: var(--on-inverse); }
}
.sa-chart-cap { margin: 8px 2px 0; font: 500 11px/16px var(--font-mono); color: var(--border-strong); }
@media (max-width: 560px) {
  .sa-chart { padding: 14px 12px 12px; }
  .sa-plot { height: 200px; margin-right: 36px; }
  .sa-key.is-avg { margin-left: 0; }
  .sa-seg-toggle button { padding: 0 11px; font-size: 12.5px; }
  .sa-bar-v { font-size: 10px; }
  .sa-gl em { top: -6px; line-height: 12px; }
}

/* ================================================================ 5. Fields + live strip */
.sa-field { gap: 12px; }
.sa-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mint-tint); color: var(--mint-ink); }
.sa-ic svg { width: 22px; height: 22px; }
.sa-livestrip { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 24px 40px;
  padding: 28px 32px; border-radius: var(--radius-xl); background: var(--surface-inverse); color: var(--on-inverse); box-shadow: var(--shadow-glow); }
.sa-livestrip::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 85%) var(--my, 50%), rgba(71, 250, 190, .12), rgba(71, 250, 190, 0) 65%); }
.sa-livestrip-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.sa-livestrip .h3 { color: var(--on-inverse); }
.sa-livestrip p { margin: 0; font-size: 15px; line-height: 23px; color: var(--on-inverse-muted); max-width: 46ch; }
.sa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; justify-content: flex-end; }
.sa-chips li { position: relative; padding: 8px 13px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03);
  font: 500 13px/18px var(--font-mono); color: var(--sa-ink2); transition: border-color 600ms ease, color 600ms ease, background-color 600ms ease; }
.sa-chips li.is-more { border-style: dashed; color: var(--on-inverse-muted); }
.sa-chips li.is-tick { border-color: rgba(131, 246, 200, .55); color: var(--mint-on-inverse); background: rgba(71, 250, 190, .08); }
@media (max-width: 760px) { .sa-livestrip { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; } .sa-chips { justify-content: flex-start; } }

/* ================================================================ 6. Example request */
.sa-req { box-shadow: var(--shadow-lg); }
.sa-req pre { font-size: 13px; line-height: 21px; }
.sa-req-auth { color: var(--sa-dim); }
@media (max-width: 560px) { .sa-req pre { font-size: 11.5px; line-height: 18px; padding: 12px; } .sa-req .code-head { font-size: 12px; padding: 10px 12px; } }

/* ================================================================ 7. Pricing */
.sa-price { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.sa-price-table { width: 100%; border-collapse: collapse; font: 500 15px/20px var(--font-sans); }
.sa-price-table thead th { background: var(--surface-sunken); font: 600 12px/16px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); padding: 14px 22px; text-align: left; }
.sa-price-table td, .sa-price-table tbody th { padding: 20px 22px; border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
.sa-price-table tbody th { display: table-cell; }
.sa-price-table tbody th strong { display: block; font: 650 16px/24px var(--font-sans); color: var(--ink); }
.sa-price-table tbody th span { display: block; font: 400 13px/18px var(--font-sans); color: var(--ink-subtle); }
.sa-money { font: 600 22px/28px var(--font-mono); letter-spacing: -.6px; font-variant-numeric: tabular-nums; color: var(--ink); }
.sa-per { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.sa-money + .sa-per { display: inline; margin-left: 4px; }
.sa-no { font: 600 20px/28px var(--font-mono); color: var(--ink-subtle); }
.sa-yes { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/20px var(--font-sans); color: var(--mint-ink); }
.sa-price-table tr.is-incl { background: linear-gradient(90deg, var(--mint-tint), rgba(227, 251, 242, .35)); }
.sa-price-note { margin: 0; padding: 14px 22px; border-top: 1px solid var(--border); font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.sa-upgrade { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--mint-tint); border: 1px solid rgba(10, 127, 88, .35); }
.sa-upgrade-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mint); color: var(--on-mint); }
.sa-upgrade-ic svg { width: 22px; height: 22px; }
.sa-upgrade > div { flex: 1 1 auto; min-width: 0; }
.sa-upgrade strong { display: block; font: 650 16px/24px var(--font-sans); color: var(--ink); }
.sa-upgrade p { margin: 2px 0 0; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.sa-upgrade .btn { flex: none; }
@media (max-width: 720px) {
  .sa-price-table thead { display: none; }
  .sa-price-table, .sa-price-table tbody, .sa-price-table tr { display: block; }
  .sa-price-table tr { padding: 16px 18px; border-top: 1px solid var(--border); }
  .sa-price-table tr:first-child { border-top: 0; }
  .sa-price-table tbody th, .sa-price-table td { display: flex; align-items: baseline; gap: 0; padding: 8px 0; border-top: 0; }
  .sa-price-table tbody th { display: block; padding-bottom: 10px; }
  .sa-price-table td::before { content: attr(data-label); margin-right: auto; padding-right: 12px; font: 500 13px/18px var(--font-sans); color: var(--ink-muted); }
  .sa-money { font-size: 18px; }
  .sa-per { display: inline; margin: 0 0 0 4px; }
  .sa-no + .sa-per { display: none; }
  .sa-upgrade { flex-wrap: wrap; align-items: flex-start; padding: 18px; }
  .sa-upgrade > div { flex-basis: calc(100% - 58px); }
  .sa-upgrade .btn { margin-left: 50px; padding: 0; min-height: 44px; }
}

/* ================================================================ 8. FAQ + 9. CTA */
.sa .faq { max-width: none; }
.sa-cta { position: relative; overflow: hidden; isolation: isolate; }
.sa-cta::before { content: ""; position: absolute; right: -10%; top: -60%; width: 60%; height: 220%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(71, 250, 190, .16), rgba(71, 250, 190, 0)); }
.sa-btn-inv { background: transparent; color: var(--on-inverse); border-color: rgba(255, 255, 255, .28); }
.sa-btn-inv:hover { color: var(--on-inverse); background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .5); }

/* ================================================================ Reduced motion: everything final and still */
@media (prefers-reduced-motion: reduce) {
  .sa *, .sa *::before, .sa *::after { animation: none !important; transition-duration: .01ms !important; }
}
