/* Frascati.science — layout concept: a white-paper / official statistical report, in the TheScience.fm type system (IBM Plex).
   White pages, navy as the leading ink (headings, rules, links, marks), a reading column with a
   "document record" card beside it, paragraph references (§) in mono, brass only for codes. */
:root {
  color-scheme: light; /* always light: white pages like an official report, regardless of device theme */
  --paper: #ffffff;
  --surface: #ffffff;
  --tint: #f3f6fb;
  --ink: #16213a;
  --navy: #12336b;
  --navy-deep: #0c2550;
  --chrome: #0F1B2D;      /* top bar + footer, TheScience.fm navy */
  --chrome-ink: #e8edf5;
  --chrome-muted: #aab6c8;
  --chrome-link: #b9d0ff;
  --mast-bg: #eef2f8;
  --promo: #12336b;       /* audio briefing panel */
  --promo-accent: #f2b544;
  --muted: #55627a;
  --line: #d5dce8;
  --brass: #8a6a22;
  --link: #1a4c9c;
  --focus: #c79a2e;
  --on-navy: #ffffff;
  /* map */
  --sea: #e7eef8;
  --land: #ffffff;
  --border: #b9c5d8;
  --r-big: #C2410C;
  --r-space: #1D4ED8;
  --r-concept: #047857;
  --r-swiss: #9F1239;
  --road-fusion: #C2410C;
  --serif: "IBM Plex Sans Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step-1: 1.2rem; --step-2: 1.5rem; --step-4: clamp(2.3rem, 5vw, 3.6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--mast-bg); }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* top line + masthead: white, navy rule like a report letterhead */
.band { background: var(--chrome); color: var(--chrome-ink); font-size: 0.78rem; }
.band-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 9px; }
.hubline { margin: 0; color: var(--chrome-ink); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; }
.hubline a { color: inherit; text-decoration: none; }
.hubline a:hover { color: #ffffff; text-decoration: underline; }
.lang { display: flex; align-items: center; gap: 8px; color: var(--chrome-ink); }
.lang-icon { flex: none; opacity: .9; }
.lang-pill { display: inline-flex; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; overflow: hidden; }
.lang-opt { padding: 4px 12px; font: 600 0.8rem/1.2 var(--mono); letter-spacing: .06em; color: var(--chrome-ink); text-decoration: none; }
.lang-opt[aria-current] { background: #ffffff; color: var(--chrome); }
a.lang-opt:hover, a.lang-opt:focus-visible { background: rgba(255, 255, 255, .15); color: #ffffff; text-decoration: none; }
.lang-full { margin-top: 10px; }
.lang-full .lang-opt { font: 600 0.88rem/1.2 var(--sans); letter-spacing: 0; padding: 6px 14px; }
.mast { background: var(--mast-bg); border-bottom: 3px solid var(--navy); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.mast-in { display: flex; align-items: center; gap: 28px; padding-block: 14px; flex-wrap: wrap; }
.brand { font: 700 1.55rem/1 var(--serif); color: var(--navy); text-decoration: none; letter-spacing: -0.01em; }
.brand span { font-weight: 500; color: var(--muted); }
.navs { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 1; min-width: 0; }
.tabs { display: flex; gap: 4px 22px; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; justify-content: flex-end; }
.tabs-family { align-items: baseline; }
.tabs-family .tabs-label { font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.tabs-family .tabs-label:hover { color: var(--navy); }
.tabs-hub a { font-size: 0.86rem; color: var(--muted); }
.tabs-hub a[aria-current] { color: var(--navy); }
table.compare caption { caption-side: bottom; text-align: left; font-size: 0.8rem; color: var(--muted); padding-top: 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { color: var(--ink); text-decoration: none; font-size: 0.92rem; white-space: nowrap; padding-block: 6px; border-bottom: 2px solid transparent; }
.tabs a:hover { border-bottom-color: var(--line); }
.tabs a[aria-current] { border-bottom-color: var(--navy); color: var(--navy); font-weight: 600; }

/* type */
h1, h2, h3 { font-family: var(--serif); color: var(--navy); text-wrap: balance; line-height: 1.15; }
h1 { font-size: var(--step-4); font-weight: 700; margin: 0; letter-spacing: -0.015em; }
.eyebrow { font: 500 0.76rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--brass); margin: 0 0 14px; }
.lede { font: 400 1.22rem/1.55 var(--serif); color: var(--ink); max-width: 62ch; margin: 18px 0 0; }
.lede-sm { font-size: 1.1rem; margin-top: 0; }

/* hero */
.hero { background: var(--promo); color: #ffffff; border-bottom: 6px solid var(--promo-accent); }
.mast { border-bottom-color: var(--promo); }
.hero-in { padding-block: clamp(40px, 7vw, 84px) clamp(32px, 5vw, 56px); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); color: #ffffff; }
.hero .eyebrow { color: var(--promo-accent); }
.hero .lede { color: #dbe4f2; }
.hero-fig { margin: 30px 0 0; color: #dbe4f2; font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 6px 26px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.25); max-width: 62ch; }
.hero-fig .mono { color: var(--promo-accent); font-weight: 500; margin-right: 6px; }

.block { padding-block: 44px 8px; }
.sec-h { font-size: var(--step-2); margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--navy); }

/* family cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 18px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--navy); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--navy); box-shadow: 0 2px 0 var(--navy); }
.card-lead { grid-column: span 2; background: var(--tint); border-top-width: 6px; }
.code { font: 500 0.78rem/1 var(--mono); color: var(--brass); letter-spacing: 0.06em; }
.card-name { font: 700 1.45rem/1.2 var(--serif); color: var(--navy); }
.card-lead .card-name { font-size: 2.1rem; }
.card-measures { font-size: 0.95rem; }
.card-meta { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.85rem; }
.card-meta dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.card-meta dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.card-go { font-size: 0.88rem; font-weight: 600; color: var(--link); }

/* place tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--navy); background: var(--surface); color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.tile-name { font: 600 1.15rem/1.25 var(--serif); color: var(--navy); }
.tile:hover .tile-name { text-decoration: underline; }

/* document layout */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 22px 0 0; font-size: 0.82rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); }
.page-head { padding-block: 26px 30px; border-bottom: 2px solid var(--navy); }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-block: 32px; align-items: start; }
.doc-home { grid-template-columns: minmax(0, 1fr); }
.doc-wide .prose { max-width: none; }
.prose { max-width: 70ch; min-width: 0; }
.prose h2 { font-size: var(--step-2); margin: 44px 0 12px; }
.prose > h2:first-child, .prose > p:first-child { margin-top: 0; }
.prose p, .prose li, .prose dd { overflow-wrap: break-word; }
.prose ul.plain { padding-left: 1.1em; display: grid; gap: 8px; }
.note { color: var(--muted); font-size: 0.88rem; }

.defn { margin: 18px 0; padding: 20px 22px; background: var(--tint); border-left: 4px solid var(--navy); }
.defn p { font: 500 1.14rem/1.55 var(--serif); margin: 0; }
.defn cite { display: block; margin-top: 10px; font: 500 0.8rem var(--mono); font-style: normal; color: var(--brass); }

ol.criteria { list-style: none; counter-reset: c; padding: 0; margin: 14px 0; border-top: 1px solid var(--line); }
ol.criteria li { counter-increment: c; position: relative; padding: 10px 0 10px 2.4em; border-bottom: 1px solid var(--line); }
ol.criteria li::before { content: counter(c); position: absolute; left: 0; top: 10px; font: 500 0.9rem/1.7 var(--mono); color: var(--brass); }

dl.types { margin: 14px 0; display: grid; gap: 14px; }
dl.types dt { font: 600 1.08rem var(--serif); color: var(--navy); }
dl.types dd { margin: 4px 0 0; }

.record { position: sticky; top: 96px; background: var(--tint); border-top: 3px solid var(--navy); padding: 18px 20px; font-size: 0.88rem; }
.record-h { margin: 0 0 12px; font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--brass); }
.record dl { margin: 0; display: grid; gap: 12px; }
.record dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.record dd { margin: 2px 0 0; overflow-wrap: anywhere; }

.official { margin-top: 44px; padding: 20px 22px; border: 1px solid var(--line); border-left: 4px solid var(--navy); }
.official h2 { margin: 0 0 6px; font-size: var(--step-1); }
.linklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.linklist li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.ext-host { font: 400 0.76rem var(--mono); color: var(--muted); }

.sources { margin-top: 44px; padding-top: 18px; border-top: 2px solid var(--navy); }
.sources h2 { font-size: var(--step-1); margin: 0 0 6px; }
.sources ol { padding-left: 1.4em; font-size: 0.86rem; display: grid; gap: 8px; color: var(--muted); }
.sources a { overflow-wrap: anywhere; }

/* places */
.places { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.place { padding: 16px 18px; border: 1px solid var(--line); border-top: 3px solid var(--navy); display: flex; flex-direction: column; gap: 6px; }
.place p { margin: 0; font-size: 0.93rem; }
.place-name { font: 600 1.08rem/1.25 var(--serif) !important; color: var(--navy); }
.place-links { margin-top: auto !important; padding-top: 6px; font-size: 0.86rem !important; }

/* contact */
.contact-card { border: 1px solid var(--line); border-left: 4px solid var(--navy); padding: 6px 20px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin: 12px 0; }
.contact-k { font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--brass); min-width: 5em; }
.contact-v { font: 600 1.25rem var(--serif); user-select: all; }

/* maps */
.mapfig { margin: 18px 0 8px; }
.mapwrap { border: 1px solid var(--line); background: var(--sea); overflow: hidden; }
.map { display: block; width: 100%; height: auto; }
.mapfig figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.m-sea { fill: var(--sea); }
.m-land path { fill: var(--land); stroke: var(--border); stroke-width: 0.7; }
.map-world .m-land path { stroke-width: 0.4; }
.m-lake path, circle.m-lake { fill: var(--sea); stroke: var(--border); stroke-width: 0.7; }
.m-road { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.m-road-big { stroke: var(--r-big); }
.m-road-space { stroke: var(--r-space); stroke-dasharray: 12 7; }
.m-road-concept { stroke: var(--r-concept); stroke-dasharray: 2 7; stroke-width: 5; }
.m-road-swiss { stroke: var(--r-swiss); stroke-dasharray: 18 5 3 5; }
.m-road-other { stroke-opacity: 0.55; }
.m-hub circle { fill: var(--land); stroke: var(--navy); stroke-width: 2.5; }
.m-hub-main circle { fill: var(--navy); }
.m-hub text, .m-offmap, .m-wlabel, .m-place text { font: 600 15px var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--land); stroke-width: 4px; stroke-linejoin: round; }
.m-hub-main text { font: 700 18px var(--serif); fill: var(--navy); }
.m-offmap { font-size: 14px; fill: var(--r-space); }
.m-credit { font: 400 11px var(--mono); fill: var(--muted); }
.m-dot { fill: var(--navy); }
.m-dot-main { fill: var(--brass); stroke: var(--land); stroke-width: 1.5; }
.m-wlabel { font-size: 13px; }
.mapwrap:has(.map-local) { background: var(--land); }
.m-paper { fill: var(--land); }
.m-rail { fill: none; stroke: var(--ink); stroke-width: 3; }
.m-rail-ties { fill: none; stroke: var(--land); stroke-width: 1.4; stroke-dasharray: 6 6; }
.m-raillabel { font: 500 13px var(--mono); fill: var(--ink); }
.m-lakelabel { font: italic 400 12px var(--serif); fill: var(--muted); }
.m-place circle { fill: var(--land); stroke: var(--navy); stroke-width: 2.5; }
.mk-main circle { fill: var(--navy); }
.mk-inst circle { fill: var(--navy); stroke: var(--land); }
.mk-rail circle { fill: var(--land); }
.mk-sight circle { fill: var(--land); stroke: var(--road-fusion); }
.m-place .m-sub { font: 400 13px var(--sans); fill: var(--muted); }
.mk-main text { font: 700 17px var(--serif); fill: var(--navy); }
.m-north path { fill: var(--navy); }
.m-north text { font: 600 12px var(--mono); fill: var(--navy); }

/* roads legend */
.roads { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.road { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; }
.road p { margin: 0; }
.road-key { margin-top: 12px; height: 0; border-top: 4px solid var(--r-big); }
.road-space .road-key { border-top: 4px dashed var(--r-space); }
.road-concept .road-key { border-top: 5px dotted var(--r-concept); }
.road-swiss .road-key { border-top: 4px dashed var(--r-swiss); }
.road-tag { margin-left: 8px; font: 500 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--brass); }
.road-name a { color: var(--navy); }
.road-name { font: 600 1.1rem var(--serif); color: var(--navy); }
.road-about { font-size: 0.9rem; color: var(--muted); }
.road-stops { font-size: 0.92rem; margin-top: 4px !important; }
.road-stops a[aria-current], .hublist a[aria-current] { font-weight: 700; color: var(--navy); }

.teaser-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.teaser-grid .mapfig { margin-top: 0; }

/* hubs table */
.tablewrap { margin: 16px 0; }
table.hubs { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.hubs th, table.hubs td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; hyphens: auto; }
table.hubs thead th { font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); border-bottom: 2px solid var(--navy); }
table.hubs tbody th { font-weight: 600; }
table.hubs .row-main { background: var(--tint); }

/* audio */
.audio { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; margin-block: 48px 64px; padding: clamp(24px, 4vw, 40px); background: var(--promo); color: #ffffff; border-left: 8px solid var(--promo-accent); }
.audio-mark { color: var(--promo-accent); }
.audio-mark svg { width: 56px; height: 56px; }
.audio h2 { font-size: 1.7rem; margin: 0 0 4px; color: #ffffff; }
.audio-label { margin: 0 0 12px; font: 500 0.76rem var(--mono); color: var(--promo-accent); text-transform: uppercase; letter-spacing: 0.08em; }
.audio p { margin: 0 0 18px; max-width: 72ch; color: #dbe4f2; }
.url-cta { display: inline-block; padding: 10px 18px; background: var(--promo-accent); color: var(--chrome); font: 700 1.3rem var(--serif); text-decoration: none; }
.url-cta:hover { background: #ffffff; }
.audio :focus-visible { outline-color: #ffffff; }
.btn { display: inline-block; padding: 10px 16px; background: var(--navy); color: var(--on-navy); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.btn:hover { text-decoration: underline; }

/* footer: light, navy rule */
.foot { background: var(--chrome); color: var(--chrome-ink); font-size: 0.9rem; padding-block: 44px 28px; }
.foot a { color: var(--chrome-link); text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: #ffffff; text-decoration: underline; }
.foot a[aria-current] { color: #ffffff !important; }
.foot-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 28px; }
.foot h2 { font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--chrome-muted); margin: 0 0 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-hubs { grid-template-columns: 1fr 1fr; gap: 6px 14px !important; }
.foot p { margin: 0 0 6px; }
.brand-foot { font-size: 1.5rem; margin-bottom: 12px !important; color: #ffffff; }
.brand-foot span { color: var(--chrome-muted); }
.disclaimer { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid #2a3a55; font-size: 0.8rem; color: var(--chrome-muted); max-width: 90ch; }

@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .record { position: static; order: -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .navs { flex-basis: 100%; align-items: stretch; }
  .tabs { justify-content: flex-start; }
  .mast-in { gap: 8px; }
  .teaser-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards, .tiles, .places { grid-template-columns: minmax(0, 1fr); }
  .card-lead { grid-column: auto; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .audio { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.m-offmap-local { font: 600 14px var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--land); stroke-width: 4px; }
.m-scale path { stroke: var(--ink); stroke-width: 2; fill: none; }
.m-scale text { font: 500 11px var(--mono); fill: var(--ink); }
ellipse.m-lake { fill: var(--sea); stroke: var(--border); stroke-width: 0.8; }

/* subpage headers: same navy panel as the home hero, a little more compact */
.hero-sub .hero-in { padding-block: 18px clamp(28px, 4vw, 44px); }
.hero-sub h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hero-sub .crumbs ol { margin: 0 0 clamp(20px, 3vw, 32px); color: #b9c6da; }
.hero-sub .crumbs a { color: #dbe4f2; }
.hero-sub .crumbs a:hover { color: #ffffff; }
.hero-sub .crumbs li + li::before { color: #6d80a0; }
.hero-sub .crumbs [aria-current] { color: #ffffff; }
.hero-sub .lede a { color: #ffffff; }

/* background graphics (data-driven, from maps.js): navy panels only */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-repeat: no-repeat; }
.hero--routes::before { background-image: url("bg-routes.svg"); background-size: 760px auto; background-position: right -40px top -170px; opacity: .55; }
.hero-sub.hero--routes::before { background-size: 640px auto; background-position: right -40px top -200px; }
.hero--local::before { background-image: url("bg-local.svg"); background-size: 760px auto; background-position: right -40px top -60px; opacity: .5; }
.hero--globe::before { background-image: url("bg-globe-hero.svg"); background-size: 520px auto; background-position: right -60px top -40px; opacity: .9; }
.hero--code::after { content: attr(data-code); position: absolute; right: max(16px, calc((100vw - 1160px) / 2)); bottom: -0.18em; font: 700 clamp(6rem, 15vw, 13rem)/1 var(--serif); letter-spacing: -0.02em; color: rgba(255, 255, 255, 0.07); white-space: nowrap; pointer-events: none; }
.hero::after { z-index: 0; }
@media (max-width: 760px) {
  .hero::before, .hero--code::after { display: none; }
}
.foot { background-image: url("bg-globe-footer.svg"); background-repeat: no-repeat; background-size: 620px auto; background-position: right -220px top -40px; }
@media (max-width: 760px) { .foot { background-size: 420px auto; background-position: right -160px bottom -120px; } }

/* podcast banner: sound-wave graphic on the right */
.audio { position: relative; overflow: hidden; }
.audio > * { position: relative; z-index: 1; }
.audio::after { content: ""; position: absolute; z-index: 0; right: clamp(16px, 3vw, 40px); top: 50%; transform: translateY(-50%); width: clamp(220px, 24vw, 320px); aspect-ratio: 520 / 220; max-width: 100%; background: url("bg-wave.svg") no-repeat center / contain; opacity: .9; pointer-events: none; }
.audio p { max-width: 50ch; }
@media (max-width: 1100px) { .audio::after { display: none; } .audio p { max-width: 72ch; } }

/* long manual pages: intro, table of contents, two-column lists, data tables */
.intro { background: var(--tint); border-left: 4px solid var(--promo-accent); padding: 20px 24px; margin: 0 0 28px; }
.intro h2 { margin-top: 0 !important; font-size: var(--step-1); }
.intro p { margin: 0 0 12px; }
.intro p:last-child { margin-bottom: 0; }
.toc { border: 1px solid var(--line); padding: 16px 22px; margin: 0 0 36px; }
.toc-h { margin: 0 0 8px; font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--brass); }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 32px; font-size: 0.93rem; }
.toc li { break-inside: avoid; padding: 2px 0; }
.prose h2[id] { scroll-margin-top: 110px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.two-col > div { border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 14px 18px; }
.col-h { margin: 0 0 6px; font-weight: 600; color: var(--navy); }
.two-col ul.plain { margin: 0; }
dl.abbr { grid-template-columns: max-content minmax(0, 1fr); column-gap: 18px; row-gap: 8px; }
dl.abbr dt { font: 600 0.95rem var(--mono); }
dl.abbr dd { margin: 0; }
table.data caption { caption-side: bottom; text-align: left; font-size: 0.8rem; color: var(--muted); padding-top: 8px; }
table.data td { font-variant-numeric: tabular-nums; }
table.data { min-width: 0; }
@media (max-width: 640px) { .toc ol { columns: 1; } .two-col { grid-template-columns: minmax(0, 1fr); } }

/* tables never scroll inside the page: on narrow screens each row becomes a small card */
@media (max-width: 700px) {
  table.hubs, table.hubs tbody, table.hubs tr, table.hubs th, table.hubs td { display: block; width: auto; }
  table.hubs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.hubs caption { display: block; }
  table.hubs tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.hubs tbody th, table.hubs td { border: 0; padding: 3px 0; }
  table.hubs tbody th { font-size: 1rem; padding-bottom: 6px; }
  table.hubs td[data-label]::before { content: attr(data-label); display: block; font: 500 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
  table.hubs tbody th[data-label]::before { content: none; }
}

/* links: no underline in the top area (breadcrumbs), underline in body text */
.crumbs a { text-decoration: none; }
.crumbs a:hover, .crumbs a:focus-visible { text-decoration: underline; }
