/* php2shell.fyi: one stylesheet for every page. Light only. Self-hosted OFL fonts (strict CSP: font-src 'self').
   Type: Libre Franklin 700 sets headings, the wordmark, buttons and UI words; Source Serif 4 sets all reading text.
   Five sizes: --step-small, --step-body, --step-lead, --step-head, --step-display. Do not add a sixth.
   No hairlines, shadows at rest, gradients, eyebrow labels or tracked caps. Surfaces differ by tone only.

   SUBPAGE CONTRACT (every page except /, which has its own sections):
   <body id="top">
     <a class="skip" href="#content">Skip to content</a>
     <header class="site-head">
       <a class="brand" href="/">PHP2Shell<span>.fyi</span></a>
       <nav class="site-nav" aria-label="Main"> 3 to 5 <a>; the current one gets aria-current="page" </nav>
       <a class="button button-small" href="/#check">Check a site</a>
     </header>
     <main id="content" class="doc">
       <nav class="crumbs" aria-label="Breadcrumb"><ol role="list"><li><a href="/">Checker</a></li> … <li aria-current="page">Title</li></ol></nav>
       <article class="page">
         <h1>…</h1> <p class="lead">…</p> <p class="hint">Last reviewed …</p>
         h2[id] h3 p ul ol blockquote, <pre tabindex="0"><code>, inline <code>,
         <div class="table-wrap"><table class="data"> (td.v = version cell, tr.eol = ended branch) </table></div>,
         <div class="callout"> (or "callout warn") <p>…</p></div>,
         <aside class="related" aria-labelledby="related-title"><h2 id="related-title">Related pages</h2>
           <ul role="list"><li><a href="…">Title<span>One-line description</span></a></li></ul></aside>
       </article>
       <nav class="doc-meta" aria-labelledby="toc-title"><h2 id="toc-title">On this page</h2><ol role="list"><li><a href="#id">…</a></li></ol></nav>
     </main>
     <footer class="site-foot"> copy the footer of index.html unchanged </footer>
   Helpers: .nowrap, .sub (secondary line in a list item), .sr-only. No inline style attributes (CSP). */

@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/libre-franklin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #eef4ff;
  --surface-2: #fff0f6;
  --ink: #14235a;
  --muted: #4a5785;
  --accent: #e2156f;
  --accent-ink: #ffffff;
  --accent-press: #c20f5e;
  --field-1: #cfe2ff;
  --field-2: #ffd3e6;
  --blue: #1f4fe0;
  --pink-ink: #a00c50;

  --font-display: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-code: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.2rem, 1rem + 0.55vw, 1.5rem);
  --step-head: clamp(1.875rem, 1.2rem + 2.1vw, 3.25rem);
  --step-display: clamp(2.5rem, 1rem + 6vw, 5.5rem);

  /* Content sits in a centred column of at most --content; full-bleed bands keep their colour to the edges. */
  --content: 72rem;
  --margin: max(clamp(1rem, 2.2vw, 2rem), (100vw - var(--content)) / 2);
  --gutter: clamp(0.75rem, 1.4vw, 1.5rem);
  --section: clamp(5rem, 3rem + 7vw, 10rem);
  --radius: 4px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
  hyphens: none;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
strong, b { font-weight: 600; }

a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.18em; transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--ink); }
}

code, pre, kbd, samp { font-family: var(--font-code); font-size: 0.86em; }
:not(pre) > code { background: var(--surface); padding: 0.08em 0.32em; border-radius: 3px; overflow-wrap: anywhere; }
pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
  tab-size: 2;
}
pre code { font-size: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }
.hint { font-size: var(--step-small); color: var(--muted); line-height: 1.45; }
.hint.warn { color: var(--pink-ink); }

.skip {
  position: absolute; left: var(--margin); top: -100px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 0.75rem; }

/* ---------- buttons (one shape on every page) ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.4em;
  border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-body); line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button:disabled { background: var(--muted); cursor: progress; }
.button-small { min-height: 2.6rem; padding: 0 1.1em; font-size: var(--step-small); }
.button-quiet, .button-compact { min-height: 2.75rem; font-size: var(--step-small); } /* compact: a pink button in a row of quiet ones */
.button-quiet { background: var(--field-1); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-press); color: var(--accent-ink); }
  .button-quiet:hover { background: var(--ink); color: var(--bg); }
}

/* ---------- header ---------- */

.site-head {
  display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.75rem);
  padding: 1.1rem var(--margin);
}
.brand {
  margin-right: auto;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-body);
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none;
}
.brand span, .foot-brand span { color: var(--muted); }
.site-nav { display: flex; gap: clamp(1rem, 2.2vw, 2.25rem); }
.site-nav a {
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-small);
  color: var(--ink); text-decoration-color: transparent;
}
.site-nav a[aria-current="page"], .site-nav a:hover { text-decoration-color: currentColor; }
@media (max-width: 720px) { .site-nav { display: none; } }

/* ---------- home: hero (sentence split by a frame) ---------- */

