/* ==========================================================================
   RIGCALC — design system (shared/global styles)
   Palette: asphalt black + brushed-steel gray + redline accent
   Type: Rajdhani (display / gauge), Inter (body), JetBrains Mono (data)
   Motif: dataplate results panel, diagonal hazard-stripe dividers

   Loaded on every page. Calculator-page-only rules live in calc.css,
   homepage-only rules live in home.css — split out so each page type only
   downloads the CSS it actually uses (Lighthouse "reduce unused CSS").
   ========================================================================== */

/* The hidden attribute must always win. A plain [hidden] rule is specificity
   (0,1,0), so any component rule that sets display — .footer-nav a is
   display:inline-block, for one — silently overrides it and renders an element
   the JS believes is hidden. That produced a visible "Cookie settings" link in
   the footer that did nothing, because the script had never revealed it. Any
   control that is hidden until a dependency is ready depends on this rule. */
[hidden] { display: none !important; }


/* Self-hosted fonts (formerly fonts.googleapis.com/fonts.gstatic.com) —
   latin subset only (U+0000-00FF covers en/es/fr/de/pt, incl. accents and
   ß); dropped the latin-ext subset since none of our locales need it.
   Inter and JetBrains Mono ship as variable fonts from Google, so one file
   covers several weights — multiple @font-face rules below intentionally
   point at the same file per family; the browser picks the right instance
   from the declared font-weight, and it's one HTTP request either way. */
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/rajdhani-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/rajdhani-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* color */
  --asphalt:       #16171a;
  --asphalt-700:   #212327;
  /* Darkened from #767c85 on 2026-08-18. That value is 3.68:1 on --panel-100
     and 4.09:1 on --chrome — both short of the 4.5:1 WCAG AA minimum — and it
     is used as TEXT in a dozen places (.eyebrow, .unit-note, field labels,
     .disclaimer, calc-tile copy), all of which were failing the axe check that
     Lighthouse runs. The .notfound-label rule further down already worked
     around this by reaching for --asphalt-700 instead; fixing the token fixes
     every other site at once rather than one rule at a time.
     #636871 measures 4.90:1 on --panel-100 and 5.45:1 on --chrome. It is also
     used for borders, where darkening is harmless. */
  --steel-600:     #636871;
  --steel-300:     #a7adb5;
  --panel-100:     #eef0f2;
  --panel-200:     #e2e5e8;
  --panel-300:     #cbd0d5;
  --chrome:        #fbfcfc;
  /* Three reds, by JOB rather than by shade — the accent has to satisfy two
     opposite contrast requirements and one value cannot do both.
       --redline-400  accent TEXT on a dark ground (header, dropdown, footer,
                      pressed toggles). redline-500 measures only 3.88:1 on
                      --asphalt, short of the 4.5:1 WCAG AA minimum; this is
                      5.18:1. Do not use it as a background.
       --redline-500  borders, rules, underlines, icon fills — anything that is
                      not text and not a text background. Unchanged, so the
                      brand accent a visitor sees on every divider is the same
                      colour it has always been.
       --redline-600  BACKGROUND behind --chrome text (.btn-primary, .stamp
                      .tag). redline-500 under chrome measured 4.48:1 — it
                      missed AA by 0.02 — while redline-600 is 5.87:1.
       --redline-700  hover for those backgrounds, since 600 is now the resting
                      state and hover has to stay distinguishable. */
  --redline-400:   #ec5568;
  --redline-500:   #e0293e;
  --redline-600:   #c01f32;
  --redline-700:   #a81a2b;
  --caution-600:   #d9432a;
  --ok-600:        #2f7a4f;
  --ink:           #16171a;

  /* type */
  --font-display: "Rajdhani", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* layout */
  --max-w: 1120px;
  --radius: 3px;
  --border: 1px solid var(--panel-300);
  --shadow-card: 0 1px 2px rgba(22,23,26,.08), 0 8px 24px rgba(22,23,26,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--panel-100);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--steel-600); }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.1;
  color: var(--asphalt);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 3.6vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.1rem; letter-spacing: .02em; }

