/*
 * Bathroom Emergency Guide v4
 * Screen: calm utilitarian bathroom-tile UI.
 * Print: deterministic A4, single column, ink-conscious.
 */

:root {
  --ink: #14201d;
  --muted: #52645e;
  --paper: #fbfaf4;
  --surface: #ffffff;
  --tile: #e9f2ed;
  --line: #b8c9c1;
  --green: #0d7355;
  --green-soft: #dff2e9;
  --red: #b42318;
  --red-soft: #fff0ed;
  --amber: #9b5b00;
  --amber-soft: #fff4d9;
  --blue: #175cd3;
  --blue-soft: #eaf2ff;
  --purple: #6f3ab2;
  --shadow: 0 14px 35px rgba(20, 32, 29, .10);
  --radius: 6px;
  --measure: 65ch;
  color-scheme: light;
  font-family: "IBM Plex Sans", "Atkinson Hyperlegible", "Noto Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
}

.badger-box {
  position: relative;
  margin: 1.35rem 0;
  padding: 1rem 1rem 1rem 1.15rem;
  background: color-mix(in srgb, var(--sg-accent, var(--green)) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--sg-accent, var(--green)) 45%, var(--line));
  border-left: .55rem solid var(--sg-accent, var(--green));
}

.badger-box::after {
  content: "///";
  position: absolute;
  top: .35rem;
  right: .55rem;
  color: var(--sg-accent, var(--green));
  font: 900 .8rem ui-monospace, monospace;
  letter-spacing: -.08em;
}

.badger-box > :first-child { margin-top: 0; }
.badger-box > :last-child { margin-bottom: 0; }

h2::before {
  content: "#";
  display: inline-block;
  margin-right: .45em;
  color: var(--sg-accent, var(--green));
  font-family: ui-monospace, monospace;
  font-size: .76em;
  font-weight: 900;
}

/*
 * Quantitative figures use an editorial chart treatment rather than the
 * heavier map/illustration card. The document owns the title and interpretive
 * note; the generated chart owns marks, scales, and labels.
 */
.quantitative-figure {
  /* Never wider than the column. At 940px with auto margins this overflowed
     the A4/2 page symmetrically, clipping the first letter of the heading on
     one side and the figure reference on the other. */
  max-width: min(940px, 100%);
  margin: 1.15rem auto 1.5rem;
  break-inside: avoid;
}

.quantitative-figure > figure {
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0;
  padding: .72rem .78rem .58rem;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-top: 4px solid var(--blue);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: none;
}

.quantitative-figure > figure img {
  order: 2;
  width: 100%;
  max-height: none;
  margin: .35rem auto 0;
  object-fit: contain;
}

.quantitative-figure > figure figcaption {
  order: 1;
  margin: 0;
  padding: 0 0 .52rem;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

.chart-note {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem 1rem;
  margin: 0;
  padding: .55rem .75rem .65rem;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-top: 0;
  background: color-mix(in srgb, var(--blue-soft) 44%, var(--surface));
  color: var(--ink);
  font-size: .84rem;
  line-height: 1.4;
}

.chart-note p { margin: 0; }
.chart-note strong { color: var(--ink); }

@media (max-width: 720px) {
  .chart-note { grid-template-columns: 1fr; }
}

@media print {
  .quantitative-figure {
    margin: 7pt 0 9pt;
  }

  .quantitative-figure > figure {
    margin: 0;
    padding: 5pt 6pt 4pt;
    border: .6pt solid #9ba6af;
    border-top: 2.2pt solid var(--blue);
    background: #fff;
    box-shadow: none;
  }

  .quantitative-figure > figure img {
    max-height: 139mm;
    margin: 2pt auto 0;
  }

  .quantitative-figure > figure figcaption {
    padding-bottom: 3.5pt;
    font-size: 8.5pt;
    line-height: 1.25;
  }

  .chart-note {
    gap: 4pt 8pt;
    padding: 4pt 6pt 5pt;
    border: .6pt solid #aab3bb;
    border-top: 0;
    background: #f7f9fa;
    font-size: 7.2pt;
    line-height: 1.32;
  }
}

:root[data-theme="dark"] {
  --ink: #e7f1ed;
  --muted: #a9bbb4;
  --paper: #101714;
  --surface: #18221e;
  --tile: #22312b;
  --line: #3b5047;
  --green: #6fd3ad;
  --green-soft: #173b2e;
  --red: #ff8b7d;
  --red-soft: #44231f;
  --amber: #f4c267;
  --amber-soft: #44351b;
  --blue: #8bb6ff;
  --blue-soft: #20334f;
  --purple: #c7a0ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, transparent 31px, color-mix(in srgb, var(--line) 28%, transparent) 32px, transparent 33px),
    linear-gradient(transparent 31px, color-mix(in srgb, var(--line) 28%, transparent) 32px, transparent 33px),
    var(--paper);
  background-size: 32px 32px;
}

a {
  color: var(--blue);
  text-underline-offset: .16em;
  overflow-wrap: anywhere;
}

/* Pandoc intentionally leaves many reference URLs as plain text. */
p, li, dd, td, th, .footnotes {
  min-width: 0;
  overflow-wrap: anywhere;
}

button {
  min-height: 44px;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .45rem .78rem;
  cursor: pointer;
}

button:hover, button:focus-visible {
  border-color: var(--green);
  outline: 3px solid color-mix(in srgb, var(--green) 20%, transparent);
}

a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 34%, transparent);
  outline-offset: 3px;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 50;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem 1rem;
  min-height: 3.6rem;
  padding: .65rem max(1rem, calc((100vw - 1240px) / 2));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.reader-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .65rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
  min-width: 44px;
}

.brand-guide,
.brand-address,
.brand-separator { white-space: nowrap; }

.brand-address {
  overflow: hidden;
  max-width: 9.5rem;
  text-overflow: ellipsis;
}

.edition-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .25rem .48rem;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 38%, var(--line));
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.reader-provenance {
  justify-self: center;
  display: flex;
  min-width: 0;
  gap: .25rem .7rem;
  align-items: center;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: .64rem;
  white-space: nowrap;
}

.reader-provenance a {
  color: inherit;
  text-decoration: none;
}

.reader-provenance a:hover,
.reader-provenance a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.repository-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  min-height: 44px;
  padding: .45rem .78rem;
  color: var(--surface);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.repository-link:hover,