.hero { padding: clamp(1rem, 3vh, 2.5rem) var(--margin) 0; }
.hero-stage {
  display: grid;
  grid-template-columns: auto minmax(16rem, 24rem) auto;
  justify-content: center;
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
}
.hero-title {
  grid-column: 1 / -1; grid-row: 1;
  display: grid; grid-template-columns: subgrid; align-items: center;
  font-size: clamp(2.75rem, 4vw, 4rem); line-height: 0.95; letter-spacing: -0.035em; /* 4vw: both halves and the frame fit the column from 1001px */
}
.hero-a { grid-column: 1; justify-self: end; white-space: nowrap; }
.hero-b { grid-column: 3; justify-self: start; white-space: nowrap; }
.mask { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.mask > span { display: block; }

.reel { grid-column: 2; grid-row: 1; margin: 0; container-type: inline-size; }
.reel-window {
  --fh: calc(100cqi * 9 / 16); --sliver: 1rem; --rg: 1rem; /* sliver < frame padding: a neighbour shows its colour, never its text */
  position: relative;
  height: calc(var(--fh) + 2 * (var(--sliver) + var(--rg)));
  overflow: clip;
}
.reel-track {
  list-style: none;
  display: grid; gap: var(--rg);
  transform: translateY(calc(var(--sliver) + var(--rg) - var(--i, 0) * (var(--fh) + var(--rg))));
}
.reel-track.is-moving { transition: transform 900ms var(--ease-in-out); }

[data-ui] .frame {
  height: var(--fh);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(0.9rem, 5cqi, 1.75rem);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: clamp(0.8125rem, 3.4cqi, 1.0625rem);
  line-height: 1.4;
}
[data-ui] .frame-req code { background: none; padding: 0; font-size: 0.85em; color: var(--muted); }
[data-ui] .frame-head { display: grid; gap: 0.2em; }
[data-ui] .frame-head code { background: none; padding: 0; font-size: 1em; color: var(--muted); overflow-wrap: anywhere; }
[data-ui] .frame-head .frame-key { font-size: clamp(1.5rem, 9.5cqi, 3.25rem); line-height: 1.05; color: var(--ink); font-weight: 700; letter-spacing: -0.03em; margin-top: 0.05em; }
[data-ui] .frame-verdict { font-family: var(--font-text); font-size: 1.05em; }
[data-ui] .tag {
  display: inline-block; margin-right: 0.45em; padding: 0.15em 0.55em 0.2em;
  border-radius: 3px; background: var(--muted); color: #ffffff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.88em;
}
[data-ui] .frame-affected { background: var(--field-2); }
[data-ui] .frame-affected .tag { background: var(--pink-ink); }
[data-ui] .frame-fixed .tag, [data-ui] .frame-backport .tag { background: var(--blue); }
[data-ui] .frame-backport { background: var(--field-1); }
[data-ui] .reel-pause {
  position: absolute; right: clamp(0.6rem, 3cqi, 1.25rem); top: calc(var(--sliver) + var(--rg) + clamp(0.6rem, 3cqi, 1.25rem));
  padding: 0.3em 0.7em; border: 0; border-radius: 3px;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 0.8125rem; cursor: pointer;
}

.hero-foot {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  align-items: start;
  margin-top: clamp(1.25rem, 3vh, 2.5rem);
}
.hero-lede { grid-column: 1 / 6; max-width: 46ch; font-size: var(--step-body); padding-bottom: 0.25rem; }
.check { grid-column: 7 / -1; }

/* ---------- checker form ---------- */

.field-label { display: block; margin-bottom: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-body); }
.input-row { display: flex; gap: 0.5rem; }
.input-row input {
  flex: 1; min-width: 0; min-height: 3.25rem; padding: 0 1rem;
  border: 2px solid transparent; border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-text); font-size: var(--step-body);
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.input-row input::placeholder { color: var(--muted); opacity: 1; }
.input-row input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.check .hint { margin-top: 0.5rem; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.9rem; cursor: pointer; }
.consent input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; accent-color: var(--accent); flex: none; }
.turnstile { margin-top: 0.9rem; min-height: 65px; }
.retry, .error { margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: var(--radius); }
.retry { background: var(--surface); }
.error { background: var(--field-2); color: var(--ink); }
.progress { margin-top: 1rem; padding: 1rem 1.1rem; background: var(--surface); border-radius: var(--radius); }
.progress p { display: flex; align-items: center; gap: 0.7rem; }
.progress-stages { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); color: var(--muted); }
/* active scan: closed by default, so the first screen stays the passive check */
.active-panel { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--field-1); }
.active-panel > summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: var(--step-body); width: fit-content; }
.active-panel > summary::marker { color: var(--accent); }
.active-panel[open] > summary { margin-bottom: 0.75rem; }
.active-panel > p { max-width: 60ch; }
.active-panel > p + p { margin-top: 0.5rem; }
.active-panel > .button { margin-top: 0.9rem; }
.spin { width: 1.1rem; height: 1.1rem; flex: none; border-radius: 50%; border: 3px solid var(--field-1); border-top-color: var(--accent); }

/* ---------- result (verdict panel) ---------- */

