/* ==========================================================================
   FiberScan — fiberscan.app
   One stylesheet. No framework, no build step, no JavaScript on the site.

   The page is typeset like the document the app produces: a dark cover band,
   a ruled light body with mono section indices, screenshots mounted as
   captioned figures, a spec table, a limitations clause, and a title block.

   Depth comes from ONE hairline and a surface step. There is no box-shadow in
   this file outside the focus ring, and no gradient outside the hero's column
   ruling. Both omissions are deliberate — see site/README.md.
   ========================================================================== */

/* ---------- Fonts (self-hosted, same subsets the app ships) --------------- */

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/barlow-condensed-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/barlow-condensed-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/barlow-condensed-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(/assets/fonts/barlow-condensed-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-400-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-400-800-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/space-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/space-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Dark surfaces — the cover and the title block */
  --ink-0: #0b0b0d;
  --ink-1: #14161a;
  --rule-dark: rgba(255, 255, 255, 0.1);
  --rule-dark-2: rgba(255, 255, 255, 0.06);
  --on-dark: #e7eaee;
  --on-dark-2: #a8b0bc;

  /* Light surfaces — the body */
  --bg: #f8fafc;
  --card: #ffffff;
  --elev: #f1f5f9;
  --ink: #0f172a;
  --slate: #475569;
  /* Was #64748b, which measured 4.34:1 on --elev — a hard AA failure — and
     cleared 4.5 by 0.05 on --bg. At 13-14px in Space Mono, for readers
     averaging mid-40s, on a phone in a plant room, that is not a margin. */
  --faint: #556070;
  --rule: #e2e8f0;
  --rule-2: #cbd5e1;

  /* Brand */
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-ink: #1d4ed8;
  --blue-on-dark: #93c5fd;

  /* Semantic — permitted only where they denote risk */
  --risk-high: #dc2626;
  --risk-high-ink: #b91c1c;
  --risk-med: #d97706;
  --risk-med-ink: #92400e;
  --risk-low: #16a34a;
  --risk-low-ink: #166534;
  --sample: #7c3aed;
  --sample-ink: #6d28d9;

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Geometry */
  --r-1: 3px;
  --r-2: 5px;
  --r-pill: 999px;
  --chamfer: 10px;
  --shell: 1200px;
  --gutter: 24px;
  --pad: 20px;
  --spine: 0px; /* becomes 64px at >=1120px */
  --measure: 68ch;
  --measure-lead: 56ch;

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- Reset -------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
figure,
figcaption,
dl,
dd,
table {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

table {
  border-collapse: collapse;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Shell & grid ------------------------------------------------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* A band is a full-bleed horizontal stripe; its inner .shell holds the grid.
   `position: relative` so the mono section index can be pinned to the spine. */
.band {
  position: relative;
  padding-block: var(--s-9);
}

/* Both, because the three deep dives are `.dive`, not `.band` — without this
   their section indices resolve against the initial containing block and sit
   off-screen at every width. */
.band > .shell,
.dive > .shell {
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gutter);
}

/* The section index lives outside the content column, in the spine gutter.
   Below 1120px there is no spine, so it sits inline above the eyebrow. */
.idx-sec {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--faint);
  margin-bottom: var(--s-5);
}

/* ---------- Type --------------------------------------------------------- */

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--s-3);
}

.on-dark .eyebrow,
.eyebrow.on-dark {
  color: var(--on-dark-2);
}

h1,
h2,
h3,
h4 {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-weight: 700;
  text-wrap: balance;
}

/* Sized so the hero headline sets in two lines, breaking on its own full
   stop, inside a 7-column measure. At 72px it took three balanced lines and
   the period landed mid-line, which reads as a wall rather than a sentence. */
h1 {
  font-size: clamp(2.75rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: initial;
}

/* The row titles in the pass are h3, not h4 — there is no h4 anywhere in the
   document, and h2 → h4 is a heading-order failure for anyone navigating by
   heading. This is their type role, not a new level. */
.pass h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: initial;
}

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--slate);
  max-width: var(--measure-lead);
}

p {
  max-width: var(--measure);
}

/* A heading and the paragraph under it are set as a pair. Margins collapse
   with any margin-bottom the heading already carries, so this is safe to
   state once rather than per band. */
h1 + .lead,
h2 + .lead,
h2 + p,
h3 + p {
  margin-top: var(--s-4);
}

/* The rest of the vertical rhythm between adjacent blocks, stated once here
   rather than as inline style attributes on the elements — which also lets
   the deployed Content-Security-Policy drop 'unsafe-inline' entirely. */