.repository-link:focus-visible {
  color: var(--surface);
  background: color-mix(in srgb, var(--ink) 88%, var(--green));
  border-color: var(--green);
}

.repository-short { display: none; }

.app-actions { justify-self: end; display: flex; gap: .45rem; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(13rem, 17rem) minmax(0, var(--measure));
  gap: clamp(2rem, 5vw, 5.5rem);
  justify-content: center;
  align-items: start;
  width: min(1240px, calc(100% - 2rem));
  margin: 2rem auto 6rem;
}

.no-toc .app-shell {
  grid-template-columns: minmax(0, min(100%, 62rem));
}

.no-toc #toc-toggle {
  display: none;
}

#TOC {
  position: sticky;
  top: 4.6rem;
  align-self: start;
  max-height: calc(100vh - 5.8rem);
  overflow: auto;
  padding: 1rem;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  border: 1px solid var(--line);
  border-radius: .9rem;
  box-shadow: var(--shadow);
  scrollbar-gutter: stable;
}

#TOC ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#TOC li { margin: .18rem 0; }

#TOC ul ul {
  padding-left: .8rem;
  border-left: 1px solid var(--line);
}

.reader-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  margin: 0 0 .85rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}

#TOC .reader-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .45rem .5rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .55rem;
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.reader-toc-book {
  margin: 0 !important;
  padding: .55rem 0 .65rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.reader-toc-book:first-child { border-top: 0; }

.reader-toc-book > a {
  color: var(--ink) !important;
  font-weight: 850;
}

.reader-toc-book.is-current-book > a {
  color: var(--ink) !important;
  background: color-mix(in srgb, var(--sg-accent, var(--green)) 12%, var(--tile));
  box-shadow: inset 4px 0 var(--sg-accent, var(--green));
}

.reader-toc-sections {
  margin-top: .2rem !important;
  padding-left: .65rem !important;
}

.reader-toc-sections a { font-size: .77rem !important; }

#TOC a {
  display: block;
  padding: .4rem .48rem;
  color: var(--muted);
  border-radius: .4rem;
  font-size: .82rem;
  line-height: 1.3;
  text-decoration: none;
}

#TOC a:hover, #TOC a:focus-visible,
#TOC a[aria-current="location"] {
  color: var(--ink);
  background: var(--tile);
}

#TOC a[aria-current="location"] {
  box-shadow: inset 4px 0 var(--sg-accent, var(--green));
  font-weight: 800;
}