p { margin: 0 0 1em; color: var(--asphalt-700); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

:focus-visible {
  outline: 3px solid var(--redline-500);
  outline-offset: 2px;
}

/* ---------------------------------- header --------------------------- */
.site-header {
  background: var(--asphalt);
  border-bottom: 4px solid var(--redline-500);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
}
.brand .mark {
  color: var(--chrome);
  background: var(--redline-500);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.brand .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand .word-main {
  font-family: var(--font-display);
  color: var(--chrome);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.brand .word-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--redline-400);
  margin-top: .2rem;
}

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a {
  color: var(--panel-200);
  text-decoration: none;
  font-size: .84rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--redline-400); }
.main-nav a.donate-link {
  background: var(--redline-500); color: var(--chrome) !important;
  padding: .4rem .9rem; border-radius: 3px;
}
.main-nav a.donate-link:hover { background: var(--chrome); color: var(--asphalt) !important; }
.nav-toggle { display: none; }

.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; user-select: none;
  color: var(--panel-200);
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: .84rem;
  display: flex; align-items: center; gap: .35rem;
  padding: .3rem 0;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: "▾"; font-size: .62rem; color: var(--steel-300); }
.nav-dropdown[open] summary::after { transform: rotate(180deg); }
.nav-dropdown summary:hover, .nav-dropdown[open] summary { color: var(--redline-400); }
.dropdown-panel {
  position: absolute; top: calc(100% + 16px); left: 50%; transform: translateX(-50%);
  background: var(--asphalt);
  border: 1px solid var(--asphalt-700); border-top: 3px solid var(--redline-500);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  display: flex; gap: 1.8rem; padding: 1.5rem 1.75rem;
  min-width: 420px; z-index: 60;
}
.dropdown-col { display: flex; flex-direction: column; min-width: 128px; }
.dropdown-label {
  font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--steel-300);
  margin: 0 0 .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--asphalt-700);
}
.dropdown-panel a { color: var(--panel-200); text-decoration: none; font-size: .9rem; padding: .32rem 0; }
.dropdown-panel a:hover, .dropdown-panel a[aria-current="page"] { color: var(--redline-400); font-weight: 600; }
/* Full-width row under the calculator columns, linking to the /calculators/
   hub. flex-basis:100% forces its own line; the panel must wrap to allow it. */
.dropdown-panel { flex-wrap: wrap; }
.dropdown-all {
  flex-basis: 100%; margin-top: .35rem; padding-top: .75rem;
  border-top: 1px solid var(--asphalt-700);
  font-family: var(--font-mono); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .07em;
}

/* --------------------------------- /calculators/ hub -------------------- */
.calc-hub { padding-bottom: 2rem; }
.calc-hub h2 { margin-top: 2rem; }
.hub-group {
  display: grid; gap: .6rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: .5rem;
}
/* Dark text: these sit on the light page background, not on the dark nav bar
   the dropdown colours were taken from. --panel-200 measured 1.11:1 here,
   effectively invisible. Asphalt is 15.69:1, and redline-600 is 5.28:1, so the
   accent is safe as hover text on this site (it is not on JoistCalc's amber). */
.hub-group a {
  color: var(--asphalt); text-decoration: none;
  padding: .5rem 0; border-bottom: 1px solid var(--panel-300);
}
.hub-group a:hover { color: var(--redline-600); border-bottom-color: var(--redline-600); }
.hub-group-intro { max-width: 62ch; color: var(--asphalt-700); margin: 0 0 1rem; }

/* --------------------------------- 404 page ----------------------------- */
.notfound { padding-bottom: 2rem; }
.notfound-actions {
  display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 2rem;
}
/* .btn-primary is width:100% by default — it is built for full-width form
   buttons inside calculator panels. Every other place it appears as a link
   overrides that the same way (.donate-banner, .donate-cta); match them. */
