/* TorqueXpert SD — homepage layer: measurement animations, report/video/settings dialogs, "How it works". Loaded after the shared stylesheets. */

/* ---------- Calm page: motion only where it explains a measurement ---------- */
.pointer-glow { display: none !important; }
.reveal, .reveal.visible { opacity: 1; transform: none; transition: none; }
.hero-windows-link { margin-top: 16px; font-size: 13px; }

/* AI report list is not a sequence: markers instead of 01–04 */
.diag-list b { display: none; }
.diag-list li { position: relative; padding-left: 18px; }
.diag-list li::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--orange); }

/* ---------- Live data: five modes, no autoplay, no numbering ---------- */
.telemetry .live-control { grid-template-columns: minmax(0, 1fr); }
.telemetry .live-control b { display: none; }
.live-control:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.telemetry-extra { margin-top: 10px !important; }

/* ---------- Shared "dyno pull" sweep over a white report ---------- */
.sweep-frame { position: relative; }
.sweep { position: absolute; inset: 0; pointer-events: none; --plot-top: 11.6%; --plot-bottom: 29.4%; --plot-right: 6.25%; --x: 0; }
.sweep-cover, .sweep-scan { position: absolute; top: var(--plot-top); bottom: var(--plot-bottom); display: none; }
.sweep-cover { left: calc(var(--x) * 1%); right: var(--plot-right); background: #efefef; }
.sweep-scan { left: calc(var(--x) * 1%); width: 2px; margin-left: -1px; background: #d00829; box-shadow: 0 0 10px rgba(208, 8, 41, .55); }
.sweep-chip { position: absolute; bottom: calc(100% + 4px); left: 50%; translate: -50% 0; padding: 3px 7px; border-radius: 4px; background: #171820; color: #fff; font: 600 11px/1.2 var(--mono); white-space: nowrap; }
.v2-motion .sweep.is-armed .sweep-cover,
.v2-motion .sweep.is-running .sweep-cover,
.v2-motion .sweep.is-running .sweep-scan { display: block; }
.v2-motion .sweep.is-done .sweep-cover { display: block; opacity: 0; transition: opacity .35s ease; }

/* Hero tablet: plot rectangle measured on hero-tablet.webp */
.hero-photo-tablet .sweep { --plot-top: 30.24%; --plot-bottom: 27.93%; --plot-right: 18.21%; z-index: 0; }
.hero-photo-tablet .sweep-chip { font-size: 9px; padding: 2px 5px; }
@media (max-width: 650px) {
  .hero-photo-tablet .sweep { --plot-top: 30.81%; --plot-bottom: 33.04%; --plot-right: 22.25%; }
  .hero-photo-tablet .sweep-chip { font-size: 8px; }
}
.hero-tablet-screen { z-index: 1; }
.v2-motion .hero-photo-arrived .hero-tablet-check::after { animation: none; }
.v2-motion .hero-photo-tablet.is-ready .hero-tablet-check::after { animation: hero-graph-ready 490ms ease-out; }
.hero-tablet-check { transition: opacity .25s ease; }
.hero-photo-tablet.is-measuring .hero-tablet-check { opacity: .35; }

/* Dyno peaks light up when the sweep passes their RPM */
.dyno-peak { transition: border-color .3s ease, box-shadow .3s ease; }
.dyno-peak.peak-hit { border-color: rgba(208, 8, 41, .75); box-shadow: 0 0 0 1px rgba(208, 8, 41, .25); }
.dyno-peak.is-torque.peak-hit { border-color: rgba(113, 183, 222, .75); box-shadow: 0 0 0 1px rgba(113, 183, 222, .25); }

/* Video marker on the Audi A5 tab */
.tab-video { display: inline-block; width: 0; height: 0; margin-left: 7px; border-block: 4px solid transparent; border-left: 7px solid currentColor; vertical-align: 1px; }

/* ---------- "Watch how this graph was measured" card ---------- */
.run-film-open {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; margin-top: 14px; padding: 10px;
  border: 1px solid rgba(227, 25, 59, .6); border-radius: 10px; background: linear-gradient(135deg, rgba(227, 25, 59, .14), rgba(30, 31, 40, .95));
  color: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease;
}
.run-film-open:hover { border-color: #e3193b; }
.run-film-open:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.run-film-thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 6px; background: #000; }
.run-film-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.run-film-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #e3193b; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.run-film-play svg { margin-left: 3px; }
.run-film-time { position: absolute; right: 5px; bottom: 5px; padding: 2px 5px; border-radius: 3px; background: rgba(0, 0, 0, .7); font: 600 10px var(--mono); }
.run-film-text strong { display: block; margin-bottom: 5px; font: 700 17px/1.15 var(--display); }
.run-film-text > span { display: block; color: #b4b6c0; font-size: 12px; line-height: 1.5; }
.run-film-text b { display: inline-block; margin-top: 7px; color: #ff5a6a; font-size: 13px; }

/* ---------- Video dialog ---------- */
dialog.run-film {
  width: min(1180px, 94vw); max-height: 94vh; padding: 0; overflow: auto; border: 1px solid #3b3d48; border-radius: 12px;
  background: #171820; color: #f3f3f5; box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
dialog.run-film::backdrop { background: rgba(10, 10, 15, .82); backdrop-filter: blur(6px); }
.run-film-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #2e3039; }
.run-film-head h2 { margin: 0; font: 700 24px/1.1 var(--display); }
.run-film-close { width: 44px; height: 44px; border: 1px solid #3b3d48; border-radius: 6px; background: transparent; color: #fff; font: 26px/1 var(--display); cursor: pointer; }
.run-film-close:hover, .run-film-close:focus-visible { border-color: #e3193b; outline: none; }
.run-film-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px 20px 6px; }
.run-film-video { position: relative; overflow: hidden; border-radius: 8px; background: #000; }
.run-film-video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.run-film-note { margin: 0; padding: 8px 20px 18px; color: #9a9ca6; font-size: 13px; line-height: 1.5; }
.film-toggle {
  position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 20px; background: rgba(15, 16, 22, .65); color: #fff; font: 700 12px var(--body); cursor: pointer;
}
.film-toggle[aria-pressed="true"] svg { display: none; }
.film-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.film-card { margin: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: #1e1f28; }
.film-hud { display: flex; align-items: center; gap: 16px; padding: 10px 14px; color: #a4a4ad; font: 600 12px var(--mono); }
.film-hud i { font-style: normal; }
.film-status { display: flex; align-items: center; gap: 7px; margin-right: auto; color: #fff; }
.film-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff2d4b; }
.run-film.is-ready .film-status::before { background: #3ecf72; }
.film-rpm b, .film-kmh b { display: inline-block; min-width: 3.1em; color: #fff; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.film-kmh b { min-width: 2em; }
.film-card .sweep-frame img { display: block; width: 100%; height: auto; }
.film-peaks { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px 12px; color: #a4a4ad; font: 600 13px var(--mono); }
.film-peaks b { color: #6f717c; font: 700 24px var(--display); transition: color .3s ease; }
.film-peaks .is-power.is-hit b { color: #ff2d4b; }
.film-peaks .is-torque.is-hit b { color: #71b7de; }
@media (max-width: 800px) {
  dialog.run-film { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; margin: 0; border: 0; border-radius: 0; }
  .run-film-head { padding: 10px 14px; }
  .run-film-head h2 { font-size: 19px; }
  .run-film-body { grid-template-columns: 1fr; gap: 12px; padding: 12px 14px 4px; }
  .run-film-video video { width: auto; height: min(50svh, 520px); aspect-ratio: 9 / 16; margin: 0 auto; }
  .run-film-note { padding: 6px 14px 16px; }
  .film-hud { gap: 12px; padding: 8px 11px; font-size: 11px; }
  .film-rpm b, .film-kmh b { font-size: 16px; }
  .film-peaks b { font-size: 20px; }
}

/* ---------- Run replay (Performance) ---------- */
.run-replay { margin-top: 8px; padding: 26px; border: 1px solid #3b3d48; border-radius: 10px; background: #1e1f28; }
.run-replay-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; }
.run-replay-head h3 { margin: 0 0 6px; font: 700 26px/1.1 var(--display); }
.run-replay-head p { max-width: 640px; margin: 0; color: #aeb0bb; font-size: 13px; line-height: 1.6; }
.run-tabs { display: flex; gap: 6px; }
.run-tabs button { min-height: 44px; padding: 0 16px; border: 1px solid #4b4d58; border-radius: 22px; background: transparent; color: #d6d7de; font: 700 13px var(--body); cursor: pointer; }
.run-tabs button[aria-pressed="true"] { border-color: #d00829; background: #d00829; color: #fff; }
.run-tabs button:focus-visible, .run-again:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.run-body { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 26px; align-items: start; }
.run-clock-label { color: #aeb0bb; font-size: 13px; }
.run-time { display: block; margin: 2px 0 14px; color: #e3193b; font: 700 72px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.run-time small { margin-left: 4px; color: #aeb0bb; font: 600 20px var(--body); }
.run-splits { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; gap: 0 18px; margin: 0 0 16px; padding: 0; list-style: none; }
.run-splits li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid #2e3039; color: #6f717c; font: 500 12px/1.3 var(--mono); transition: color .2s ease; }
.run-splits li b { font-weight: 600; }
.run-splits li.is-hit { color: #f3f3f5; }
.run-splits li.is-final.is-hit { color: #e3193b; }
.run-again { min-height: 44px; padding: 0 16px; border: 1px solid #666875; border-radius: 5px; background: transparent; color: #fff; font: 700 13px var(--body); cursor: pointer; }
.run-again:hover { border-color: #e3193b; }
.run-again[hidden] { display: none; }
/* Chart cropped from the app screenshot (1170×2532): crop x 50–1125, y 1010–1760 */
.run-chart { position: relative; overflow: hidden; aspect-ratio: 1075 / 750; border-radius: 9px; background-color: #26262e; background-repeat: no-repeat; background-size: 108.837% auto; background-position: 52.632% 56.678%; --x: 7.86; }
.run-chart[data-run="0-100"] { background-image: url("/assets/screens/performance-report-0-100.jpg"); }
.run-chart[data-run="100-150"] { background-image: url("/assets/screens/performance-report-100-150.jpg"); }
.run-chart-head { position: absolute; left: 1.2%; right: 1.2%; top: 1.2%; height: 9.2%; display: flex; align-items: center; gap: 18px; padding: 0 2.5%; border-radius: 6px; background: #2e2f38; color: #9a9ca6; font: 600 clamp(10px, 1.5vw, 15px)/1 var(--mono); }
.run-chart-head i { font-style: normal; }
.run-chart-head b { color: #fff; font-weight: 700; }
.run-chart-head .run-chart-speed b { color: #ff5a6a; }
.run-cover, .run-scan { position: absolute; top: 10.7%; bottom: 16%; display: none; }
.run-cover { left: calc(var(--x) * 1%); right: 9.6%; background: #26262e; }
.run-scan { left: calc(var(--x) * 1%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .6); }
.v2-motion .run-chart.is-armed .run-cover, .v2-motion .run-chart.is-running .run-cover, .v2-motion .run-chart.is-running .run-scan { display: block; }
.run-note { margin: 14px 0 0; color: #868895; font-size: 12px; line-height: 1.5; }
.perf-notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 40px; align-items: start; margin-top: 34px; }
.perf-notes > .eyebrow, .perf-notes > h3, .perf-notes > p { grid-column: 1; }
.perf-notes > .performance-signal { grid-column: 2; grid-row: 1 / span 3; }
.perf-notes > .performance-disciplines { grid-column: 2; }
@media (max-width: 900px) {
  .run-body { grid-template-columns: 1fr; }
  .run-time { font-size: 60px; }
  .perf-notes { grid-template-columns: 1fr; }
  .perf-notes > * { grid-column: 1 !important; grid-row: auto !important; }
}
@media (max-width: 560px) {
  .run-replay { padding: 18px 14px; }
  .run-replay-head h3 { font-size: 22px; }
  .run-tabs { width: 100%; }
  .run-tabs button { flex: 1; padding: 0 10px; }
  .run-chart-head { gap: 10px; font-size: 10px; }
}

/* ---------- How it works (interactive) ---------- */
.how { background: #14151c; border-block: 1px solid #22232c; }
.how-body { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.how-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.how-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; border: 1px solid #3b3d48; border-radius: 22px; background: transparent; color: #a4a4ad; font: 700 12px var(--body); cursor: pointer; }
.how-tabs button b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2a2b33; color: #d6d7de; font: 700 13px var(--mono); }
.how-tabs button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.how-tabs button[aria-selected="true"] { padding-right: 14px; border-color: #e3193b; color: #fff; }
.how-tabs button[aria-selected="true"] span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
.how-tabs button[aria-selected="true"] b, .how-tabs button.is-done b { background: #e3193b; color: #fff; }
.how-tabs button:focus-visible, .how-nav button:focus-visible, .how-action:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.how-step h3 { margin: 0 0 10px; font: 700 clamp(26px, 2.6vw, 36px)/1.05 var(--display); }
.how-step > p { max-width: 520px; margin: 0 0 20px; color: #b4b6c0; font-size: 15px; line-height: 1.65; }
.how-step[hidden] { display: none; }
.how-action { min-height: 48px; padding: 0 20px; border: 1px solid #e3193b; border-radius: 5px; background: #e3193b; color: #fff; font: 800 13px var(--body); cursor: pointer; }
.how-action.secondary { border-color: #666875; background: transparent; }
.how-after { display: none; margin-top: 18px; }
.how-step.is-complete .how-after { display: block; }
.how-step.is-complete .how-action[data-action="plug"], .how-step.is-complete .how-action[data-action="connect"] { display: none; }
.how-label { margin: 0 0 8px; color: #fff; font-size: 14px; font-weight: 700; }
.how-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.how-chips li { padding: 7px 11px; border: 1px solid #3b3d48; border-radius: 16px; color: #d6d7de; font-size: 12px; }
.how-small { max-width: 520px; margin: 0; color: #868895; font-size: 13px; line-height: 1.55; }
.how-status { display: flex; align-items: center; gap: 8px; margin: 0; color: #fff; font-weight: 700; }
.how-status::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: #3ecf72; }
.how-slider { display: grid; gap: 8px; max-width: 460px; color: #d6d7de; font-size: 14px; font-weight: 700; }
.how-slider input { width: 100%; height: 44px; accent-color: #e3193b; cursor: grab; }
.how-stores { display: flex; flex-wrap: wrap; gap: 8px; }
.how-stores img { width: 18px; height: 18px; }
.how-nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.how-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; min-height: 44px; padding: 0 14px; border: 1px solid #4b4d58; border-radius: 5px; background: transparent; color: #fff; font: 700 13px var(--body); cursor: pointer; }
.how-nav button:disabled { opacity: .35; cursor: default; }
.how-nav .how-next { margin-left: auto; border-color: #e3193b; }
.how-count { color: #868895; font: 600 12px var(--mono); }

/* Step 3–4 controls: measurement modes */
.how-modes { display: grid; gap: 8px; max-width: 460px; }
.how-mode { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #3b3d48; border-radius: 8px; background: #1a1b22; color: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.how-mode strong { font: 700 15px var(--body); }
.how-mode span { color: #a4a4ad; font-size: 13px; }
.how-mode:hover { border-color: #666875; }
.how-mode[aria-pressed="true"] { border-color: #e3193b; background: rgba(227, 25, 59, .1); }
.how-mode:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.how-modes.is-compact { display: flex; flex-wrap: wrap; gap: 6px; max-width: none; margin: 0 0 18px; }
.how-modes.is-compact .how-mode { min-height: 40px; padding: 0 14px; border-radius: 20px; align-content: center; }
.how-modes.is-compact .how-mode strong { font-size: 13px; }
.how-modes.is-compact .how-mode span { display: none; }
.how-mode-panel { display: none; }
.how-body[data-mode="power"] .how-mode-panel[data-for="power"],
.how-body[data-mode="accel"] .how-mode-panel[data-for="accel"],
.how-body[data-mode="live"] .how-mode-panel[data-for="live"] { display: block; }
.how-step .how-mode-panel .how-after { display: none; }
.how-body.is-pulled .how-mode-panel[data-for="power"] .how-after,
.how-body.is-measured .how-mode-panel[data-for="accel"] .how-after { display: block; }
.how-body.is-measured [data-action="measure"] { display: none; }
.how-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.how-link { color: #fff; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.how-visual { position: relative; width: 100%; aspect-ratio: 10 / 9; container-type: inline-size; --report-4: translate(0, 28.3%) scale(.53); }
.how-visual > * { position: absolute; margin: 0; opacity: 0; pointer-events: none; transition: opacity .45s ease, transform .7s cubic-bezier(.2, .7, .2, 1), left .6s ease, top .6s ease, width .6s ease; }

/* The diagnostic port under the dashboard and a Bluetooth OBD-II adapter */
.how-visual .st-obd { left: 16%; top: 3%; width: 66%; touch-action: none; }
.st-obd svg { display: block; width: 100%; height: auto; overflow: visible; }
.how-visual .st-adapter { transform: translateY(calc((1 - var(--plug, 0)) * 92px)); transition: transform .45s cubic-bezier(.2, .7, .2, 1); cursor: grab; }
.how-visual.is-dragging .st-adapter { transition: none; cursor: grabbing; }
.how-visual .st-led { fill: #7cc4ff; opacity: clamp(.15, calc((var(--plug, 0) - .85) * 7), 1); }
.how-visual .st-led-glow { fill: #7cc4ff; opacity: clamp(0, calc((var(--plug, 0) - .85) * 2.4), .35); }
.st-tag { position: absolute; left: 78%; padding: .35em .7em; border: 1px solid #3b3d48; border-radius: 4px; background: rgba(20, 21, 28, .92); color: #d6d7de; font: 600 clamp(10px, 2.1cqw, 13px)/1.2 var(--mono); white-space: nowrap; transition: opacity .3s ease, top .45s cubic-bezier(.2, .7, .2, 1); }
.st-tag::before { content: ""; position: absolute; right: 100%; top: 50%; width: 3.2cqw; height: 1px; background: #62646f; }
.st-tag-port { top: 19%; }
.st-tag-adapter { top: calc(68% - var(--plug, 0) * 30.7%); }
.how-visual.is-dragging .st-tag-adapter { transition: opacity .3s ease; }
.st-obd .st-hint { position: absolute; left: 13%; top: 64%; margin: 0; color: #e3193b; font: 700 clamp(22px, 5cqw, 34px) var(--display); opacity: 0; transition: opacity .3s ease; }
.how-body:not([data-step="1"]) .st-tag { opacity: 0; }
.how-visual .st-waves { left: 33%; top: 57%; width: 13%; }

/* Phone: real TorqueXpert SD screens with tappable areas */
.how-visual .st-phone { left: 56%; top: 2%; width: 40%; aspect-ratio: 1170 / 2532; overflow: hidden; border: 3px solid #3a3c46; border-radius: 13% / 6%; background: #1e1d23; box-shadow: 0 24px 50px rgba(0, 0, 0, .5); transform: translateX(14%); }
.st-phone .st-scr { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .3s ease; }
.st-phone img.st-scr { object-fit: cover; }
.st-phone[data-screen="connect"] [data-s="connect"],
.st-phone[data-screen="menu"] [data-s="menu"],
.st-phone[data-screen="live"] [data-s="live"],
.st-phone[data-screen="power"] [data-s="power"],
.st-phone[data-screen="test"] [data-s="test"],
.st-phone[data-screen="session"] [data-s="session"] { opacity: 1; }
.st-hot { position: absolute; display: block; padding: 0; border: 2px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.st-hot[hidden] { display: none; }
.st-hot:hover { border-color: rgba(227, 25, 59, .9); background: rgba(227, 25, 59, .08); }
.st-hot.is-hint { border-color: rgba(227, 25, 59, .7); }
.v2-motion .st-hot.is-hint { animation: st-pulse 1.6s ease-in-out infinite; }
@keyframes st-pulse { 0%, 100% { border-color: rgba(227, 25, 59, .3); box-shadow: 0 0 0 0 rgba(227, 25, 59, 0); } 50% { border-color: rgba(227, 25, 59, .95); box-shadow: 0 0 0 4px rgba(227, 25, 59, .22); } }
.how-body.is-connected:not(.is-scanning)[data-step="2"] .st-phone[data-screen="connect"] .st-hot[data-hot="menu"] { border-color: rgba(227, 25, 59, .7); }
.v2-motion .how-body.is-connected:not(.is-scanning)[data-step="2"] .st-phone[data-screen="connect"] .st-hot[data-hot="menu"] { animation: st-pulse 1.6s ease-in-out infinite; }
.st-hot.is-tapped::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(255, 255, 255, .28); animation: st-tapped .45s ease-out forwards; }
@keyframes st-tapped { to { opacity: 0; } }
.st-connect-ui .st-hl { fill: rgba(227, 25, 59, .1); stroke: #e3193b; stroke-width: 6; opacity: 0; transition: transform .28s ease, opacity .2s ease; }
.how-body.is-scanning .st-connect-ui .st-hl { opacity: 1; }
.st-power-ui .st-arc { transition: stroke-dasharray .08s linear; }
.st-power-ui .st-rpm { fill: #fff; font: 700 126px var(--mono); }
.st-power-ui .st-rpm-unit { fill: #868895; font: 500 32px var(--body); letter-spacing: 9px; }
.st-power-ui .st-kmh { fill: #fff; font: 700 96px var(--body); }
.st-power-ui .st-kmh-unit { fill: #b4b6c0; font: 500 38px var(--body); }
.st-power-ui .st-time { fill: #f7554a; font: 600 50px var(--mono); }

/* What the app found, next to the phone */
.how-visual .st-callouts { inset: 0; }
.st-call { position: absolute; padding: .3em .65em; border: 1px solid #3b3d48; border-radius: 4px; background: rgba(20, 21, 28, .94); color: #d6d7de; font: 600 clamp(10px, 1.9cqw, 12px)/1.2 var(--mono); white-space: nowrap; opacity: 0; translate: 0 -50%; transition: opacity .3s ease; }
.st-call::after { content: ""; position: absolute; left: 100%; top: 50%; width: 12px; height: 1px; background: #62646f; }
.st-call.st-tip { border-color: #e3193b; color: #fff; }
.how-body[data-step="2"] .st-call.is-on:not(.st-tip), .how-body[data-step="3"] .st-tip { opacity: 1; }

/* Report drawn by the pull */
.how-visual .st-report { left: 0; top: 12%; width: 100%; transform-origin: 0 0; transform: var(--report-4); }
.how-visual .st-report .sweep-frame { overflow: hidden; border-radius: 8px; box-shadow: 0 22px 54px rgba(0, 0, 0, .55); }
.how-visual .st-report img { display: block; width: 100%; height: auto; }
.how-visual .st-peaks { display: none; }
.how-visual .st-devices { inset: 0; }
.how-visual .st-devices img { position: absolute; height: auto; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .55)); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.how-visual .st-laptop { left: -2%; top: 2%; width: 72%; transform: translateY(10%); }
.how-visual .st-tablet { left: 40%; top: 44%; width: 60%; transform: translateY(14%); }

/* step states */
.how-body[data-step="1"] .st-obd, .how-body[data-step="2"] .st-obd, .how-body[data-step="3"] .st-obd,
.how-body[data-step="4"]:not([data-mode="power"]) .st-obd { opacity: 1; }
.how-body[data-step="1"] .st-obd { pointer-events: auto; }
.how-body[data-step="1"]:not(.is-plugged) .st-hint { opacity: 1; }
.v2-motion .how-body[data-step="1"]:not(.is-plugged) .st-hint { animation: how-hint 1.2s ease-in-out 3; }
@keyframes how-hint { 50% { translate: 0 -12px; } }
.how-body:not([data-step="1"]) .st-obd { left: 0; top: 50%; width: 34%; }
.how-body.is-connected[data-step="2"] .st-waves, .how-body[data-step="3"] .st-waves, .how-body[data-step="4"]:not([data-mode="power"]) .st-waves { opacity: 1; }
.v2-motion .how-body.is-connected .st-waves path { animation: st-wave 1.4s ease-in-out infinite; }
.v2-motion .how-body.is-connected .st-waves path:nth-child(2) { animation-delay: .2s; }
.v2-motion .how-body.is-connected .st-waves path:nth-child(3) { animation-delay: .4s; }
@keyframes st-wave { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
.how-body[data-step="2"] .st-phone, .how-body[data-step="3"] .st-phone, .how-body[data-step="4"] .st-phone { opacity: 1; transform: none; pointer-events: auto; }
.how-body[data-step="2"] .st-callouts, .how-body[data-step="3"] .st-callouts { opacity: 1; }
.how-body[data-step="4"][data-mode="power"] .st-report { opacity: 1; }
.how-body[data-step="1"] .st-report, .how-body[data-step="2"] .st-report, .how-body[data-step="3"] .st-report, .how-body[data-step="4"]:not([data-mode="power"]) .st-report { transition: opacity .2s ease; }
.how-body[data-step="5"] .st-devices { opacity: 1; }
.how-body[data-step="5"] .st-devices img { transform: none; }
.how-body[data-step="5"] .st-report { opacity: 0; transform: translate(48.2%, 53.9%) scale(.435); transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .3s ease .65s; }

@media (max-width: 900px) {
  .how-body { grid-template-columns: 1fr; gap: 18px; }
  .how-panel { display: contents; }
  .how-tabs { order: 1; margin-bottom: 0; }
  .how-visual { order: 2; width: min(100%, 520px); margin-inline: auto; aspect-ratio: 1 / 1; --report-4: translate(0, 36.8%) scale(.48); }
  .how-steps { order: 3; }
  .how-nav { order: 4; margin-top: 4px; }
  .how-step > p, .how-mode-panel > p { font-size: 14px; }
  .how-visual .st-obd { left: 12%; top: 14%; width: 62%; }
  .st-tag { left: 74%; }
  .how-body:not([data-step="1"]) .st-obd { left: 0; top: 56%; width: 36%; }
  .how-visual .st-waves { left: 32%; top: 62%; width: 14%; }
  .how-visual .st-phone { left: 51%; top: 1%; width: 46%; }
}
@media (max-width: 600px) {
  .how-visual .st-callouts { display: none; }
}
.how-step .how-mode-panel > p { max-width: 520px; margin: 0 0 20px; color: #b4b6c0; font-size: 15px; line-height: 1.65; }
.how-mode-panel h3 { margin: 0 0 10px; font: 700 clamp(26px, 2.6vw, 36px)/1.05 var(--display); }
.how-visual.no-anim *, .how-visual.no-anim > * { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .how-visual > *, .how-visual .st-adapter, .how-visual .st-devices img, .how-body[data-step="5"] .st-report, .st-phone .st-scr, .st-tag, .st-call, .st-connect-ui .st-hl { transition: none !important; }
}

/* ---------- Platforms: one account + Windows in one block ---------- */
.platforms-block .ecosystem-windows-grid { margin-top: 64px; padding-top: 56px; border-top: 1px solid #31323c; }
.ecosystem-map-card .v2-globe { width: 26px; height: 26px; color: #fff; flex: 0 0 auto; }

/* ---------- CTA with contacts ---------- */
.cta-contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px 40px; align-items: start; margin-top: 40px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .14); }
.cta-contacts > p { margin: 0; color: #e7d6da; font-size: 14px; line-height: 1.65; }
.cta-contacts .contact-links { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.cta-contacts .contact-links a { font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .cta-contacts { grid-template-columns: 1fr; }
  .cta-contacts .contact-links { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .how-tabs { flex-wrap: nowrap; }
  .how-tabs button, .how-tabs button[aria-selected="true"] { padding: 0 7px; }
  .how-tabs button[aria-selected="true"] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* =========================================================
   Round 3: phone screens back in Performance, report & settings dialogs, Live data layout
   ========================================================= */

/* Shared "open" cards (same look as the video card) */
.tx-open {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; padding: 10px;
  border: 1px solid rgba(227, 25, 59, .6); border-radius: 10px; background: linear-gradient(135deg, rgba(227, 25, 59, .14), rgba(30, 31, 40, .95));
  color: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease;
}
.tx-open:hover { border-color: #e3193b; }
.tx-open:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.tx-open-thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 6px; background: #000; }
.tx-open-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #e3193b; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.tx-open-text strong { display: block; margin-bottom: 5px; font: 700 17px/1.15 var(--display); }
.tx-open-text > span { display: block; color: #b4b6c0; font-size: 12px; line-height: 1.5; }
.tx-open-text b { display: inline-block; margin-top: 7px; color: #ff5a6a; font-size: 13px; }
/* Thumbnail of the report: the chart area of the 0–100 app screenshot */
.perf-report-thumb { background: #26262e url("/assets/screens/performance-report-0-100.jpg") no-repeat 52.632% 56.678% / 108.837% auto; }
.perf-report-open { max-width: 620px; margin: 18px auto 0; }
.live-custom-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.live-custom-open { max-width: 620px; margin: 0 auto 8px; }

/* Dialog base shared with the video dialog */
dialog.tx-dialog {
  width: min(1180px, 94vw); max-height: 94vh; padding: 0; overflow: auto; border: 1px solid #3b3d48; border-radius: 12px;
  background: #171820; color: #f3f3f5; box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
dialog.tx-dialog::backdrop { background: rgba(10, 10, 15, .82); backdrop-filter: blur(6px); }

/* Run report */
.rr-body { display: grid; grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); gap: 22px; align-items: start; padding: 18px 20px 6px; }
.rr-side .run-tabs { margin-bottom: 14px; }
.rr-car { margin: 0 0 14px; color: #aeb0bb; font-size: 13px; line-height: 1.55; }
.rr-result { margin-bottom: 12px; }
.rr-result-label { display: block; color: #aeb0bb; font-size: 13px; }
.rr-result-time { display: block; color: #e3193b; font: 700 56px/1.05 var(--display); letter-spacing: -.02em; }
.rr-stats { display: block; margin-top: 4px; color: #868895; font: 600 11px var(--mono); }
.rr-side .run-splits li { font-size: 11px; }
.rr-chart-card { overflow: hidden; border: 1px solid #34353f; border-radius: 12px; background: #26262e; }
.rr-readout { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 10px 4px; padding: 9px 12px; border-radius: 8px; background: #2e2f38; color: #9a9ca6; font: 600 13px/1.2 var(--mono); }
.rr-readout i { font-style: normal; }
.rr-readout b { color: #fff; font-variant-numeric: tabular-nums; }
.rr-r-spd i { color: #ff5a6a; }
.rr-r-g i { color: #5b8cff; }
.rr-svg { display: block; width: 100%; height: auto; touch-action: none; cursor: ew-resize; user-select: none; }
.rr-gridline { stroke: #3a3b45; stroke-width: 1; }
.rr-gridline-v { stroke-dasharray: 3 4; }
.rr-ax { fill: #8d8f99; font: 500 11px var(--mono); }
.rr-ax-spd { fill: #ff5a6a; }
.rr-line { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.rr-spd { stroke: #ff4b55; }
.rr-rpm { stroke: #f3f3f5; }
.rr-g { stroke: #4c7dff; }
.rr-cursor { stroke: #fff; stroke-width: 2; stroke-dasharray: 7 6; }
.rr-dot { stroke: #26262e; stroke-width: 2; }
.rr-dot-spd { fill: #ff4b55; }
.rr-dot-rpm { fill: #f3f3f5; }
.rr-dot-g { fill: #4c7dff; }
.run-report.hide-spd .rr-spd, .run-report.hide-spd .rr-dot-spd, .run-report.hide-spd .rr-r-spd,
.run-report.hide-rpm .rr-rpm, .run-report.hide-rpm .rr-dot-rpm, .run-report.hide-rpm .rr-r-rpm,
.run-report.hide-g .rr-g, .run-report.hide-g .rr-dot-g, .run-report.hide-g .rr-r-g { display: none; }
.rr-scrub { display: block; width: calc(100% - 28px); height: 32px; margin: 0 14px; accent-color: #e3193b; }
.rr-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 6px 12px 14px; }
.rr-legend label { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: #e6e7ec; font-size: 15px; cursor: pointer; }
.rr-legend input { width: 20px; height: 20px; margin: 0; cursor: pointer; }
.rr-l-spd input { accent-color: #e5484d; }
.rr-l-rpm input { accent-color: #d6d7de; }
.rr-l-g input { accent-color: #4c7dff; }
@media (max-width: 800px) {
  dialog.tx-dialog { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; margin: 0; border: 0; border-radius: 0; }
  .rr-body { grid-template-columns: 1fr; gap: 14px; padding: 12px 14px 4px; }
  .rr-chart-card { order: -1; }
  .rr-side .run-tabs { margin-bottom: 10px; }
  .rr-result-time { font-size: 44px; }
  .rr-readout { gap: 4px 12px; margin: 8px 8px 2px; font-size: 11px; }
  .rr-legend label { font-size: 14px; }
}

/* Customize live data dialog */
.live-custom-body { padding: 18px 20px 22px; }
.live-custom-body .parameter-settings { margin: 0; padding: 0; border: 0; background: none; }
.live-custom-params { margin-top: 28px; padding-top: 22px; border-top: 1px solid #2e3039; }
.live-custom-params h3 { margin: 0 0 8px; font: 700 22px/1.15 var(--display); }
.live-custom-params p { max-width: 760px; margin: 0 0 14px; color: #b4b6c0; font-size: 14px; line-height: 1.6; }
@media (max-width: 800px) { .live-custom-body { padding: 14px; } }

/* Live data block: no text squeezed beside the small labels */
.telemetry .live-control-group-custom { display: none; }
.telemetry .live-controls { grid-template-columns: minmax(0, 1fr) !important; gap: 18px; }
.telemetry .live-control-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.telemetry .live-control { display: grid; grid-template-columns: minmax(0, 1fr) !important; align-content: start; gap: 6px; padding: 12px 14px; }
.telemetry .live-control > * { grid-column: 1 !important; grid-row: auto !important; }
.telemetry .live-control strong { font-size: 16px; line-height: 1.2; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.telemetry .live-control .live-control-summary { display: block; margin: 0; color: #868895; font: 500 9px/1.45 var(--mono); letter-spacing: .04em; white-space: normal; }
.telemetry .live-control > span { font-size: 12px; }
.telemetry-details { margin-top: 36px; }
@media (max-width: 560px) {
  .telemetry .live-control-group { grid-template-columns: minmax(0, 1fr); }
  .telemetry .live-control strong { font-size: 15px; }
}
@media (max-width: 560px) {
  .tx-open, .run-film-open { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; }
  .tx-open-text strong, .run-film-text strong { font-size: 15px; }
}

.rr-result-time small { margin-left: 4px; color: #aeb0bb; font: 600 18px var(--body); }
@media (max-width: 800px) {
  .rr-side { display: contents; }
  .rr-side .run-tabs { order: -2; margin-bottom: 0; }
  .rr-ax { font-size: 17px; }
}

/* One vertical rhythm for all content sections (hero and CTA keep their own) */
main > section.section, main > section.platforms-block { padding-top: 100px; padding-bottom: 100px; }
@media (max-width: 900px) { main > section.section, main > section.platforms-block { padding-top: 80px; padding-bottom: 80px; } }
@media (max-width: 560px) { main > section.section, main > section.platforms-block { padding-top: 68px; padding-bottom: 68px; } }

/* Live data block: one list beside the phone. The selected mode opens in place,
   and the live data settings sit right under Live Data. */
.telemetry .live-detail { display: none !important; }
.telemetry .live-showcase { align-items: center; }
.telemetry .live-controls { grid-template-columns: minmax(0, 1fr) !important; gap: 22px; align-self: center; max-width: 560px; }
.telemetry .live-control-group { grid-template-columns: minmax(0, 1fr) !important; gap: 8px; }
.telemetry .live-control { min-height: 0; padding: 14px 16px; }
.telemetry .live-control:hover { transform: none; }
.telemetry .live-control.active > span { display: block !important; color: #b4b6c0; font-size: 13px; line-height: 1.55; }
.telemetry .live-control.active .live-control-summary { display: none; }
.telemetry .live-custom-open { position: relative; max-width: none; margin: 0 0 6px 18px; width: calc(100% - 18px); grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 8px; }
.telemetry .live-custom-open::before { content: ""; position: absolute; left: -12px; top: -9px; width: 10px; height: 50%; border-left: 1px solid #3b3d48; border-bottom: 1px solid #3b3d48; border-bottom-left-radius: 6px; }
.telemetry .live-custom-open .tx-open-text strong { font-size: 16px; }
@media (min-width: 1100px) {
  /* Nine modes in two columns: Live & Logging on the left, the rest on the right */
  .telemetry .live-showcase { grid-template-columns: minmax(320px, 420px) minmax(560px, 700px); column-gap: 64px; justify-content: center; }
  .telemetry .live-phone-wrap { grid-row: 1; }
  .telemetry .live-controls { grid-row: 1; max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; column-gap: 18px; row-gap: 22px; align-content: start; }
  .telemetry .live-control-group:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
  .telemetry .live-control-group:nth-child(2) { grid-column: 2; grid-row: 1; }
  .telemetry .live-control-group:nth-child(3) { grid-column: 2; grid-row: 2; }
  .telemetry .live-control-group:nth-child(4) { grid-column: 2; grid-row: 3; }
  .telemetry .live-custom-open { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 8px 8px 12px; }
  .telemetry .live-custom-open .tx-open-thumb { aspect-ratio: 2.3 / 1; }
  .telemetry .live-custom-open .live-custom-thumb img { object-position: 50% 17%; }
  .telemetry .live-custom-open .tx-open-text { padding: 0 4px; }
  .telemetry .live-custom-open .tx-open-text strong { font-size: 15px; }
  .telemetry .live-custom-open::before { height: 30px; }
}
@media (max-width: 560px) {
  .telemetry .live-custom-open { margin-left: 12px; width: calc(100% - 12px); grid-template-columns: 92px minmax(0, 1fr); }
  .telemetry .live-custom-open::before { left: -9px; width: 7px; }
}