.toc-kicker {
  margin: 0 0 .55rem;
  color: var(--green);
  font-family: ui-monospace, monospace;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.toc-help {
  margin: 1rem 0 0;
  padding: .7rem;
  color: var(--red);
  background: var(--red-soft);
  border-left: 4px solid var(--red);
  font-size: .78rem;
}

main {
  min-width: 0;
  column-count: 1;
}

.chapter {
  margin: 0 0 3rem;
  padding: clamp(1.35rem, 3.6vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.document-cover {
  position: relative;
  min-height: min(780px, calc(100vh - 8rem));
  display: grid;
  align-content: center;
  overflow: hidden;
  border: 8px solid var(--green);
  background:
    linear-gradient(135deg, transparent 0 48%, color-mix(in srgb, var(--green) 12%, transparent) 48% 52%, transparent 52%),
    var(--surface);
  background-size: 26px 26px;
}

.document-cover::before {
  content: "SMALL-ROOM FIELD NOTES";
  display: inline-block;
  width: fit-content;
  margin-bottom: 1.2rem;
  padding: .35rem .55rem;
  color: var(--surface);
  background: var(--green);
  font-family: ui-monospace, monospace;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.document-cover h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 5.2rem);
  line-height: .92;
  letter-spacing: -.065em;
}

.document-cover h2 { border: 0; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  letter-spacing: -.045em;
}

h2 {
  margin: 2rem 0 .65rem;
  padding-top: .55rem;
  border-top: 3px solid var(--green);
  font-size: clamp(1.22rem, 2.6vw, 1.58rem);
}

h3 {
  margin: 1.8rem 0 .6rem;
  color: var(--green);
  font-size: 1.15rem;
}

h4 {
  margin: 1.4rem 0 .45rem;
  font-size: 1rem;
}

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

strong { font-weight: 800; }

hr {
  height: 0;
  margin: 2.4rem 0;
  border: 0;
  border-top: 1px dashed var(--line);
}

blockquote {
  margin: 1.4rem 0;
  padding: .9rem 1rem;
  background: var(--tile);
  border-left: 5px solid var(--green);
}

blockquote p { margin: .25rem 0; }

/* The reader-facing section address, e.g. [amb.2.8]. Sits on the heading's own
   line, set quietly enough that it never competes with the heading text. The
   machine-checkable [BEG:C:S:008] form stays in the registry and the anchor. */
.section-ref {
  float: right;
  margin-left: .8em;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: .58em;
  font-weight: 400;
  letter-spacing: .02em;
  opacity: .75;
  text-decoration: none;
}

.reference-link {
  color: inherit;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.reference-link:hover,
.reference-link:focus-visible { text-decoration: underline; }

/* Canonical stable fragments (#BEG:H:S:003, etc.) sit beside the legacy
   lowercase anchors without adding layout height. The scroll margin keeps the
   target clear of the sticky online reader bar. */
.reference-anchor,
.legacy-reference-anchor {
  display: block;
  height: 0;
  scroll-margin-top: 4.7rem;
}

/* The rationale under a procedure heading: why we act this way, before how.
   Sits tight to the heading it belongs to and never competes with it. */
.principle {
  margin: -.35rem 0 1.1rem;
  padding: .1rem 0 .1rem .7rem;
  color: var(--muted);
  border-left: 3px solid color-mix(in srgb, var(--sg-accent, var(--green)) 55%, transparent);
  font-size: .93rem;
  font-style: italic;
  line-height: 1.45;
  break-inside: avoid;
  break-after: avoid;
}

.principle p { margin: 0; }

/* Inline lead-in rather than its own line: the rationale should read as one
   quiet line under the heading, not as a stacked label plus a sentence. */
.principle p:first-of-type::before {
  margin-right: .4em;
  color: var(--sg-accent, var(--green));
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  content: "Principle";
}

pre {
  max-width: 100%;
  overflow: auto;
  padding: 1rem;
  color: var(--ink);
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: .78rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

code {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: .9em;
}

table {
  display: table;
  width: 100%;
  margin: 1.2rem 0 1.8rem;
  border-collapse: collapse;
  font-size: .87rem;
  line-height: 1.42;
}

th, td {
  padding: .58rem .62rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--surface);
  background: var(--green);
  font-size: .76rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}

tr:nth-child(even) td { background: color-mix(in srgb, var(--tile) 55%, transparent); }

img {
  display: block;
  max-width: min(100%, 940px);
  height: auto;
  max-height: 72vh;
  margin: 1.5rem auto;
  object-fit: contain;
  border: 1px solid var(--line);
}

figure { margin: 1.5rem 0; }

figcaption {
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

math {
  max-width: 100%;
  color: var(--ink);
  font-size: 1.02em;
}

math[display="block"] {
  overflow-x: auto;
  margin: 1.25rem 0;
  padding: .8rem;
  background: var(--tile);
  border-left: 4px solid var(--blue);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.2rem 0;
}

.route-card, .safety-card, .formula-card {
  min-width: 0;
  padding: .85rem;
  overflow-wrap: anywhere;
  word-break: normal;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  background: var(--surface);
}

.route-card h3, .safety-card h3, .formula-card h3 { margin-top: 0; }

.route-card[data-route="112"], .safety-card {
  background: var(--red-soft);
  border-top-color: var(--red);
}

.route-card[data-route="calm"] { border-top-color: var(--green); }
.route-card[data-route="medical"] { border-top-color: var(--blue); }
.route-card[data-route="support"] { border-top-color: var(--purple); }
.route-card[data-route="survival"] { border-top-color: var(--amber); }

.emergency-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 1.2rem 0 1.8rem;
  border: 2px solid var(--ink);
}

.emergency-strip > div {
  min-width: 0;
  padding: .7rem;
  overflow-wrap: anywhere;
  border-right: 1px solid var(--ink);
}

.emergency-strip > div:last-child { border-right: 0; }
.emergency-strip strong { display: block; font-size: 1.35rem; }

.emergency-gate {
  max-width: var(--measure);
  margin: 1.15rem 0 1.35rem;
  padding: .8rem .95rem;
  overflow-wrap: anywhere;
  background: var(--red-soft);
  border: 1px solid var(--red);
  border-left: 6px solid var(--red);
}

.emergency-gate strong:first-child {
  display: block;
  margin-bottom: .15rem;
  color: var(--red);
  font-size: 1.03em;
}

.checklist {
  padding: 1rem 1rem 1rem 2.4rem;
  background: var(--green-soft);
  border: 1px solid var(--green);
}

.source-note {
  color: var(--muted);
  font-size: .83rem;
}

.footnotes {
  margin-top: 2.5rem;
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .78rem;
}

.footnotes hr { display: none; }
.footnotes ol { padding-left: 1.4rem; }

#toc-toggle { display: none; }

.revision-footer {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: min(100% - 2rem, 1120px);
  margin: 2rem auto .8rem;
  padding-top: .55rem;
  color: var(--muted);
  border-top: 3px solid var(--sg-accent, var(--green));
  font-family: ui-monospace, monospace;
  font-size: .68rem;
  line-height: 1.35;
}

.revision-mark {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--sg-accent, var(--green));
  background-color: color-mix(in srgb, currentColor 12%, var(--surface));
  background-image: var(--sg-pattern, repeating-linear-gradient(135deg, transparent 0 4px, currentColor 4px 5px));
  background-size: var(--sg-pattern-size, 9px 9px);
  border: 1px solid currentColor;
}

@media (max-width: 900px) {
  .edition-chip { display: none; }

  .app-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .reader-provenance {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: space-between;
    overflow-x: auto;
    padding-top: .15rem;
    border-top: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
    scrollbar-width: none;
  }

  .reader-provenance::-webkit-scrollbar { display: none; }

  .app-shell {
    display: block;
    width: min(100% - 1rem, var(--measure));
    margin-top: 1rem;
  }

  #TOC {
    position: fixed;
    inset: 3.8rem .5rem auto;
    z-index: 30;
    display: none;
    max-height: calc(100vh - 4.5rem);
  }

  .toc-open #TOC { display: block; }
  #toc-toggle { display: inline-block; }
  .chapter { padding: 1.15rem; }
}

@media (max-width: 620px) {
  :root { font-size: 16px; }
  .app-bar { padding-inline: .65rem; }
  .reader-identity .brand { font-size: .76rem; letter-spacing: .045em; }
  .reader-identity .edition-chip { display: none; }
  .reader-identity .brand-address { max-width: 6.5rem; }
  .app-actions { gap: .3rem; }
  .repository-long { display: none; }
  .repository-short { display: inline; }
  .app-actions button { padding-inline: .62rem; }
  .app-shell { width: min(100% - .6rem, var(--measure)); }
  .chapter { padding: 1rem .9rem; }
  .route-grid { grid-template-columns: 1fr; }
  .emergency-strip { grid-template-columns: 1fr 1fr; }
  .emergency-strip > div:nth-child(2) { border-right: 0; }
  .emergency-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  #theme-toggle { display: none; }
}

@page {
  size: A4;
  /* Side margins set the measure. A 184mm text area meant content had to be
     capped at var(--measure), which left prose sitting under a rule twice its
     width with all the slack on one side. Narrowing the page instead gives one
     column that the running header, footer, prose, tables and figures share:
     108mm is about 70 characters here, close to the 66 the A4/2 edition
     already reads at. */
  margin: 14.5mm 51mm 16mm;
  /* Margin boxes are declared once, by the generated furniture in
     project_meta.revision_footer_css. Declaring @top-left here as well meant
     the later rule could override its content but not its border or
     background, so the identity rule silently never drew. */
}

@page :first {
  margin: 10mm;
  /* Box resets live with the generated furniture, for the same reason. */
}

@media print {
  /* The page geometry is the measure in every print edition, as it already
     was for A4/2 and large print. Nothing is capped separately. */
  :root { --measure: 100%; }

  /* Body text stays ragged-right. WCAG 2.1 SC 1.4.8 states that text is not
     justified, and this guide ships cognitive-overload and sensory-panic
     accessibility profiles. Justified + hyphens: auto renders cleanly in
     Chromium and was tested; it is declined on that ground, not on looks. */

  :root {
    --ink: #111;
    --muted: #444;
    --paper: #fff;
    --surface: #fff;
    --tile: #f3f3ef;
    --line: #aaa;
    --green: #1e5b48;
    font-size: 9.3pt;
    line-height: 1.36;
    color-scheme: light;
  }

  html, body {
    width: auto;
    min-width: 0;
    background: #fff;
  }

  .app-bar, #TOC, .reading-progress { display: none !important; }
  .reference-link { color: inherit !important; text-decoration: none !important; }
  .reference-anchor, .legacy-reference-anchor { display: none !important; }

  /* Print provenance lives in the @page margin boxes generated per edition by
     project_meta.revision_footer_css. This element stays for screen only. */
  .revision-footer { display: none !important; }

  .app-shell, main {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    column-count: 1 !important;
    columns: auto !important;
  }

  .chapter {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    box-shadow: none;
    break-before: page;
  }

  .chapter:first-child { break-before: auto; }
  .document-cover + .chapter { break-before: page; }

  .document-cover {
    min-height: 257mm;
    padding: 15mm;
    border: 4mm solid #1e5b48;
    background: #fff;
  }

  .document-cover h1 { font-size: 36pt; }
  .document-cover h2 { font-size: 15pt; }

  h1 {
    margin-bottom: 8pt;
    font-size: 21.5pt;
  }
  h2 {
    margin: 10pt 0 4pt;
    padding-top: 3pt;
    font-size: 14.5pt;
    break-after: avoid-page;
  }
  h3 {
    margin: 9pt 0 3pt;
    font-size: 10.8pt;
    break-after: avoid-page;
  }
  h4 {
    margin: 7pt 0 2.5pt;
    font-size: 9.5pt;
    break-after: avoid-page;
  }

  p,
  ul,
  ol {
    margin-top: 0;
    margin-bottom: 5pt;
  }

  li { margin-bottom: 1pt; }
  p { widows: 3; orphans: 3; }

  table {
    table-layout: fixed;
    margin: 6pt 0 9pt;
    font-size: 7.5pt;
    line-height: 1.28;
    break-inside: auto;
  }

  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  th, td {
    padding: 3.5pt;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  img {
    max-width: 100%;
    max-height: 174mm;
    margin: 5pt auto;
    border: 0;
    break-inside: avoid;
  }

  blockquote,
  pre,
  .route-card,
  .safety-card,
  .formula-card,
  .checklist,
  .emergency-gate {
    margin: 5pt 0;
    box-shadow: none;
  }

  pre,
  .safety-card,
  .emergency-gate {
    break-inside: avoid;
  }

  blockquote,
  .route-card,
  .formula-card,
  .checklist {
    break-inside: auto;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }

  .route-card {
    min-width: 0;
    padding: 3.5pt 5pt;
    overflow-wrap: anywhere;
  }

  .route-card h3,
  .route-card p {
    margin: 2pt 0;
  }

  .route-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6pt;
  }

  img[alt*="flowgraph"] {
    max-height: 125mm;
  }

  .emergency-strip { break-inside: avoid; }

  .emergency-gate {
    margin: 5pt 0 7pt;
    padding: 5pt 6pt;
    border-left-width: 4pt;
    font-size: 8.6pt;
    line-height: 1.35;
  }

  math[display="block"] {
    overflow: visible;
    margin: 6pt 0;
    padding: 5pt;
    break-inside: avoid;
  }

  .footnotes {
    margin-top: 12pt;
    padding-top: 6pt;
    line-height: 1.26;
  }

  a { color: inherit; text-decoration: none; }
}


/*
 * Eleven-book identity layer for the experimental v4-alt synthesis.
 * Colour is supplementary: every identity also exposes code, title, pattern,
 * and a generated geometric graph node.
 */

.standalone-subguide {
  --sg-accent: #344054;
  --sg-soft: #eef1f4;
  --sg-pattern:
    linear-gradient(90deg, transparent 23px, currentColor 24px, transparent 25px),
    linear-gradient(transparent 23px, currentColor 24px, transparent 25px);
  --sg-pattern-size: 24px 24px;
  position: relative;
  min-width: 0;
}

[data-subguide="SHELF"] {
  --sg-pattern-name: "solid";
  --sg-accent: #344054;
  --sg-soft: #eef1f4;
  --sg-pattern: repeating-linear-gradient(0deg, transparent 0 8px, currentColor 9px 11px, transparent 12px 18px);
  --sg-pattern-size: 100% 24px;
}

.hub-node-heading h2::before {
  content: none;
}

[data-subguide="O"] {
  --sg-pattern-name: "pulse";
  --sg-accent: #16A34A;
  --sg-soft: #eaf8ee;
  --sg-pattern: linear-gradient(135deg, transparent 0 43%, currentColor 44% 47%, transparent 48% 54%, currentColor 55% 58%, transparent 59%);
  --sg-pattern-size: 48px 22px;
}

[data-subguide="A"] {
  --sg-pattern-name: "diamond";
  --sg-accent: #D4880A;
  --sg-soft: #fff4db;
  --sg-pattern: linear-gradient(45deg, transparent 42%, currentColor 43% 48%, transparent 49% 100%), linear-gradient(-45deg, transparent 42%, currentColor 43% 48%, transparent 49% 100%);
  --sg-pattern-size: 28px 28px;
}

[data-subguide="B"] {
  --sg-pattern-name: "wave";
  --sg-accent: #2E8B7A;
  --sg-soft: #e7f5f2;
  --sg-pattern: repeating-radial-gradient(ellipse at 50% 100%, transparent 0 8px, currentColor 9px 10px, transparent 11px 18px);
  --sg-pattern-size: 38px 22px;
}

[data-subguide="C"] {
  --sg-pattern-name: "cross";
  --sg-accent: #C23D2E;
  --sg-soft: #fff0ed;
  --sg-pattern: linear-gradient(90deg, transparent 40%, currentColor 41% 59%, transparent 60%), linear-gradient(transparent 40%, currentColor 41% 59%, transparent 60%);
  --sg-pattern-size: 24px 24px;
}

[data-subguide="D"] {
  --sg-pattern-name: "shield";
  --sg-accent: #2563EB;
  --sg-soft: #eaf0ff;
  --sg-pattern: linear-gradient(135deg, currentColor 0 45%, transparent 46%), linear-gradient(225deg, currentColor 0 45%, transparent 46%);
  --sg-pattern-size: 30px 22px;
}

[data-subguide="H"] {
  --sg-pattern-name: "zigzag";
  --sg-accent: #EA580C;
  --sg-soft: #fff0e8;
  --sg-pattern: linear-gradient(135deg, transparent 0 42%, currentColor 43% 50%, transparent 51%), linear-gradient(45deg, transparent 0 42%, currentColor 43% 50%, transparent 51%);
  --sg-pattern-size: 32px 26px;
}

[data-subguide="Z"] {
  --sg-pattern-name: "crosshatch";
  --sg-accent: #4A6741;
  --sg-soft: #edf3e9;
  --sg-pattern: repeating-linear-gradient(45deg, transparent 0 9px, currentColor 10px 11px, transparent 12px 20px), repeating-linear-gradient(-45deg, transparent 0 9px, currentColor 10px 11px, transparent 12px 20px);
  --sg-pattern-size: 28px 28px;
}

[data-subguide="P"] {
  --sg-pattern-name: "dots";
  --sg-accent: #6366F1;
  --sg-soft: #eeeeff;
  --sg-pattern: radial-gradient(circle, currentColor 0 2px, transparent 2.4px);
  --sg-pattern-size: 18px 18px;
}

[data-subguide="S"] {
  --sg-pattern-name: "speech";
  --sg-accent: #9333EA;
  --sg-soft: #f5eaff;
  --sg-pattern: radial-gradient(ellipse at 45% 42%, transparent 0 32%, currentColor 34% 40%, transparent 42%);
  --sg-pattern-size: 36px 28px;
}

[data-subguide="T"] {
  --sg-pattern-name: "form-grid";
  --sg-accent: #6B7280;
  --sg-soft: #f0f1f3;
  --sg-pattern: linear-gradient(90deg, transparent 23px, currentColor 24px, transparent 25px), linear-gradient(transparent 23px, currentColor 24px, transparent 25px);
  --sg-pattern-size: 24px 24px;
}

[data-subguide="R"] {
  --sg-pattern-name: "solid";
  --sg-accent: #B5763B;
  --sg-soft: #f7eee4;
  --sg-pattern: repeating-linear-gradient(0deg, transparent 0 8px, currentColor 9px 11px, transparent 12px 18px);
  --sg-pattern-size: 100% 24px;
}

.subguide-cover {
  position: relative;
  display: grid;
  align-content: end;
  min-height: min(720px, calc(100vh - 8rem));
  margin-bottom: 1.5rem;
  padding: clamp(1.4rem, 5vw, 3.4rem);
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 8px solid var(--sg-accent);
}

.subguide-cover::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 31%;
  color: var(--sg-accent);
  opacity: .35;
  background-image: var(--sg-pattern);
  background-size: var(--sg-pattern-size);
  border-bottom: 2px solid var(--sg-accent);
}