.notfound-actions .btn-primary {
  width: auto; padding: .8rem 1.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.6rem; border-radius: var(--radius);
  /* Dark on the light page background — --panel-200 measured 1.11:1 here.
     redline-600 is 5.28:1, so the accent is safe as hover text on this site. */
  border: 1px solid var(--steel-600); color: var(--asphalt);
  background: transparent; text-decoration: none;
  font-family: var(--font-display); font-size: .98rem;
  text-transform: uppercase; letter-spacing: .03em;
}
.btn-secondary:hover { border-color: var(--redline-600); color: var(--redline-600); }
.notfound-label {
  font-family: var(--font-mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em;
  /* Kept on --asphalt-700 deliberately. --steel-600 now clears AA as text
     (4.90:1 on --panel-100 since it was darkened — see the token), so this no
     longer *has* to avoid it, but --asphalt-700 is the stronger choice for a
     label this small and there is no reason to weaken it. */
  color: var(--asphalt-700); margin: 0 0 .5rem;
}
.notfound-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.notfound-links a { color: var(--asphalt); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--panel-300); }
.notfound-links a:hover { color: var(--redline-600); text-decoration-color: var(--redline-600); }

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle {
    display: inline-flex;
    background: none; border: 1px solid var(--steel-600);
    color: var(--chrome); border-radius: var(--radius);
    padding: .65rem .85rem; font-size: 1rem;
  }
  .main-nav.is-open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 84px; left: 0; right: 0;
    background: var(--asphalt); padding: 1rem 20px; gap: .9rem;
    border-bottom: 4px solid var(--redline-500);
    max-height: calc(100vh - 84px); overflow-y: auto;
  }
  .main-nav.is-open .nav-dropdown { width: 100%; }
  .dropdown-panel {
    position: static; transform: none; min-width: 0;
    background: transparent; border: none; box-shadow: none;
    flex-direction: column; gap: 1rem; padding: .9rem 0 .2rem 1rem;
  }
  .dropdown-label { color: var(--steel-300); border-bottom-color: var(--asphalt-700); }
  .dropdown-panel a { color: var(--panel-200); }
  .dropdown-panel a:hover, .dropdown-panel a[aria-current="page"] { color: var(--redline-400); }
}

/* --------------------------------- hero --------------------------------- */
.page-hero { padding: 2.25rem 0 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--steel-600); margin-bottom: .6rem;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--redline-500); }

.hazard-rule {
  border: none; height: 6px; margin: 1.5rem 0 2rem; border-radius: 2px;
  background: repeating-linear-gradient(
    -45deg,
    var(--asphalt), var(--asphalt) 10px,
    var(--redline-500) 10px, var(--redline-500) 20px
  );
  opacity: .9;
}

/* --------------------------------- buttons (used everywhere) ------------ */
.btn-primary {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; font-size: .98rem;
  background: var(--redline-600); color: var(--chrome);
  border: none; border-radius: var(--radius);
  padding: .85rem 1.2rem; width: 100%; cursor: pointer;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--redline-700); }

/* --------------------------------- footer -------------------------------- */
.site-footer {
  background: var(--asphalt); color: var(--steel-300);
  margin-top: 3rem; padding: 2.25rem 0;
  font-size: .82rem;
  border-top: 4px solid var(--redline-500);
}
.site-footer a { color: var(--panel-200); text-decoration: none; }
.site-footer a:hover { color: var(--redline-400); }

.footer-nav {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: .8rem;
  padding-bottom: 1.4rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--asphalt-700);
}
.footer-nav a { display: inline-block; padding: .3rem 0; }
.footer-nav a[aria-current="page"] { color: var(--redline-400); }

