/* RoofBenchmark.com
   Design tokens and components per roofbenchmark-huisstijl.md.
   Mobile first. Larger layouts are added with min-width queries only.

   Three documented deviations from the huisstijl colour table, each because the
   specified pair fails the WCAG 2.1 AA target the same document sets in 39.1:
     1. Copper CTA fill uses Copper Dark #96592B. White on #B0703C is 4.02:1.
     2. Eyebrow text on white uses Copper Dark for the same reason.
     3. Interactive control borders use --rb-line-strong #7C8E9C (3.38:1), because
        #D4DADF is 1.41:1 and cannot carry a control boundary (WCAG 1.4.11).
        #D4DADF is kept for decorative dividers and table rules as specified.
*/

:root {
  /* Brand */
  --rb-slate: #232E38;
  --rb-slate-2: #31404D;
  --rb-zinc: #EDF0F2;
  --rb-panel: #FFFFFF;
  --rb-ink: #1A2430;
  --rb-muted: #5C6B78;

  /* Action and accent */
  --rb-chalk: #1D5FBF;
  --rb-chalk-hover: #174E9E;
  --rb-chalk-soft: #E4EDFB;
  --rb-copper: #B0703C;
  --rb-copper-dark: #96592B;
  --rb-copper-deep: #7D4A23;

  /* Structure */
  --rb-line: #D4DADF;
  --rb-line-strong: #7C8E9C;
  --rb-grid: rgba(140, 158, 172, .07);
  --rb-grid-dark: rgba(159, 180, 198, .055);
  --rb-slate-light: #9FB4C6;
  --rb-dark-text-soft: #C5D2DD;
  --rb-dark-divider: rgba(69, 86, 100, 0.53);

  /* Semantic */
  --rb-good: #1E7B4D;
  --rb-warning: #A15C0C;
  --rb-error: #A23838;

  /* Type */
  --rb-font-display: "Saira Condensed", "Arial Narrow", Arial, sans-serif;
  --rb-font-body: "Barlow", Arial, Helvetica, sans-serif;
  --rb-font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Radius */
  --rb-radius-sm: 6px;
  --rb-radius-md: 8px;
  --rb-radius-lg: 10px;
  --rb-radius-pill: 999px;

  /* Layout */
  --rb-content-max: 1180px;
  --rb-app-max: 1120px;
  --rb-reading-max: 760px;

  /* Spacing, 8pt rhythm */
  --rb-space-1: 4px;
  --rb-space-2: 8px;
  --rb-space-3: 12px;
  --rb-space-4: 16px;
  --rb-space-6: 24px;
  --rb-space-8: 32px;
  --rb-space-10: 40px;
  --rb-space-12: 48px;
  --rb-space-16: 64px;
  --rb-space-20: 80px;
  --rb-space-24: 96px;
}

/* --------------------------------------------------------------- fonts */
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/barlow-400.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/barlow-600.woff2) format("woff2");
}
@font-face {
  font-family: "Saira Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/saira-condensed-600.woff2) format("woff2");
}
@font-face {
  font-family: "Saira Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/saira-condensed-700.woff2) format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-500.woff2) format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-600.woff2) format("woff2");
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--rb-font-body);
  /* The drafting grid from the brand kit, at 40px like the pattern asset.
     Two hairlines rather than an image: no request, and it scales cleanly. */
  background-color: var(--rb-zinc);
  background-image:
    linear-gradient(to right, var(--rb-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rb-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--rb-ink);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4 { font-family: var(--rb-font-display); color: var(--rb-ink); line-height: 1.12; }
h1 { font-size: clamp(2.35rem, 7vw, 3.5rem); font-weight: 700; line-height: 1.0;
     letter-spacing: -.005em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 4.6vw, 2.25rem); font-weight: 600; letter-spacing: .005em;
     text-wrap: balance; }
h3 { font-size: clamp(1.3rem, 3.2vw, 1.55rem); font-weight: 600; }
h4 { font-family: var(--rb-font-body); font-size: 1.125rem; font-weight: 600; line-height: 1.3; }

a { color: var(--rb-chalk); }
a:hover { color: var(--rb-chalk-hover); }

:focus-visible {
  outline: 3px solid var(--rb-chalk);
  outline-offset: 2px;
  border-radius: 4px;
}

