/* nobullshitloans.com: the ledger.
   Money kept honestly. Headlines are set in Besley, a Clarendon: the face of
   American bank signs, ledgers and handbills, sturdy and plain. Reading text is
   Public Sans. Worked math sits on ledger sheets with a money column, a single
   rule above the total and the accountant's double rule under it. Boldness lives
   in the headlines and the ledgers; everything else stays quiet. */

@font-face {
  font-family: "Besley";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/besley.woff2") format("woff2");
}
@font-face {
  font-family: "Besley";
  font-style: italic;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/besley-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/public-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/public-sans-italic.woff2") format("woff2");
}

:root {
  --paper: #ffffff;
  --paper-alt: #f4f6fb;
  --ink: #1d2340;
  --ink-strong: #131a38;
  --muted: #545c78;
  --brand: #242f67;
  --brand-hover: #18204d;
  --on-brand: #ffffff;
  --brand-soft: #e8ecf7;
  --rule: #dce1ed;
  --rule-strong: #131a38;
  --ledger: #eef2fa;
  --ledger-rule: #c9d2e8;
  --brass: #6f88c2;
  --alert: #a3301f;
  --band: #f1f4fa;
  --on-band: #242f67;
  --band-muted: #4b5573;
  --field: #ffffff;
  --field-line: #7b839c;
  --shadow: rgba(19, 26, 56, 0.14);
  --mark: #fff0b3;
  --mark-ink: #5c4500;
  /* chart marks: validated categorical order (blue, amber, plum, olive, sky) */
  --viz-1: #2f55b0;
  --viz-2: #b5832b;
  --viz-3: #a34f7e;
  --viz-4: #677826;
  --viz-5: #3d8fb8;
  --viz-on-1: #ffffff;
  --viz-on-2: #131a38;
  --viz-on-3: #ffffff;
  --viz-on-4: #ffffff;
  --viz-on-5: #131a38;
  --viz-dim: #ccd3e3;
  --viz-grid: #e5e9f2;
  --viz-base: #9aa3b8;

  --font-display: "Besley", "Clarendon", "Rockwell", Georgia, serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-ui: var(--font-body);

  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.15rem);
  --t-small: 0.9rem;
  --t-h3: clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);
  --t-h2: clamp(1.5rem, 1.3rem + 0.9vw, 1.95rem);
  --t-h1: clamp(2rem, 1.55rem + 1.8vw, 2.85rem);
  --t-hero: clamp(2.45rem, 1.55rem + 3.7vw, 4.35rem);

  --measure: 42rem;
  --rail: 220px;
  --rail-gap: 64px;
  --wide: calc(var(--rail) + var(--rail-gap) + var(--measure));
  --g: 16px;
  --gutter-l: max(var(--g), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--g), env(safe-area-inset-right, 0px));
  --radius: 6px;
  --radius-lg: 10px;
}
@media (min-width: 700px) { :root { --g: 28px; } }
@media (min-width: 1100px) { :root { --g: 40px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1324;
    --paper-alt: #141b31;
    --ink: #e3e7f2;
    --ink-strong: #f3f5fb;
    --muted: #a4accb;
    --brand: #a9bbea;
    --brand-hover: #c9d5f5;
    --on-brand: #0d1324;
    --brand-soft: #1b2440;
    --rule: #273150;
    --rule-strong: #e3e7f2;
    --ledger: #151d36;
    --ledger-rule: #2d3a60;
    --brass: #8fa6dc;
    --alert: #f19480;
    --band: #141b31;
    --on-band: #f3f5fb;
    --band-muted: #b9c2de;
    --field: #0b1020;
    --field-line: #6a7495;
    --shadow: rgba(0, 0, 0, 0.5);
    --mark: #4a3d12;
    --mark-ink: #ffe7a3;
    --viz-1: #5f86e8;
    --viz-2: #b8812f;
    --viz-3: #c76a9e;
    --viz-4: #8f9d3a;
    --viz-5: #3f97c0;
    --viz-on-1: #0d1324;
    --viz-on-2: #0d1324;
    --viz-on-3: #0d1324;
    --viz-on-4: #0d1324;
    --viz-on-5: #0d1324;
    --viz-dim: #2b3555;
    --viz-grid: #1c2440;
    --viz-base: #56607f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1324;
  --paper-alt: #141b31;
  --ink: #e3e7f2;
  --ink-strong: #f3f5fb;
  --muted: #a4accb;
  --brand: #a9bbea;
  --brand-hover: #c9d5f5;
  --on-brand: #0d1324;
  --brand-soft: #1b2440;
  --rule: #273150;
  --rule-strong: #e3e7f2;
  --ledger: #151d36;
  --ledger-rule: #2d3a60;
  --brass: #8fa6dc;
  --alert: #f19480;
  --band: #141b31;
  --on-band: #f3f5fb;
  --band-muted: #b9c2de;
  --field: #0b1020;
  --field-line: #6a7495;
  --shadow: rgba(0, 0, 0, 0.5);
  --mark: #4a3d12;
  --mark-ink: #ffe7a3;
  --viz-1: #5f86e8;
  --viz-2: #b8812f;
  --viz-3: #c76a9e;
  --viz-4: #8f9d3a;
  --viz-5: #3f97c0;
  --viz-on-1: #0d1324;
  --viz-on-2: #0d1324;
  --viz-on-3: #0d1324;
  --viz-on-4: #0d1324;
  --viz-on-5: #0d1324;
  --viz-dim: #2b3555;
  --viz-grid: #1c2440;
  --viz-base: #56607f;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 92px; }
@media (min-width: 761px) and (max-width: 1099px) { html { scroll-padding-top: 140px; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--paper);
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--brand-hover); text-decoration-thickness: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: var(--radius); }
.skip-link:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-strong);
  line-height: 1.14;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--t-h1); font-weight: 700; letter-spacing: -0.012em; }
h2 { font-size: var(--t-h2); font-weight: 680; letter-spacing: -0.006em; }
h3 { font-size: var(--t-h3); font-weight: 640; }
h4 { font-size: 1.05rem; font-weight: 640; }
p, ul, ol, dl, table, blockquote, figure { margin: 0; }
strong { font-weight: 700; }

/* ---------- frame ---------- */
.wrap {
  width: 100%;
  max-width: calc(1200px + var(--gutter-l) + var(--gutter-r));
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 74px;
  padding-block: 10px;
}
.brand { display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-width: 0; flex: 0 1 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: clamp(1.18rem, 1rem + 0.55vw, 1.42rem);
  letter-spacing: -0.012em;
  line-height: 1.05;
  color: var(--brand);
  white-space: nowrap;
}
.brand-mark span { font-weight: 420; color: var(--muted); }
.brand-who { font-size: 0.74rem; line-height: 1.3; color: var(--muted); text-wrap: balance; display: flex; align-items: center; gap: 6px; }
.brand-edge { height: 18px; width: auto; flex: none; display: block; background: #fff; padding: 2px 4px; border-radius: 4px; box-sizing: content-box; }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; gap: 2px; padding: 0; margin: 0; }
.primary-nav .nav-menu-only { display: none; }
.site-header.nav-open .primary-nav .nav-menu-only { display: list-item; }
.primary-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.primary-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.primary-nav a[aria-current="page"] { color: var(--brand); font-weight: 650; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border-radius: var(--radius);
  background: var(--brand); color: var(--on-brand);
  border: 1.5px solid var(--brand);
  font-family: var(--font-body); font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--on-brand); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--brand); }