.result {
  /* Verdict tones are their own colour set: the brand pink and blue never carry a verdict. */
  --v-bg: #f3f5f9; --v-accent: #5b6788; --v-ink: #3d4866; --v-icon: "?";
  --v-steps: var(--surface);
  margin: clamp(2rem, 5vw, 4.5rem) var(--margin) 0;
}
.result[data-tone="bad"] { --v-bg: #fff1ec; --v-accent: #d03a1b; --v-ink: #a3290f; --v-icon: "!"; }
.result[data-tone="warn"] { --v-bg: #fff8e6; --v-accent: #b7791f; --v-ink: #7d520a; --v-icon: "!"; }
.result[data-tone="good"] { --v-bg: #ecf9f1; --v-accent: #1d8a4e; --v-ink: #136b3b; --v-icon: "\2713"; }
.result + .result { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.verdict {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 3rem);
  background: var(--v-bg); border-radius: var(--radius);
}
.verdict-main { grid-column: 1 / -1; }
.verdict-head { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.5rem); }
.verdict-icon {
  flex: none; display: grid; place-items: center;
  width: clamp(2.75rem, 5vw, 3.75rem); aspect-ratio: 1; border-radius: 50%;
  background: var(--v-accent); color: #ffffff;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1;
}
.verdict-icon::before { content: var(--v-icon); }
.result-kind { font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); color: var(--muted); margin-bottom: 0.3rem; }
.verdict-answer { margin-top: 1.1rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.015em; color: var(--v-ink); max-width: 46ch; }
.verdict-lead { margin-top: 0.9rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); line-height: 1.15; letter-spacing: -0.02em; max-width: 40ch; }
#result-title, #active-title { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; }
#result-title:focus, #active-title:focus { outline: none; }
.verdict-text { margin-top: 0.9rem; max-width: 62ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.chips li { padding: 0.25em 0.65em; border-radius: 3px; background: var(--bg); font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); }
.chips:empty { display: none; }

.suggestion { margin-top: 1rem; padding: 1.25rem clamp(1.25rem, 3vw, 3rem); background: var(--surface); border-radius: var(--radius); display: grid; gap: 0.75rem; justify-items: start; }

