/* GUI-FieldBench page. Light only, in the language of the project's renders: real objects on a flat #f5f5f7 stage,
   system type, nearly monochrome. A white page carries #f5f5f7 rounded panels, as in the README.
   The one accent is the orange of the tap ring, rgb(255, 96, 32): it means "where the ESP32 clicked" and is used
   for that and the favicon only. The three series colours (--s1..--s3) belong to the three runs; they were checked
   with the dataviz validator against #f5f5f7 and #ffffff (all pairs, every check passes). */
:root {
  --page-bg: #ffffff; --stage: #f5f5f7; --stage-2: #e8e8ed; --track: #e3e3e8;
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #86868b;   /* names / sentences / short labels only */
  --hair: rgba(0, 0, 0, .08);
  --accent: rgb(255, 96, 32);
  --blue: #0071e3;                                        /* apple.com's button blue; only the phrase in the headline */
  --s1: #2a78d6; --s2: #d55181; --s3: #008300;          /* MAI-Gym iPhone, MAI-Gym iPad, GUI-Owl iPad */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --page: min(1120px, 100% - 32px);
  --r-lg: 22px; --r-md: 18px; --r-sm: 12px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
[hidden] { display: none !important; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--page-bg); color: var(--ink); font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
a { color: inherit; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: .88em; letter-spacing: 0; }
h1, h2, h3, p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, select, input { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* Top bar: frosted white, no rule until the page scrolls under it. */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 52px; padding: 0 max(16px, calc((100% - 1120px) / 2));
       background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 var(--hair); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 17px var(--display); text-decoration: none; white-space: nowrap; letter-spacing: -.02em; }
.brand-mark { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--accent); }
.top-nav { display: flex; gap: 26px; margin-left: auto; font-size: 13px; }
.top-nav a { color: var(--ink-2); text-decoration: none; }
.top-nav a:hover { color: var(--ink); }
.gh { font-size: 13px; padding: 5px 14px; border-radius: 980px; background: var(--stage); text-decoration: none; }
.gh:hover { background: var(--stage-2); }

/* Hero: the claim, centred, then the rendered rig as the picture. */
.hero { width: min(880px, 100% - 32px); margin: 0 auto; padding: 72px 0 40px; text-align: center; }
.eyebrow { font: 600 15px var(--sans); color: var(--ink-3); letter-spacing: -.005em; }
h1 { font: 700 clamp(2.5rem, 6.2vw, 4.75rem)/1.04 var(--display); letter-spacing: -.035em; margin-top: 14px; text-wrap: balance; }
h1 em { font-style: italic; }
h1 .hl { color: var(--blue); }
h1 sup { font: 500 .36em/1 var(--sans); vertical-align: top; position: relative; top: .55em; margin-left: .08em; color: var(--ink-3); letter-spacing: 0; }
/* One sentence on one line at every width: in the system font it is 21.7em to 22.5em long (small sizes are set
   wider), so 3.9vw keeps it inside the 16 px gutters down to 320 px. A wider fallback font wraps to two even lines. */
