/* Toolbox Insider design system
   Mobile-first, system fonts only, no external requests, light and dark. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;

  --ink: #131a22;
  --ink-2: #3c4a5a;
  --ink-3: #61717f;
  --paper: #ffffff;
  --paper-2: #f5f6f4;
  --paper-3: #eceee9;
  --line: #dcdfd9;
  --line-2: #c6cabf;

  --accent: #b8480f;
  --accent-ink: #93380a;
  --accent-soft: #fdf1e8;
  --steel: #2c5470;
  --steel-soft: #eaf1f6;
  --green: #2f6b45;
  --green-soft: #e9f3ec;
  --amber-soft: #fdf5e0;
  --amber-ink: #7c5a10;
  --danger: #a32020;
  --danger-soft: #fbecec;
  --on-accent: #ffffff;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(19, 26, 34, .06), 0 1px 1px rgba(19, 26, 34, .04);
  --shadow-md: 0 4px 16px -6px rgba(19, 26, 34, .18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-head: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Semibold", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1180px;
  --measure: 43rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ecef;
    --ink-2: #b3bec8;
    --ink-3: #8b97a3;
    --paper: #12161c;
    --paper-2: #171d25;
    --paper-3: #1e252e;
    --line: #2b333d;
    --line-2: #3b444f;

    --accent: #ff8a4c;
    --accent-ink: #ffa876;
    --accent-soft: #2a1b12;
    --steel: #8fbcd9;
    --steel-soft: #16222c;
    --green: #7fc79b;
    --green-soft: #14231a;
    --amber-soft: #241f10;
    --amber-ink: #e3c37a;
    --danger: #ff8d8d;
    --danger-soft: #2a1618;
    --on-accent: #1b1005;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 6px 22px -8px rgba(0, 0, 0, .6);
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.35rem + 2.3vw, 2.95rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 1.2rem + .85vw, 1.85rem); margin-top: 2.4em; }
h3 { font-size: clamp(1.13rem, 1.05rem + .4vw, 1.3rem); margin-top: 2em; }
h4 { font-size: 1.02rem; margin-top: 1.6em; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
p, ul, ol, table, pre, blockquote { margin: 0 0 1.15em; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code { font-family: var(--font-mono); font-size: .87em; background: var(--paper-3); padding: .12em .35em; border-radius: 3px; }
pre { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow-x: auto; font-size: .9rem; }
pre code { background: none; padding: 0; }
small { font-size: .85em; }
strong { font-weight: 660; }
abbr[title] { text-decoration: underline dotted; cursor: help; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-bar { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 800; font-family: var(--font-head); font-size: 1.06rem; letter-spacing: -.02em; flex: 0 0 auto; }
.brand:hover { color: var(--accent-ink); }
.brand__mark { width: 26px; height: 26px; flex: 0 0 auto; color: var(--accent); }
.brand__name em { font-style: normal; color: var(--ink-3); font-weight: 600; }

.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: .45rem;
  background: var(--paper-2); border: 1px solid var(--line-2); color: var(--ink);
  font: inherit; font-size: .9rem; font-weight: 600; padding: .45rem .7rem; border-radius: var(--radius); cursor: pointer;
}
.nav-toggle svg { width: 16px; height: 16px; }
.site-nav { display: none; }
.site-nav[data-open="true"] { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0 0 .9rem; display: grid; gap: 1px; }
.site-nav a {
  display: block; padding: .68rem .3rem; text-decoration: none; color: var(--ink-2);
  font-weight: 600; font-size: .96rem; border-bottom: 1px solid var(--line);
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--accent-ink); }

@media (min-width: 62rem) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; margin-left: auto; }
  .site-nav ul { display: flex; gap: .15rem; padding: 0; }
  .site-nav a {
    border-bottom: 0; padding: .45rem .6rem; border-radius: var(--radius); font-size: .885rem; letter-spacing: -.01em;
  }
  .site-nav a:hover { background: var(--paper-2); }
  .site-nav a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); }
}

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .82rem; color: var(--ink-3); padding: 1rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.crumbs li::after { content: "›"; margin-left: .35rem; color: var(--line-2); }
.crumbs li:last-child::after { content: none; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- article ---------- */
.page { padding-bottom: 4rem; }
.article-head { padding: 1.25rem 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-ink); text-decoration: none; margin-bottom: .7rem;
}
.eyebrow:hover { text-decoration: underline; }
.article-head h1 { max-width: 22ch; margin-bottom: .55rem; }
.standfirst { font-size: 1.15rem; line-height: 1.55; color: var(--ink-2); max-width: var(--measure); margin: 0 0 1.1rem; }
.byline {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center;
  font-size: .82rem; color: var(--ink-3); margin: 0;
}
.byline__item { display: inline-flex; align-items: center; gap: .35rem; }
.byline svg { width: 14px; height: 14px; opacity: .75; }
.byline a { color: var(--ink-3); }

