/* ───────────────────────────────────────────────────────────────────────────
   Relevus — Documentation
   Sigma Telecoms brand system. Light + dark, sidebar-driven, print-friendly.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --navy: #003c64;
  --magenta: #b41464;
  --teal: #148cb4;
  --off-white: #f4f7fa;
  --grey: #8096a8;
  --white: #ffffff;

  --bg: var(--white);
  --bg-soft: var(--off-white);
  --bg-sunken: #eef3f8;
  --text: #16324a;
  --text-soft: #5a7085;
  --heading: var(--navy);
  --line: #dce5ee;
  --line-soft: #e9f0f6;
  --link: #0f6d92;
  --code-bg: #f2f6fa;
  --code-text: #0d5a7a;
  --shadow-sm: 0 1px 2px rgba(0, 40, 70, 0.06);
  --shadow-md: 0 4px 18px rgba(0, 40, 70, 0.09);
  --shadow-lg: 0 18px 48px rgba(0, 40, 70, 0.16);

  --sidebar-w: 302px;
  --toc-w: 232px;
  --header-h: 64px;
  --radius: 10px;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #071a2a;
  --bg-soft: #0b2438;
  --bg-sunken: #061524;
  --text: #cfe0ee;
  --text-soft: #8fa9bf;
  --heading: #eaf3fa;
  --line: #16374f;
  --line-soft: #10293c;
  --link: #4fb8dd;
  --code-bg: #0c2739;
  --code-text: #7ed0ee;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Header ──────────────────────────────────────────────────────────────── */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 60;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--white); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand__sigma {
  font-family: var(--font-display); font-weight: 800; font-size: 27px;
  line-height: 1; color: var(--teal);
}
.brand__stack { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-weight: 800; font-size: 21px;
  letter-spacing: 2.4px; text-transform: uppercase;
}
.brand__sub {
  font-family: var(--font-display); font-weight: 600; font-size: 9.5px;
  letter-spacing: 3.2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

.topbar__spacer { flex: 1; }

.topbar__links { display: flex; align-items: center; gap: 4px; }
.topbar__link {
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  letter-spacing: 1.4px; text-transform: uppercase;
  padding: 8px 12px; border-radius: 6px;
}
.topbar__link:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); text-decoration: none; }
.topbar__link--cta {
  background: var(--magenta); color: var(--white);
}
.topbar__link--cta:hover { background: #cf1a74; color: var(--white); }

.iconbtn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px;
  background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.85);
  cursor: pointer; padding: 0;
}
.iconbtn:hover { background: rgba(255, 255, 255, 0.16); color: var(--white); }
.iconbtn svg { width: 19px; height: 19px; }

.menu-toggle { display: none; }

/* ── Search ──────────────────────────────────────────────────────────────── */

.search { position: relative; width: min(340px, 34vw); }
.search__input {
  width: 100%; height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-body); font-size: 14.5px;
  padding: 0 12px 0 38px;
  outline: none;
}
.search__input::placeholder { color: rgba(255, 255, 255, 0.5); }
.search__input:focus { background: rgba(255, 255, 255, 0.18); border-color: var(--teal); }
.search__icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: rgba(255, 255, 255, 0.55); pointer-events: none;
}
.search__results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; display: none; max-height: 62vh; overflow-y: auto;
}
.search__results.is-open { display: block; }
.search__hit { display: block; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); }
.search__hit:last-child { border-bottom: 0; }
.search__hit:hover, .search__hit.is-active { background: var(--bg-soft); text-decoration: none; }
/* The three lines are spans, so they must be told to stack. */
.search__hit-title {
  display: block;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--heading);
  line-height: 1.2; margin: 1px 0 2px;
}
.search__hit-desc { display: block; font-size: 13.5px; color: var(--text-soft); line-height: 1.45; }
.search__hit-crumb {
  display: block;
  font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--magenta); font-weight: 500; line-height: 1.3;
}
.search__empty { padding: 16px; font-size: 14px; color: var(--text-soft); }