.result-rows { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.rrow {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding: 1.25rem clamp(1.25rem, 3vw, 3rem);
}
.rrow > h3 { grid-column: 1 / 4; font-size: var(--step-body); line-height: 1.3; padding-top: 0.1rem; }
.rrow > :not(h3) { grid-column: 4 / -1; min-width: 0; }
.rrow-steps { background: var(--v-steps); border-radius: var(--radius); padding-block: 1.75rem; }
.rrow ul, .rrow ol { padding-left: 1.2em; display: grid; gap: 0.6rem; max-width: 70ch; }
.rrow-steps ol { gap: 0.9rem; }
.rrow li::marker { font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.rrow .sub { display: block; color: var(--muted); font-size: var(--step-small); margin-top: 0.2rem; }
.cmd { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.cmd code { font-size: 0.9em; padding: 0.4em 0.6em; }
.cmd button { min-height: 2.5rem; }
.table-wrap { overflow-x: auto; }
.saw { border-collapse: collapse; width: 100%; max-width: 70ch; font-size: var(--step-small); }
.saw th, .saw td { text-align: left; vertical-align: top; padding: 0.55rem 0.8rem; }
.saw th { width: 12em; color: var(--muted); font-family: var(--font-display); font-weight: 700; }
.saw tr:nth-child(odd) { background: var(--surface); }
.saw code { background: none; padding: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.limit { margin-top: 1rem; max-width: 62ch; }
#scan-meta, #rules-meta { margin-top: 0.3rem; }
/* Paid PDF report (only with ?pdf=1): a plain notice above the results, like .suggestion. */
.report-ready {
  margin: clamp(2rem, 5vw, 4.5rem) var(--margin) 0; padding: 1.25rem clamp(1.25rem, 3vw, 3rem);
  background: var(--surface); border-radius: var(--radius); display: grid; gap: 0.75rem; justify-items: start;
}
.report-ready h2 { font-size: var(--step-lead); line-height: 1.2; }
.report-ready h2:focus { outline: none; }
.report-ready + .result { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
/* What the report includes: a native modal (Esc, focus trap, top layer). It floats, so it is the one
   thing on the page with a shadow; the sample page sits on the light blue field like paper on a desk. */
.report-dialog {
  width: min(100% - 2rem, 52rem); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 0;
  border: 0; border-radius: var(--radius); background: var(--bg); color: var(--ink);
  box-shadow: 0 1.5rem 4rem rgb(20 35 90 / 0.18); overflow: auto; overscroll-behavior: contain;
}
.report-dialog::backdrop { background: rgb(207 226 255 / 0.75); }
.report-dialog-body { display: grid; grid-template-columns: 17rem minmax(0, 1fr); }
.report-dialog-figure { background: var(--surface); padding: clamp(1rem, 2.5vw, 1.75rem); display: grid; align-content: center; }
.report-dialog-figure img { display: block; width: 100%; height: auto; border-radius: 2px; }
.report-dialog-text { padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: 0.9rem; align-content: start; }
.report-dialog h2 { font-size: var(--step-lead); line-height: 1.15; }
.report-dialog ul { padding-left: 1.2em; display: grid; gap: 0.45rem; font-size: var(--step-small); line-height: 1.45; }
.report-dialog li::marker { color: var(--accent); }
.report-dialog-price { font-weight: 600; } /* body text, so the h2 stays the only heading */
.report-dialog .actions { margin-top: 0.2rem; }

/* ---------- home: version lookup (headline you can type) ---------- */

.lookup {
  margin-top: var(--section);
  padding: 0 var(--margin);
}
.lookup h2 { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; }
.lookup-line {
  position: relative;
  margin-top: clamp(1rem, 2.5vw, 2.5rem);
  font-family: var(--font-display); font-weight: 700; font-size: calc(var(--step-head) * 1.25);
  line-height: 1.05; letter-spacing: -0.045em;
}
[data-ui] .lookup-input {
  display: block; width: 100%; padding: 0 0 0.04em; margin: 0 0 0 -0.04em;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; letter-spacing: inherit; font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}
[data-ui] .lookup-input:focus { outline: none; }
[data-ui] .lookup-input:focus-visible { outline: none; }
[data-ui]:focus-within { outline: 3px solid var(--accent); outline-offset: 0.12em; border-radius: 2px; }
[data-ui] .lookup-mirror { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; pointer-events: none; font-variant-numeric: tabular-nums; }
[data-ui] .lookup-caret {
  position: absolute; left: 0; top: 0.16em; width: 0.08em; height: 0.78em;
  background: var(--accent); pointer-events: none;
  transform: translateX(var(--caret-x, 0px));
}
.lookup-line:focus-within .lookup-caret { display: none; }

.lookup-foot {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2rem;
  margin-top: clamp(2rem, 3.5vw, 3rem); align-items: start;
}
.lookup-try { grid-column: 1 / 6; display: grid; gap: 1rem; align-content: start; }
.lookup-examples { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.example {
  min-height: 2.75rem; padding: 0 1rem; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-body); font-variant-numeric: tabular-nums;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.example:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .example:hover { background: var(--ink); color: var(--bg); } }
.lookup-note { color: var(--muted); max-width: 44ch; }

.answer { grid-column: 7 / -1; }
[data-ui].answer {
  --a-bg: var(--surface); --a-tag: var(--muted);
  padding: clamp(1.25rem, 2.4vw, 2rem); border-radius: var(--radius); background: var(--a-bg);
  display: grid; gap: 0.6rem; justify-items: start; min-height: 11rem;
  transition: background-color var(--t-ui) ease;
}
[data-ui].answer[data-verdict="potentially-affected"] { --a-bg: var(--field-2); --a-tag: var(--pink-ink); }
[data-ui].answer[data-verdict="backport-check-needed"] { --a-bg: var(--field-1); --a-tag: var(--blue); }
[data-ui].answer[data-verdict="fixed-version-reported"] { --a-tag: var(--blue); }
[data-ui] .answer-tag { padding: 0.15em 0.6em 0.2em; border-radius: 3px; background: var(--a-tag); color: #ffffff; font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; }
[data-ui] .answer-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em; }
[data-ui] .answer-text { max-width: 52ch; }

/* ---------- home: what the check does (drag through the stages) ---------- */

.stages {
  margin-top: 0;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto;
  min-height: 76svh;
}
.stages-text {
  grid-column: 1; grid-row: 1 / 3;
  background: var(--field-1);
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 3vw, 3rem) 9rem var(--margin);
  display: grid; align-content: start; gap: clamp(1.5rem, 3vw, 3rem);
}
.stages-text h2 { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; }
.clauses { display: grid; gap: 2rem; max-width: 36rem; }
.clause-head { font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 0.9rem; }
.clause p:not(.clause-head) { max-width: 44ch; }
.stages-ui {
  grid-column: 2; grid-row: 1 / 3;
  background: var(--surface);
  /* the fragment's top lines up with the clause (h2 line + the gap below it) */
  padding: calc(clamp(3rem, 6vw, 6rem) + var(--step-head) * 0.98 + clamp(1.5rem, 3vw, 3rem)) var(--margin) 9rem clamp(1.5rem, 3vw, 3rem);
  display: grid; justify-items: center; align-content: start;
}
.stages-ui > [data-ui] { grid-area: 1 / 1; align-self: start; width: min(100%, 36rem); }
[data-ui].stage-ui { background: var(--bg); border-radius: var(--radius); padding: 1.75rem 1.9rem; font-size: 1.0625rem; line-height: 1.45; }
[data-ui] .ui-title { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; margin-bottom: 1rem; }
[data-ui] .ui-list { margin: 0; display: grid; gap: 0.15rem; }
[data-ui] .ui-list > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0.8rem; padding: 0.75rem 0.85rem; border-radius: 3px; background: var(--surface); }
[data-ui] .ui-list dt { color: var(--muted); }
[data-ui] .ui-list dd { margin: 0; overflow-wrap: anywhere; }
[data-ui] .ui-list code { background: none; padding: 0; font-size: 0.88em; }
[data-ui] .ui-list .ok { color: var(--blue); font-weight: 600; }
[data-ui] .ui-list .stop { background: var(--field-2); }
[data-ui].stage-ui pre { padding: 0.9rem 1rem; font-size: 0.875rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.stages-control {
  grid-column: 1 / -1; grid-row: 2; z-index: 1;
  padding: 0 var(--margin) 28px;
}
.range { position: relative; height: 32px; }
.range-fill {
  position: absolute; left: 0; right: 0; top: 12px; height: 8px;
  background: var(--ink); transform-origin: left center; transform: scaleX(var(--p, 0));
  transition: transform var(--t-ui) var(--ease-out);
  pointer-events: none;
}
.range input {
  position: absolute; inset: 0; width: 100%; height: 32px; margin: 0;
  appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer;
}
.range input::-webkit-slider-runnable-track { height: 8px; background: rgba(20, 35, 90, 0.18); border-radius: 0; }
.range input::-moz-range-track { height: 8px; background: rgba(20, 35, 90, 0.18); border-radius: 0; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 32px; height: 32px; margin-top: -12px; border: 0; border-radius: var(--radius); background: var(--accent); position: relative; z-index: 2; }
.range input::-moz-range-thumb { width: 32px; height: 32px; border: 0; border-radius: var(--radius); background: var(--accent); }
.range input:focus-visible { outline: none; }
.range input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }
.range input:focus-visible::-moz-range-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }
.range-names { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 0.75rem; }
.range-names li:nth-child(2) { text-align: center; padding-right: 16%; }
.range-names li:nth-child(3) { text-align: center; padding-left: 16%; }
.range-names li:last-child { text-align: right; }
.range-names button {
  border: 0; background: none; padding: 0.3rem 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-body); color: var(--muted);
  transition: color var(--t-hover) ease;
}
.range-names button.is-on, .range-names button:hover { color: var(--ink); }

/* without JS every stage shows; once initStages() adds .is-live, one at a time, crossfaded */
.stages.is-live .clause:not(.is-on) { display: none; }
.stages.is-live .stage-ui { opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s 200ms; }
.stages.is-live .stage-ui.is-on { opacity: 1; visibility: visible; transition: opacity 200ms ease; }
.stages-ui > [data-ui] + [data-ui] { margin-top: 1rem; }
.stages.is-live .stages-ui > [data-ui] + [data-ui] { margin-top: 0; }

/* ---------- home: fixed releases (statement, table pushed right) ---------- */

.branches { padding: var(--section) var(--margin) 0; }
.branches-title { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; }
.branches-title span { display: block; }
.branches-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  margin-top: clamp(1.5rem, 3vw, 3rem); align-items: start;
}
.branches-code { grid-column: 1 / 6; margin: 0; position: sticky; top: 12vh; }
.branches-code pre { background: var(--surface); color: var(--ink); font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem); padding: clamp(1.1rem, 1.6vw, 1.5rem); white-space: pre-wrap; overflow-wrap: anywhere; }
.branches-code figcaption { margin-top: 0.9rem; max-width: 40ch; }
.branches-table { grid-column: 6 / -1; padding-left: clamp(1rem, 3vw, 3rem); }
.releases { width: 100%; border-collapse: collapse; font-size: var(--step-body); font-variant-numeric: tabular-nums; }
.releases thead th { font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); color: var(--muted); text-align: left; padding: 0 0 0.6rem; }
.releases th, .releases td { text-align: left; vertical-align: baseline; padding: 0.55rem 0; }
.releases tbody th { width: 22%; font-weight: 400; color: var(--muted); padding-right: 1rem; }
.releases td.v { width: 40%; font-family: var(--font-display); font-weight: 700; padding-right: 1rem; white-space: nowrap; }
.releases td:last-child { text-align: right; white-space: nowrap; }
.releases td.v a { color: var(--ink); text-decoration-color: rgba(20, 35, 90, 0.35); }
.releases td.v a:hover { text-decoration-color: currentColor; color: var(--blue); }
.releases tbody.group tr:first-child > * { padding-top: 2.75rem; }
.branches-source { margin-top: 2rem; color: var(--muted); max-width: 60ch; }