.layout { display: block; }
@media (min-width: 66rem) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 3.25rem; align-items: start; }
  .layout > .sidebar { position: sticky; top: 4.75rem; }
}

.prose { max-width: var(--measure); font-size: 1.075rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { scroll-margin-top: 5rem; padding-top: .35rem; }
.prose h3 { scroll-margin-top: 5rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-bottom: .45em; }
.prose li > ul, .prose li > ol { margin-top: .45em; margin-bottom: .2em; }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: .2rem 0 .2rem 1.1rem; margin-left: 0;
  color: var(--ink-2); font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* answer block */
.answer {
  border: 1px solid var(--line-2); border-left: 4px solid var(--accent);
  background: var(--paper-2); border-radius: var(--radius);
  padding: 1.05rem 1.2rem; margin: 0 0 2rem; max-width: var(--measure);
}
.answer p:last-child { margin-bottom: 0; }
.answer__label {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 .3rem;
}
.answer p:not(.answer__label) { font-size: 1.06rem; line-height: 1.6; }

/* takeaways */
.takeaways {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper-2);
  padding: 1.1rem 1.25rem; margin: 0 0 2rem; max-width: var(--measure);
}
.takeaways h2 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .7rem; color: var(--ink-3); }
.takeaways ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.takeaways li { position: relative; padding-left: 1.6rem; font-size: .98rem; line-height: 1.5; }
.takeaways li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem;
  border: 2px solid var(--accent); border-radius: 2px;
}

/* callouts */
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--ink-3);
  border-radius: var(--radius); padding: .95rem 1.1rem; margin: 1.6rem 0; background: var(--paper-2);
}
.callout > :last-child { margin-bottom: 0; }
.callout__label {
  font-size: .7rem !important; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  margin: 0 0 .4rem !important; color: var(--ink-3);
}
.callout p, .callout li { font-size: .98rem; }
.callout--key { border-left-color: var(--accent); background: var(--accent-soft); }
.callout--key .callout__label { color: var(--accent-ink); }
.callout--snippet { border-left-color: var(--steel); background: var(--steel-soft); }
.callout--snippet .callout__label { color: var(--steel); }
.callout--tip, .callout--method { border-left-color: var(--green); background: var(--green-soft); }
.callout--tip .callout__label, .callout--method .callout__label { color: var(--green); }
.callout--warn { border-left-color: var(--danger); background: var(--danger-soft); }
.callout--warn .callout__label { color: var(--danger); }
.callout--spec, .callout--data, .callout--money { border-left-color: var(--amber-ink); background: var(--amber-soft); }
.callout--spec .callout__label, .callout--data .callout__label, .callout--money .callout__label { color: var(--amber-ink); }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.table-wrap:focus-visible { outline: 3px solid var(--accent); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: 0; }
thead th {
  background: var(--paper-3); text-align: left; font-family: var(--font-head); font-weight: 700;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2);
  padding: .65rem .75rem; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