.subguide-cover > * {
  position: relative;
  z-index: 1;
}

.subguide-family-mark {
  width: fit-content;
  margin-bottom: .8rem;
  padding: .3rem .55rem;
  color: white;
  background: var(--sg-accent);
  font-family: ui-monospace, monospace;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.subguide-code {
  margin: 0;
  color: var(--sg-accent);
  font-family: ui-monospace, monospace;
  font-size: clamp(3.8rem, 13vw, 7.4rem);
  font-weight: 950;
  line-height: .82;
}

.subguide-cover h1 {
  max-width: 14ch;
  margin: .8rem 0;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: .94;
}

.subguide-promise {
  max-width: 49ch;
  margin: .4rem 0 0;
  font-size: clamp(1.02rem, 2.1vw, 1.3rem);
  font-weight: 700;
}

.subguide-position,
.subguide-intro,
.subguide-contents,
.subguide-handoff,
.sources-and-limits {
  position: relative;
  min-width: 0;
  margin: 1.3rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 5px solid var(--sg-accent);
  background: var(--surface);
}

.subguide-position {
  background: color-mix(in srgb, var(--sg-soft) 52%, var(--surface));
}

/* Contents is its own object, not a tail on "what this book is for". */
.subguide-contents { margin-top: 1rem; }
.subguide-contents > h2:first-child { margin-top: 0; }

.subguide-position::after,
.subguide-handoff::after {
  content: attr(data-subguide);
  position: absolute;
  inset: .7rem .7rem auto auto;
  min-width: 2rem;
  padding: .2rem .36rem;
  color: white;
  background: var(--sg-accent);
  border: 1px solid var(--ink);
  font-family: ui-monospace, monospace;
  font-size: .86rem;
  font-weight: 900;
  text-align: center;
}

/* Nothing is capped here any more. The print page geometry is the column, so
   prose, tables, figures and cards already share one width, and capping a
   table inside it only made the table narrower than its own columns need. */

.subguide-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  margin: .8rem 0 1.1rem;
}