/* ---------- home: platforms (sentences with switches) ---------- */

.bands { padding-top: var(--section); }
.bands h2 { padding: 0 var(--margin) clamp(1.5rem, 3vw, 3rem); font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; }
.band {
  --on: var(--field-1);
  position: relative;
  min-height: max(16vh, 7.5rem);
  padding: 1.5rem var(--margin);
  display: grid; align-content: center;
  transition: background-color 300ms ease;
}
.band-2 { --on: var(--field-2); }
.band-3 { --on: var(--surface); }
.band-4 { --on: var(--surface-2); }
.band-5 { --on: var(--field-1); }
.band:has(.switch-input:checked) { background: var(--on); }
@media (hover: hover) and (pointer: fine) {
  .band:not(:has(.switch-input:checked)):hover { background: var(--surface); }
  .band:hover .band-label { color: var(--ink); }
}
.switch-input { position: absolute; opacity: 0; width: 1.25rem; height: 1.25rem; margin: 0; pointer-events: none; }
.band-label {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--gutter);
  cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); line-height: 1.1; letter-spacing: -0.02em;
  color: var(--muted);
  transition: color var(--t-hover) ease;
}
.switch-input:checked + .band-label { color: var(--ink); }
[data-ui].switch {
  position: relative; width: 2.1em; height: 1.1em; border-radius: 999px;
  background: rgba(20, 35, 90, 0.2);
  transition: background-color var(--t-ui) ease;
}
[data-ui].switch > span {
  position: absolute; top: 0.12em; left: 0.12em; width: 0.86em; height: 0.86em; border-radius: 50%;
  background: var(--bg);
  transition: transform var(--t-ui) var(--ease-out);
}
.switch-input:checked + .band-label [data-ui].switch { background: var(--accent); }
.switch-input:checked + .band-label [data-ui].switch > span { transform: translateX(1em); }
.switch-input:focus-visible + .band-label [data-ui].switch { outline: 3px solid var(--accent); outline-offset: 3px; }
.band-label:active [data-ui].switch > span { scale: 0.92; }
.band-more { display: none; margin-top: 0.7rem; max-width: 70ch; }
.band:has(.switch-input:checked) .band-more { display: grid; gap: 0.35rem; }
.band-more a { color: var(--ink); }
.bands-all { padding: 1.5rem var(--margin) 0; color: var(--muted); }