.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.footer-left { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.version-tag {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .04em; color: var(--steel-300);
  background: var(--asphalt-700); border: 1px solid var(--steel-600);
  border-radius: 3px; padding: .15rem .45rem; line-height: 1.4;
}

.disclaimer { font-size: .76rem; color: var(--steel-600); margin-top: .5rem; }

/* ------------------------------ static content pages ---------------------- */
.legal-content { max-width: 76ch; }
.legal-content h2 { margin-top: 2rem; }
.legal-content ul { color: var(--asphalt-700); padding-left: 1.2rem; }
.legal-content li { margin-bottom: .4rem; }
.updated-note { font-family: var(--font-mono); font-size: .78rem; color: var(--steel-600); margin-bottom: 1.5rem; }
.contact-card {
  background: var(--chrome); border: var(--border); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-card); max-width: 46ch;
}
.contact-card .value { font-family: var(--font-mono); font-size: 1.1rem; word-break: break-word; }
.legal-note {
  background: var(--panel-200); border: 1px solid var(--panel-300);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  font-size: .86rem; color: var(--asphalt-700); margin-bottom: 1.75rem;
}

/* ------------------------------ donate ---------------------------------- */
.donate-banner {
  background: var(--asphalt); color: var(--chrome);
  border-radius: var(--radius); border: 1px solid var(--asphalt-700);
  border-left: 4px solid var(--redline-500);
  padding: 1.75rem 2rem; margin: 2.25rem 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.donate-banner .copy { max-width: 56ch; }
.donate-banner h3 { color: var(--chrome); margin-bottom: .4rem; }
.donate-banner p { color: var(--steel-300); margin: 0; font-size: .92rem; }
.donate-banner .btn-primary { width: auto; padding: .8rem 1.6rem; flex-shrink: 0; }

.donate-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: 1.75rem 0; }
@media (max-width: 720px) { .donate-tiers { grid-template-columns: 1fr; } }
.donate-tier {
  background: var(--chrome); border: var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow-card);
}
.donate-tier .amount { font-family: var(--font-mono); font-weight: 700; font-size: 1.3rem; color: var(--asphalt); }
.donate-tier p { font-size: .88rem; margin: .5rem 0 0; }

.donate-cta {
  text-align: center; padding: 2rem; background: var(--chrome);
  border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card);
  margin: 1.75rem 0;
}
.donate-cta .btn-primary { width: auto; padding: .95rem 2.2rem; display: inline-block; text-decoration: none; }
.donate-cta p.hint { margin-top: .9rem; }

/* ------------------------------ cross-site promo -------------------------- */
.cross-promo {
  background: var(--panel-200); border: 1px dashed var(--panel-300);
  border-radius: var(--radius); padding: 1rem 1.5rem; margin: 2.25rem 0;
  text-align: center; font-size: .92rem; color: var(--asphalt-700);
}
.cross-promo a { font-weight: 700; color: var(--redline-600); text-decoration: none; }
.cross-promo a:hover { text-decoration: underline; }
.footer-crosslink {
  font-family: var(--font-mono); font-size: .78rem; color: var(--steel-300);
  margin: 0 0 1.1rem;
}
.footer-crosslink a { color: var(--panel-200); font-weight: 600; }
.footer-crosslink a:hover { color: var(--redline-400); }

/* ------------------------------ engagement: favorite stars (nav, every page) */
.fav-star {
  background: none; border: none; cursor: pointer; line-height: 1;
  font-size: 1rem; color: var(--steel-300); padding: .35rem;
  transition: color .12s ease, transform .12s ease;
}
.fav-star:hover { color: var(--redline-500); transform: scale(1.15); }
.fav-star.is-active { color: var(--redline-500); }
.nav-fav-row { display: flex; align-items: center; gap: .4rem; }
.nav-fav-row a { flex: 1; }