/* ── Shell ───────────────────────────────────────────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  max-width: 1600px;
  margin: 0 auto;
  padding-top: var(--header-h);
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.sidebar {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  padding: 28px 12px 60px 24px;
  background: var(--bg);
}
.sidebar__group { margin-bottom: 26px; }
.sidebar__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 11.5px; letter-spacing: 3.4px; text-transform: uppercase;
  color: var(--magenta); margin: 0 0 9px 10px;
}
.sidebar__list { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); }
.sidebar__link {
  display: block; padding: 6px 12px; margin-left: -1.5px;
  border-left: 1.5px solid transparent;
  color: var(--text-soft); font-size: 15.2px; line-height: 1.4;
}
.sidebar__link:hover { color: var(--link); background: var(--bg-soft); text-decoration: none; }
.sidebar__link.is-current {
  color: var(--navy); font-weight: 500;
  border-left-color: var(--magenta); background: var(--bg-soft);
}
:root[data-theme="dark"] .sidebar__link.is-current { color: var(--heading); }

.sidebar__sublist { list-style: none; margin: 2px 0 6px; padding: 0 0 0 12px; }
.sidebar__sublink {
  display: block; padding: 3px 12px; font-size: 14px; color: var(--text-soft);
  border-left: 1.5px solid var(--line-soft); margin-left: 0;
}
.sidebar__sublink:hover { color: var(--link); text-decoration: none; }
.sidebar__sublink.is-active { color: var(--teal); border-left-color: var(--teal); }

/* ── Main ────────────────────────────────────────────────────────────────── */

.main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--toc-w); gap: 40px; padding: 0 40px; }
.article { min-width: 0; padding: 34px 0 88px; max-width: 860px; }

.breadcrumb {
  font-size: 11.5px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--magenta); font-family: var(--font-display); font-weight: 700;
  margin-bottom: 12px;
}
.breadcrumb a { color: inherit; }

.article h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 4.6vw, 50px); line-height: 1.02;
  text-transform: uppercase; letter-spacing: -0.4px;
  color: var(--heading); margin: 0 0 14px;
}
.article .lede {
  font-size: 19.5px; line-height: 1.62; color: var(--text-soft);
  font-weight: 300; margin: 0 0 34px; max-width: 62ch;
}

.article h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 30px; line-height: 1.14; text-transform: uppercase; letter-spacing: 0.3px;
  color: var(--heading); margin: 52px 0 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.article h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 21.5px; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--heading); margin: 34px 0 10px;
}
.article h4 {
  font-family: var(--font-body); font-weight: 500; font-size: 17px;
  color: var(--heading); margin: 24px 0 6px;
}

.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 24px; }
.article li { margin-bottom: 7px; }
.article li > ul, .article li > ol { margin-top: 7px; margin-bottom: 4px; }
.article strong { font-weight: 500; color: var(--heading); }

.anchor {
  opacity: 0; margin-left: 9px; font-size: 0.62em; color: var(--teal);
  font-family: var(--font-body); font-weight: 400; text-decoration: none;
  vertical-align: middle;
}
h2:hover .anchor, h3:hover .anchor { opacity: 1; }

code, kbd {
  font-family: var(--font-mono); font-size: 0.855em;
  background: var(--code-bg); color: var(--code-text);
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-soft);
  white-space: nowrap;
}
kbd { font-size: 0.8em; box-shadow: 0 1.5px 0 var(--line); }
pre {
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 18px; overflow-x: auto;
  margin: 0 0 20px; font-size: 14px; line-height: 1.6;
}
pre code { background: none; border: 0; padding: 0; white-space: pre; color: var(--text); }

/* UI labels quoted from the app — reads as a button, not as code. */
.ui {
  font-family: var(--font-body); font-weight: 500; font-size: 0.94em;
  background: var(--bg-soft); color: var(--heading);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 7px; white-space: nowrap;
}

/* ── Callouts ────────────────────────────────────────────────────────────── */