tbody td { padding: .62rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--paper-2); background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
.ta-right { text-align: right; font-variant-numeric: tabular-nums; }
.ta-center { text-align: center; }

@media (max-width: 40rem) {
  .table-wrap { border: 0; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-wrap tr {
    border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; padding: .3rem .1rem; background: var(--paper);
  }
  .table-wrap tbody tr:nth-child(even) { background: var(--paper-2); }
  .table-wrap td { border: 0; padding: .35rem .8rem; text-align: left !important; }
  .table-wrap td::before {
    content: attr(data-label); display: block;
    font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
  }
  .table-wrap td:empty { display: none; }
}

/* ---------- table of contents ---------- */
.toc { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper-2); padding: 1rem 1.1rem; margin-bottom: 1.75rem; }
.toc > summary {
  font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3); cursor: pointer; list-style: none;
}
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after { content: " +"; font-family: var(--font-mono); }
.toc[open] > summary::after { content: " −"; }
.toc ol { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .1rem; counter-reset: toc; }
.toc li a {
  display: block; padding: .28rem 0; font-size: .9rem; color: var(--ink-2); text-decoration: none; line-height: 1.4;
}
.toc li a:hover { color: var(--accent-ink); text-decoration: underline; }
.toc li.lvl-3 a { padding-left: 1rem; font-size: .855rem; color: var(--ink-3); }
@media (min-width: 66rem) {
  .toc { position: static; }
  .sidebar .toc > summary { pointer-events: none; }
}

/* ---------- sidebar cards ---------- */
.sidebar { display: grid; gap: 1.5rem; font-size: .92rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.1rem; background: var(--paper); }
.card h2, .card h3 {
  font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .7rem;
}
.card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.card li a { text-decoration: none; color: var(--ink); font-weight: 550; line-height: 1.35; display: block; }
.card li a:hover { color: var(--accent-ink); text-decoration: underline; }
.card--accent { background: var(--accent-soft); border-color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }

/* ---------- faq ---------- */
.faq { margin: 3rem 0 0; max-width: var(--measure); }
.faq h2 { margin-top: 0; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-of-type { border-top: 1px solid var(--line); }
.faq__item > summary {
  cursor: pointer; padding: .95rem 1.8rem .95rem 0; font-weight: 650; font-family: var(--font-head);
  font-size: 1.02rem; line-height: 1.4; list-style: none; position: relative;
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
  content: "+"; position: absolute; right: .2rem; top: .85rem; font-family: var(--font-mono);
  font-size: 1.25rem; color: var(--accent); line-height: 1;
}
.faq__item[open] > summary::after { content: "−"; }
.faq__item > summary:hover { color: var(--accent-ink); }
.faq__answer { padding: 0 0 1.1rem; color: var(--ink-2); }
.faq__answer > :last-child { margin-bottom: 0; }

/* ---------- sources ---------- */
.sources { margin: 3rem 0 0; max-width: var(--measure); }
.sources ol { padding-left: 1.3rem; font-size: .92rem; color: var(--ink-2); }
.sources li { margin-bottom: .6rem; }
.sources .note { color: var(--ink-3); }

/* ---------- related ---------- */
.related { margin: 3.25rem 0 0; }
.related h2 { margin-top: 0; font-size: 1.15rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 34rem) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 48rem) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.tile {
  display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.05rem 1.15rem;
  background: var(--paper); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tile:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tile__kicker { font-size: .69rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); }
.tile__title { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; line-height: 1.32; margin: 0; letter-spacing: -.01em; }
.tile:hover .tile__title { color: var(--accent-ink); }
.tile__desc { font-size: .9rem; color: var(--ink-2); line-height: 1.45; margin: 0; }
.tile__meta { font-size: .76rem; color: var(--ink-3); margin: .15rem 0 0; }