.subguide-meta > div {
  min-width: 0;
  padding: .5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .78rem;
}

.subguide-meta strong {
  display: block;
  color: var(--sg-accent);
  font-family: ui-monospace, monospace;
  font-size: .67rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.subguide-neighbours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: .8rem 0;
}

.subguide-neighbours > div {
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sg-accent);
  background: var(--surface);
}

.subguide-identity-key {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: .75rem 0;
  font-size: .82rem;
}

.subguide-pattern-swatch {
  width: 5.2rem;
  height: 2.1rem;
  flex: 0 0 auto;
  color: var(--sg-accent);
  background-image: var(--sg-pattern);
  background-size: var(--sg-pattern-size);
  border: 1px solid var(--ink);
}

.route-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  align-items: stretch;
}

.route-chip {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-width: 10.5rem;
  max-width: 16rem;
  overflow: hidden;
  color: var(--ink);
  background: color-mix(in srgb, var(--sg-soft) 58%, var(--surface));
  border: 1px solid var(--line);
  border-left: 5px solid var(--sg-accent);
  font-size: .72rem;
  line-height: 1.18;
}

.route-chip::before {
  content: "";
  grid-row: 1 / 3;
  width: 1.6rem;
  min-height: 2.7rem;
  color: var(--sg-accent);
  background-image: var(--sg-pattern);
  background-size: var(--sg-pattern-size);
  border-right: 1px solid var(--line);
}