.legend + .mono {
  margin-top: var(--s-4);
}

.mono + .body-2,
.toc + .body-2,
.facts + .body-2,
.spec-wrap + .facts {
  margin-top: var(--s-5);
}

.clause + .eyebrow,
.notlist + .body-2 {
  margin-top: var(--s-6);
}

.body-2 {
  font-size: 1rem;
  color: var(--slate);
}

.small {
  font-size: 0.875rem;
  color: var(--slate);
}

.mono {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 120ms var(--ease), color 120ms var(--ease);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--r-2);
}

.on-dark :focus-visible {
  outline-color: var(--blue-on-dark);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--blue);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--r-2);
  text-decoration: none;
  font-weight: 700;
}

.skip:focus {
  left: var(--s-4);
  top: var(--s-4);
}

/* ---------- Header ------------------------------------------------------- */

.masthead {
  background: var(--ink-0);
  border-bottom: 1px solid var(--rule-dark);
}

.masthead > .shell {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
  color: var(--on-dark);
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: var(--r-2);
}

.brand span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

.masthead nav ul {
  display: flex;
  gap: var(--s-6);
}

/* inline-flex + min-height so the target clears WCAG 2.5.8's 24px minimum;
   a 15px line box on its own is 19px. The header stays 64px. */
.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--on-dark-2);
  text-decoration: none;
  transition: color 120ms var(--ease);
}

.masthead nav a:hover {
  color: var(--on-dark);
}

/* Scoped to .masthead so these beat `.masthead nav ul { display: flex }`,
   which is more specific than a bare .nav-wide / .nav-narrow and was
   otherwise showing both navigations stacked on every page. */
.masthead .nav-wide {
  display: none;
}

/* ---------- Hero --------------------------------------------------------- */

.hero {
  background: var(--ink-0);
  color: var(--on-dark);
  padding-block: 120px var(--s-9);
  overflow: hidden;
}

/* The column ruling: hairlines on the real 12-column boundaries, masked out
   before it reaches the content edge. A drawing convention, not decoration —
   which means it has to survive being checked against the drawing. It is
   drawn on the shell's CONTENT box, so it starts where column 1 starts and
   its pitch is the true column pitch. Painted on the section box instead, it
   began 104px to the left and ran ~144px out of register by column 12.
   Suppressed below 900px, where there is no 12-column grid to rule. */
.hero > .shell {
  position: relative;
}

@media (min-width: 900px) {
  .hero > .shell::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--pad) + var(--spine));
    right: var(--pad);
    pointer-events: none;
    background-image: repeating-linear-gradient(
      to right,
      var(--rule-dark-2) 0 1px,
      transparent 1px calc((100% + var(--gutter)) / 12)
    );
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 160px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 160px), transparent 100%);
  }
}

.hero h1 {
  color: var(--on-dark);
  margin-bottom: var(--s-5);
}

.hero .lead {
  color: var(--on-dark-2);
  margin-bottom: var(--s-7);
}

.hero a {
  color: var(--blue-on-dark);
}

/* Store badges. Apple and Google both require their artwork be shown
   unaltered, so no filter, no opacity and no recolouring — the anchor gets
   the state, the badge does not. */
.badges {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.badges a {
  display: inline-flex;
  border-radius: var(--r-2);
  transition: opacity 120ms var(--ease);
}

.badges a:hover {
  opacity: 0.85;
}

.badges img {
  height: 40px;
  width: auto;
}

.badges-note {
  margin-top: var(--s-4);
  font-size: 0.875rem;
  color: var(--on-dark-2);
}

/* ---------- Figure plate ------------------------------------------------- */

.plate {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: 12px;
}

.plate-dark {
  background: var(--ink-1);
  border-color: var(--rule-dark);
}

/* The sources in assets/shots/ are cropped at build time to the exact region
   each caption names, so the plate shows the whole image. A fixed pixel
   window with object-fit:cover chose the frame by arithmetic instead, and
   discarded up to two-thirds of every plate — including, in Fig. 02, all of
   the recorded finding the caption described. A plate shows the whole plate. */
.plate-win {
  overflow: hidden;
  border-radius: 2px;
  background: var(--elev);
}

.plate-win img {
  width: 100%;
  height: auto;
}

.plate figcaption {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 12px;
}

.plate-dark figcaption {
  color: var(--on-dark-2);
}

.chamfer-tl {
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% 100%, 0 100%, 0 var(--chamfer));
}

.chamfer-tr {
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
}

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--r-2);
  text-decoration: none;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), transform 80ms var(--ease);
}

.btn:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

/* ---------- Band 3 — the note ------------------------------------------- */