.btn-quiet:hover { background: var(--brand-soft); color: var(--brand-hover); border-color: var(--brand); }
.btn-band { background: var(--on-band); color: var(--band); border-color: var(--on-band); }
.btn-band:hover { background: transparent; color: var(--on-band); border-color: var(--on-band); }
.btn-band-quiet { background: transparent; color: var(--on-band); border-color: color-mix(in srgb, var(--on-band) 50%, transparent); }
.btn-band-quiet:hover { background: color-mix(in srgb, var(--on-band) 10%, transparent); color: var(--on-band); border-color: var(--on-band); }

@media (max-width: 1180px) {
  .primary-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .site-header.nav-open .primary-nav {
    display: block;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 16px 28px -12px var(--shadow);
    padding: 6px var(--gutter-r) 16px var(--gutter-l);
    max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .site-header.nav-open .primary-nav ul { flex-direction: column; gap: 0; }
  .site-header.nav-open .primary-nav a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--rule); border-radius: 0; box-shadow: none; }
}
@media (max-width: 760px) {
  .site-header { position: relative; top: auto; }
  html { scroll-padding-top: 64px; }
  .header-row { min-height: 0; padding-block: 12px; gap: 12px; align-items: center; }
}
@media (max-width: 560px) {
  .header-text { display: none; }
  .brand-who { font-size: 0.7rem; }
}

/* ---------- search overlay ---------- */
.search-panel {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in srgb, var(--ink-strong) 48%, transparent);
  padding: calc(env(safe-area-inset-top, 0px) + 72px) var(--gutter-r) 24px var(--gutter-l);
}
.search-box {
  max-width: 720px; margin-inline: auto;
  background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px var(--shadow);
  overflow: hidden;
}
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.search-field svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search-field input, .hero-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 1.08rem; padding: 6px 2px; outline: none;
}
.search-field input::placeholder, .hero-search input::placeholder { color: var(--muted); opacity: 1; }
.search-results { list-style: none; padding: 6px; margin: 0; max-height: min(60vh, 520px); overflow-y: auto; }
.search-results a { display: block; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--brand-soft); }
.search-results .r-title { font-weight: 650; display: block; color: var(--ink-strong); }
.search-results .r-desc { font-size: 0.86rem; color: var(--muted); display: block; line-height: 1.45; }
.search-empty { padding: 14px 16px; color: var(--muted); font-size: 0.95rem; }

/* ---------- home ---------- */
.hero { padding-block: clamp(36px, 5.5vw, 80px) clamp(36px, 5vw, 72px); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(48px, 6vw, 104px); }
}
.hero h1 {
  font-size: var(--t-hero);
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: -0.022em;
  max-width: 16.5ch;
}
.hero-lede { margin-top: 22px; max-width: 46ch; font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); line-height: 1.55; color: var(--muted); }
.hero-search {
  margin-top: 30px; max-width: 640px;
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--ink-strong); border-radius: var(--radius-lg);
  padding: 6px 6px 6px 16px; background: var(--field);
}
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.hero-search svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.hero-search .btn { flex: none; }
.hero-results { max-width: 640px; position: relative; }
.hero-agents { margin-top: 18px; font-size: 0.93rem; }
.hero-agents a { color: var(--muted); font-weight: 600; text-underline-offset: 3px; }
.hero-agents a:hover { color: var(--brand); }
.hero-results .search-results { position: absolute; left: 0; right: 0; top: 6px; z-index: 20; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: 0 18px 40px var(--shadow); }
.hero-person { margin: 0; }
.hero-person picture { display: block; }
.hero-person img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--paper-alt); }
.hero-person figcaption { margin-top: 14px; display: grid; gap: 1px; }
.hp-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink-strong); line-height: 1.25; }
.hp-line { font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 959px) {
  .hero-person { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding-top: 22px; border-top: 1px solid var(--rule); max-width: 640px; }
  .hero-person img { width: 64px; height: 64px; aspect-ratio: 1; border-radius: 50%; }
  .hero-person figcaption { margin-top: 0; }
  .hp-name { font-size: 1.08rem; }
}
.portrait-fallback { display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--brand-soft); color: var(--brand); font-family: var(--font-display); font-weight: 760; font-size: 2rem; border-radius: var(--radius); }

.asked { background: var(--paper-alt); border-block: 1px solid var(--rule); padding-block: clamp(32px, 4.5vw, 56px); }
.asked h2 { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); }
.asked-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; column-gap: 40px; }
@media (min-width: 700px) { .asked-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.asked-list li { border-top: 1px solid var(--rule); }
.asked-list a { display: block; padding: 13px 0; color: var(--brand); text-decoration: none; font-weight: 550; line-height: 1.4; }
.asked-list a:hover { color: var(--brand); text-decoration: underline; }

.section { padding-block: clamp(52px, 6.5vw, 96px); }
.section-alt { background: var(--paper-alt); border-top: 1px solid var(--rule); }
.section-feature { border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 10px; margin-bottom: 30px; max-width: 58ch; }
.section-head p { color: var(--muted); }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 36px; }
.door { display: grid; gap: 6px; align-content: start; padding: 20px 0 28px; border-top: 2px solid var(--rule-strong); text-decoration: none; color: var(--ink); }
.door:hover { color: var(--ink); text-decoration: none; }
.door-title { font-family: var(--font-display); font-weight: 680; font-size: 1.3rem; line-height: 1.2; color: var(--ink-strong); }
.door:hover .door-title { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.door p { color: var(--muted); font-size: 0.97rem; }

.split { display: grid; gap: 36px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: clamp(44px, 6vw, 96px); } }
.feature-copy h2 { max-width: 20ch; }
.feature-math { display: grid; gap: 12px; }

.process { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.process li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 4px 10px; padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.process li:first-child { border-top: 2px solid var(--rule-strong); }
.process li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--font-display); font-weight: 720;
  font-size: 1.7rem; line-height: 1.05; color: var(--brand);
  font-variant-numeric: lining-nums;
}
.process h3 { font-size: 1.2rem; }
.process p { color: var(--muted); font-size: 0.97rem; max-width: 60ch; }