.route-chip > strong {
  align-self: end;
  padding: .35rem .45rem .08rem;
  color: var(--sg-accent);
  font-family: ui-monospace, monospace;
  font-size: .84rem;
  font-weight: 950;
}

.route-chip > span {
  align-self: end;
  padding: .35rem .45rem .08rem 0;
  font-weight: 800;
}

.route-chip > small {
  grid-column: 2 / 3;
  padding: 0 .45rem .35rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: .61rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.subguide-scope-grid,
.edition-resource-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin: .8rem 0 1rem;
}

.subguide-scope-grid > section,
.edition-resource-map > section {
  min-width: 0;
  padding: .65rem .72rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--sg-accent);
  background: var(--surface);
}

.subguide-scope-grid strong,
.edition-resource-map h3 {
  color: var(--sg-accent);
}

.subguide-scope-grid p,
.edition-resource-map p,
.edition-resource-map ul {
  margin: .35rem 0 0;
  font-size: .8rem;
}

.edition-resource-map h3 {
  margin: 0;
  font-size: .92rem;
}

.edition-resource-map li + li { margin-top: .35rem; }
.edition-route-key { grid-column: 1 / -1; }

.resource-privacy {
  display: inline-flex;
  margin-left: .3rem;
  padding: .08rem .3rem;
  color: var(--muted);
  background: var(--sg-soft);
  border: 1px solid var(--line);
  font-family: ui-monospace, monospace;
  font-size: .62rem;
  text-transform: uppercase;
}

.legacy-reference-anchor {
  display: block;
  height: 0;
  overflow: hidden;
}

/* Figures and cards share the text measure. Running them to the full page
   width while body text stopped at var(--measure) gave every figure page two
   different right-hand edges, which is what made the layout look unfinished. */
.resource-card {
  position: relative;
  max-width: var(--measure);
  margin: .65rem 0 1.1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--sg-accent);
  background: color-mix(in srgb, var(--sg-soft) 24%, var(--surface));
  break-inside: avoid;
}

.resource-kicker {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .65rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--sg-soft) 52%, var(--surface));
  font-family: ui-monospace, monospace;
  font-size: .68rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.resource-kicker strong {
  color: var(--sg-accent);
  letter-spacing: .08em;
}

.resource-kicker > span {
  padding-left: .45rem;
  color: var(--muted);
  border-left: 1px solid var(--line);
  letter-spacing: .04em;
}

.resource-kicker code {
  margin-left: auto;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-weight: 800;
  white-space: nowrap;
}

.resource-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .15rem .6rem;
  padding: .65rem .7rem .35rem;
}

/* The figure's address belongs at the edge of the card, the way a section
   address sits at the edge of its heading — not on a line of its own. */
.resource-heading code {
  grid-area: 1 / 2 / 3 / 3;
  align-self: start;
  color: var(--muted);
  background: none;
  font-family: ui-monospace, monospace;
  font-size: .62rem;
  letter-spacing: .02em;
  white-space: nowrap;
}

.resource-heading strong,
.resource-heading span { grid-column: 1; }

.resource-heading strong {
  font-size: 1rem;
  line-height: 1.18;
}

.resource-heading span,
.resource-description {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.template-route-band .resource-description,
.template-route-band .resource-preparation,
.template-route-band .resource-privacy,
.template-route-band .resource-links {
  margin: 0;
  padding: .42rem .68rem;
}

.template-route-band .resource-privacy {
  padding-top: 0;
  color: var(--muted);
  font-size: .69rem;
}

.resource-links {
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.35;
}

.template-route-band .resource-links,
.figure-reference .resource-links {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--sg-soft) 22%, var(--surface));
}

.figure-reference > p:not(.resource-links),
.figure-reference > figure {
  margin: .35rem .55rem .55rem;
  text-align: center;
}

.figure-reference figcaption { display: none; }

.figure-reference img {
  max-height: 155mm;
  margin: 0 auto;
}

.figure-reference .resource-links {
  margin: 0;
  padding: .42rem .68rem;
}

.resource-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: .55rem;
  margin: .65rem 0 1.2rem;
}

.resource-catalog-item {
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--sg-accent);
  background: color-mix(in srgb, var(--sg-soft) 20%, var(--surface));
  break-inside: avoid;
}

.resource-catalog-kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: .62rem;
  text-transform: uppercase;
}

.resource-catalog-kicker strong { color: var(--sg-accent); }
.resource-catalog-kicker code { white-space: nowrap; }

.resource-catalog-item h3 {
  margin: .35rem 0 .18rem;
  padding: 0;
  border: 0;
  font-size: .9rem;
  line-height: 1.2;
}

.resource-catalog-item h3::before { content: none; }

.resource-catalog-item p {
  margin: .22rem 0 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.35;
}

.resource-catalog-links,
.resource-catalog-preparation,
.resource-catalog-privacy {
  padding-top: .25rem;
  border-top: 1px solid var(--line);
}

.subguide-handoff {
  background: color-mix(in srgb, var(--sg-soft) 60%, white);
}

.standalone-subguide .sources-and-limits h3 {
  padding-left: .6rem;
  border-left: 5px solid var(--sg-accent);
}

.standalone-subguide img[alt*="subguide graph"],
.standalone-subguide img[alt*="Subguide graph"] {
  max-height: 150mm;
}

.hub-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 2rem;
}

.hub-node {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 6px solid var(--sg-accent);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(20, 32, 29, .08);
}

.hub-node-pattern {
  width: 100%;
  height: 4.8rem;
  margin: 0;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.hub-node-heading {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem .85rem 0;
}

.hub-node-heading > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: var(--sg-accent);
  border: 1px solid var(--ink);
  font-family: ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 950;
}

.hub-node-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.06rem;
  line-height: 1.12;
}

.hub-node > p {
  flex: 1 1 auto;
  margin: .65rem .85rem;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.42;
}

.hub-node dl {
  margin: 0 .85rem .75rem;
  font-size: .72rem;
}