.note {
  --accent: var(--teal);
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px 20px; margin: 0 0 22px;
}
.note > :last-child { margin-bottom: 0; }
.note__title {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: 2.4px; text-transform: uppercase; color: var(--accent);
  margin: 0 0 6px; display: block;
}
.note--tip { --accent: var(--teal); }
.note--warn { --accent: #c07800; }
.note--danger { --accent: var(--magenta); }
.note--role { --accent: var(--navy); }
:root[data-theme="dark"] .note--role { --accent: var(--teal); }

/* ── Role pills ──────────────────────────────────────────────────────────── */

.roles { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-weight: 500;
  font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 3px;
  border: 1px solid transparent; white-space: nowrap;
}
.pill--releveur { background: rgba(20, 140, 180, 0.13); color: var(--teal); border-color: rgba(20, 140, 180, 0.35); }
.pill--responsable { background: rgba(0, 60, 100, 0.11); color: var(--navy); border-color: rgba(0, 60, 100, 0.3); }
.pill--admin { background: rgba(180, 20, 100, 0.11); color: var(--magenta); border-color: rgba(180, 20, 100, 0.32); }
.pill--muted { background: var(--bg-soft); color: var(--text-soft); border-color: var(--line); }
:root[data-theme="dark"] .pill--responsable { color: #7fc4e8; border-color: rgba(127, 196, 232, 0.35); background: rgba(127, 196, 232, 0.1); }

/* ── Figures ─────────────────────────────────────────────────────────────── */

figure { margin: 0 0 26px; }
figure img, figure video {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); background: var(--bg-soft);
}
figure img { cursor: zoom-in; }
/* The clips are recorded at the app's own portrait shape (820×940). Left at
   full width they'd be ~900 px tall and swamp the page, so cap the height and
   let them centre — it reads as a tablet recording, which is what it is. */
figure video {
  max-height: min(620px, 78vh);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  background: var(--navy);
}
figcaption {
  font-size: 13.5px; color: var(--text-soft); line-height: 1.5;
  margin-top: 9px; padding-left: 2px; border-left: 2px solid var(--magenta);
  padding-left: 10px;
}
.figure--narrow { max-width: 420px; }
.figure--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.figure--pair figure { margin: 0; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2, 18, 30, 0.94);
  display: none; align-items: center; justify-content: center; padding: 32px;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lightbox__close {
  position: absolute; top: 20px; right: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  border: 0; font-size: 22px; cursor: pointer;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
thead th {
  background: var(--bg-soft); text-align: left;
  font-family: var(--font-display); font-weight: 700;
  font-size: 12.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--navy);
  padding: 11px 14px; border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
:root[data-theme="dark"] thead th { color: var(--heading); }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; line-height: 1.55; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-soft); }
td code { white-space: nowrap; }
.td-yes { color: var(--teal); font-weight: 500; }
.td-no { color: var(--grey); }

/* ── Steps ───────────────────────────────────────────────────────────────── */

.steps { list-style: none; counter-reset: step; margin: 0 0 26px; padding: 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 22px 46px; margin: 0;
  border-left: 1.5px solid var(--line); margin-left: 15px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 4px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -15.5px; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.steps > li > :first-child { margin-top: 0; }
.steps h4 { margin-top: 0; }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 16px; margin: 0 0 30px; }
.card {
  display: block; background: var(--bg);
  border: 1px solid var(--line); border-top: 3px solid var(--teal);
  border-radius: var(--radius); padding: 18px 19px;
  box-shadow: var(--shadow-sm); transition: transform 0.16s, box-shadow 0.16s;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.card--magenta { border-top-color: var(--magenta); }
.card__eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 10.5px;
  letter-spacing: 2.8px; text-transform: uppercase; color: var(--magenta); display: block; margin-bottom: 5px;
}
.card__title {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--heading);
  margin: 0 0 5px; line-height: 1.1;
}
.card__desc { font-size: 14.5px; color: var(--text-soft); line-height: 1.55; margin: 0; }