.note {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-8);
}

.note p {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: var(--measure-lead);
}

.note-rule {
  border-top: 1px solid var(--rule);
  margin-top: var(--s-8);
}

/* ---------- Band 4 — the pass ------------------------------------------- */

.pass {
  margin-top: var(--s-7);
}

.pass li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
  border-top: 1px solid var(--rule);
  padding-block: var(--s-6);
}

.pass li:last-child {
  border-bottom: 1px solid var(--rule);
}

.pass .idx {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.pass p {
  color: var(--slate);
  font-size: 1rem;
}

/* ---------- Band 5 — deep dives ----------------------------------------- */

.dive {
  padding-block: var(--s-9);
  border-top: 1px solid var(--rule);
}

.dive:first-of-type {
  border-top: 0;
}

.dive h2 {
  margin-bottom: var(--s-4);
}

.dive p + p {
  margin-top: var(--s-4);
}

.dive .plate {
  margin-top: var(--s-7);
}

/* Risk legend — the only place risk colour is used as design. */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

.chip {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid currentColor;
}

.chip-high {
  color: var(--risk-high-ink);
  background: rgba(220, 38, 38, 0.08);
}
.chip-med {
  color: var(--risk-med-ink);
  background: rgba(217, 119, 6, 0.1);
}
.chip-low {
  color: var(--risk-low-ink);
  background: rgba(22, 163, 74, 0.09);
}
.chip-sample {
  color: var(--sample-ink);
  background: rgba(124, 58, 237, 0.09);
}

/* Report contents list, set like a table of contents. */
.toc {
  margin-top: var(--s-5);
  border-top: 1px solid var(--rule);
}

.toc li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--s-3);
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-block: var(--s-3);
}

.toc .n {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.toc .t {
  font-size: 1rem;
}

.toc .t em {
  font-style: normal;
  color: var(--slate);
}

/* ---------- Band 6 — jurisdictions --------------------------------------- */

.jurisdictions {
  background: var(--elev);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Hairline grid: 1px gap over a --rule background, cells painted --card. */
.region-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  overflow: hidden;
  margin-top: var(--s-7);
}

/* The class value must stay exactly "region" and .small must stay the last
   child — tests/run-ui-checks.js parses this markup to verify that every
   framework named here comes out of that region's own frameworkLabel in
   src/app/core/data/regions.ts. Restyle freely; do not rename or reorder. */
.region {
  background: var(--card);
  padding: var(--s-5);
}

.region .code {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-bottom: var(--s-2);
}

.region .std {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: var(--s-1);
}

.region .small {
  font-size: 0.875rem;
  color: var(--slate);
  line-height: 1.45;
}

.after-grid {
  margin-top: var(--s-6);
}

.after-grid p + p {
  margin-top: var(--s-4);
}

/* ---------- Band 7 — spec table ------------------------------------------ */

.spec {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  margin-top: var(--s-7);
  font-variant-numeric: tabular-nums;
}

.spec th {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: left;
  padding: var(--s-3) var(--s-5);
  border-bottom: 2px solid var(--rule-2);
}

.spec td {
  font-size: 1rem;
  padding: var(--s-4) var(--s-5);
  vertical-align: top;
  border-top: 1px solid var(--rule);
}

.spec tbody tr:first-child td {
  border-top: 0;
}

.spec td + td {
  border-left: 1px solid var(--rule);
  color: var(--slate);
}

.spec-wrap {
  overflow-x: auto;
}

/* One merged cell instead of four em-dashes stacked down the right column.
   The asymmetry is the argument; four rows of filler buried it. */
.spec-none {
  color: var(--faint);
  vertical-align: middle;
}

.facts {
  margin-top: var(--s-5);
}

.facts li + li {
  margin-top: var(--s-1);
}

/* ---------- Band 8 — pricing --------------------------------------------- */

.tiers {
  margin-top: var(--s-7);
}

.tier {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: var(--s-6);
}

.tier--pro::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--blue);
}

.tier .price {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}