.about-card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); }
.about-card h2 { font-size: 1.45rem; }
.about-text { margin-top: 12px; }
.about-text p + p { margin-top: 0.8em; }
.creds { list-style: none; padding: 0; margin: 20px 0 0; }
.creds li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--rule); font-size: 0.95rem; line-height: 1.45; }
.creds li::before {
  content: ""; position: absolute; left: 3px; top: 1.05em;
  width: 12px; height: 6px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.home-reviews { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.home-reviews span, .cta-reviews span { white-space: nowrap; }
.about-more { margin-top: 12px; font-weight: 650; }

/* ---------- bands ---------- */
.band { background: var(--band); color: var(--on-band); border-block: 1px solid var(--rule); }
.band .wrap { padding-block: clamp(44px, 5.5vw, 76px); }
.band h2 { color: var(--on-band); }
.band p { color: var(--band-muted); max-width: 60ch; margin-top: 10px; }
.band a:not(.btn) { color: var(--on-band); }
.band :focus-visible, .article-cta :focus-visible { outline-color: var(--on-band); }
.band-row { display: grid; gap: 22px; align-items: center; }
@media (min-width: 860px) { .band-row { grid-template-columns: 1fr auto; gap: 48px; } }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.band .contact-line { margin-top: 12px; font-size: 0.95rem; }
.band .contact-line strong { color: var(--on-band); font-variant-numeric: tabular-nums; }

/* ---------- article ---------- */
.crumbs { padding-top: 28px; font-size: 0.85rem; color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: "/"; margin: 0 9px; color: color-mix(in srgb, var(--muted) 55%, transparent); }
.crumbs li:last-child:not(:first-child) { display: none; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

.article-head { padding-block: 12px 4px; }
.article-head h1 { max-width: 30ch; }
.article-head .lede { margin-top: 14px; }
.byline { margin-top: 22px; display: flex; align-items: center; gap: 12px; }
.byline-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-alt); }
.byline-text { font-size: 0.87rem; line-height: 1.45; color: var(--muted); }
.byline-text > span { display: block; }
.nw { white-space: nowrap; }
.byline-text a { color: var(--ink-strong); font-weight: 650; text-decoration: none; }
.byline-text a:hover { color: var(--brand); text-decoration: underline; }

.article-grid { display: grid; padding-bottom: 80px; }
.article-main { min-width: 0; width: 100%; max-width: var(--measure); margin-inline: auto; }
.rail { display: none; }
@media (min-width: 1100px) {
  .article-grid { grid-template-columns: var(--rail) minmax(0, var(--measure)); column-gap: var(--rail-gap); justify-content: center; }
  .article-main { margin-inline: 0; }
  .rail { display: block; padding-top: 30px; }
  .rail-inner { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 100px); max-height: calc(100vh - 124px); overflow-y: auto; padding-bottom: 20px; }
}
.rail h2 { font-size: 1rem; font-weight: 700; }
.rail ol { list-style: none; padding: 0; margin: 12px 0 0; border-left: 1px solid var(--rule); }
.rail a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 0.86rem; line-height: 1.4; }
.rail a:hover { color: var(--ink-strong); }
.rail a.is-current { color: var(--brand); border-left-color: var(--brand); font-weight: 650; }

.jump { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 16px; }
.jump summary { cursor: pointer; font-weight: 650; color: var(--ink-strong); }
.jump ol { margin-top: 10px; padding-left: 1.3em; display: grid; gap: 6px; font-size: 0.95rem; }
@media (min-width: 1100px) { .jump { display: none; } }

.prose { min-width: 0; display: flow-root; }
.article-main > .prose, .article-head + .prose { margin-top: 30px; }
.prose > * + * { margin-top: 1.1em; }
.prose > h2 { margin-top: 2.1em; }
.prose > h3 { margin-top: 1.75em; }
.prose > h2 + *, .prose > h3 + * { margin-top: 0.55em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2em; }
.prose blockquote { border-left: 3px solid var(--rule); padding-left: 18px; color: var(--muted); }
.prose code { font-size: 0.92em; background: var(--paper-alt); padding: 1px 5px; border-radius: 4px; }
.prose strong { color: var(--ink-strong); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--radius); }
/* a wide table fades on whichever edge still has columns to scroll to */
.table-frame { position: relative; min-width: 0; max-width: 100%; }
.table-frame::before, .table-frame::after {
  content: ""; position: absolute; top: 1px; bottom: 1px; width: 40px; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity 0.18s ease;
}
.table-frame::after { right: 1px; border-radius: 0 var(--radius) var(--radius) 0; background: linear-gradient(to left, var(--paper) 15%, transparent); }
.table-frame::before { left: 1px; border-radius: var(--radius) 0 0 var(--radius); background: linear-gradient(to right, var(--paper) 15%, transparent); }
.table-frame.more-right::after, .table-frame.more-left::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .table-frame::before, .table-frame::after { transition: none; } }

/* on a phone, a table with four or more columns becomes one small card per row,
   every value labeled with its column, so no column ever sits off screen */
@media (max-width: 600px) {
  .prose table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .prose table.stack-sm, .prose table.stack-sm tbody, .prose table.stack-sm tr, .prose table.stack-sm td { display: block; }
  .prose table.stack-sm tr { padding: 12px 16px 13px; border-bottom: 1px solid var(--rule); }
  .prose table.stack-sm tbody tr:last-child { border-bottom: 0; }
  .prose table.stack-sm tbody tr:nth-child(even) { background: color-mix(in srgb, var(--paper-alt) 55%, transparent); }
  .prose table.stack-sm td { border: 0; padding: 3px 0; }
  .prose table.stack-sm td[data-label] { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 14px; }
  .prose table.stack-sm td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.86rem; line-height: 1.45; padding-top: 0.1em; }
  .prose table.stack-sm td:first-child { font-weight: 700; color: var(--ink-strong); padding-bottom: 5px; }
  .prose table.stack-sm td:first-child::before { font-weight: 400; }
}
@media (max-width: 480px) { .prose th, .prose td { padding: 9px 10px; } }

/* example terms: one card per loan on a phone, so the rate and APR are never off screen */
@media (max-width: 640px) {
  .prose .terms-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .prose .terms-table, .prose .terms-table tbody, .prose .terms-table tr, .prose .terms-table td { display: block; }
  .prose .terms-table tr { padding: 14px 16px; border-bottom: 1px solid var(--rule); }
  .prose .terms-table tbody tr:last-child { border-bottom: 0; }
  .prose .terms-table td { border: 0; padding: 3px 0; }
  .prose .terms-table td:first-child { padding-bottom: 8px; }
  .prose .terms-table td[data-label] { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; }
  .prose .terms-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.86rem; }
}
.prose table { border-collapse: collapse; width: 100%; font-size: 0.92rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose thead th { background: var(--paper-alt); font-weight: 700; color: var(--ink-strong); }
.prose tbody tr:last-child td { border-bottom: 0; }

/* the short answer */
.short { background: var(--ledger); border-radius: var(--radius); padding: 20px 24px 22px; }
.short-label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--brand); margin-bottom: 6px; }
.short > * + * { margin-top: 0.6em; }
.short p { font-size: 1.03em; color: var(--ink-strong); }

/* Tyler's take: his own judgment, with his face on it */
.take { border-left: 3px solid var(--brand); padding: 2px 0 2px 20px; }
.take-label { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--brand); margin-bottom: 8px; }
.take-label::before { content: ""; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--paper-alt) url("../images/tyler-rood.jpg") center 30% / cover; }
.take > * + * { margin-top: 0.6em; }