/* ------------------------------ engagement: Your Data panel (every page) -- */
.data-settings-overlay {
  position: fixed; inset: 0; background: rgba(22,23,26,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem; z-index: 200;
}
.data-settings-overlay[hidden] { display: none; }
.data-settings-panel {
  background: var(--chrome); border-radius: var(--radius);
  box-shadow: var(--shadow-card); max-width: 52ch; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 2rem;
  position: relative;
}
.data-settings-panel h2 { margin-bottom: 1rem; }
.data-settings-panel ul { color: var(--asphalt-700); padding-left: 1.2rem; }
.data-settings-panel li { margin-bottom: .4rem; font-size: .92rem; }
.data-settings-close {
  position: absolute; top: .7rem; right: .7rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--steel-600); padding: .5rem;
}
.data-settings-close:hover { color: var(--redline-500); }
.data-settings-summary {
  font-family: var(--font-mono); font-size: .8rem; background: var(--panel-200);
  border-radius: var(--radius); padding: .8rem 1rem; margin-top: 1.25rem;
}
.data-settings-actions { margin-top: 1.25rem; }
.data-settings-actions .btn-primary { width: auto; padding: .75rem 1.4rem; }

/* ------------------------------ print (small; not worth a 4th file) ------- */
@media print {
  .site-header, .site-footer, .calc-actions, .calc-card,
  .support, .donate-banner, .cross-promo, .hero-band, .data-settings-overlay { display: none !important; }
  .calc-layout { display: block; }
  .results-panel {
    position: static; background: var(--chrome); color: var(--ink);
    box-shadow: none; border: 1px solid #000;
  }
  .results-panel .eyebrow, .result-line .k { color: #444; }
  .result-line .v, .stamp .value, .stamp .label { color: #000; }
  .print-summary {
    display: block; margin-bottom: 1rem; padding-bottom: 1rem;
    border-bottom: 1px solid #000; font-size: .85rem;
  }
  .print-summary h3 { color: #000; margin-bottom: .2rem; }
  .print-summary div { display: flex; justify-content: space-between; gap: 1rem; }
}

/* ------------------------------------------------ breadcrumb trail ------- */
/* --steel-600, not --steel-300. The lighter token renders #a7adb5 on the
   --panel-100 page ground, which is 1.98:1 — nowhere near the 4.5:1 WCAG AA
   minimum, and the worst contrast failure on the site. --steel-600 is 4.90:1
   on the same ground and is already in the palette, so this stays inside the
   existing design rather than inventing a colour. Measured, not eyeballed. */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--steel-600);
  margin-bottom: .75rem;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
/* No opacity at all here, unlike the JoistCalc rule this mirrors.
   `opacity` composites against the page ground, and --steel-600 has less
   headroom on --panel-100 (4.90:1) than JoistCalc's --steel-600 does on its
   own ground (6.56:1) — so even .9 dropped this to 4.00:1 and kept failing.
   Distinguishing the current crumb by weight of colour instead of by fading
   it inverts nothing a reader relies on: the page you are on reads strongest,
   its ancestors stay muted, and --asphalt-700 clears AA with room to spare. */
.breadcrumb [aria-current="page"] { color: var(--asphalt-700); }
.breadcrumb-sep { opacity: .5; }

/* ---- Accessibility -------------------------------------------------------
   Skip link: visually hidden until focused, then pinned to the top-left. It
   is the first focusable thing on every page (injected by build-i18n.js), so
   a keyboard or screen-reader user can jump straight to the calculator
   instead of tabbing through the whole nav and the calculators dropdown on
   every page. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .65rem 1rem;
  background: var(--asphalt);
  color: var(--chrome);
  border-bottom: 3px solid var(--redline-500);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}
/* The skip target should not draw a focus ring when it receives programmatic
   focus from the skip link — the visible jump is the feedback. */
#main:focus {
  outline: none;
}

/* Respect the OS "reduce motion" setting. People who set it often do so
   because motion triggers nausea or migraine, so this is a real
   accessibility need rather than a preference. Durations are near-zero
   rather than zero so transitionend listeners still fire. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