/* ---------- home: questions (large questions, answers beside) ---------- */

.faq { padding: var(--section) var(--margin) 0; }
.faq-row {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  align-items: baseline;
  padding-bottom: clamp(3rem, 5vw, 5rem);
}
.faq-row > h2, .faq-row > h3 { grid-column: 1 / 7; font-size: var(--step-lead); line-height: 1.1; letter-spacing: -0.02em; }
.faq-row > p { grid-column: 8 / -1; max-width: 42ch; }
.faq-head > h2 { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; }
.faq-row:last-child { padding-bottom: 0; }
.faq-head > p { font-family: var(--font-display); font-weight: 700; }

/* ---------- footer (contact as the headline), shared by every page ---------- */

.site-foot {
  margin-top: var(--section);
  background: var(--field-2);
  padding: 2.5rem var(--margin) 1.75rem;
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
}
.site-foot a { color: var(--ink); }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gutter); }
.foot-notes { display: grid; gap: 0.3rem; max-width: 58ch; }
.foot-brand { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.foot-up { font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); white-space: nowrap; }
.foot-guides { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; font-family: var(--font-display); font-weight: 700; }
.foot-contact { padding-top: clamp(2rem, 5vw, 5rem); }
.foot-mail { margin-top: 0.4rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-display); line-height: 0.9; letter-spacing: -0.045em; }
.foot-mail a { display: inline-block; text-decoration: none; margin-left: -0.05em; }
.foot-mail span { display: block; }
.foot-mail a:hover { color: var(--pink-ink); }
.foot-meta {
  display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 0.75rem var(--gutter);
  font-size: var(--step-small);
}
.foot-meta p:first-child { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.foot-meta p:nth-child(2) { text-align: center; }
.foot-meta p:last-child { text-align: right; }

/* ---------- subpages: article template (see the contract at the top) ---------- */

.doc {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--margin) 0;
  align-items: start;
}
.crumbs { grid-column: 1 / -1; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0; font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); color: var(--muted); }
.crumbs li + li::before { content: "›"; padding: 0 0.6em; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current="page"] { color: var(--ink); }

.page { grid-column: 1 / 8; min-width: 0; }
.page > * + * { margin-top: 1.1rem; }
.page h1 { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.035em; max-width: 22ch; }
.page .lead { margin-top: 1.5rem; font-size: var(--step-body); line-height: 1.6; max-width: 62ch; }
.page h1 + .lead { margin-top: 1.5rem; }
.page .lead + .hint { margin-top: 1rem; margin-bottom: clamp(4.5rem, 7vw, 6rem); } /* the intro ends here: keep the date line off the first h2 */
.page h2 { margin-top: clamp(3rem, 5vw, 4.5rem); font-size: var(--step-lead); line-height: 1.12; letter-spacing: -0.02em; scroll-margin-top: 1.5rem; }
.page h3 { margin-top: 2.25rem; font-size: var(--step-body); line-height: 1.3; scroll-margin-top: 1.5rem; }
.page h2 + *, .page h3 + * { margin-top: 0.8rem; }
.page h2 + h3 { margin-top: 1.25rem; }
.page p, .page li { max-width: 68ch; }
.page ul, .page ol { padding-left: 1.3em; display: grid; gap: 0.5rem; }
.page li::marker { color: var(--muted); }
.page li > ul, .page li > ol { margin-top: 0.5rem; }
.page blockquote { margin: 1.5rem 0 0; padding: 1rem 1.25rem; background: var(--surface); border-radius: var(--radius); font-style: italic; max-width: 68ch; }
.page pre { max-width: 100%; }
.page .sub { display: block; color: var(--muted); font-size: var(--step-small); }
.page .src { display: inline-block; margin-right: 0.4em; padding: 0.05em 0.5em 0.1em; border-radius: 3px; background: var(--field-1); font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); line-height: 1.4; } /* source tag on a measure (mitigations) */
pre .c { color: var(--muted); } /* comment line inside a code block */
.page p > .button { margin-top: 0.4rem; }

.callout { padding: 1.25rem 1.4rem; background: var(--surface); border-radius: var(--radius); max-width: 72ch; }
.callout.warn { background: var(--field-2); }
.callout > * + * { margin-top: 0.6rem; }