/* Watch out */
.watch { border-left: 3px solid var(--alert); padding: 2px 0 2px 20px; }
.watch-label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--alert); margin-bottom: 6px; }
.watch > * + * { margin-top: 0.6em; }

/* ---------- the ledger sheet (worked math) ---------- */
.pad {
  margin-inline: 0;
  background: var(--ledger);
  color: var(--ink);
  border: 1px solid var(--ledger-rule);
  border-radius: var(--radius);
  padding: 18px 22px 16px;
}
.pad-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.12rem; line-height: 1.3; color: var(--ink-strong);
  margin: 0; padding-bottom: 12px;
  border-bottom: 2px solid var(--rule-strong);
}
.pad-rows { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; font-size: 0.97rem; line-height: 1.4; }
.pad-rows td { padding: 9px 0; border-bottom: 1px solid var(--ledger-rule); vertical-align: baseline; }
.pad-rows .op { width: 1.5em; color: var(--muted); font-weight: 600; }
.pad-rows .label { padding-right: 16px; }
.pad-rows .val { width: 1%; text-align: right; white-space: nowrap; font-weight: 650; color: var(--ink-strong); padding-left: 16px; border-left: 1px solid var(--ledger-rule); }
.pad-rows tr:has(> td.val:empty) .label { font-weight: 650; color: var(--ink-strong); }
.pad-rows tr.total td { border-top: 1.5px solid var(--rule-strong); border-bottom: 0; padding-top: 12px; font-weight: 750; color: var(--ink-strong); }
.pad-rows tr.total .val span { display: inline-block; padding-bottom: 3px; border-bottom: 3px double var(--brass); }
.pad-text { font-size: 0.95rem; margin: 10px 0 0; }
.pad-note { font-size: 0.86rem; line-height: 1.5; color: var(--muted); margin: 12px 0 0; }
.pad-foot { font-size: 0.8rem; line-height: 1.5; color: var(--muted); margin-top: 10px; }
.page-disclaimer { margin-top: 2.4em; }

/* numbered steps (real sequences only) */
.steps > ol, .steps-list { list-style: none; padding: 0 !important; counter-reset: s; display: grid; }
.steps > ol > li, .steps-list > li { counter-increment: s; position: relative; padding: 13px 0 14px 46px; margin: 0 !important; border-top: 1px solid var(--rule); }
.steps > ol > li:last-child, .steps-list > li:last-child { border-bottom: 1px solid var(--rule); }
.steps > ol > li::before, .steps-list > li::before {
  content: counter(s); position: absolute; left: 0; top: 10px;
  font-family: var(--font-display); font-weight: 720; font-size: 1.4rem; line-height: 1.2; color: var(--brand);
  font-variant-numeric: lining-nums;
}
.steps > ol > li > p + p { margin-top: 0.5em; }

/* FAQ */
.faq { margin-top: 3em; }
.faq > h2 { padding-bottom: 14px; border-bottom: 2px solid var(--rule-strong); }
.faq-item { padding-block: 18px 20px; border-bottom: 1px solid var(--rule); }
.faq-item h3 { font-size: 1.16rem; font-weight: 650; }
.faq-item div { margin-top: 8px; }
.faq-item div > * + * { margin-top: 0.6em; }

/* the contact panel at the end of every guide */
.article-cta {
  margin-top: 3em;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start;
  background: var(--band); color: var(--on-band);
  border: 1px solid var(--ledger-rule);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
}
.cta-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid color-mix(in srgb, var(--on-band) 35%, transparent); }
.cta-body > * + * { margin-top: 10px; }
.article-cta h2 { color: var(--on-band); font-size: 1.45rem; }
.article-cta p { color: var(--band-muted); }
.article-cta a:not(.btn) { color: var(--on-band); }
.article-cta .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.article-cta .copy-num { color: var(--on-band); }
.article-cta .number { color: var(--on-band); }
.cta-reviews { font-size: 0.88rem; }
.article-cta .cta-note { font-size: 0.84rem; margin-top: 8px; }
/* on a phone, the calculator's answer rides along at the top while you type */
.tool-peek { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); z-index: 44; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 46px; padding: 9px var(--gutter-r) 9px var(--gutter-l); background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 10px 24px -18px var(--shadow); transform: translateY(-110%); visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s; }
.tool-peek.is-on { transform: none; visibility: visible; transition: transform 0.2s ease; }
.tool-peek-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.tool-peek-val { flex: none; font-weight: 750; font-size: 1.12rem; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .tool-peek { display: none; } }
@media (prefers-reduced-motion: reduce) { .tool-peek, .tool-peek.is-on { transition: none; } }
@media (max-width: 520px) {
  .article-cta { grid-template-columns: 1fr; gap: 14px; }
  .cta-photo { width: 56px; height: 56px; }
}

.sources { margin-top: 2.6em; }
.sources h2 { font-size: 1.15rem; margin-bottom: 8px; }
.sources ul { padding-left: 1.1em; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.sources li + li { margin-top: 5px; }

.related { margin-top: 2.6em; }
.related h2 { font-size: 1.3rem; }
.related ul { list-style: none; padding: 0; margin-top: 12px; border-top: 2px solid var(--rule-strong); }
.related li { border-bottom: 1px solid var(--rule); margin: 0 !important; }
.related a { display: block; padding: 14px 0; text-decoration: none; font-family: var(--font-display); font-weight: 650; font-size: 1.08rem; line-height: 1.3; color: var(--ink-strong); }
.related a:hover { color: var(--brand); }
.related a span { display: block; margin-top: 4px; font-family: var(--font-body); font-weight: 400; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }

.number { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-strong); }
.copy-num { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.copy-num button::after { content: ""; position: absolute; inset: -8px -6px; }  /* a 44px tap target around the small pill */
.copy-num button { position: relative; font: inherit; font-size: 0.8rem; font-weight: 600; padding: 3px 12px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }

/* required notices */
.notice { background: var(--paper-alt); border-radius: var(--radius); padding: 12px 16px; font-size: 0.88rem; line-height: 1.55; color: var(--ink); }
.notice p + p { margin-top: 6px; }
.notice a { font-weight: 650; }
.not-approval { border: 2px solid var(--rule-strong); border-radius: var(--radius); padding: 16px 20px; }
.not-approval strong.na { display: block; font-family: var(--font-body); font-size: 1.3rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1.25; color: var(--ink-strong); margin-bottom: 6px; }
.not-approval p { font-size: 0.95rem; }
/* reverse mortgage notice: prominent box at the top of the page */
.notice-prominent { border: 2px solid var(--rule-strong); border-radius: var(--radius); padding: 14px 18px; }
.notice-prominent strong.np { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.3; color: var(--ink-strong); margin-bottom: 4px; }
.notice-prominent p { font-size: 0.95rem; line-height: 1.55; color: var(--ink); }
/* Virginia 10VAC5-160-60: 'THIS IS NOT A LOAN APPROVAL' at 14 point or larger, bold.
   1.3rem = 20.8px = 15.6pt and never smaller than 19px (14.25pt) on any screen. */
.not-approval strong.na { font-size: max(1.3rem, 19px) !important; }

/* ---------- hubs ---------- */
.hub-wrap { max-width: calc(var(--wide) + var(--gutter-l) + var(--gutter-r)); padding-bottom: 72px; }
.hub-head { padding-block: 12px 26px; }
.lede { font-size: clamp(1.08rem, 1rem + 0.3vw, 1.2rem); line-height: 1.55; color: var(--muted); max-width: 58ch; }
.hub-head .lede, .head-text .lede { margin-top: 14px; }
/* proof on the agents hub: a face, a license number, a track record and a direct line */
.proof { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); max-width: 60ch; }
.proof-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-alt); }
.proof-name { font-size: 0.95rem; line-height: 1.45; color: var(--ink); }
.proof-name a { color: var(--ink-strong); font-weight: 700; text-decoration: none; }
.proof-name a:hover { color: var(--brand); text-decoration: underline; }
.proof-facts { list-style: none; padding: 0; margin: 3px 0 0; display: grid; gap: 1px; font-size: 0.88rem; line-height: 1.55; color: var(--muted); }
.proof-facts a { color: inherit; }
.proof-facts a:hover { color: var(--brand); }
.proof-facts .proof-phone { color: var(--ink-strong); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-decoration: none; }
@media (max-width: 560px) { .proof { align-items: flex-start; } }