/* ---------- home ---------- */
.hero { padding: 2.75rem 0 2.25rem; border-bottom: 1px solid var(--line); }
.hero__inner { max-width: 46rem; }
.hero h1 { margin-bottom: .7rem; }
.hero p { font-size: 1.16rem; line-height: 1.55; color: var(--ink-2); max-width: 38rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-head); font-weight: 650; font-size: .95rem;
  text-decoration: none; padding: .62rem 1.05rem; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-ink); color: var(--on-accent); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); background: var(--paper); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

.section { padding: 3rem 0 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.35rem; }
.section__head h2 { margin: 0; font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); }
.section__head p { margin: 0; color: var(--ink-3); font-size: .92rem; max-width: 40rem; }
.section__more { font-size: .88rem; font-weight: 600; white-space: nowrap; }

.cluster-card {
  display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem 1.25rem 1.3rem; background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.cluster-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.cluster-card__icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: .15rem; }
.cluster-card h3 { font-size: 1.08rem; margin: 0; letter-spacing: -.015em; }
.cluster-card p { font-size: .91rem; color: var(--ink-2); margin: 0; line-height: 1.45; }
.cluster-card__count { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; margin-top: .3rem; }

.stat-row { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 48rem) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--paper); padding: 1.1rem 1.15rem; }
.stat__num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--accent-ink); letter-spacing: -.02em; line-height: 1.1; }
.stat__label { font-size: .82rem; color: var(--ink-3); line-height: 1.35; margin-top: .2rem; }

/* ---------- hub ---------- */
.hub-head { padding: 1.5rem 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2.25rem; }
.hub-head h1 { max-width: 20ch; }
.hub-head .standfirst { font-size: 1.18rem; }
.hub-intro { max-width: var(--measure); color: var(--ink-2); font-size: 1.05rem; }