.tier .num {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.tier .per {
  font-size: 0.875rem;
  color: var(--slate);
}

.tier .caps {
  border-top: 1px solid var(--rule);
}

.tier .caps li {
  font-size: 1rem;
  padding-block: var(--s-3);
  border-top: 1px solid var(--rule);
}

.tier .caps li:first-child {
  border-top: 0;
}

.tier .tier-foot {
  font-size: 0.875rem;
  color: var(--slate);
  margin-top: var(--s-5);
}

.tiers-note {
  margin-top: var(--s-5);
  color: var(--slate);
}

/* ---------- Band 9 — scope ----------------------------------------------- */

.scope {
  background: var(--card);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.scope-inner {
  border-left: 3px solid var(--slate);
  padding-left: var(--s-5);
}

.scope h2 {
  margin-bottom: var(--s-5);
}

/* Full body size and full contrast. A disclaimer set in grey 12px reads as
   something the publisher hopes you will not read. */
.scope .clause {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: var(--measure);
}

.scope .clause + .clause {
  margin-top: var(--s-4);
}

.notlist {
  margin-top: var(--s-6);
  border-top: 1px solid var(--rule);
}

.notlist li {
  border-bottom: 1px solid var(--rule);
  padding-block: var(--s-3);
  font-size: 1rem;
  color: var(--slate);
}

/* ---------- Footer ------------------------------------------------------- */

.site-foot {
  background: var(--ink-0);
  color: var(--on-dark-2);
  border-top: 1px solid var(--rule-dark);
  padding-block: var(--s-8);
}

.site-foot a {
  color: var(--on-dark-2);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--on-dark);
  text-decoration: underline;
}

.titleblock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-dark);
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-1);
  overflow: hidden;
}

.titleblock div {
  background: var(--ink-1);
  padding: var(--s-4) var(--s-5);
}

.titleblock dt {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  margin-bottom: var(--s-1);
}

.titleblock dd {
  font-size: 1rem;
  color: var(--on-dark);
}

.footnav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6);
  margin-top: var(--s-7);
}

.footnav h3 {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  margin-bottom: var(--s-3);
}

/* The footer IS the mobile navigation, so its links are built like
   navigation: a 12px block padding gives a ~43px target against a 19px line
   box. Tightened on desktop, where the pointer is precise. */
.footnav li {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* `anywhere` rather than the inherited `break-word`: this one also feeds the
   min-content size, which is what keeps support@ingenioproductions.com from
   overflowing a 165px grid track and pushing the whole page sideways. */
.footnav a {
  display: block;
  padding-block: 12px;
  overflow-wrap: anywhere;
}

.baseline {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule-dark);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
}

.baseline .mono {
  color: var(--on-dark-2);
}

.credits {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--on-dark-2);
  max-width: none;
}

.credits a,
.docfoot a {
  display: inline-block;
  padding-block: 6px;
}

/* ---------- Legal / document pages --------------------------------------- */

.dochead {
  padding-block: var(--s-8) var(--s-7);
  border-bottom: 1px solid var(--rule);
}

.dochead h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-4);
}

.doc {
  padding-block: var(--s-8) var(--s-10);
}

.doc-col {
  max-width: var(--measure);
}

.doc h2 {
  font-size: 1.5rem;
  line-height: 1.15;
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
}

.doc h2:first-child {
  margin-top: 0;
}

.doc h3 {
  font-size: 1.1875rem;
  margin-top: var(--s-6);
  margin-bottom: var(--s-3);
}

.doc p {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: var(--s-4);
}

.doc ul,
.doc ol {
  margin-bottom: var(--s-4);
  padding-left: 1.25rem;
}

.doc ul li {
  list-style: disc;
}

.doc ol li {
  list-style: decimal;
}

.doc li {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: var(--s-2);
  padding-left: 0.25rem;
}

.doc strong {
  font-weight: 700;
}

.doc code {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  background: var(--elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: 1px 5px;
}

.doc table {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  margin-bottom: var(--s-5);
}

.doc th {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 2px solid var(--rule-2);
  white-space: nowrap;
}

.doc td {
  font-size: 0.9375rem;
  line-height: 1.55;
  padding: var(--s-3) var(--s-4);
  vertical-align: top;
  border-top: 1px solid var(--rule);
}

.doc td + td,
.doc th + th {
  border-left: 1px solid var(--rule);
}

.doc .tablewrap {
  overflow-x: auto;
  margin-bottom: var(--s-5);
}

.doc .tablewrap table {
  margin-bottom: 0;
  min-width: 34rem;
}

.callout {
  background: var(--elev);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--slate);
  border-radius: var(--r-1);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
}

.callout p:last-child {
  margin-bottom: 0;
}

.toc-box {
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  background: var(--card);
  padding: var(--s-5);
  margin-bottom: var(--s-7);
}

.toc-box ol {
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: var(--s-6);
}

.toc-box li {
  list-style: none;
  margin-bottom: 0;
  font-size: 0.9375rem;
  break-inside: avoid;
}

/* A list of section links is navigation, not prose, so it does not get the
   "target in a sentence" exemption. */
.toc-box a {
  display: inline-block;
  padding-block: 6px;
}

.docfoot {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}