.lede { margin: 22px auto 0; font-size: clamp(.78rem, 3.9vw, 1.3rem); line-height: 1.45; color: var(--ink-2); text-wrap: balance; }
/* The three tags stay on one line at every width: the type shrinks with the viewport instead of wrapping. */
.pills { display: flex; justify-content: center; flex-wrap: nowrap; gap: clamp(5px, 1.6vw, 8px); margin-top: 26px; white-space: nowrap; }
.pills li { font: 500 clamp(11px, 3vw, 14px) var(--sans); padding: .42em 1em; border-radius: 980px; background: var(--stage); color: var(--ink); }
.cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 980px; background: var(--stage); text-decoration: none; font-weight: 500; font-size: 15px; transition: background-color .15s; }
.btn:hover { background: var(--stage-2); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #3a3a3c; }
.footnote { margin-top: 22px; font-size: 13px; color: var(--ink-2); }

/* The rig. The picture carries its own stage and rounded corners. The live layer (screen + the phone's glass and
   frame) is placed in % of the picture, so it scales with it; it appears only once its images are ready. */
.rig { width: var(--page); margin: 0 auto; }
.rig-pic { position: relative; container-type: inline-size; }
.rig-still { display: block; width: 100%; height: auto; }
.rig-glass { position: absolute; display: block; height: auto; pointer-events: none; opacity: 0; }
.rig-pic .screen { opacity: 0; }
.rig-pic.live .rig-glass, .rig-pic.live .screen { opacity: 1; }
/* Under each device's name in the picture, the run as it happens. Centred on the picture's own label positions. */
.rig-live { position: relative; height: 3.6em; margin-top: 6px; font-size: 13px; line-height: 1.45; }
.rl { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; white-space: nowrap; max-width: 30%; }
.rl-host { left: 24.5%; } .rl-board { left: 55.7%; } .rl-phone { left: 81.6%; }
.rl-who { display: none; font-weight: 600; }
.rl-sub { color: var(--ink-3); }
.rl-out { color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* Screens inside rendered frames (hero and player). `.screen` is as wide as its picture and as tall as the
   screenshot's aspect asks; site.js maps it onto the display with the renderer's own projective transform, so
   everything inside it is positioned in screenshot fractions. The frame picture sits on top: opaque everywhere
   except the display, where it lets the screenshot through exactly as much as the glass does. */
.screen { position: absolute; left: 0; top: 0; width: 100%; transform-origin: 0 0; background: #000; container-type: inline-size; }
.screen .under { position: absolute; inset: 0; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: 0; transition: opacity .28s; }
.frame.on { opacity: 1; }
.fx { position: absolute; inset: 0; z-index: 3; pointer-events: none; }   /* above the two fading frames (z 1 and 2) */
.fx svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* The ring: about a fingertip (4 mm radius) on every device, as in the README's replays. Sizes come in as the
   screenshot's own pixels (the SVG's viewBox). */
.ring { fill: none; stroke: var(--accent); transform-box: fill-box; transform-origin: center; animation: tap .55s cubic-bezier(.2, .8, .2, 1) both; }
.ring.hold { stroke-dasharray: none; fill: rgba(255, 96, 32, .18); }
.drag { stroke: var(--accent); fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s ease-in-out .1s forwards; }
@keyframes tap { from { transform: scale(1.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.keys { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); max-width: 90%; padding: .45em 1em; border-radius: 999px;
        background: rgba(255, 255, 255, .94); color: var(--ink); font: 600 var(--keys, 5cqw) var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        box-shadow: 0 4px 18px rgba(0, 0, 0, .28); animation: rise .35s ease-out both; }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }

/* At a glance */
.facts { width: var(--page); margin: 64px auto 0; display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.facts li { padding: 26px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; font-size: 15px; color: var(--ink-2); background: var(--stage); border-radius: var(--r-lg); }
.facts p { display: grid; gap: 0; white-space: nowrap; }
.facts b { font: 600 2.6rem/1.1 var(--display); color: var(--ink); letter-spacing: -.03em; }
.app-icons { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.app-icons img { display: block; width: clamp(36px, 10vw, 44px); height: auto; border-radius: 22%; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* Sections */
.sec { width: var(--page); margin: 0 auto; padding: 120px 0 0; }
.sec h2 { font: 700 clamp(2rem, 4.4vw, 3.1rem)/1.08 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.sec-lede { margin-top: 14px; max-width: 40em; font-size: 1.06rem; color: var(--ink-2); text-wrap: pretty; }
.sec h3 { font: 600 1.15rem/1.3 var(--display); letter-spacing: -.015em; }
.sec h3.sub { margin-top: 80px; font: 700 clamp(1.5rem, 2.6vw, 1.9rem)/1.15 var(--display); letter-spacing: -.025em; }

/* Not another simulator benchmark: three cards. The struck line is how those benchmarks work, the name is the point,
   the small line under it is the example. */
.diffs { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.diffs article { padding: 34px 30px 32px; border-radius: var(--r-lg); background: var(--stage); display: grid; align-content: start; gap: 6px; }
.ico { width: 36px; height: 36px; margin-bottom: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.was { font-size: 14px; color: var(--ink-3); }
.diffs h3 { font: 700 clamp(1.5rem, 2.4vw, 1.85rem)/1.12 var(--display); letter-spacing: -.025em; }
.now { margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }

/* Replay player */
.tabs { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { background: var(--stage); border: 0; border-radius: 14px; padding: 9px 16px 10px; cursor: pointer; text-align: left; display: grid; gap: 1px; font-size: 15px; font-weight: 600; transition: background-color .15s; }
.tabs button:hover { background: var(--stage-2); }
.tabs button small { font: 400 12px var(--sans); color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs button[aria-selected="true"] small { color: rgba(255, 255, 255, .72); }
.player { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 48px; align-items: start; }
.player-stage { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--stage); aspect-ratio: 960 / 1240; container-type: inline-size; }
.player-stage .screen { height: 100%; }   /* until site.js maps it: a dark display, as a phone that is off */
.frame-pic { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.stage-label { position: absolute; z-index: 3; left: 26.8%; top: 6.2%; font-size: max(12px, 2.9cqw); color: var(--ink-3); }
.stage-label b { font-weight: 600; color: var(--ink); }
.player-panel { display: grid; align-content: start; gap: 16px; min-width: 0; padding-top: 8px; }
.task-meta { font: 600 12px var(--sans); color: var(--ink-3); letter-spacing: .04em; }
.task-text { font: 600 clamp(1.25rem, 2vw, 1.5rem)/1.3 var(--display); letter-spacing: -.02em; text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 12.5px; padding: 3px 10px; border-radius: 980px; background: var(--stage); color: var(--ink-2); }
.steps { display: grid; gap: 1px; max-height: 318px; overflow-y: auto; font: 400 13px/1.5 var(--mono); }
.steps li { display: grid; grid-template-columns: 2.2em 1fr; gap: 8px; padding: 4px 10px; border-radius: 8px; color: var(--ink-3); cursor: pointer; }
.steps li:hover { color: var(--ink); }
.steps li.past { color: var(--ink-2); }
.steps li.now { background: var(--stage); color: var(--ink); font-weight: 600; }
.steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wire-line { min-height: 1.6em; font-size: 12.5px; color: var(--ink-2); }
.wire-line b { font: 600 13px var(--sans); color: var(--ink); }
.outcome { padding: 14px 16px; border-radius: 14px; background: var(--stage); display: grid; gap: 6px; animation: rise2 .4s ease-out both; }
@keyframes rise2 { from { transform: translateY(8px); opacity: 0; } }
.verdict { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--sans); letter-spacing: .02em; }
/* Pass / fail marks are glyph and word, not colour: a filled dark disc for a pass, a hollow one for a fail. */
.mark { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 10.5px/1 var(--sans); flex: none; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.mark.pass { background: var(--ink); color: #fff; box-shadow: none; }
.mark.fail { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.answer { font-size: 15px; color: var(--ink); }
.note { font-size: 14.5px; color: var(--ink-2); }
.note b { color: var(--ink); font-weight: 600; }
.controls { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.controls button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--stage); cursor: pointer; font-size: 15px; line-height: 1; transition: background-color .15s; }
.controls button:hover { background: var(--stage-2); }
.ticks { display: flex; gap: 4px; flex: 1; margin-left: 8px; }
.ticks i { flex: 1; height: 4px; border-radius: 2px; background: var(--track); }
.ticks i.done { background: var(--ink); }

/* Results */
.level-key { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--ink-2); }
.level-key > span:first-child { color: var(--ink); font-weight: 600; }
.level-key code { font-size: 12.5px; color: var(--ink); background: var(--stage); border-radius: 6px; padding: 1px 6px; margin-right: 3px; }
.tiles { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { padding: 26px 28px 24px; border-radius: var(--r-lg); background: var(--stage); display: grid; align-content: start; }
.tile-label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.tile-device { font-size: 13.5px; color: var(--ink-2); margin-top: 1px; }
.swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c); }
.tile-value { font: 700 clamp(3rem, 5.4vw, 4rem)/1 var(--display); letter-spacing: -.04em; margin-top: 22px; font-variant-numeric: tabular-nums; }
.tile-cap { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.lv-rows { margin-top: 20px; display: grid; gap: 4px; }
.lv-row { display: grid; grid-template-columns: 2em 1fr 3.2em; align-items: center; gap: 10px; padding: 3px 0; font-size: 12.5px; border-radius: 6px; cursor: default; }
.lv-row code { font-size: 12px; color: var(--ink-2); }
.lv-row b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.lv-bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--c); }
.lv-row:hover b, .lv-row:focus-visible b { color: var(--ink); }
.chart-card { margin-top: 16px; padding: 28px; border-radius: var(--r-lg); background: var(--stage); }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.chart-sub { font-size: 14px; color: var(--ink-2); }
/* Failed tasks by reason: one ranked bar list per run, all three on the same scale. Bars wear the run's colour, text stays ink. */
.reasons { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.reason-col { display: grid; align-content: start; gap: 14px; min-width: 0; }
.reason-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.reason-head small { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.reason { display: grid; gap: 6px; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); border-radius: 4px; }
.rbar { display: flex; align-items: center; gap: 8px; }
.rbar i { height: 8px; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--c); }
.rbar b { font: 500 12.5px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.numbers { margin-top: 16px; padding: 0 28px; border-radius: var(--r-lg); background: var(--stage); }
.numbers summary { padding: 18px 0; cursor: pointer; font-size: 15px; font-weight: 600; }
.numbers summary:hover { color: var(--ink-2); }
.numbers .fine { padding: 16px 0 22px; max-width: 60em; }
.table-wrap { overflow-x: auto; }
.rtable { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rtable th, .rtable td { text-align: left; padding: 11px 14px 11px 0; border-top: 1px solid var(--hair); white-space: nowrap; }
.rtable thead th { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.rtable tbody th { font-weight: 600; }
.rtable tbody th span { display: inline-flex; align-items: center; gap: 8px; }
.rtable small { color: var(--ink-3); font-size: 12.5px; }
.fine { font-size: 13px; color: var(--ink-2); }
.notes { margin-top: 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.notes li { padding: 18px 18px 20px; border-radius: var(--r-md); background: var(--stage); display: grid; align-content: start; gap: 10px; }
.notes b { font-size: 15px; font-weight: 600; }
.notes code { justify-self: start; font-size: 12px; color: var(--ink-2); background: #fff; border-radius: 6px; padding: 3px 7px; white-space: normal; overflow-wrap: anywhere; }

/* Task browser */
.filters { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--stage-2); }
.seg button { background: none; border: 0; padding: 6px 18px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.field { display: grid; gap: 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.field select, .field input { height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--stage); font: 400 14px var(--sans); color: var(--ink); min-width: 120px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background: var(--stage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.field.grow { flex: 1; min-width: 180px; } .field.grow input { width: 100%; }
.count { font-size: 12.5px; color: var(--ink-3); padding-bottom: 9px; margin-left: auto; }
.tlist { margin-top: 16px; border-radius: var(--r-lg); overflow: hidden; background: var(--stage); }
.trow + .trow { box-shadow: inset 0 1px 0 #fff; }
.trow > button { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; padding: 13px 20px; display: grid; grid-template-columns: 112px 100px 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14.5px; }
.trow > button:hover { background: var(--stage-2); }
.trow > button:focus-visible { outline-offset: -3px; }
.tid { font: 400 12.5px var(--mono); color: var(--ink-2); }
.tapp { font-size: 13px; color: var(--ink-2); }
.tlevel { font: 500 11.5px var(--mono); padding: 1px 6px; border-radius: 6px; background: #fff; text-align: center; color: var(--ink-2); }
.touts { display: flex; gap: 14px; }
.tout { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tout .mark { width: 16px; height: 16px; font-size: 9.5px; }
.tmore { padding: 2px 20px 20px 156px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.tmore ul { display: grid; gap: 3px; }
.tmore li { padding-left: 16px; position: relative; }
.tmore li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.tmore .lab { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }
.empty { padding: 32px; text-align: center; color: var(--ink-2); }

/* Closing line, footer, tooltip */
.next { width: var(--page); margin: 120px auto 0; padding: 56px 32px; border-radius: var(--r-lg); background: var(--stage); display: grid; justify-items: center; gap: 22px; text-align: center; }
.next p { font: 700 clamp(1.4rem, 2.8vw, 2rem)/1.2 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.next .btn { background: var(--ink); color: #fff; }
.next .btn:hover { background: #3a3a3c; }
.foot { width: var(--page); margin: 48px auto 0; padding: 0 0 56px; display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.foot b { color: var(--ink); font-weight: 600; }
.tip { position: fixed; z-index: 40; pointer-events: none; max-width: 300px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: 0 8px 28px rgba(0, 0, 0, .16), 0 0 0 .5px rgba(0, 0, 0, .08); font-size: 13px; line-height: 1.4; }
.tip b { font-weight: 600; } .tip small { display: block; color: var(--ink-2); font-size: 12.5px; }

@media (max-width: 980px) {
  .facts { grid-template-columns: 1fr; }
  .app-icons { margin-left: 0; gap: 8px; }
  .diffs, .tiles, .reasons { grid-template-columns: 1fr; }
  .notes { grid-template-columns: repeat(2, 1fr); }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .tabs button { flex: none; }
  .player { grid-template-columns: 1fr; gap: 28px; }
  .player-stage { width: 100%; max-width: 480px; margin: 0 auto; }
  .top-nav { display: none; } .gh { margin-left: auto; } .top { gap: 12px; }
  .trow > button { grid-template-columns: 96px 1fr auto; padding-inline: 16px; }
  .trow .tapp, .trow .tlevel { display: none; }
  .trow .tinstr { grid-column: 1 / -1; grid-row: 2; }
  .tmore { padding-left: 16px; }
}
/* Too narrow to centre the live text under the picture's labels: list it, each line with its device's name. */
@media (max-width: 720px) {
  .rig-live { height: auto; margin-top: 14px; display: grid; gap: 8px; }
  .rl { position: static; transform: none; display: flex; flex-wrap: wrap; gap: 0 8px; justify-items: start; max-width: none; white-space: normal; }
  .rl-who { display: inline; }
  .rl-out { overflow: visible; }
}
@media (max-width: 560px) {
  .notes { grid-template-columns: 1fr; }
  .facts b { font-size: 2rem; }
  .facts li { padding: 22px 22px; }
  .sec { padding-top: 88px; }
  .hero { padding-top: 48px; }
  .diffs article { padding: 28px 24px; }
  .tile { padding: 24px; }
  .chart-card { padding: 22px; } .numbers { padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring, .drag, .keys, .outcome { animation: none; }
  .drag { stroke-dashoffset: 0; }
  .frame { transition: none; }
}