/* ---------- tools / calculators ---------- */
.calc {
  border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--paper-2);
  padding: 1.25rem 1.3rem 1.4rem; margin: 0 0 2rem;
}
.calc h2 { margin-top: 0; font-size: 1.1rem; }
.calc__grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .calc__grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 44rem) { .calc__grid--3 { grid-template-columns: repeat(3, 1fr); } }
.field { display: grid; gap: .3rem; }
.field label { font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: .77rem; color: var(--ink-3); line-height: 1.35; }
.field input, .field select {
  font: inherit; font-size: 1rem; padding: .55rem .65rem; border: 1px solid var(--line-2);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; min-height: 2.75rem;
}
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.calc__out {
  margin-top: 1.3rem; border-top: 1px solid var(--line-2); padding-top: 1.1rem;
}
.result-row { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .result-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 50rem) { .result-row--3 { grid-template-columns: repeat(3, 1fr); } }
.result {
  border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: .8rem .9rem;
}
.result__label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.result__value { font-family: var(--font-head); font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.result__note { font-size: .8rem; color: var(--ink-3); line-height: 1.35; margin-top: .15rem; }
.verdict { border-radius: var(--radius); padding: .85rem 1rem; font-size: .96rem; margin-top: 1rem; border: 1px solid var(--line); }
.verdict--ok { background: var(--green-soft); border-color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.verdict--warn { background: var(--amber-soft); border-color: var(--amber-ink); border-color: color-mix(in srgb, var(--amber-ink) 35%, transparent); }
.verdict--bad { background: var(--danger-soft); border-color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.verdict strong { display: block; margin-bottom: .2rem; }
.calc__noscript { border: 1px dashed var(--line-2); padding: .9rem 1rem; border-radius: var(--radius); font-size: .92rem; color: var(--ink-2); }
.bar { height: .5rem; background: var(--paper-3); border-radius: 99px; overflow: hidden; margin-top: .45rem; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .2s ease; }

/* ---------- glossary ---------- */
.gloss-filter { position: sticky; top: 3.85rem; z-index: 20; background: var(--paper); padding: 1rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.gloss-letters { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .75rem; }
.gloss-letters a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; padding: 0 .35rem;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-size: .84rem; font-weight: 650; color: var(--ink-2);
}
.gloss-letters a:hover { border-color: var(--accent); color: var(--accent-ink); }
.gloss-group { margin-bottom: 2.25rem; }
.gloss-group h2 { margin-top: 0; scroll-margin-top: 8rem; border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: .15rem; }
.gloss-list { display: grid; gap: 1rem; }
.gloss-item { border-bottom: 1px solid var(--line); padding-bottom: 1rem; scroll-margin-top: 8rem; }
.gloss-item h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.gloss-item p { margin: 0 0 .35rem; color: var(--ink-2); font-size: .97rem; }
.gloss-item .aka { font-size: .82rem; color: var(--ink-3); font-style: italic; }
.gloss-item .see { font-size: .82rem; color: var(--ink-3); }
.gloss-item .see a { color: var(--ink-2); }
.tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: var(--paper-3); color: var(--ink-2); padding: .12rem .4rem; border-radius: 3px; vertical-align: .1em;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 2.75rem 0 2rem; margin-top: 4rem; font-size: .92rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 44rem) { .footer-grid { grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2.5rem; } }
.footer-brand p { color: var(--ink-3); font-size: .89rem; max-width: 26rem; margin: .6rem 0 0; line-height: 1.5; }
.site-footer h2 { font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-legal {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--ink-3); font-size: .82rem;
}

/* ---------- misc ---------- */
.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; }
.updated-note { font-size: .82rem; color: var(--ink-3); border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1rem; max-width: var(--measure); }
.notice { border: 1px solid var(--line-2); background: var(--paper-2); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; margin: 2rem 0; max-width: var(--measure); }
.notice > :last-child { margin-bottom: 0; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: var(--measure); line-height: 1.55; }
.center-narrow { max-width: 34rem; margin-inline: auto; text-align: center; padding: 3rem 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; }
.pill {
  font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 99px; padding: .3rem .75rem; background: var(--paper);
}
.pill:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---------- technical diagrams ---------- */
.figure { margin: 2rem 0; max-width: var(--measure); }
.prose .figure { max-width: none; }
.figure svg.dgm {
  width: 100%; height: auto; display: block;
  background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: .5rem;
  color: var(--ink-2);
}
.figure figcaption {
  font-size: .87rem; line-height: 1.5; color: var(--ink-2);
  margin-top: .65rem; padding-left: .9rem; border-left: 2px solid var(--accent);
}
.figure figcaption strong { color: var(--ink); }
.figure__note { display: block; color: var(--ink-3); margin-top: .2rem; }

.dgm text { fill: currentColor; }
.dgm-lbl { font: 600 12px var(--font-head); fill: var(--ink-2); }
.dgm-lbl-lg { font: 700 13px var(--font-head); fill: var(--ink); }
.dgm-lbl-sm { font: 500 11px var(--font-head); fill: var(--ink-3); }
.dgm-lbl-em { font: 700 12px var(--font-head); fill: var(--accent-ink); }
.dgm-big { font: 800 46px var(--font-head); fill: var(--ink); letter-spacing: .08em; }

.dgm-solid { fill: var(--ink-3); opacity: .55; }
.dgm-solid-2 { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dgm-solid-line { fill: none; stroke: var(--ink-3); stroke-width: 2; }
.dgm-part-a { fill: color-mix(in srgb, var(--steel) 22%, transparent); stroke: var(--steel); stroke-width: 1.5; }
.dgm-part-b { fill: color-mix(in srgb, var(--accent) 20%, transparent); stroke: var(--accent); stroke-width: 1.5; }
.dgm-part-c { fill: color-mix(in srgb, var(--green) 22%, transparent); stroke: var(--green); stroke-width: 1.5; }
.dgm-part-d { fill: color-mix(in srgb, var(--ink-3) 12%, transparent); stroke: var(--line-2); stroke-width: 1.5; }
.dgm-part-e { fill: color-mix(in srgb, var(--ink-2) 30%, transparent); stroke: var(--ink-2); stroke-width: 1.5; }
.dgm-ball circle { fill: var(--accent); stroke: var(--accent-ink); stroke-width: 1; }
.dgm-arrow path { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.dgm-dim path { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.dgm-foam rect { fill: color-mix(in srgb, var(--steel) 14%, transparent); stroke: var(--steel); stroke-width: .8; }
.dgm-void { fill: var(--paper); }
.dgm-void rect, .dgm-void circle { fill: var(--paper); stroke: var(--line-2); stroke-width: 1; }
.dgm-pivot { fill: var(--danger); }
.dgm-cg circle { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.dgm-cg path { stroke: var(--ink); stroke-width: 1.6; }
.dgm-hook { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dgm-stress { fill: none; stroke: var(--danger); stroke-width: 2.4; }
.dgm-fastener { stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; }
.dgm-axis { fill: none; stroke: var(--ink-2); stroke-width: 1.6; }
.dgm-grid path { fill: none; stroke: var(--line); stroke-width: 1; }
.dgm-band { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.dgm-curve { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }
.dgm-pt { fill: var(--accent-ink); }
.dgm-bar-a rect { fill: color-mix(in srgb, var(--steel) 45%, transparent); }
.dgm-bar-b rect { fill: var(--accent); }
.dgm-fp rect { fill: none; stroke: var(--steel); stroke-width: 2; }
.dgm-fp--b rect { stroke: var(--accent); }
.dgm-fp--c rect { stroke: var(--green); stroke-dasharray: 6 4; }
.dgm-fp--d rect { stroke: var(--ink-3); stroke-dasharray: 2 3; }

/* ---------- questions index ---------- */
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.qlist li { background: var(--paper); padding: .8rem 1rem; display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline; justify-content: space-between; }
.qlist li:hover { background: var(--paper-2); }
.qlist a { font-weight: 600; text-decoration: none; color: var(--ink); flex: 1 1 22rem; line-height: 1.4; }
.qlist a:hover { color: var(--accent-ink); text-decoration: underline; }
.qlist__src { font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 34rem) { .qlist__src { white-space: normal; } }

/* ---------- sequential cluster navigation ---------- */
.seq { display: grid; gap: 1rem; margin: 2.5rem 0 0; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .seq { grid-template-columns: 1fr 1fr; } }
.seq__link {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .9rem 1.05rem;
  background: var(--paper); transition: border-color .15s;
}
.seq__link:hover { border-color: var(--accent); }
.seq__link--next { text-align: right; }
.seq__dir { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .25rem; }
.seq__link--prev .seq__dir::before { content: "\2190  "; }
.seq__link--next .seq__dir::after { content: "  \2192"; }
.seq__title { font-family: var(--font-head); font-weight: 650; font-size: .98rem; line-height: 1.35; }
.seq__link:hover .seq__title { color: var(--accent-ink); }

/* ---------- sortable table headers ---------- */
.th-sort {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem; text-align: inherit;
}
.th-sort:hover { color: var(--accent-ink); }
.th-sort span { opacity: .45; font-size: .9em; }
th[aria-sort] .th-sort span { opacity: 1; color: var(--accent-ink); }

/* dataset caveats under a row label */
.row-note { display: block; font-size: .78rem; color: var(--ink-3); line-height: 1.4; margin-top: .3rem; max-width: 34rem; }

/* ---------- header search ---------- */
.header-search {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none; color: var(--ink-2); font-family: var(--font-head);
  font-weight: 650; font-size: .875rem; padding: .42rem .7rem;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--paper);
}
.header-search:hover { border-color: var(--accent); color: var(--accent-ink); }
.header-search svg { width: 15px; height: 15px; }
.nav-toggle { margin-left: .5rem; }
@media (min-width: 62rem) {
  .site-nav { margin-left: auto; order: 2; }
  .header-search { margin-left: .6rem; order: 3; }
}
@media (max-width: 24rem) {
  .header-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