/* ---------- Breakpoints -------------------------------------------------- */

@media (min-width: 600px) {
  .region-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Grid, not `columns: 2` — multicol balances by height, which left the two
     hairline stacks ending 70px apart. */
  .notlist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s-6);
  }

  .footnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .masthead .nav-wide {
    display: flex;
  }

  .masthead .nav-narrow {
    display: none;
  }
}

@media (min-width: 900px) {
  :root {
    --pad: 32px;
  }

  .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .band {
    padding-block: var(--s-10);
  }

  /* Hero: type in 1–7, column 8 deliberately empty, figure in 9–12. */
  .hero {
    padding-block: 176px var(--s-9);
  }

  .hero-copy {
    grid-column: 1 / span 7;
  }

  .hero-fig {
    grid-column: 9 / span 4;
    align-self: start;
  }

  .note-copy {
    grid-column: 2 / span 7;
  }

  .head-6 {
    grid-column: 1 / span 6;
  }

  .head-7 {
    grid-column: 1 / span 7;
  }

  .full {
    grid-column: 1 / span 12;
  }

  .col-8 {
    grid-column: 1 / span 8;
  }

  /* The pass rows become a 12-column subgrid; row length is intentionally
     uneven, which is what keeps the sequence from reading as a card row. */
  .pass li {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    align-items: baseline;
  }

  .pass .idx {
    grid-column: 1 / span 1;
  }

  .pass h3 {
    grid-column: 2 / span 4;
  }

  .pass p {
    grid-column: 6 / span 6;
  }

  /* Deep dives: the spans change between blocks so the sequence is not a
     mirrored zig-zag. */
  .dive-a .dive-copy {
    grid-column: 1 / span 5;
  }
  .dive-a .dive-fig {
    grid-column: 7 / span 6;
  }

  .dive-b .dive-fig {
    grid-column: 1 / span 5;
    grid-row: 1;
  }
  .dive-b .dive-copy {
    grid-column: 7 / span 6;
    grid-row: 1;
  }

  .dive-c .dive-copy {
    grid-column: 1 / span 6;
  }
  .dive-c .dive-fig {
    grid-column: 8 / span 5;
  }

  /* Without this the plate stretches to the height of the taller text column
     and leaves a dead white field under its caption. */
  .dive-fig {
    align-self: start;
  }

  .dive .plate {
    margin-top: 0;
  }

  /* Pricing: asymmetric spans, columns 5 and 12 left empty. */
  .tier--free {
    grid-column: 1 / span 4;
  }
  .tier--pro {
    grid-column: 6 / span 6;
  }

  /* A title block runs the width of the sheet. Sitting it in columns 1-8
     beside a 396px-tall link stack left a 359px void under it — the largest
     unexplained empty area on the page, and the last thing anyone saw. */
  .titleblock-wrap {
    grid-column: 1 / span 12;
  }

  /* Full width, like the title block above it: over 8 columns the three
     tracks came out at 210px and broke the contact address mid-word. */
  .footnav-wrap {
    grid-column: 1 / span 12;
    margin-top: var(--s-7);
  }

  .footnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-6);
    margin-top: 0;
  }

  .footnav a {
    padding-block: 6px;
  }

  .titleblock {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .doc-col {
    grid-column: 1 / span 8;
  }

  .dochead-col {
    grid-column: 1 / span 8;
  }
}

/* The spine: at wide viewports the content shell is pushed right, and the
   section index sits in the gutter that opens up. The page is measurably
   off-centre, which is the structural signature of a composed layout.

   The index is positioned INSIDE the shell's own padding, not outside its
   border box. Hanging it in negative space only works once the viewport
   exceeds --shell plus two gutters, so on a 1280 or 1366 laptop — which is
   most of this audience — every index was silently clipped off-screen. */
@media (min-width: 1120px) {
  :root {
    --spine: 64px;
  }

  .shell {
    padding-left: calc(var(--pad) + var(--spine));
  }

  .idx-sec {
    position: absolute;
    left: var(--pad);
    top: 0.35em;
    margin: 0;
  }
}

@media (min-width: 1200px) {
  :root {
    --pad: 40px;
  }
}

/* Ten cells in two clean rows rather than five rows of half-empty ones —
   dense enough to read as a coverage table, which is the point of it. */
@media (min-width: 1120px) {
  .region-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* The band rhythm is tuned for a desktop composition. Left alone it made the
   landing page 16,000px on a phone. */
@media (max-width: 599px) {
  .band,
  .dive {
    padding-block: var(--s-8);
  }

  .hero {
    padding-block: var(--s-9) var(--s-8);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