.data, .num, code {
  font-family: var(--rb-font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wrap { width: min(100% - 2rem, var(--rb-content-max)); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(100% - 4rem, var(--rb-content-max)); } }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--rb-panel); color: var(--rb-ink);
  padding: var(--rb-space-3) var(--rb-space-4);
  border: 2px solid var(--rb-chalk); border-radius: 0 0 var(--rb-radius-md) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* -------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--rb-slate);
  /* The dark drafting grid, so the bar reads as part of the same document. */
  background-image:
    linear-gradient(to right, var(--rb-grid-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rb-grid-dark) 1px, transparent 1px);
  background-size: 40px 40px;
  color: #fff;
  border-bottom: 3px solid var(--rb-copper);
}
/* Anchor targets clear the sticky bar. */
:target, [id] { scroll-margin-top: 5.5rem; }
.header-inner {
  display: flex; align-items: center; gap: var(--rb-space-4);
  padding-block: var(--rb-space-3); flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: var(--rb-space-2);
  color: #fff; text-decoration: none; margin-right: auto; min-height: 44px;
}
.logo-mark { width: 40px; height: 33px; flex: none; color: #fff; }
.logo-word {
  font-family: var(--rb-font-display); font-weight: 700; font-size: 1.6rem;
  letter-spacing: .01em; line-height: 1;
}
.logo-word b { color: #fff; font-weight: 700; }
/* At 320px the enlarged logo and the Menu button no longer fit on one row, and
   the button drops to a second line. One step down keeps the header a single
   row there without shrinking the logo on any width that has the space. */
@media (max-width: 22.5rem) {
  .logo-mark { width: 34px; height: 28px; }
  .logo-word { font-size: 1.35rem; }
}
.logo-word > span { color: var(--rb-slate-light); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: var(--rb-space-2);
  min-height: 44px; padding: 0 var(--rb-space-3);
  background: transparent; color: #fff; font-family: inherit; font-size: .95rem;
  font-weight: 600; border: 1.5px solid var(--rb-slate-light);
  border-radius: var(--rb-radius-md); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; content: "";
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

.site-nav { flex-basis: 100%; }
.site-nav ul { list-style: none; padding: 0; margin: 0; }
.nav-item { position: relative; }
.nav-top-link {
  display: block; color: #fff; text-decoration: none; font-weight: 600;
  padding: var(--rb-space-3) var(--rb-space-1); min-height: 44px;
  display: flex; align-items: center;
}
.nav-top-link:hover, .nav-top-link:focus-visible { color: #fff; }
.js .site-nav[hidden] { display: none; }

/* ---- submenu, mobile: an accordion inside the expanded nav ---- */
.nav-item { border-bottom: 1px solid var(--rb-dark-divider); }
.nav-item > .nav-sub-toggle {
  position: absolute; top: 0; right: 0; width: 48px; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--rb-slate-light); cursor: pointer;
}
.nav-sub-toggle .chev { width: 12px; height: 8px; transition: transform .18s ease; }
.nav-sub-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-sub { display: none; padding: 0 0 var(--rb-space-3); }
.nav-item.is-open > .nav-sub { display: block; }
.nav-sub-inner { display: flex; gap: var(--rb-space-3); }
.nav-sub-icon { display: none; }
.nav-sub ul { display: grid; gap: 2px; width: 100%; }
.nav-sub a {
  display: block; padding: var(--rb-space-2) var(--rb-space-3);
  color: var(--rb-dark-text-soft); text-decoration: none; border-radius: var(--rb-radius-md);
  border-left: 2px solid transparent;
}
.nav-sub a:hover, .nav-sub a:focus-visible { background: rgba(159,180,198,.12); color: #fff; }
.nav-sub a[aria-current="page"] { border-left-color: var(--rb-copper); color: #fff; }
.nav-sub-t { display: block; font-weight: 600; font-size: .9375rem; }
.nav-sub-d { display: block; font-size: .8125rem; color: var(--rb-slate-light); }

@media (min-width: 64rem) {
  .nav-toggle { display: none; }
  .site-nav { flex-basis: auto; }
  .js .site-nav[hidden] { display: block; }
  .nav-top { display: flex; gap: 2px; }
  .nav-item { border-bottom: 0; }
  .nav-top-link {
    border-bottom: 3px solid transparent; padding: var(--rb-space-2) var(--rb-space-3);
    font-size: .95rem; white-space: nowrap;
  }
  .nav-item.is-current > .nav-top-link { border-bottom-color: var(--rb-copper); }

  /* The toggle is a mobile affordance. On a pointer the panel opens on hover
     and on focus, so the keyboard path works without script. */
  .nav-item > .nav-sub-toggle {
    position: static; width: auto; min-height: 0; padding: 0 0 0 2px;
    pointer-events: none;
  }
  .nav-top-link { padding-right: var(--rb-space-2); }
  .nav-item { display: flex; align-items: center; }

  .nav-sub {
    display: block; position: absolute; top: 100%; left: 0; z-index: 70;
    min-width: 21rem; padding: 0;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
  }
  .nav-item:hover > .nav-sub,
  .nav-item:focus-within > .nav-sub,
  .nav-item.is-open > .nav-sub {
    opacity: 1; visibility: visible; transform: none;
  }
  .nav-sub-inner {
    background: var(--rb-panel); color: var(--rb-ink);
    border: 1px solid var(--rb-line); border-top: 3px solid var(--rb-copper);
    border-radius: 0 0 var(--rb-radius-lg) var(--rb-radius-lg);
    padding: var(--rb-space-4); margin-top: 3px;
    box-shadow: 0 12px 28px rgba(26, 36, 48, .16);
  }
  .nav-sub-icon {
    display: block; width: 26px; height: 26px; flex: none; color: var(--rb-slate);
    margin-top: 2px;
  }
  .nav-sub a { color: var(--rb-ink); border-left: 2px solid transparent; }
  .nav-sub a:hover, .nav-sub a:focus-visible { background: var(--rb-chalk-soft); color: var(--rb-ink); }
  .nav-sub a[aria-current="page"] { border-left-color: var(--rb-copper); background: var(--rb-chalk-soft); }
  .nav-sub-t { color: var(--rb-chalk); }
  .nav-sub a:hover .nav-sub-t { color: var(--rb-chalk-hover); }
  .nav-sub-d { color: var(--rb-muted); }
  /* The last two panels would run off the right edge. */
  .nav-item:nth-last-child(-n+2) > .nav-sub { left: auto; right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-sub { transition: none; }
  .nav-sub-toggle .chev { transition: none; }
}

/* ---------------------------------------------------------------- page */
.page { padding-block: 0 var(--rb-space-16); }
.page > .wrap:first-child { padding-top: var(--rb-space-8); }
.breadcrumb { margin-bottom: var(--rb-space-4); font-size: .875rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--rb-space-2); padding: 0; }
.breadcrumb li + li::before { content: "/"; color: var(--rb-muted); margin-right: var(--rb-space-2); }
.breadcrumb a { color: var(--rb-muted); }
.breadcrumb [aria-current] { color: var(--rb-ink); font-weight: 600; }

/* The poster opens every block with a mono label over a rule. Same device here:
   a ruler edge, the label, then the headline. */
.page-head { max-width: 52rem; padding-top: var(--rb-space-6); position: relative; }
.page-head::before {
  content: ""; display: block; height: 10px; margin-bottom: var(--rb-space-4);
  border-top: 1px solid var(--rb-line-strong);
  background-image: repeating-linear-gradient(
    to right, var(--rb-line-strong) 0 1px, transparent 1px 40px);
  background-size: 100% 6px; background-repeat: no-repeat; background-position: 0 0;
  max-width: 22rem;
}
.page-head h1 { margin-bottom: var(--rb-space-4); }
.eyebrow {
  font-family: var(--rb-font-mono); font-size: .6875rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--rb-copper-dark);
  margin-bottom: var(--rb-space-3); display: flex; align-items: center; gap: var(--rb-space-3);
}
.eyebrow::after {
  content: ""; flex: 1; height: 2px; background: var(--rb-chalk); max-width: 8rem;
}
.lead { font-size: 1.125rem; line-height: 1.5; color: var(--rb-ink); max-width: 44ch; }
@media (min-width: 48rem) { .lead { font-size: 1.3125rem; } }
.page-meta { margin-top: var(--rb-space-3); font-size: .8125rem; color: var(--rb-muted); }
.page-meta .data { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }

/* On an article the hero is a band, not a billboard: the reader came for the
   content and it should start on the first screen. Inside a masthead the image
   keeps its full 16:9, because it is the composition there. */
.hero-media { margin-block: var(--rb-space-8); border-radius: var(--rb-radius-lg); overflow: hidden;
  border-top: 3px solid var(--rb-copper); }
.hero-media img { width: 100%; display: block; }
.page > .wrap .hero-media img { aspect-ratio: 21 / 8; object-fit: cover; }
.masthead .hero-media { margin: 0; }

.page-layout { display: grid; gap: var(--rb-space-8); align-items: start; }
.page-layout > * { min-width: 0; }
@media (min-width: 64rem) {
  .has-aside .page-layout { grid-template-columns: minmax(0, 1fr) 20rem; }
}
.page-body > * + * { margin-top: var(--rb-space-4); }
.page-body > h2 {
  margin-top: var(--rb-space-16); padding-top: var(--rb-space-4);
  position: relative; border-top: 1px solid var(--rb-line);
}
.page-body > h2::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 3.5rem; height: 3px; background: var(--rb-chalk);
}
.page-body > h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.page-body > h2:first-child::before { display: none; }
.page-body > h3 { margin-top: var(--rb-space-8); }
.page-body > .table-wrap, .page-body > .callout, .page-body > .card-grid,
.page-body > .faq, .page-body > .benchmark-plate { margin-top: var(--rb-space-6); }
.page-body p, .page-body ul, .page-body ol { max-width: var(--rb-reading-max); }
.page-body ul, .page-body ol { padding-left: 1.25rem; }
.page-body li + li { margin-top: var(--rb-space-2); }

.page-aside { display: grid; gap: var(--rb-space-4); }
@media (min-width: 64rem) { .page-aside { position: sticky; top: var(--rb-space-4); } }

.toc {
  margin-block: var(--rb-space-6); padding: var(--rb-space-4);
  background: var(--rb-panel); border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg); max-width: var(--rb-reading-max);
}
.toc-h {
  font-family: var(--rb-font-mono); font-size: .6875rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rb-muted);
  margin-bottom: var(--rb-space-2);
}
.toc ul { list-style: none; padding: 0; display: grid; gap: var(--rb-space-1); }
.toc a { display: block; padding: var(--rb-space-1) 0; }

/* --------------------------------------------------------------- cards */
.card, .rb-card {
  background: var(--rb-panel); border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg); padding: var(--rb-space-6);
}
.card-grid { display: grid; gap: var(--rb-space-4); }
@media (min-width: 40rem) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card-grid > * { min-width: 0; }