.hub-intro { max-width: var(--measure); margin-bottom: 20px; }
.hub-group { margin-top: 44px; }
.hub-group-title { font-size: 1.4rem; }
.hub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0 44px; border-top: 2px solid var(--rule-strong); margin-top: 14px; }
.hub-item { padding: 16px 0 20px; border-bottom: 1px solid var(--rule); display: grid; gap: 5px; align-content: start; }
.hub-item a { font-family: var(--font-display); font-weight: 650; font-size: 1.15rem; line-height: 1.3; color: var(--ink-strong); text-decoration: none; }
.hub-item a:hover { color: var(--brand); text-decoration: underline; }
.hub-item p { color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

/* ---------- calculators ---------- */
.tool-head, .tool { max-width: var(--wide); margin-inline: auto; }
.tool-head .lede { margin-top: 14px; }
.tool {
  display: grid; gap: 24px;
  margin-top: 26px; margin-bottom: 52px;
  padding: clamp(16px, 3vw, 32px);
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}
@media (min-width: 980px) { .tool { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 36px; align-items: start; } }
.tool-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 650; font-size: 0.93rem; color: var(--ink-strong); }
.field legend { color: var(--ink-strong); }
.field .hint { font-size: 0.82rem; line-height: 1.45; color: var(--muted); }
.field input, .field select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--field);
  border: 1px solid var(--field-line); border-radius: var(--radius);
  padding: 10px 12px; min-height: 46px; width: 100%;
  font-variant-numeric: tabular-nums;
}
.field input:focus, .field select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 12px; align-items: start; }
@supports (grid-template-rows: subgrid) {
  .field-row > .field { grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; }
  .field-row > .field > label { align-self: end; }
}
.input-affix { position: relative; }
.input-affix > span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 0.95rem; }
.input-affix .pre { left: 12px; }
.input-affix .post { right: 12px; }
.input-affix input.has-pre { padding-left: 26px; }
.input-affix input.has-post { padding-right: 34px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { font-weight: 400; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-block; padding: 8px 14px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--field); cursor: pointer; font-size: 0.93rem; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand); color: var(--on-brand); font-weight: 650; }
.seg input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.tool-out { display: grid; gap: 18px; min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(16px, 2.5vw, 26px); }
.tool-big { font-family: var(--font-body); font-weight: 750; font-size: clamp(2.4rem, 1.7rem + 2.6vw, 3.4rem); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums proportional-nums; color: var(--ink-strong); }
.tool-big.tool-big-msg { font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem); line-height: 1.15; letter-spacing: -0.01em; }
.tool-big-label { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
.tool-note { font-size: 0.84rem; line-height: 1.5; color: var(--muted); }
.tool-steps { font-size: 0.95rem; }
.ladder { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.ladder th, .ladder td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.ladder th:first-child, .ladder td:first-child { text-align: left; }
.ladder thead th { background: var(--paper-alt); color: var(--ink-strong); }
.bar-track { height: 10px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 999px; }

/* ---------- glossary ---------- */
.glossary-index { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.glossary-index a { min-width: 38px; text-align: center; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; font-family: var(--font-display); font-weight: 700; color: var(--brand); }
.glossary-index a:hover { background: var(--brand-soft); }
.glossary h2 { margin-top: 1.6em; padding-bottom: 6px; border-bottom: 2px solid var(--rule-strong); font-size: 1.6rem; }
.glossary dt { font-family: var(--font-display); font-weight: 650; font-size: 1.12rem; margin-top: 1.3em; color: var(--ink-strong); }
.glossary dd { margin: 0.3em 0 0; }

/* ---------- plain pages ---------- */
.page-wrap { max-width: calc(var(--measure) + var(--gutter-l) + var(--gutter-r)); padding-bottom: 80px; }
.terms-wrap { max-width: calc(var(--wide) + var(--gutter-l) + var(--gutter-r)); }
.page-narrow { max-width: var(--measure); }
.page-wide { max-width: none; }
.page-wrap .article-head { padding-bottom: 8px; }
.page-wrap .prose { margin-top: 28px; }
.head-with-photo { display: grid; gap: 20px; }
@media (min-width: 640px) { .head-with-photo { grid-template-columns: 190px minmax(0, 1fr); gap: 32px; align-items: end; } }
.about-portrait { display: block; width: 100%; max-width: 240px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--paper-alt); }
.notfound { padding-block: 80px; max-width: 60ch; }
.notfound h1 { font-size: var(--t-hero); }
.notfound .lede { margin-top: 16px; }
.nf-action { margin-top: 22px; }
.nf-links { margin-top: 24px; display: grid; gap: 8px; padding-left: 1.2em; }

/* ---------- footer ---------- */
.site-footer { background: var(--paper-alt); border-top: 1px solid var(--rule); font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { padding-block: 52px 34px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.footer-grid h2 { font-size: 1.02rem; font-weight: 700; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); text-decoration: underline; }
.footer-grid .number { color: var(--ink-strong); }
.legal { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--rule); display: grid; gap: 10px; font-size: 0.84rem; line-height: 1.6; color: var(--ink); }
.legal strong { font-weight: 700; }
.legal p { max-width: 112ch; }
.legal .company-logo { margin: 0 0 8px; }
.legal .company-logo img { display: block; height: 40px; width: auto; background: #fff; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--rule); box-sizing: content-box; }
.eho { display: flex; gap: 12px; align-items: flex-start; }
.eho svg { width: 30px; height: 30px; flex: none; color: var(--ink); }

/* one-tap contact on phones */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .mobile-bar {
    display: flex; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--paper); border-top: 1px solid var(--rule);
    padding: 8px var(--gutter-r) calc(8px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
    box-shadow: 0 -10px 24px -16px var(--shadow);
  }
  .mobile-bar .btn { flex: 1; min-height: 46px; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 520px) {
  .hero-search { flex-wrap: wrap; padding: 8px; }
  .hero-search svg { display: none; }
  .hero-search input { flex: 1 1 100%; padding: 8px 6px; }
  .hero-search .btn { flex: 1 1 100%; }
}

mark.verify { background: var(--mark); color: var(--mark-ink); font-size: 0.78em; padding: 1px 6px; border-radius: 4px; font-family: var(--font-body); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .primary-nav a, .icon-btn, .asked-list a, .door-title, .related a, .hub-item a { transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
}
@media print {
  .site-header, .site-footer .footer-grid, .rail, .jump, .band, .article-cta, .mobile-bar, .search-panel { display: none !important; }
  body { padding-bottom: 0; font-size: 11pt; }
  .pad { border: 1px solid #999; background: none; }
  a { color: inherit; }
}

/* ---------- graphics: charts, panels, timelines, comparisons, flows, checklists, drawings ---------- */
.fig { margin: 0; container-type: inline-size; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--paper); padding: clamp(16px, 2.6vw, 24px); }
.prose > .fig, .prose > .glance, .prose > .checklist { margin-top: 1.9em; }
.prose > .fig + *, .prose > .glance + *, .prose > .checklist + * { margin-top: 1.9em; }
.fig-head { display: grid; gap: 4px; }
.fig-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.3; color: var(--ink-strong); }
.fig-caption { font-size: 0.92rem; line-height: 1.5; color: var(--muted); }
.fig-note { margin-top: 12px; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.fig-error { border: 2px solid var(--alert); color: var(--alert); padding: 12px 16px; border-radius: var(--radius); font-size: 0.9rem; }
.fig-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 !important; margin: 12px 0 0; font-size: 0.84rem; color: var(--muted); }
.fig-legend li { margin: 0 !important; display: inline-flex; align-items: center; }
.key { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; }
.key-line { width: 16px; height: 3px; border-radius: 2px; }
.key.s1, .c-hbar.s1, .c-seg.s1, .viz-tip .k.s1 { background: var(--viz-1); }
.key.s2, .c-hbar.s2, .c-seg.s2, .viz-tip .k.s2 { background: var(--viz-2); }
.key.s3, .c-hbar.s3, .c-seg.s3, .viz-tip .k.s3 { background: var(--viz-3); }
.key.s4, .c-hbar.s4, .c-seg.s4, .viz-tip .k.s4 { background: var(--viz-4); }
.key.s5, .c-hbar.s5, .c-seg.s5, .viz-tip .k.s5 { background: var(--viz-5); }
.fig-data { margin-top: 12px; font-size: 0.86rem; }
.fig-data summary { cursor: pointer; width: fit-content; color: var(--brand); font-weight: 650; }
.fig-data .table-wrap { margin-top: 8px; }
.prose .fig-data table { font-size: 0.86rem; }
.prose .fig-data td { text-align: right; white-space: nowrap; }

/* SVG charts: a wide and a narrow drawing, picked by the figure's own width */
.fig-plot { margin-top: 12px; }
.c-svg { display: block; width: 100%; height: auto; overflow: visible; }
.c-narrow { display: none; }
@container (max-width: 470px) { .c-wide { display: none; } .c-narrow { display: block; } }
.c-svg text { font-family: var(--font-body); }
.c-tick { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.c-axis-title { font-size: 12px; fill: var(--muted); }
.c-val { font-size: 12px; font-weight: 650; fill: var(--ink-strong); font-variant-numeric: tabular-nums; }
.c-grid { stroke: var(--viz-grid); stroke-width: 1; }
.c-base { stroke: var(--viz-base); stroke-width: 1; }
.c-bar.s1 { fill: var(--viz-1); } .c-bar.s2 { fill: var(--viz-2); } .c-bar.s3 { fill: var(--viz-3); }
.c-bar.is-dim, .c-hbar.is-dim { fill: var(--viz-dim); background: var(--viz-dim); }
.c-col:hover .c-bar { opacity: 0.82; }
.c-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-line.s1 { stroke: var(--viz-1); } .c-line.s2 { stroke: var(--viz-2); } .c-line.s3 { stroke: var(--viz-3); }
.c-area { opacity: 0.1; } .c-area.s1 { fill: var(--viz-1); }
.c-dot { stroke: var(--paper); stroke-width: 2; }
.c-dot.s1 { fill: var(--viz-1); } .c-dot.s2 { fill: var(--viz-2); } .c-dot.s3 { fill: var(--viz-3); }
.c-hit { fill: transparent; }
.c-cross { stroke: var(--ink-strong); stroke-width: 1; opacity: 0; }
.c-x:hover .c-cross { opacity: 0.35; }
.c-ref { stroke: var(--ink-strong); stroke-width: 1.25; stroke-dasharray: 5 4; }
.c-ref-label, .c-mark-label { font-size: 12px; font-weight: 650; fill: var(--ink-strong); }
.c-mark { stroke: var(--muted); stroke-width: 1; }

/* horizontal bars: HTML, so long labels wrap */
.c-hbars { display: grid; gap: 12px; margin-top: 14px; }
.c-hrow { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: 4px 14px; align-items: center; }
@container (max-width: 470px) { .c-hrow { grid-template-columns: minmax(0, 1fr); } }
.c-hrow-label { font-size: 0.9rem; line-height: 1.35; color: var(--ink); }
.c-hrow-bars { display: grid; gap: 3px; }
.c-hbar-line { display: flex; align-items: center; gap: 8px; padding-right: 92px; min-width: 0; }
.c-hbar { display: block; flex: none; height: 16px; min-width: 2px; border-radius: 0 4px 4px 0; }
.c-hbar-val { font-size: 0.86rem; font-weight: 650; color: var(--ink-strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-hrow:hover .c-hbar { opacity: 0.82; }

/* segmented bars: one whole split into parts */
.c-stack { display: grid; gap: 16px; margin-top: 14px; }
.c-srow-label { font-size: 0.9rem; margin-bottom: 6px; color: var(--ink); }
.c-srow-label strong { color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.c-sbar { display: flex; gap: 2px; height: 28px; min-width: 48px; }
/* flex-basis 0 keeps every segment exactly proportional to its value; a label that doesn't fit is hidden, never cropped into view */
.c-seg { display: flex; align-items: center; flex-basis: 0; min-width: 3px; overflow: hidden; border-radius: 4px; padding: 0 8px; container-type: inline-size; }
.c-seg.s1 { color: var(--viz-on-1); } .c-seg.s2 { color: var(--viz-on-2); } .c-seg.s3 { color: var(--viz-on-3); } .c-seg.s4 { color: var(--viz-on-4); } .c-seg.s5 { color: var(--viz-on-5); }
.c-seg-val { font-size: 0.78rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-seg.is-tight .c-seg-val { visibility: hidden; }
@container (max-width: 44px) { .c-seg-val { visibility: hidden; } }
.c-seg:hover { opacity: 0.85; }

/* tooltip, built by site.js with textContent */
.viz-tip { position: fixed; z-index: 90; pointer-events: none; max-width: 260px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 28px -12px var(--shadow); padding: 8px 11px; font-size: 0.82rem; line-height: 1.4; }
.viz-tip .t { color: var(--muted); font-size: 0.76rem; margin-bottom: 3px; }
.viz-tip .r { display: flex; align-items: center; gap: 8px; }
.viz-tip .r b { font-weight: 700; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.viz-tip .k { flex: none; width: 12px; height: 3px; border-radius: 2px; }

/* at a glance: the numbers that matter, as tiles */
.glance { border-top: 2px solid var(--rule-strong); padding-top: 14px; }
.glance-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink-strong); }
.g-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0 28px; margin: 8px 0 0; }
.g-item { padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
.g-item dt { font-size: 0.84rem; line-height: 1.35; color: var(--muted); }
.g-item dd { margin: 5px 0 0; }
.g-val { display: block; font-weight: 750; font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.55rem); line-height: 1.15; letter-spacing: -0.012em; color: var(--ink-strong); }
.g-note { display: block; margin-top: 4px; font-size: 0.82rem; line-height: 1.4; color: var(--muted); }
@media (max-width: 420px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; } }

/* timeline: when, on a rail */
.tl { list-style: none; padding: 0 !important; margin: 16px 0 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 7.75rem minmax(0, 1fr); column-gap: 30px; padding-bottom: 20px; margin: 0 !important; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: calc(7.75rem + 14px); top: 14px; bottom: -6px; width: 2px; background: var(--rule); }
.tl-item:last-child::before { display: none; }
.tl-item::after { content: ""; position: absolute; left: calc(7.75rem + 8px); top: 5px; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box; background: var(--paper); border: 3px solid var(--viz-1); }
.tl-when { font-size: 0.86rem; font-weight: 700; line-height: 1.4; color: var(--brand); text-align: right; }
.tl-title { font-weight: 650; line-height: 1.4; color: var(--ink-strong); }
.tl-text { margin-top: 3px; font-size: 0.93rem; line-height: 1.55; color: var(--muted); }
@container (max-width: 470px) {
  .tl-item { grid-template-columns: minmax(0, 1fr); padding-left: 30px; }
  .tl-item::before { left: 6px; }
  .tl-item::after { left: 0; }
  .tl-when { text-align: left; }
}

/* comparison: options side by side, row by row */
.cmp-wrap { margin-top: 14px; }
.prose table.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.93rem; line-height: 1.5; font-variant-numeric: normal; }
.prose .cmp th, .prose .cmp td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--rule); white-space: normal; }
.prose .cmp thead th { background: none; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink-strong); border-bottom: 2px solid var(--rule-strong); }
.prose .cmp tbody th { width: 27%; font-weight: 650; color: var(--ink-strong); padding-left: 0; }
.prose .cmp .is-lean { background: var(--ledger); }
.prose .cmp thead th.is-lean { border-radius: 6px 6px 0 0; }
.prose .cmp tbody tr:last-child th, .prose .cmp tbody tr:last-child td { border-bottom: 0; }
/* on a phone each row becomes its own small comparison: the row label on top, the options side by side */
@container (max-width: 520px) {
  .prose .cmp thead { display: none; }
  .prose .cmp, .prose .cmp tbody { display: block; width: auto; }
  .prose .cmp tr { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .prose .cmp tbody tr:last-child { border-bottom: 0; }
  .prose .cmp tbody th { grid-column: 1 / -1; display: block; width: auto; padding: 0 0 6px; border: 0; }
  .prose .cmp td { display: block; padding: 6px 8px; border: 0; border-radius: var(--radius); font-size: 0.88rem; }
  .prose .cmp td::before { content: attr(data-col); display: block; margin-bottom: 2px; font-size: 0.74rem; font-weight: 700; line-height: 1.3; color: var(--muted); }
}

/* flow: who hands what to whom */
.fl { list-style: none; padding: 0 !important; margin: 16px 0 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: 52px; }
.fl-step { position: relative; display: flex; margin: 0 !important; }
.fl-box { flex: 1; display: block; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); padding: 12px 14px; }
.fl-step.is-lead .fl-box { border-color: var(--viz-1); background: var(--ledger); }
.fl-title { display: block; font-weight: 700; line-height: 1.3; color: var(--ink-strong); }
.fl-text { display: block; margin-top: 4px; font-size: 0.86rem; line-height: 1.45; color: var(--muted); }
.fl-arrow { position: absolute; left: -52px; top: 50%; width: 52px; height: 0; display: flex; justify-content: center; }
.fl-arrow::before { content: ""; position: absolute; left: 6px; right: 10px; top: -1px; height: 2px; background: var(--muted); }
.fl-arrow::after { content: ""; position: absolute; right: 4px; top: -5px; border: 5px solid transparent; border-left: 7px solid var(--muted); border-right: 0; }
.fl-arrow span { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 0.7rem; line-height: 1.2; color: var(--muted); }
@container (max-width: 560px) {
  .fl { grid-template-columns: minmax(0, 1fr); row-gap: 46px; column-gap: 0; }
  .fl-arrow { left: 0; right: 0; top: -46px; width: auto; height: 46px; }
  .fl-arrow::before { left: 50%; right: auto; top: 6px; bottom: 12px; width: 2px; height: auto; }
  .fl-arrow::after { left: calc(50% - 5px); right: auto; top: auto; bottom: 4px; border: 5px solid transparent; border-top: 7px solid var(--muted); border-bottom: 0; }
  .fl-arrow span { bottom: auto; top: 14px; left: calc(50% + 10px); text-align: left; }
}

/* checklists: tick them off as you go (saved in this browser only) */
.checklist { border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 16px 20px 14px; }
.checklist-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink-strong); margin: 0 0 6px; }
.checklist ul, .checklist ol { list-style: none; padding-left: 0 !important; margin: 0; }
.checklist li { position: relative; padding: 9px 0 9px 32px; border-top: 1px solid var(--rule); margin: 0 !important; }
.checklist li::before { content: ""; position: absolute; left: 1px; top: 11px; width: 18px; height: 18px; box-sizing: border-box; border: 1.5px solid var(--field-line); border-radius: 4px; background: var(--field); }
.checklist li.is-done::before { background: var(--viz-1); border-color: var(--viz-1); }
.checklist li.is-done::after { content: ""; position: absolute; left: 7px; top: 14px; width: 6px; height: 10px; border: solid var(--viz-on-1); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checklist li.is-done > label { color: var(--muted); }
.checklist li > input.ck { position: absolute; left: 0; top: 9px; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.checklist li > input.ck:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.checklist li > label { cursor: pointer; display: block; }

/* hand-drawn figures */
.fig-drawn .fig-art svg { display: block; width: 100%; max-width: 440px; height: auto; margin-inline: auto; }
.fig-cap { margin-top: 12px; font-size: 0.92rem; line-height: 1.5; color: var(--muted); }
.fig-art svg text { font-family: var(--font-body); fill: var(--ink); }
.fig-art .d-title { font-family: var(--font-display); font-weight: 700; fill: var(--ink-strong); }
.fig-art .d-strong { font-weight: 700; fill: var(--ink-strong); }
.fig-art .d-muted { fill: var(--muted); }
.fig-art .d-on { fill: var(--viz-on-1); }
.fig-art .d-line { fill: none; stroke: var(--ink-strong); stroke-width: 1.5; }
.fig-art .d-rule { fill: none; stroke: var(--rule); stroke-width: 1; }
.fig-art .d-thin { fill: none; stroke: var(--muted); stroke-width: 1; }
.fig-art .d-paper { fill: var(--paper); }
.fig-art .d-ledger { fill: var(--ledger); }
.fig-art .d-soft { fill: var(--brand-soft); }
.fig-art .d-f1 { fill: var(--viz-1); } .fig-art .d-f2 { fill: var(--viz-2); } .fig-art .d-f3 { fill: var(--viz-3); }
.fig-art .d-s1 { fill: none; stroke: var(--viz-1); stroke-width: 2.5; } .fig-art .d-s2 { fill: none; stroke: var(--viz-2); stroke-width: 2.5; }
.fig-art .d-ink { fill: var(--ink-strong); }

@media print {
  .fig, .checklist { break-inside: avoid; }
  .fig-data { display: none; }
  .viz-tip { display: none; }
}

/* ---------- illustrations: elevation drawings in ink, navy and amber ---------- */
.a-ink { stroke: var(--ink-strong); stroke-width: 1.6; stroke-linejoin: round; }
.a-paper { fill: var(--paper); }
.a-soft { fill: var(--brand-soft); }
.a-glass { fill: var(--ledger); }
.a-door { fill: var(--viz-1); }
.a-brick { fill: color-mix(in srgb, var(--viz-2) 24%, var(--paper)); }
.a-brass { fill: var(--viz-2); }
.a-brass-soft { fill: color-mix(in srgb, var(--viz-2) 30%, var(--paper)); }
.a-brass-ink { stroke: var(--viz-2); stroke-width: 1.6; }
.a-brass-line { fill: none; stroke: var(--viz-2); stroke-width: 2.4; stroke-linecap: round; }
.a-stroke { fill: none; stroke: var(--ink-strong); stroke-width: 1.6; stroke-linecap: round; }
.a-thin { fill: none; stroke: var(--muted); stroke-width: 1; }
.a-ink-fill { fill: var(--ink-strong); }
.a-rule-fill { fill: color-mix(in srgb, var(--muted) 45%, var(--paper)); }
.a-flag { fill: color-mix(in srgb, var(--alert) 75%, var(--paper)); }
.a-canton { fill: var(--brand); }
.a-none { fill: none; }
.a-arrow { fill: none; stroke: var(--viz-1); stroke-width: 2.5; stroke-linecap: round; }
.a-arrow-head { fill: var(--viz-1); }
.a-check { fill: none; stroke: var(--ink-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hub-head-art { display: grid; gap: 18px; align-items: end; }
@media (min-width: 760px) { .hub-head-art { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 40px; } }
.hub-art svg { display: block; width: 100%; max-width: 300px; height: auto; }
@media (max-width: 759px) { .hub-art svg { max-width: 240px; } }

.door-art { display: block; width: 150px; margin-bottom: 8px; }
.door-art svg { display: block; width: 100%; height: auto; }

.section-wheel { border-top: 1px solid var(--rule); }
@media (min-width: 900px) { .split-flip { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); } }
.wheel-art { margin: 0; }
.wheel-art .fig-art svg { display: block; width: 100%; max-width: 420px; height: auto; margin-inline: auto; }
@media (max-width: 899px) { .split-flip .wheel-art { order: 2; } }

/* the home page process on a rail: real sequence, numbered nodes */
.process li { position: relative; grid-template-columns: 44px 1fr; border-top: 0; padding: 0 0 22px; }
.process li:first-child { border-top: 0; }
.process li::before {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--viz-1); color: var(--viz-on-1);
  font-family: var(--font-body); font-weight: 750; font-size: 0.95rem; line-height: 1;
  grid-row: span 2; position: relative; z-index: 1;
}
.process li::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--rule); }
.process li:last-child::after { display: none; }
.process li:last-child { padding-bottom: 0; }
.process h3 { padding-top: 4px; }
.c-live { display: grid; gap: 0; }
.c-live .fig-legend { margin-top: 0; }
.c-live .c-stack { margin-top: 10px; }
.key-ref { width: 18px; height: 0; border-radius: 0; border-top: 1.5px dashed var(--ink-strong); }
/* values and mark labels keep a halo in the surface color, so a line never cuts through the text */
.c-val, .c-mark-label { paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }

/* ---------- texting from a laptop: a QR code, the number and a copy button ---------- */
.text-panel { width: min(400px, calc(100% - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: var(--radius-lg); padding: 28px 28px 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.5); text-align: center; }
.text-panel::backdrop { background: color-mix(in srgb, var(--ink-strong) 55%, transparent); }
.text-panel h2 { font-size: 1.45rem; padding-inline: 28px; }
.text-panel-lede { margin-top: 8px; font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.text-panel-qr { width: 200px; margin: 18px auto 16px; padding: 10px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); }
.text-panel-qr svg { display: block; width: 100%; height: auto; }
.text-panel-num { justify-content: center; font-size: 1.05rem; }
.text-panel-alt { margin-top: 10px; font-size: 0.86rem; color: var(--muted); }
.text-panel-close { position: absolute; top: 12px; right: 12px; }
.text-panel .icon-btn { width: 38px; height: 38px; }

/* ---------- long guides on phones and tablets: where am I, and jump anywhere ---------- */
.toc-bar { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); z-index: 45; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 10px 24px -18px var(--shadow); transform: translateY(-110%); visibility: hidden; }
.toc-bar.is-on { transform: none; visibility: visible; }
.toc-bar summary { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px var(--gutter-r) 6px var(--gutter-l); cursor: pointer; list-style: none; }
.toc-bar summary::-webkit-details-marker { display: none; }
.toc-bar summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.toc-bar[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.toc-bar-label { flex: none; font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.toc-bar-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; font-weight: 650; color: var(--ink-strong); }
.toc-bar ol { list-style: none; margin: 0; padding: 4px var(--gutter-r) 12px var(--gutter-l); max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--rule); }
.toc-bar li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
.toc-bar li a.is-current { color: var(--brand); font-weight: 650; }
@media (min-width: 761px) { .toc-bar { top: calc(env(safe-area-inset-top, 0px) + 75px); } }
@media (min-width: 1100px) { .toc-bar { display: none; } }
@media (prefers-reduced-motion: no-preference) { .toc-bar { transition: transform 0.2s ease, visibility 0.2s; } }
@media print { .toc-bar, .text-panel { display: none !important; } }