.data { width: 100%; border-collapse: collapse; font-size: var(--step-small); font-variant-numeric: tabular-nums; line-height: 1.45; }
.data caption { text-align: left; font-size: var(--step-small); color: var(--muted); padding-bottom: 0.7rem; }
.data th, .data td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem; }
.data thead th { font-family: var(--font-display); font-weight: 700; color: var(--muted); padding-top: 0; }
.data tbody tr:nth-child(odd) { background: var(--surface); }
.data tbody th { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.data td.v { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.data tr.eol { color: var(--muted); }
.data tr.eol td.v { color: var(--pink-ink); }

.related { margin-top: clamp(3.5rem, 6vw, 5rem); padding: clamp(1.25rem, 3vw, 2.25rem); background: var(--surface-2); border-radius: var(--radius); }
.page .related h2 { margin-top: 0; }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem var(--gutter); margin-top: 1.1rem; }
.related a { font-family: var(--font-display); font-weight: 700; color: var(--ink); text-decoration-color: rgba(20, 35, 90, 0.35); }
.related a span { display: block; margin-top: 0.2rem; font-family: var(--font-text); font-weight: 400; font-size: var(--step-small); color: var(--muted); text-decoration: none; }
.related a:hover { color: var(--blue); }

.doc-side { grid-column: 9 / -1; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.doc-meta { padding: 1.25rem 1.4rem; background: var(--surface); border-radius: var(--radius); }

/* the one fact of the page, as a fragment (the home frame idea): fixed versions, a header line or an admin screen */
[data-ui].doc-key { display: grid; gap: 0.8rem; padding: clamp(1.25rem, 2vw, 1.75rem); background: var(--field-2); border-radius: var(--radius); }
[data-ui] .key-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 1rem + 1.6vw, 2.5rem); line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
[data-ui] .key-big span { display: inline-block; white-space: nowrap; margin-right: 0.3em; }
[data-ui] .key-big.is-long { font-size: clamp(1.25rem, 0.9rem + 0.9vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
[data-ui] .key-big code, [data-ui] .key-path code { background: none; padding: 0; font-size: 0.92em; }
[data-ui] .key-path { font-family: var(--font-display); font-weight: 700; font-size: var(--step-small); }
[data-ui] .key-note { font-size: var(--step-small); line-height: 1.45; }
[data-ui].doc-key .ui-list > div { background: var(--bg); }
[data-ui].doc-key pre { background: var(--bg); padding: 0.9rem 1rem; font-size: 0.875rem; white-space: pre-wrap; }
[data-ui].doc-key .tag { display: inline-block; margin-right: 0.4em; padding: 0.1em 0.5em 0.15em; border-radius: 3px; background: var(--pink-ink); color: #ffffff; font-family: var(--font-display); font-weight: 700; }
.doc-meta h2 { font-size: var(--step-body); margin-bottom: 0.6rem; }
.doc-meta ol { list-style: none; display: grid; gap: 0.15rem; }
.doc-meta a { display: block; padding: 0.3rem 0; font-size: var(--step-small); color: var(--muted); text-decoration-color: transparent; }
.doc-meta a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- motion (transform and opacity only; the reduced page is the finished page) ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes open-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes turn { to { transform: rotate(1turn); } }

@media (prefers-reduced-motion: no-preference) {
  .hero .mask > span { animation: line-up 900ms var(--ease-expo) both; }
  .hero .hero-a .mask > span { animation-delay: 120ms; }
  .hero .hero-b .mask > span { animation-delay: 230ms; }
  .reel-window { animation: open-down 1100ms var(--ease-in-out) 150ms both; }
  .hero-lede { animation: rise 600ms var(--ease-out) 420ms both; }
  .check { animation: rise 600ms var(--ease-out) 500ms both; }
  .lookup-caret { animation: blink 1.1s steps(1) infinite; }
  .spin { animation: turn 800ms linear infinite; }

  .result:not([hidden]) .verdict { animation: rise 500ms var(--ease-out) both; }
  .doc .crumbs { animation: rise 500ms var(--ease-out) 60ms both; }
  .doc .page > h1 { animation: rise 700ms var(--ease-out) 120ms both; }
  .doc .page > h1 + .lead { animation: rise 700ms var(--ease-out) 220ms both; }
  .doc .doc-side { animation: rise 700ms var(--ease-out) 300ms both; }
  .result:not([hidden]) .rrow { animation: rise 500ms var(--ease-out) 120ms both; }
  .report-dialog[open] { animation: rise var(--t-ui) var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel-track.is-moving { transition: none; }
}

/* ---------- narrower screens ---------- */

@media (max-width: 1000px) {
  .hero-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 0.75rem; }
  .hero-title { grid-column: 1; grid-row: 1 / 4; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); align-items: start; font-size: var(--step-display); }
  .hero-a { grid-column: 1; grid-row: 1; justify-self: start; }
  .hero-b { grid-column: 1; grid-row: 3; justify-self: start; }
  .reel { grid-column: 1; grid-row: 2; }
  .reel-window { --fh: min(calc(100cqi * 9 / 16), 15rem); --sliver: 0.6rem; --rg: 0.75rem; }
  [data-ui] .frame { font-size: clamp(0.875rem, 3.6cqi, 1.125rem); }
  [data-ui] .frame-head .frame-key { font-size: clamp(1.75rem, 10cqi, 3.5rem); }
  .hero-foot { grid-template-columns: minmax(0, 1fr); row-gap: 1.75rem; }
  .hero-lede, .check { grid-column: 1; }
  .hero-lede { max-width: 52ch; }

  .verdict { grid-template-columns: minmax(0, 1fr); }
  .verdict-main { grid-column: 1; }
  .rrow { grid-template-columns: minmax(0, 1fr); row-gap: 0.6rem; }
  .rrow > h3, .rrow > :not(h3) { grid-column: 1; }

  .lookup-try, .answer { grid-column: 1 / -1; }
  .lookup-foot { grid-template-columns: minmax(0, 1fr); }
  .answer { order: -1; }

  .stages { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; min-height: 0; }
  .stages-text { display: contents; }
  .stages-text h2 { grid-row: 1; background: var(--field-1); padding: 2.75rem var(--margin) 0; }
  .clauses { grid-row: 4; max-width: none; background: var(--field-1); padding: 0 var(--margin) 3rem; }
  .stages-ui { grid-column: 1; grid-row: 2; min-height: 0; padding: 1.75rem var(--margin); background: var(--field-1); }
  .stages-control { grid-column: 1; grid-row: 3; padding: 0 var(--margin) 1.75rem; background: var(--field-1); }
  .range { height: 40px; }
  .range-fill { top: 16px; }
  .range input { height: 40px; }
  .range input::-webkit-slider-thumb { width: 40px; height: 40px; margin-top: -16px; }
  .range input::-moz-range-thumb { width: 40px; height: 40px; }
  .range-names button { font-size: var(--step-small); min-height: 44px; }

  .branches-grid { grid-template-columns: minmax(0, 1fr); row-gap: 2.5rem; }
  .branches-code, .branches-table { grid-column: 1; }
  .branches-code { position: static; order: 2; width: min(100%, 34rem); justify-self: end; }

  .faq-row { grid-template-columns: minmax(0, 1fr); row-gap: 0.75rem; padding-bottom: 3.5rem; }
  .faq-row > h2, .faq-row > h3, .faq-row > p { grid-column: 1; }

  /* one column: the key fragment moves up under the intro, and the page list goes (it repeated the headings) */
  .doc { grid-template-columns: minmax(0, 1fr); }
  .page, .doc-side { display: contents; }
  .doc > * , .page > *, .doc-side > * { grid-column: 1; min-width: 0; }
  .doc > .crumbs { order: -4; }
  .page > h1, .page > .lead, .page > .lead + .hint, .page > .lead + .sub { order: -3; }
  .page .lead + .hint { margin-bottom: 0; }
  [data-ui].doc-key { order: -2; margin: 2rem 0 0.5rem; }
  .page h1 { max-width: none; }
  .doc-meta { display: none; }
}

@media (max-width: 640px) {
  /* guide tables stack: the first two cells share a line, the rest sit under the second (roles in the HTML keep the semantics) */
  .data thead { display: none; }
  .data, .data caption, .data tbody, .data tr { display: block; }
  .data tr { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: 0.8rem; padding: 0.6rem 0.8rem; }
  .data th, .data td { padding: 0; }
  .data tr > :first-child { grid-row: span 4; } /* a tall first cell never pushes the next lines down */
  .data td:nth-child(n+3) { grid-column: 2; margin-top: 0.25rem; }
  .page pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .site-head { padding-block: 0.9rem; }
  .input-row { flex-direction: column; }
  .input-row .button { width: 100%; }
  .releases thead { display: none; }
  .releases, .releases tbody, .releases tr { display: block; }
  .releases tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; padding: 0.55rem 0; }
  .releases th, .releases td { padding: 0; }
  .releases tbody th { width: auto; grid-column: 1 / -1; font-size: var(--step-small); }
  .releases td.v { width: auto; }
  .releases td:last-child { font-size: var(--step-small); color: var(--muted); align-self: center; }
  .releases tbody.group tr:first-child { padding-top: 2.25rem; }
  .releases tbody.group tr:first-child > * { padding-top: 0; }
  .band-label { font-size: clamp(1.25rem, 6.4vw, 1.75rem); }
  .band-label [data-ui].switch { font-size: 1.5rem; }
  .foot-top { flex-direction: column; }
  .foot-meta { grid-template-columns: minmax(0, 1fr); }
  .foot-meta p:nth-child(2), .foot-meta p:last-child { text-align: left; }
  .data tbody th, .data td.v { white-space: normal; }
  .page h1 { font-size: calc(var(--step-head) * 0.85); } /* long guide titles stay on two lines */
  .branches-code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .reel-window { --fh: min(calc(100cqi * 0.62), 15rem); }
  [data-ui] .frame-req { display: none; }
  /* the sample page becomes a peek at its top (down to just below its title band), so the list and the button stay on the first screen */
  .report-dialog-body { grid-template-columns: minmax(0, 1fr); }
  .report-dialog-figure { padding-bottom: 0; }
  .report-dialog-figure img { height: 7.25rem; object-fit: cover; object-position: top; border-radius: 2px 2px 0 0; }
}