/* ── Hero (home) ─────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--white);
  border-radius: 14px; padding: 46px 44px 44px;
  margin: 0 0 40px;
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -90px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 54px solid var(--teal); opacity: 0.14; transform: rotate(15deg);
}
.hero::before {
  content: ""; position: absolute; right: 110px; bottom: -70px;
  width: 180px; height: 150px; background: var(--magenta); opacity: 0.16;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero__eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px;
  letter-spacing: 5px; text-transform: uppercase; color: #ff7ab8; margin: 0 0 12px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 6vw, 66px); line-height: 0.98; text-transform: uppercase;
  margin: 0 0 16px; color: var(--white); letter-spacing: -0.5px;
}
.hero p { font-size: 19px; font-weight: 300; line-height: 1.6; max-width: 56ch; color: rgba(255, 255, 255, 0.86); margin: 0 0 22px; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero__tag {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500;
  padding: 5px 14px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 2px;
  color: rgba(255, 255, 255, 0.82);
}

/* ── Key/value definition rows ───────────────────────────────────────────── */

.kv { border-top: 1px solid var(--line); margin: 0 0 24px; }
.kv__row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
.kv__key { font-weight: 500; color: var(--heading); }
.kv__val { color: var(--text-soft); }
.kv__val > :last-child { margin-bottom: 0; }

/* ── Prev / next ─────────────────────────────────────────────────────────── */

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 58px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager__link {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
  display: block; transition: border-color 0.15s, transform 0.15s;
}
.pager__link:hover { border-color: var(--teal); transform: translateY(-2px); text-decoration: none; }
.pager__link--next { text-align: right; grid-column: 2; }
.pager__dir {
  font-family: var(--font-display); font-weight: 700; font-size: 10.5px;
  letter-spacing: 2.6px; text-transform: uppercase; color: var(--magenta); display: block; margin-bottom: 3px;
}
.pager__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; text-transform: uppercase; color: var(--heading); line-height: 1.15; }

/* ── TOC ─────────────────────────────────────────────────────────────────── */

.toc {
  position: sticky; top: calc(var(--header-h) + 34px);
  align-self: start; max-height: calc(100vh - var(--header-h) - 60px);
  overflow-y: auto; padding: 0 0 40px; font-size: 14.2px;
}
.toc__title {
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase; color: var(--magenta); margin: 0 0 10px;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); }
.toc li a {
  display: block; padding: 4px 0 4px 13px; margin-left: -1.5px;
  border-left: 1.5px solid transparent; color: var(--text-soft); line-height: 1.4;
}
.toc li a:hover { color: var(--link); text-decoration: none; }
.toc li a.is-active { color: var(--teal); border-left-color: var(--teal); font-weight: 500; }
.toc li.toc--h3 a { padding-left: 26px; font-size: 13.6px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 30px 40px; font-size: 13.8px; color: var(--text-soft);
}
.footer__inner { max-width: 1600px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__sigma { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--teal); line-height: 1; }

/* ── Skip link ───────────────────────────────────────────────────────────── */

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--magenta); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip:focus { left: 12px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 940px) {
  :root { --header-h: 58px; }
  .menu-toggle { display: inline-flex; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; width: 300px;
    z-index: 55; transform: translateX(-101%); transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg); height: auto;
  }
  .sidebar.is-open { transform: none; }
  .scrim { position: fixed; inset: var(--header-h) 0 0; background: rgba(0, 25, 45, 0.5); z-index: 54; display: none; }
  .scrim.is-open { display: block; }
  .main { padding: 0 20px; }
  .article { padding: 24px 0 64px; }
  .topbar__links { display: none; }
  /* The spacer would fight the search field for the leftover width. */
  .topbar__spacer { display: none; }
  .topbar { gap: 10px; padding: 0 12px; }
  .search { width: auto; flex: 1; min-width: 0; }
  .brand__sub { display: none; }
  .hero { padding: 32px 26px; }
  .figure--pair { grid-template-columns: 1fr; }
  .kv__row { grid-template-columns: 1fr; gap: 3px; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { grid-column: 1; text-align: left; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand__name { font-size: 18px; }
  .footer { padding: 24px 20px; }
}

/* ── Print ───────────────────────────────────────────────────────────────── */

@media print {
  .topbar, .sidebar, .toc, .pager, .footer, .scrim, .lightbox { display: none !important; }
  .shell { display: block; padding-top: 0; }
  .main { display: block; padding: 0; }
  .article { max-width: none; padding: 0; }
  figure img { box-shadow: none; break-inside: avoid; }
  .note, table, figure { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