.link-card {
  display: flex; flex-direction: column; gap: var(--rb-space-2);
  background: var(--rb-panel); border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg); padding: var(--rb-space-4) var(--rb-space-6);
  text-decoration: none; color: inherit;
}
.link-card:hover { border-color: var(--rb-line-strong); color: inherit; }
.link-card h3, .link-card .link-card-t {
  font-family: var(--rb-font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--rb-chalk);
}
.link-card:hover .link-card-t, .link-card:hover h3 { color: var(--rb-chalk-hover); }
.link-card p { color: var(--rb-muted); font-size: .9375rem; }
.link-card .data { color: var(--rb-ink); font-size: .875rem; }

/* --------------------------------------------------- benchmark plate */
.benchmark-plate {
  background: var(--rb-slate); color: #fff;
  border-radius: var(--rb-radius-lg); border-top: 3px solid var(--rb-copper);
  padding: var(--rb-space-6);
}
.plate-eyebrow {
  font-family: var(--rb-font-mono); font-size: .6875rem; font-weight: 600;
  letter-spacing: .14em; color: var(--rb-slate-light); text-transform: uppercase;
}
.plate-range {
  font-size: clamp(1.375rem, 5vw, 1.625rem); margin-top: var(--rb-space-2);
  line-height: 1.15; color: #fff;
}
.plate-loc { color: var(--rb-dark-text-soft); font-size: .875rem; }
.plate-kv {
  margin-top: var(--rb-space-4); padding-top: var(--rb-space-4);
  border-top: 1px solid var(--rb-dark-divider); display: grid; gap: var(--rb-space-2);
}
.plate-kv > div { display: flex; justify-content: space-between; gap: var(--rb-space-3); font-size: .875rem; }
.plate-kv dt { color: var(--rb-dark-text-soft); }
.plate-kv dd { color: #fff; font-size: .8125rem; }
.plate-badges { display: flex; flex-wrap: wrap; gap: var(--rb-space-2); margin-top: var(--rb-space-4); }
.plate-note {
  margin-top: var(--rb-space-4); font-size: .75rem; line-height: 1.5;
  color: var(--rb-dark-text-soft);
}

/* -------------------------------------------------------------- badges */
.badge {
  display: inline-block; font-size: .6875rem; font-weight: 600; letter-spacing: .06em;
  padding: 4px 10px; border-radius: var(--rb-radius-pill); border: 1px solid;
  font-family: var(--rb-font-mono);
}
.badge-hail { color: #7A4B00; border-color: #E4C88F; background: #FBF3E1; }
.badge-wind { color: #7A2E12; border-color: #EBB9A6; background: #FCEEE7; }
.badge-snow { color: #1C4E79; border-color: #B4CFE6; background: #E9F2FA; }
.badge-cool { color: #1E6B33; border-color: #B3D9BE; background: #E9F6ED; }
.badge-neutral { color: var(--rb-muted); border-color: var(--rb-line); background: #F5F7F8; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--rb-space-2);
  min-height: 44px; padding: var(--rb-space-3) var(--rb-space-6);
  font-family: var(--rb-font-body); font-size: 1rem; font-weight: 600;
  border-radius: 9px; border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; text-align: center;
}
.btn-primary { background: var(--rb-chalk); color: #fff; }
.btn-primary:hover { background: var(--rb-chalk-hover); color: #fff; }
.btn-primary:disabled { background: #AEC3E0; color: #fff; cursor: not-allowed; }
.btn-copper { background: var(--rb-copper-dark); color: #fff; }
.btn-copper:hover { background: var(--rb-copper-deep); color: #fff; }
.btn-secondary { background: var(--rb-panel); color: var(--rb-ink); border-color: var(--rb-line-strong); }
.btn-secondary:hover { background: var(--rb-zinc); color: var(--rb-ink); border-color: var(--rb-slate); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rb-space-3); }
.cta-sub { font-size: .875rem; color: var(--rb-muted); }

/* -------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; background: var(--rb-panel);
  border: 1px solid var(--rb-line); border-radius: var(--rb-radius-lg); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
caption {
  text-align: left; padding: var(--rb-space-4) var(--rb-space-4) 0;
  font-family: var(--rb-font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--rb-ink);
}
th {
  font-family: var(--rb-font-mono); font-size: .6875rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--rb-muted);
  text-align: left; padding: var(--rb-space-3) var(--rb-space-4);
  border-bottom: 2px solid var(--rb-line); white-space: nowrap;
}
td { padding: var(--rb-space-3) var(--rb-space-4); border-bottom: 1px solid var(--rb-line); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }
td.num { font-family: var(--rb-font-mono); font-weight: 600; font-variant-numeric: tabular-nums; font-size: .875rem; }
tfoot td {
  font-weight: 700; border-top: 2px solid var(--rb-ink); border-bottom: none;
  padding-block: var(--rb-space-4);
}
tfoot td.num { font-family: var(--rb-font-mono); }
.row-highlight { background: var(--rb-chalk-soft); }
.table-note { font-size: .8125rem; color: var(--rb-muted); margin-top: var(--rb-space-2); max-width: var(--rb-reading-max); }
.source-note { font-size: .8125rem; color: var(--rb-muted); max-width: var(--rb-reading-max); }

th[data-sort] .sort-btn {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  font: inherit; color: inherit; min-height: 32px;
}
th[data-sort] .sort-btn::after { content: "\2195"; opacity: .45; font-size: .9em; }
th[aria-sort="ascending"] .sort-btn::after { content: "\2191"; opacity: 1; }
th[aria-sort="descending"] .sort-btn::after { content: "\2193"; opacity: 1; }
th[aria-sort] { color: var(--rb-ink); }

.table-filter { padding: var(--rb-space-4) var(--rb-space-4) 0; }
.table-filter label {
  display: block; font-size: .8125rem; font-weight: 600; margin-bottom: var(--rb-space-1);
}
.table-filter input { max-width: 22rem; }
.table-empty { padding: var(--rb-space-4); color: var(--rb-muted); font-size: .9375rem; }

/* ------------------------------------------------------------ callouts */
.callout {
  border-radius: var(--rb-radius-lg); padding: var(--rb-space-4) var(--rb-space-6);
  max-width: var(--rb-reading-max);
}
.callout-title { font-weight: 600; margin-bottom: var(--rb-space-2); }
.callout p + p { margin-top: var(--rb-space-2); }
.callout-info { background: var(--rb-chalk-soft); border-left: 4px solid var(--rb-chalk); }
.callout-warning { background: #FBF3E1; border-left: 4px solid var(--rb-warning); }
.callout-local {
  background: var(--rb-panel); border: 1px solid var(--rb-line);
  border-top: 3px solid var(--rb-copper);
}
.callout-local .callout-title {
  font-family: var(--rb-font-mono); font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--rb-copper-dark);
}
.callout-benchmark { background: var(--rb-slate); color: #fff; }
.callout-benchmark .callout-title { color: #fff; }
.callout-benchmark a { color: #A8C6F0; }

.data-stamp {
  display: flex; flex-wrap: wrap; gap: var(--rb-space-2) var(--rb-space-3);
  align-items: baseline; font-size: .8125rem; color: var(--rb-muted);
  padding: var(--rb-space-3) var(--rb-space-4); background: #F5F7F8;
  border: 1px solid var(--rb-line); border-radius: var(--rb-radius-md);
  max-width: var(--rb-reading-max);
}
.data-stamp .data { font-size: .6875rem; letter-spacing: .1em; color: var(--rb-ink); }

/* ----------------------------------------------------------------- faq */
.faq { max-width: var(--rb-reading-max); display: grid; gap: var(--rb-space-2); }
.faq-item {
  background: var(--rb-panel); border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg);
}
.faq-item summary {
  cursor: pointer; padding: var(--rb-space-4) var(--rb-space-6);
  font-weight: 600; min-height: 44px; display: flex; align-items: center;
}
.faq-item summary::marker { color: var(--rb-chalk); }
.faq-body { padding: 0 var(--rb-space-6) var(--rb-space-4); }
.faq-body > * + * { margin-top: var(--rb-space-3); }

/* --------------------------------------------------------------- forms */
label.field-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: var(--rb-space-1); }
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; font-family: var(--rb-font-body); font-size: 1rem;
  color: var(--rb-ink); background: var(--rb-panel);
  border: 1.5px solid var(--rb-line-strong); border-radius: var(--rb-radius-md);
  min-height: 44px;
}
select { appearance: none; padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235C6B78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--rb-chalk); outline: none; box-shadow: 0 0 0 3px var(--rb-chalk-soft);
}
.field { margin-bottom: var(--rb-space-4); }
.field-hint { font-size: .8125rem; color: var(--rb-muted); margin-top: var(--rb-space-1); }
.field-error { font-size: .875rem; color: var(--rb-error); font-weight: 600; margin-top: var(--rb-space-1); }
.field-row { display: grid; gap: var(--rb-space-4); }
@media (min-width: 36rem) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field-row > * { min-width: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: var(--rb-space-3); padding: var(--rb-space-3) var(--rb-space-4);
  border-radius: var(--rb-radius-md); font-weight: 600; font-size: .9375rem; }
.form-status[data-state="ok"] { background: #E9F6ED; border: 1px solid #B3D9BE; color: #1E6B33; }
.form-status[data-state="error"] { background: #FCEEE7; border: 1px solid #EBB9A6; color: var(--rb-error); }

/* --------------------------------------------------------- option cards */
.option-grid { display: grid; gap: var(--rb-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 40rem) { .option-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .option-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.option-grid > * { min-width: 0; }
.opt {
  position: relative; display: block; background: var(--rb-panel);
  border: 1.5px solid var(--rb-line-strong); border-radius: var(--rb-radius-lg);
  padding: var(--rb-space-3); cursor: pointer; min-height: 44px;
}
.opt:hover { border-color: var(--rb-slate); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt:has(input:checked) { border-color: var(--rb-chalk); border-width: 2px; background: var(--rb-chalk-soft); padding: calc(var(--rb-space-3) - .5px); }
.opt:has(input:focus-visible) { outline: 3px solid var(--rb-chalk); outline-offset: 2px; }
.opt-t { font-weight: 600; font-size: .9375rem; display: block; }
.opt-d { font-size: .8125rem; color: var(--rb-muted); display: block; margin-top: 2px; }
.opt-m {
  font-family: var(--rb-font-mono); font-size: .75rem; font-weight: 600;
  color: var(--rb-chalk); display: block; margin-top: var(--rb-space-1);
}
.opt-viz { height: 34px; margin-bottom: var(--rb-space-1); }
.opt-viz polygon { fill: var(--rb-chalk-soft); stroke: var(--rb-chalk); stroke-width: 2; }
.opt:has(input:checked) .opt-viz polygon { fill: #fff; }

.check-row {
  display: flex; gap: var(--rb-space-3); align-items: flex-start;
  background: var(--rb-panel); border: 1.5px solid var(--rb-line-strong);
  border-radius: var(--rb-radius-lg); padding: var(--rb-space-3); margin-bottom: var(--rb-space-2);
  cursor: pointer;
}
.check-row input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--rb-chalk); }
.check-row:has(input:focus-visible) { outline: 3px solid var(--rb-chalk); outline-offset: 2px; }
.check-row .opt-t { display: block; }
.check-row .check-price {
  margin-left: auto; font-family: var(--rb-font-mono); font-size: .8125rem;
  font-weight: 600; color: var(--rb-chalk); white-space: nowrap;
}
.check-row.is-locked { background: #F5F8FB; border-color: var(--rb-line); cursor: default; }

/* --------------------------------------------------------------- misc */
.stat-row { display: grid; gap: var(--rb-space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 52rem) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--rb-panel); border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg); padding: var(--rb-space-4); min-width: 0; }
.stat dt { font-size: .8125rem; color: var(--rb-muted); }
.stat dd { font-family: var(--rb-font-mono); font-weight: 600; font-size: 1.25rem;
  font-variant-numeric: tabular-nums; margin-top: var(--rb-space-1); }

.trust-strip { display: flex; flex-wrap: wrap; gap: var(--rb-space-2) var(--rb-space-6);
  padding: 0; list-style: none; font-size: .9375rem; color: var(--rb-muted); }
.trust-strip li { display: flex; align-items: center; gap: var(--rb-space-2); }
.trust-strip li::before {
  content: ""; width: 13px; height: 9px; flex: none;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 9 L7 2 L13 9' fill='none' stroke='%2396592B' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

.section-dark {
  background: var(--rb-slate); color: #fff; border-radius: var(--rb-radius-lg);
  border-top: 3px solid var(--rb-copper); padding: var(--rb-space-8) var(--rb-space-6);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: var(--rb-dark-text-soft); }
.section-dark a { color: #A8C6F0; }
.section-dark > * + * { margin-top: var(--rb-space-4); }

.bar-chart { list-style: none; padding: 0; display: grid; gap: var(--rb-space-2); max-width: var(--rb-reading-max); }
.bar-chart li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; gap: var(--rb-space-3); align-items: center; font-size: .875rem; }
.bar-chart .bar-track { background: var(--rb-line); border-radius: var(--rb-radius-pill); height: 12px; min-width: 0; }
.bar-chart .bar-fill { background: var(--rb-chalk); border-radius: var(--rb-radius-pill); height: 100%; display: block; }
.bar-chart li.is-reference .bar-fill { background: var(--rb-copper-dark); }
.bar-chart .bar-value { font-family: var(--rb-font-mono); font-weight: 600; font-size: .8125rem; white-space: nowrap; }

/* -------------------------------------------------------------- footer */
.site-footer {
  background: var(--rb-slate); color: #fff;
  background-image:
    linear-gradient(to right, var(--rb-grid-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rb-grid-dark) 1px, transparent 1px);
  background-size: 40px 40px;
  padding-block: var(--rb-space-16) var(--rb-space-8);
  border-top: 3px solid var(--rb-copper);
}
.foot-grid { display: grid; gap: var(--rb-space-8); }
@media (min-width: 40rem) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .foot-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.foot-col { min-width: 0; }
.foot-col h2 {
  font-family: var(--rb-font-mono); font-size: .6875rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rb-slate-light);
  margin-bottom: var(--rb-space-3);
}
.foot-col ul { list-style: none; padding: 0; display: grid; gap: var(--rb-space-1); }
.foot-col a { color: var(--rb-dark-text-soft); text-decoration: none; font-size: .9375rem;
  display: block; padding-block: 6px; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
/* The poster closes on a full-bleed bar: mark, wordmark, tagline, then the
   version and period set right in mono. */
.foot-bar { margin-top: var(--rb-space-16); padding-top: var(--rb-space-6);
  border-top: 1px solid var(--rb-dark-divider); display: grid; gap: var(--rb-space-3); }
.foot-rule {
  height: 8px; margin-bottom: var(--rb-space-6);
  background-image: repeating-linear-gradient(
    to right, var(--rb-slate-light) 0 1px, transparent 1px 32px);
  opacity: .5;
}
.foot-tagline {
  font-family: var(--rb-font-display); font-weight: 600; font-size: 1.0625rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--rb-slate-light);
}
@media (min-width: 52rem) {
  .foot-bar { grid-template-columns: auto 1fr auto; align-items: center;
              gap: var(--rb-space-6); }
  .foot-brand { grid-row: 1; }
  .foot-tagline { grid-row: 1; }
  .foot-data { grid-row: 1; text-align: right; }
  .foot-legal, .foot-disclaimer { grid-column: 1 / -1; }
}
.foot-brand { display: flex; align-items: center; gap: var(--rb-space-2);
  font-family: var(--rb-font-display); font-weight: 700; font-size: 1.25rem; color: #fff; }
.foot-brand .logo-mark { width: 28px; height: 23px; }
.foot-brand > span > span { color: var(--rb-slate-light); }
.foot-data, .foot-legal { font-size: .8125rem; color: var(--rb-dark-text-soft); }
.foot-data .data { font-size: .6875rem; letter-spacing: .1em; }
.foot-data a, .foot-legal a { color: var(--rb-dark-text-soft); }
.foot-disclaimer { font-size: .75rem; color: var(--rb-slate-light); max-width: 46rem; line-height: 1.55; }

/* ------------------------------------------------------------- 404 */
.err-actions { display: flex; flex-wrap: wrap; gap: var(--rb-space-3); margin-top: var(--rb-space-6); }

/* ------------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .nav-toggle, .toc, .cta-row, .skip-link { display: none; }
  body { background: #fff; }
  .benchmark-plate, .section-dark, .callout-benchmark {
    background: #fff !important; color: #000 !important;
    border: 1px solid #232E38 !important;
  }
  .benchmark-plate *, .section-dark *, .callout-benchmark * { color: #000 !important; }
  .table-wrap { overflow: visible; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* =====================================================================
   Calculator
   The wizard is progressive enhancement. Without JavaScript the page
   renders every step as a plain stacked form plus a worked reference
   benchmark, so the content stays crawlable and usable.
   ===================================================================== */
.calc { display: grid; gap: var(--rb-space-6); align-items: start; margin-top: var(--rb-space-6); }
.calc > * { min-width: 0; }
@media (min-width: 64rem) { .calc { grid-template-columns: minmax(0, 1fr) 20rem; } }

.calc-main { background: var(--rb-panel); border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg); padding: var(--rb-space-6); }
.calc-step + .calc-step { margin-top: var(--rb-space-12); padding-top: var(--rb-space-8);
  border-top: 1px solid var(--rb-line); }
.js .calc-step[hidden] { display: none; }
.calc-step h2 { font-size: clamp(1.5rem, 4vw, 1.75rem); }
.calc-step > * + * { margin-top: var(--rb-space-4); }
.calc-step .step-sub { color: var(--rb-muted); font-size: .9375rem; max-width: 42rem; }
.calc-fieldset { border: 0; padding: 0; margin: 0; }
.calc-fieldset legend { font-weight: 600; font-size: .875rem; padding: 0; margin-bottom: var(--rb-space-2); }

/* Roofline stepper. The nodes follow a rising and falling roof line. */
.stepper { margin-bottom: var(--rb-space-6); }
.js .stepper { display: block; }
.stepper svg { width: 100%; height: auto; display: block; overflow: visible; }
.roofline { fill: none; stroke: var(--rb-line); stroke-width: 3; }
.roofline-done { fill: none; stroke: var(--rb-chalk); stroke-width: 3; stroke-linecap: round;
  transition: stroke-dashoffset .45s ease; }
.stepnode circle { fill: #fff; stroke: var(--rb-line-strong); stroke-width: 3; transition: .2s; }
.stepnode text { font-family: var(--rb-font-display); font-weight: 600; font-size: 13px; fill: var(--rb-muted); }
.stepnode .steplabel { font-family: var(--rb-font-body); font-size: 12px; fill: var(--rb-muted); }
.stepnode.is-done circle { stroke: var(--rb-chalk); fill: var(--rb-chalk); }
.stepnode.is-done .num { fill: #fff; }
.stepnode.is-active circle { stroke: var(--rb-chalk); fill: #fff; stroke-width: 4; }
.stepnode.is-active .num { fill: var(--rb-chalk); }
.stepnode.is-active .steplabel { fill: var(--rb-ink); font-weight: 600; }
.stepnode button { all: unset; }
.stepper a:focus-visible circle, .stepper button:focus-visible circle { stroke: var(--rb-chalk); }
.stepper-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--rb-space-2); }
.stepper-list a { font-size: .875rem; }
.js .stepper-list { display: none; }

.step-nav { display: flex; justify-content: space-between; gap: var(--rb-space-3);
  margin-top: var(--rb-space-8); flex-wrap: wrap; }
.js .calc-submit { display: none; }

/* Live benchmark plate, sticky rail on desktop, bottom bar on mobile */
.calc-rail { display: grid; gap: var(--rb-space-4); }
@media (min-width: 64rem) { .calc-rail { position: sticky; top: var(--rb-space-4); } }
@media (max-width: 63.99rem) {
  .js .calc-rail .benchmark-plate.is-docked {
    position: fixed; inset: auto 0 0 0; z-index: 40; border-radius: 0;
    padding: var(--rb-space-2) var(--rb-space-4); display: flex; align-items: center;
    gap: var(--rb-space-3); box-shadow: 0 -2px 12px rgba(26, 36, 48, .22);
  }
  .js .calc-rail .benchmark-plate.is-docked .plate-kv,
  .js .calc-rail .benchmark-plate.is-docked .plate-note,
  .js .calc-rail .benchmark-plate.is-docked .plate-badges { display: none; }
  .js .calc-rail .benchmark-plate.is-docked .plate-range {
    font-size: clamp(.9375rem, 4.2vw, 1.0625rem); margin: 0; white-space: nowrap;
    flex: 1 1 auto; min-width: 0;
  }
  .js .calc-rail .benchmark-plate.is-docked .plate-eyebrow {
    font-size: .5625rem; line-height: 1.25; flex: 0 0 auto; max-width: 4.5rem;
  }
  .js .calc-rail .benchmark-plate.is-docked .plate-loc {
    font-size: .6875rem; flex: 0 0 auto; text-align: right; white-space: nowrap;
  }
  .js .calc-rail .benchmark-plate.is-docked > div { display: contents; }
  .js body.has-docked-plate { padding-bottom: 76px; }
}

/* Material cards */
.mat-grid { display: grid; gap: var(--rb-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 46rem) { .mat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mat-grid > * { min-width: 0; }
.mat { position: relative; display: flex; flex-direction: column; gap: 3px;
  background: var(--rb-panel); border: 1.5px solid var(--rb-line-strong);
  border-radius: var(--rb-radius-lg); padding: var(--rb-space-3); cursor: pointer; }
.mat:hover { border-color: var(--rb-slate); }
.mat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mat:has(input:checked) { border-color: var(--rb-chalk); border-width: 2px;
  background: var(--rb-chalk-soft); padding: calc(var(--rb-space-3) - .5px); }
.mat:has(input:focus-visible) { outline: 3px solid var(--rb-chalk); outline-offset: 2px; }
.mat-swatch { height: 6px; border-radius: 3px; margin-bottom: 5px; }
.mat-name { font-weight: 600; font-size: .875rem; }
.mat-price { font-family: var(--rb-font-mono); font-weight: 600; font-size: .9375rem; }
.mat-life { font-size: .75rem; color: var(--rb-muted); }
.mat-flag { font-size: .75rem; font-weight: 600; margin-top: 2px; }
.mat-flag.is-good { color: var(--rb-good); }
.mat-flag.is-warn { color: var(--rb-warning); }

/* Tabs for the size step */
.calc-tabs { display: flex; border: 1.5px solid var(--rb-line-strong);
  border-radius: 9px; overflow: hidden; margin-bottom: var(--rb-space-4); }
.calc-tabs button { flex: 1; min-height: 44px; padding: var(--rb-space-2);
  background: var(--rb-panel); border: 0; border-right: 1.5px solid var(--rb-line-strong);
  font-family: inherit; font-size: .875rem; font-weight: 600; color: var(--rb-muted); cursor: pointer; }
.calc-tabs button:last-child { border-right: 0; }
.calc-tabs button[aria-selected="true"] { background: var(--rb-slate); color: #fff; }

/* Result */
.result-head { background: var(--rb-slate); color: #fff; border-radius: var(--rb-radius-lg);
  border-top: 3px solid var(--rb-copper); padding: var(--rb-space-8) var(--rb-space-6); }
.result-head .plate-eyebrow { color: var(--rb-slate-light); }
.result-big { font-family: var(--rb-font-mono); font-weight: 600;
  font-size: clamp(1.5rem, 7vw, 2.25rem); line-height: 1.1; margin: var(--rb-space-2) 0; }
.result-exp { color: var(--rb-dark-text-soft); font-size: 1.0625rem; }
.result-exp b { color: #fff; font-family: var(--rb-font-mono); }
.result-meta { display: grid; gap: var(--rb-space-4); margin-top: var(--rb-space-6);
  grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 46rem) { .result-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.result-meta div { min-width: 0; }
.result-meta dt { font-size: .8125rem; color: var(--rb-slate-light); }
.result-meta dd { font-family: var(--rb-font-mono); font-weight: 600; font-size: 1rem; color: #fff; }
.result-section { margin-top: var(--rb-space-8); }
.result-section > * + * { margin-top: var(--rb-space-4); }

/* Tool output is injected after load, so it carries its own rhythm. */
.tool-output > * + * { margin-top: var(--rb-space-6); }
.tool-output .source-note { margin-bottom: var(--rb-space-2); }
.tool-output h3 { margin-top: var(--rb-space-8); }
.tool-output .benchmark-plate { margin-top: var(--rb-space-4); }
.tool-output ul:not(.bar-chart) { padding-left: 1.25rem; max-width: var(--rb-reading-max); }
.tool-output ul:not(.bar-chart) li + li { margin-top: var(--rb-space-2); }
[data-tool] form + [data-output]:not([hidden]) {
  display: block; margin-top: var(--rb-space-8);
  padding-top: var(--rb-space-6); border-top: 1px solid var(--rb-line);
}
.toc a { padding: var(--rb-space-2) 0; }

/* Mobile body copy never drops below 16px. Card descriptions and the trust strip
   read as body copy rather than as captions, so they scale up on small screens
   and only tighten once there is room for them. */
@media (max-width: 47.99rem) {
  .link-card p, .trust-strip, .opt-d, .mat-life { font-size: 1rem; }
  .opt-d, .mat-life { line-height: 1.45; }
}

/* ---------------------------------------------------------- card thumbs */
/* A referring panel shows the hero of the page it points at, so arriving on
   that page is a recognition rather than a surprise. */
.link-card.has-thumb { padding: 0; overflow: hidden; gap: 0; }
.link-card-thumb { display: block; background: var(--rb-zinc); }
.link-card-thumb img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
}

/* A card whose destination has no photograph gets a drawn plate rather than an
   empty panel, on the same drafting ground as the masthead. It keeps the card
   the same shape as the ones beside it. */
.link-card-thumb.is-icon {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background-color: var(--rb-slate);
  background-image:
    linear-gradient(to right, rgba(159, 180, 198, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(159, 180, 198, .09) 1px, transparent 1px);
  background-size: 28px 28px;
}
.card-icon { width: 3.25rem; height: 3.25rem; color: var(--rb-slate-light); }
.link-card:hover .card-icon { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .card-icon { transition: color .15s ease; }
}

.link-card-body {
  display: flex; flex-direction: column; gap: var(--rb-space-2);
  padding: var(--rb-space-4) var(--rb-space-6) var(--rb-space-6);
}
.link-card.has-thumb:hover .link-card-thumb img { opacity: .92; }
@media (prefers-reduced-motion: no-preference) {
  .link-card-thumb img { transition: opacity .15s ease; }
}

/* =====================================================================
   Masthead
   The poster opens on a Slate field with the drafting grid, a mono label
   over a rule, and a large condensed headline. Product, hub and trust
   pages open the same way; article pages keep the light title block so
   the dark treatment stays a signal.
   ===================================================================== */
.masthead {
  background: var(--rb-slate); color: #fff;
  background-image:
    linear-gradient(to right, var(--rb-grid-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rb-grid-dark) 1px, transparent 1px);
  background-size: 40px 40px;
  border-bottom: 3px solid var(--rb-copper);
  margin-bottom: var(--rb-space-12);
  padding-block: var(--rb-space-8) var(--rb-space-12);
  position: relative; overflow: hidden;
}
/* A single roofline drawn into the field, as on the poster. Decorative only. */
/* The brand roofline drawn into the field, with its dimension node, exactly the
   device the poster uses behind the logo. Decorative, so it is not in the DOM. */
.masthead::after {
  content: ""; position: absolute; right: -4%; bottom: -12%;
  width: min(38rem, 54%); aspect-ratio: 1200 / 520; pointer-events: none; opacity: .28;
  background-repeat: no-repeat; background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 520' fill='none'%3E%3Cpath d='M180 470 L600 110 L1020 470' stroke='%239FB4C6' stroke-width='14' stroke-linejoin='round' opacity='.30'/%3E%3Cpath d='M180 470 L600 110' stroke='%235C93E0' stroke-width='5' opacity='.55'/%3E%3Cpath d='M600 110 V40' stroke='%235C93E0' stroke-width='3' stroke-dasharray='10 10' opacity='.5'/%3E%3Ccircle cx='600' cy='110' r='11' stroke='%235C93E0' stroke-width='4' opacity='.6'/%3E%3Cpath d='M600 110 V72' stroke='%23B0703C' stroke-width='4' opacity='.75'/%3E%3Cpath d='M120 500 H1080' stroke='%239FB4C6' stroke-width='2' opacity='.25'/%3E%3Cpath d='M180 500v-16M300 500v-9M420 500v-16M780 500v-16M900 500v-9M1020 500v-16' stroke='%239FB4C6' stroke-width='2' opacity='.25'/%3E%3C/svg%3E");
}
@media (max-width: 63.99rem) { .masthead::after { opacity: .3; } }
.masthead-inner { position: relative; z-index: 1; display: grid; gap: var(--rb-space-8); }
.masthead-inner > * { min-width: 0; }
@media (min-width: 64rem) {
  .masthead.has-media .masthead-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    align-items: center; gap: var(--rb-space-12);
  }
}
.masthead .page-head { max-width: 40rem; padding-top: 0; }
.masthead .page-head::before {
  border-top-color: var(--rb-slate-light);
  background-image: repeating-linear-gradient(
    to right, var(--rb-slate-light) 0 1px, transparent 1px 40px);
  opacity: .6;
}
.masthead h1 { color: #fff; }
.masthead .lead { color: var(--rb-dark-text-soft); }
.masthead .eyebrow { color: var(--rb-copper); }
.masthead .eyebrow::after { background: var(--rb-slate-light); opacity: .7; }
.masthead .page-meta { color: var(--rb-slate-light); }
.masthead .breadcrumb a { color: var(--rb-slate-light); }
.masthead .breadcrumb [aria-current] { color: #fff; }
.masthead .breadcrumb li + li::before { color: var(--rb-slate-light); }
.masthead-media { margin: 0; }
.masthead-media .hero-media {
  margin: 0; border: 1px solid rgba(159, 180, 198, .35);
  border-top: 3px solid var(--rb-copper); border-radius: var(--rb-radius-lg);
}
/* The state benchmark chart, drawn from the model in build/statevis.py.

   An inline SVG carries no intrinsic size: left alone it falls back to 300x150
   and can push the page sideways. It gets its width here, and a maximum, because
   text inside an SVG scales with the viewBox. Capping the drawing at 34rem holds
   the scale factor between 0.61 and 0.97, which is a narrow enough band that two
   label sizes cover every viewport. */
.statevis {
  display: block; width: 100%; height: auto; max-width: 34rem;
  border: 1px solid rgba(159, 180, 198, .35);
  border-top: 3px solid var(--rb-copper);
  border-radius: var(--rb-radius-lg);
  background: rgba(16, 24, 32, .32);
}
.statevis text { font-family: var(--rb-font-mono); font-weight: 500; }
.statevis .sv-mono { font-size: 21px; letter-spacing: .05em; }
@media (min-width: 34rem) { .statevis .sv-mono { font-size: 15px; } }

.page-state .masthead-plate { margin-top: var(--rb-space-8); }
@media (min-width: 64rem) {
  .page-state .masthead.has-media .masthead-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
    align-items: start;
  }
}

/* A dark masthead whose page has no photograph draws its own icon, on the same
   ground as the state chart, so the right hand column is never simply empty. */
.masthead-icon {
  display: grid; place-items: center; aspect-ratio: 16 / 9; max-width: 34rem;
  border: 1px solid rgba(159, 180, 198, .35);
  border-top: 3px solid var(--rb-copper);
  border-radius: var(--rb-radius-lg);
  background-color: rgba(16, 24, 32, .32);
  background-image:
    linear-gradient(to right, rgba(159, 180, 198, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(159, 180, 198, .09) 1px, transparent 1px);
  background-size: 32px 32px;
}
.masthead-icon-svg { width: 5.5rem; height: 5.5rem; color: var(--rb-slate-light); }

.page-home .masthead { padding-block: var(--rb-space-12) var(--rb-space-16); }

/* =====================================================================
   Drafting details
   ===================================================================== */
/* Crop marks in copper on the panels that carry a result. */
.benchmark-plate { position: relative; }
.benchmark-plate::before, .benchmark-plate::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--rb-copper); border-style: solid; opacity: .85;
}
.benchmark-plate::before { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.benchmark-plate::after { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }

/* Cards pick up a hairline top edge so a grid of them reads as a set. */
.link-card { position: relative; }
.link-card::before {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 3px;
  background: var(--rb-line-strong); opacity: 0; transition: opacity .15s ease;
  border-radius: var(--rb-radius-lg) var(--rb-radius-lg) 0 0;
}
.link-card:hover::before, .link-card:focus-visible::before {
  opacity: 1; background: var(--rb-chalk);
}
@media (prefers-reduced-motion: reduce) { .link-card::before { transition: none; } }

/* Icons */
.icon { width: 22px; height: 22px; flex: none; }
.icon path, .icon rect, .icon circle, .icon line { vector-effect: non-scaling-stroke; }

/* Stat blocks read as the poster's data plate. */
.stat {
  border-top: 3px solid var(--rb-chalk);
  border-radius: 0 0 var(--rb-radius-lg) var(--rb-radius-lg);
}
.stat dt {
  font-family: var(--rb-font-mono); font-size: .6875rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--rb-muted);
}
.stat dd { font-size: 1.5rem; letter-spacing: -.01em; }

/* Table captions get the mono label treatment from the poster. */
caption {
  font-family: var(--rb-font-mono); font-size: .75rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--rb-muted);
  padding-bottom: var(--rb-space-3);
}

/* The data stamp reads as a stamped label rather than a note. */
.data-stamp {
  border-left: 3px solid var(--rb-copper); border-radius: 0 var(--rb-radius-md) var(--rb-radius-md) 0;
  background: var(--rb-panel);
}

/* Trust strip ticks become drafting nodes. */


/* The poster's example benchmark box, set into the masthead field. */
.masthead-plate {
  margin-top: var(--rb-space-8); max-width: 30rem;
  border: 1px solid rgba(159, 180, 198, .4); border-radius: var(--rb-radius-md);
  background: rgba(20, 28, 37, .45); padding: var(--rb-space-4) var(--rb-space-6);
}
.masthead-plate .mp-label {
  font-family: var(--rb-font-mono); font-size: .625rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--rb-slate-light);
}
.masthead-plate .mp-spec { font-size: .8125rem; color: var(--rb-dark-text-soft);
  margin-top: 2px; }
.masthead-plate .mp-figure {
  display: flex; align-items: baseline; gap: var(--rb-space-3); flex-wrap: wrap;
  margin-top: var(--rb-space-3); padding-top: var(--rb-space-3);
  border-top: 1px solid rgba(159, 180, 198, .28);
}
.masthead-plate .mp-num {
  font-family: var(--rb-font-mono); font-weight: 600; color: #fff;
  font-size: clamp(1.375rem, 3.6vw, 1.75rem); font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.masthead-plate .mp-unit { font-family: var(--rb-font-mono); font-size: .75rem;
  color: var(--rb-slate-light); letter-spacing: .08em; }
.masthead-plate .mp-note { margin-left: auto; font-family: var(--rb-font-mono);
  font-size: .6875rem; color: var(--rb-slate-light); text-align: right; }

/* Mobile first corrections, measured at 375px rather than assumed.
   The footer link rows are separated by middots and sit at the text height, so
   their tap target was 16px. Padding lifts them past the 24px minimum without
   moving the rows apart visually. The plate label was 10px, which is too small
   to read comfortably on a phone even in uppercase mono. */
@media (max-width: 48rem) {
  .foot-legal a, .foot-data a { display: inline-block; padding-block: .3rem; }
  .masthead-plate .mp-label { font-size: .6875rem; }
}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