.hub-node dl > div {
  display: grid;
  grid-template-columns: 4.1rem minmax(0, 1fr);
  gap: .4rem;
  padding: .18rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
}

.hub-node dt {
  color: var(--sg-accent);
  font-family: ui-monospace, monospace;
  font-weight: 900;
  text-transform: uppercase;
}

.hub-node dd { margin: 0; }

.hub-open,
.hub-master {
  display: block;
  margin-top: auto;
  padding: .72rem .85rem;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  font-weight: 900;
}

.hub-open {
  color: white;
  background: var(--sg-accent);
  text-decoration: none;
}

.hub-open:hover,
.hub-open:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--sg-accent) 34%, transparent);
  outline-offset: 2px;
  text-decoration: underline;
}

.hub-master {
  color: var(--muted);
  background: var(--sg-soft);
}

@media (max-width: 860px) {
  .hub-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .subguide-meta,
  .subguide-neighbours,
  .subguide-scope-grid,
  .edition-resource-map,
  .hub-directory {
    grid-template-columns: 1fr;
  }

  .edition-route-key { grid-column: auto; }
  .template-crossrefs { grid-template-columns: 1fr; }
  .route-chip { max-width: none; flex: 1 1 12rem; }
}

@media print {
  .standalone-subguide {
    --sg-soft: #f5f5f2;
  }

  .hub-directory { grid-template-columns: 1fr; }

  .hub-node { break-inside: avoid; box-shadow: none; }

  .subguide-cover {
    min-height: 257mm;
    margin: 0;
    padding: 15mm;
    border-width: 4mm;
    /* break-before matters as much as break-after once books are bound into
       the master. A standalone cover is the first thing in the document, so it
       starts at a page top by luck. In the master it follows whatever ended
       mid-page, and a 257mm box starting halfway down simply fragments: the
       pattern band, the "Book N of 11" mark, and the glyph land at the foot of
       one page and the title on the next, which reads as a cover with its
       identity missing. */
    break-before: page;
    break-after: page;
  }

  .subguide-cover::before {
    height: 33%;
    opacity: .62;
  }

  .subguide-code { font-size: 62pt; }
  .subguide-cover h1 { font-size: 34pt; }
  .subguide-promise { font-size: 13pt; }

  .subguide-position,
  .subguide-handoff,
  .sources-and-limits {
    margin: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    background: #fff;
  }

  .subguide-position,
  .subguide-handoff,
  .sources-and-limits {
    break-before: page;
  }

  .subguide-intro {
    padding: 5pt 6pt;
    border-top-width: 3pt;
  }

  .subguide-meta {
    gap: 4pt;
    margin: 5pt 0 7pt;
  }

  .subguide-meta > div {
    padding: 4pt;
    font-size: 7pt;
  }

  .subguide-neighbours {
    grid-template-columns: 1fr 1fr;
    gap: 4pt;
  }

  .subguide-neighbours > div {
    padding: 3pt 4pt;
    border-left-width: 3pt;
    font-size: 7.3pt;
  }

  .subguide-pattern-swatch {
    width: 34mm;
    height: 10mm;
  }

  .subguide-scope-grid,
  .edition-resource-map {
    gap: 4pt;
    margin: 5pt 0 7pt;
  }

  .subguide-scope-grid > section,
  .edition-resource-map > section {
    padding: 4pt 5pt;
    border-top-width: 2pt;
  }

  .subguide-scope-grid p,
  .edition-resource-map p,
  .edition-resource-map ul {
    font-size: 7pt;
  }

  .route-chip {
    min-width: 39mm;
    max-width: 58mm;
    border-left-width: 2.5pt;
    font-size: 6.4pt;
  }

  .route-chip::before { width: 7mm; min-height: 10mm; }
  .route-chip > strong { padding: 2pt 3pt 0; font-size: 7pt; }
  .route-chip > span { padding: 2pt 3pt 0 0; }
  .route-chip > small { padding: 0 3pt 2pt; font-size: 5.3pt; }

  .resource-card {
    margin: 3pt 0 6pt;
    border-top-width: 3pt;
  }

  .resource-kicker { padding: 3pt 4pt; font-size: 6pt; }
  .resource-heading { padding: 4pt 5pt 2pt; }
  .resource-heading strong { font-size: 8pt; }
  .resource-heading span,
  .resource-description { font-size: 6.5pt; }
  .resource-links,
  .template-route-band .resource-privacy { font-size: 5.8pt; }
  .figure-reference img { max-height: 145mm; }
  .resource-catalog { grid-template-columns: 1fr; gap: 3pt; }
  .resource-catalog-item { padding: 3pt 4pt; border-top-width: 2.5pt; }
  .resource-catalog-kicker { font-size: 5.5pt; }
  .resource-catalog-item h3 { font-size: 7.5pt; }
  .resource-catalog-item p { font-size: 6pt; }

  html[data-print-layout="a4half"] .subguide-cover {
    min-height: 283mm;
    padding: 8mm 6mm;
    border-width: 2.5mm;
  }

  html[data-print-layout="a4half"] .subguide-code { font-size: 42pt; }
  html[data-print-layout="a4half"] .subguide-cover h1 { font-size: 24pt; }
  html[data-print-layout="a4half"] .subguide-promise { font-size: 9.5pt; }

  html[data-print-layout="a4half"] .subguide-meta,
  html[data-print-layout="a4half"] .subguide-neighbours,
  html[data-print-layout="a4half"] .subguide-scope-grid,
  html[data-print-layout="a4half"] .edition-resource-map {
    grid-template-columns: 1fr;
  }

  html[data-print-layout="a4half"] .subguide-meta > div,
  html[data-print-layout="a4half"] .subguide-neighbours > div {
    font-size: 6.3pt;
  }

  html[data-print-layout="a4half"] .edition-route-key { grid-column: auto; }
  html[data-print-layout="a4half"] .route-chip { min-width: 100%; max-width: 100%; }

  html[data-print-layout="largeprint"] .subguide-cover h1 { font-size: 39pt; }
  html[data-print-layout="largeprint"] .subguide-promise { font-size: 16pt; }
  html[data-print-layout="largeprint"] .subguide-meta > div,
  html[data-print-layout="largeprint"] .subguide-neighbours > div {
    font-size: 10.5pt;
  }

  html[data-print-layout="largeprint"] .subguide-scope-grid p,
  html[data-print-layout="largeprint"] .edition-resource-map p,
  html[data-print-layout="largeprint"] .edition-resource-map ul,
  html[data-print-layout="largeprint"] .resource-heading span,
  html[data-print-layout="largeprint"] .resource-description,
  html[data-print-layout="largeprint"] .resource-links {
    font-size: 9.5pt;
  }
}


/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page {
  @top-left {
    content: "BATHROOM EMERGENCY GUIDE";
    color: #0d7355;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(0deg,#0d7355 0 2.2px,transparent 2.2px 5.5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #0d7355;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #0d7355;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #0d7355;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-shelf {
  @top-left {
    content: "⌘ SHELF // THE SHELF";
    color: #344054;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(0deg,#344054 0 2.2px,transparent 2.2px 5.5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #344054;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #344054;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #344054;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-o {
  @top-left {
    content: "∿ O // GREEN BOOK";
    color: #16A34A;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(60deg,#16A34A 0 1.3px,transparent 1.3px 5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #16A34A;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #16A34A;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #16A34A;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-a {
  @top-left {
    content: "◆ A // AMBER BOOK";
    color: #D4880A;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(45deg,#D4880A 0 1.4px,transparent 1.4px 6px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #D4880A;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #D4880A;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #D4880A;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-b {
  @top-left {
    content: "≈ B // TEAL BOOK";
    color: #2E8B7A;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-radial-gradient(ellipse at 50% 130%,transparent 0 2px,#2E8B7A 2px 3.2px,transparent 3.2px 6px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #2E8B7A;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #2E8B7A;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #2E8B7A;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-c {
  @top-left {
    content: "+ C // RED BOOK";
    color: #C23D2E;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(90deg,#C23D2E 0 1.5px,transparent 1.5px 5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #C23D2E;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #C23D2E;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #C23D2E;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-d {
  @top-left {
    content: "■ D // BLUE BOOK";
    color: #2563EB;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(0deg,#2563EB 0 1.5px,transparent 1.5px 5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #2563EB;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #2563EB;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #2563EB;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-h {
  @top-left {
    content: "⚡ H // ORANGE BOOK";
    color: #EA580C;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(135deg,#EA580C 0 1.4px,transparent 1.4px 5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #EA580C;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #EA580C;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #EA580C;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-z {
  @top-left {
    content: "╳ Z // OLIVE BOOK";
    color: #4A6741;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(45deg,#4A6741 0 1px,transparent 1px 3px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #4A6741;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #4A6741;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #4A6741;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-p {
  @top-left {
    content: "● P // INDIGO BOOK";
    color: #6366F1;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-radial-gradient(circle at 1.6px 1.6px,#6366F1 0 .9px,transparent 1.1px 3.2px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #6366F1;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #6366F1;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #6366F1;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-s {
  @top-left {
    content: "◤ S // PURPLE BOOK";
    color: #9333EA;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-radial-gradient(circle at 40% 60%,transparent 0 1.5px,#9333EA 1.5px 2.4px,transparent 2.4px 5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #9333EA;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #9333EA;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #9333EA;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-t {
  @top-left {
    content: "▦ T // GREY BOOK";
    color: #6B7280;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(90deg,#6B7280 0 1px,transparent 1px 3px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #6B7280;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #6B7280;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #6B7280;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Generated running furniture. Literal strings only: Chromium
   drops string() in paged media. */
@page beg-r {
  @top-left {
    content: "━ R // COPPER BOOK";
    color: #B5763B;
    font-family: sans-serif;
    font-weight: 900;
    font-size: 8pt;
    letter-spacing: .035em;
    vertical-align: bottom;
    padding-left: 18.4mm;
    padding-bottom: 1.1mm;
    background-image: repeating-linear-gradient(0deg,#B5763B 0 2.2px,transparent 2.2px 5.5px);
    background-repeat: no-repeat;
    background-position: left 1.2mm bottom 1.25mm;
    background-size: 16mm 3.8mm;
    border-bottom: 2.6pt solid #B5763B;
  }
  @top-right {
    content: "A4 / color · be.fkr.dev";
    color: #B5763B;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 7pt;
    letter-spacing: .05em;
    vertical-align: bottom;
    padding-right: 1mm;
    padding-bottom: 1.1mm;
    border-bottom: 2.6pt solid #B5763B;
  }
  @bottom-center {
    content: counter(page) " / " counter(pages);
    color: #52645e;
    font-family: sans-serif;
    font-size: 8pt;
  }
  @bottom-left {
    content: "Bathroom Emergency 5.1.2 · 6d3ae5e";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
  @bottom-right {
    content: "2026-08-14 · be.fkr.dev";
    color: #52645e;
    font-family: sans-serif;
    font-size: 6pt;
  }
}

@page :first {
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { border-bottom: 0; }
  @top-right { content: none; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .revision-footer { display: none !important; }
}

/* Bound-guide page routing. Every cover uses the same furniture-free first-page
   geometry as a detached book; the following pages inherit their book's named
   page and therefore its literal running identity. */
@page beg-cover {
  margin: 10mm;
  @top-left { content: none; background-image: none; border-bottom: 0; padding: 0; }
  @top-right { content: none; border-bottom: 0; padding: 0; }
  @bottom-center { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  .standalone-subguide[data-subguide="SHELF"] { page: beg-shelf; }
  .standalone-subguide[data-subguide="O"] { page: beg-o; }
  .standalone-subguide[data-subguide="A"] { page: beg-a; }
  .standalone-subguide[data-subguide="B"] { page: beg-b; }
  .standalone-subguide[data-subguide="C"] { page: beg-c; }
  .standalone-subguide[data-subguide="D"] { page: beg-d; }
  .standalone-subguide[data-subguide="H"] { page: beg-h; }
  .standalone-subguide[data-subguide="Z"] { page: beg-z; }
  .standalone-subguide[data-subguide="P"] { page: beg-p; }
  .standalone-subguide[data-subguide="S"] { page: beg-s; }
  .standalone-subguide[data-subguide="T"] { page: beg-t; }
  .standalone-subguide[data-subguide="R"] { page: beg-r; }
  .standalone-subguide > .subguide-cover { page: beg-cover; }
}
