:root {
  color-scheme: light;
  --paper: #f3f2ec;
  --surface: #fcfcf8;
  --recess: #eaeae2;
  --ink: #172124;
  --muted: #4f5a5d;
  --line: #cdd0c9;
  --hairline: #e0e2dc;
  --strong-line: #aeb5af;
  --blue: #1e3a8a;
  --vector: #2563eb;
  --blue-wash: #e8edf9;
  --bronze: #b45309;
  --vermilion: #c2410c;
  --hot-wash: #f9eadd;
  --green: #2e645a;
  --green-wash: #e4efea;
  --axis: #7e8b8e;
  --metal: #e0e5e3;
  --shape: #f3f4ef;
  --bolt: #c7d1d8;
  --on-blue: #fff;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #182126;
  --surface: #202a30;
  --recess: #192328;
  --ink: #f2f4f0;
  --muted: #bdc7c9;
  --line: #48564f;
  --hairline: #36434a;
  --strong-line: #708086;
  --blue: #b5ccff;
  --vector: #84aaff;
  --blue-wash: #2a3c63;
  --bronze: #f8b068;
  --vermilion: #ffa385;
  --hot-wash: #4a3029;
  --green: #a4d8c5;
  --green-wash: #27443e;
  --axis: #97a6a9;
  --metal: #38464e;
  --shape: #2b373d;
  --bolt: #4a5d69;
  --on-blue: #16213d;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.25rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--sans); }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: var(--blue); text-underline-offset: .19em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--vector); outline-offset: 3px; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.09; }
h1, h2, h3 { letter-spacing: -.035em; }
p + p { margin-top: .7rem; }
svg { display: block; }
.shell { width: min(100% - 5.5rem, 82rem); margin-inline: auto; }
.skip-link { position: absolute; inset: 1rem auto auto 1rem; z-index: 10; transform: translateY(-200%);
  background: var(--surface); padding: .5rem .75rem; }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--strong-line); }
.site-nav { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.19rem; font-weight: 750;
  letter-spacing: -.045em; color: var(--ink); white-space: nowrap; text-decoration: none; min-height: 44px; }
.brand svg, .lost-mark svg { width: 2rem; color: var(--blue); flex: none; }
.brand span span { color: var(--blue); }
.desktop-nav, .nav-controls { display: flex; align-items: center; gap: 1.6rem; }
.desktop-nav a { display: grid; place-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 550; }
.desktop-nav a:hover { color: var(--blue); text-decoration: underline; }
.nav-controls { gap: .55rem; }
.theme-button, .mobile-menu summary { min-height: 42px; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 2px; font-size: .875rem; font-weight: 650; padding: .45rem .68rem; }
.theme-button { display: flex; align-items: center; gap: .4rem; }
.theme-button:hover, .mobile-menu summary:hover { background: var(--blue-wash); }
.theme-icon { height: .8rem; width: .8rem; border: 1px solid currentColor; border-radius: 50%;
  background: linear-gradient(90deg, transparent 50%, currentColor 50%); }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .45rem; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after, .select-wrap::after { content: ""; display: block; width: .44rem; height: .44rem;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.mobile-menu nav { z-index: 3; position: absolute; right: 0; top: calc(100% + .55rem); width: min(17rem, 80vw);
  background: var(--surface); border: 1px solid var(--strong-line); padding: .3rem; box-shadow: 0 11px 24px #151c2522;
  max-height: min(70vh, 30rem); overflow: auto; }
.mobile-menu nav a { display: flex; min-height: 42px; align-items: center; padding: .4rem .6rem;
  text-decoration: none; font-size: .9rem; color: var(--ink); }
.mobile-menu nav a:hover { background: var(--blue-wash); color: var(--blue); }

.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: .095em; font: 650 .76rem/1.32 var(--mono); }
.primary-link, .text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.primary-link { padding: .54rem .95rem; border-radius: 2px; color: var(--on-blue); background: var(--blue);
  text-decoration: none; border: 1px solid var(--blue); }
.primary-link:hover { box-shadow: inset 0 0 0 1px var(--on-blue); }
.text-link { font-size: .93rem; }
.home-hero { border-bottom: 1px solid var(--strong-line); padding: clamp(2.4rem, 6.1vw, 5.5rem) 0 3.65rem;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.13fr); align-items: center; gap: clamp(1.9rem, 5vw, 4.6rem); }
.home-intro h1 { font-size: clamp(3.45rem, 6.2vw, 6.12rem); line-height: .96; letter-spacing: -.062em; margin: .83rem 0 1.25rem; }
.home-intro h1 span, .lost h1 span { color: var(--blue); }
.home-description { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 29rem; }
.home-actions { margin-top: 1.5rem; display: flex; gap: .95rem 1.25rem; flex-wrap: wrap; }
.plate { background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.hero-figure { border-top: 3px solid var(--blue); }
.plate-head { display: flex; justify-content: space-between; align-items: center;
  gap: .7rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); }
.plate-head h2 { margin-top: .2rem; font-size: clamp(1.08rem, 1.6vw, 1.38rem); }
.plate-badge { font: 600 .78rem/1.2 var(--mono); color: var(--blue); border: 1px solid var(--line); padding: .35rem .55rem; white-space: nowrap; }
.diagram-wrap { padding: .35rem .75rem .45rem; background-color: var(--surface);
  background-image: linear-gradient(var(--hairline) 1px, transparent 1px), linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center; }
.anatomy-svg { width: 100%; max-width: 43rem; height: auto; margin-inline: auto; overflow: hidden; }
.hero-figure-foot { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  column-gap: .75rem; padding: 0 1.12rem; color: var(--muted); font: .8rem/1.36 var(--mono); }
.hero-figure-foot a { display: inline-flex; align-items: center; min-height: 44px; font: 650 .875rem/1.25 var(--sans); }
.tool-index { margin: 2rem 0 4rem; }
.index-head { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--strong-line); }
.index-head h2, .reference-block h2 { font-size: clamp(1.45rem, 2.3vw, 2.05rem); }
.index-head p { color: var(--muted); font: 500 .84rem/1.4 var(--mono); }
.index-category { display: grid; grid-template-columns: minmax(7.6rem, .24fr) minmax(0, 1fr); gap: .8rem;
  border-bottom: 1px solid var(--strong-line); }
.index-category h3 { padding: 1.25rem 0; color: var(--blue); font-size: 1.19rem; }
.index-line { padding: .8rem .15rem; display: grid; grid-template-columns: minmax(9rem, .85fr) minmax(0, 1.6fr) minmax(5.7rem, .35fr);
  align-items: center; gap: .9rem; }
.index-line + .index-line { border-top: 1px solid var(--line); }
.index-line h4 { font-size: 1.11rem; letter-spacing: -.018em; }
.index-line h4 a { display: flex; min-height: 44px; align-items: center; color: var(--ink); text-decoration: none; }
.index-line h4 a:hover { color: var(--blue); text-decoration: underline; }
.index-line p { color: var(--muted); font-size: .94rem; }
.cases-link { display: flex; min-height: 44px; align-items: center; justify-content: flex-end; text-align: right; font: 550 .83rem/1.36 var(--mono); }

.tool-heading { padding: 1.7rem 0 1.65rem; }
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: .36rem .55rem; color: var(--muted);
  font-size: .85rem; margin-bottom: .65rem; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 1.4rem; }
.heading-row > div:first-child { min-width: 0; }
.heading-row h1 { font-size: clamp(2.34rem, 4.25vw, 4.16rem); line-height: 1.01; letter-spacing: -.061em; }
.heading-row p { color: var(--muted); margin-top: .58rem; max-width: 52rem; }
.unit-control { display: grid; gap: .25rem; color: var(--muted); white-space: nowrap; font-size: .84rem; }
.unit-toggle { display: inline-flex; border: 1px solid var(--strong-line); border-radius: 2px; overflow: hidden; }
.unit-toggle button { border: 0; background: var(--surface); min-width: 3.2rem; min-height: 42px;
  font: 700 .92rem/1 var(--mono); }
.unit-toggle button + button { border-left: 1px solid var(--line); }
.unit-toggle button[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); }
.unit-toggle button:focus-visible { outline-offset: -3px; }

.bench { display: grid; grid-template-columns: minmax(17.8rem, .44fr) minmax(0, 1fr);
  grid-template-areas: "input readout" "input details"; column-gap: 1.25rem; row-gap: 1rem; align-items: start; }
.results-primary { grid-area: readout; min-width: 0; }
.results-detail { grid-area: details; min-width: 0; display: grid; gap: 1rem; }
.editor { grid-area: input; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ink); }
.editor-head, .section-head { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.editor-head { border-bottom: 1px solid var(--line); padding: .83rem .94rem; }
.editor-head h2, .section-head h2, .readout-table h2 { font-size: 1.23rem; }
.editor-head span { color: var(--muted); font: .72rem/1.2 var(--mono); }
.inputs { padding: .92rem; }
.input-group { padding: .5rem 0 0; margin: 0; border: 0; min-inline-size: 0; }
.input-group + .input-group { margin-top: 1rem; }
.input-group legend { width: 100%; font-weight: 700; padding: 0 0 .36rem; border-bottom: 1px solid var(--hairline); font-size: .92rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .57rem; row-gap: .62rem; }
.field { min-width: 0; display: flex; flex-direction: column; gap: .21rem; }
.choice { grid-column: 1 / -1; }
.field label { display: flex; align-items: end; min-height: 1.15rem; color: var(--muted); font-size: .875rem;
  font-weight: 550; line-height: 1.16; overflow-wrap: anywhere; }
.field small { color: var(--muted); font-size: .75rem; line-height: 1.28; }
.input-wrap, .select-wrap { display: flex; align-items: center; min-width: 0; border: 1px solid var(--strong-line);
  background: var(--paper); border-radius: 2px; }
.input-wrap:focus-within, .select-wrap:focus-within { border-color: var(--vector); }
.field input, .field select { font-size: 1rem; min-height: 42px; background: transparent; min-width: 0;
  width: 100%; border: 0; border-radius: 2px; padding: .4rem .44rem; }
.field input { font-family: var(--mono); font-variant-numeric: tabular-nums; flex: 1; }
.field input:focus-visible, .field select:focus-visible { outline-offset: 0; }
.field input[aria-invalid], .field select[aria-invalid] { outline: 1px solid var(--vermilion); }
.field .input-unit { flex: none; color: var(--muted); font: .745rem/1 var(--mono); padding-right: .43rem; }
.select-wrap { position: relative; color: var(--ink); }
.select-wrap::after { pointer-events: none; position: absolute; right: .8rem; }
.select-wrap select { appearance: none; padding-right: 1.85rem; font-weight: 550; }
.input-error { margin: .7rem .9rem 0; border-left: 3px solid var(--vermilion); background: var(--hot-wash);
  padding: .55rem .7rem; color: var(--ink); font-size: .92rem; }

.telemetry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .62rem; margin-bottom: .75rem; }
.telemetry-card { min-width: 0; border: 1px solid var(--line); border-top: 3px solid var(--blue);
  background: var(--surface); padding: .64rem .73rem .55rem; min-height: 6.12rem;
  display: grid; grid-template-rows: auto 1fr auto; align-items: start; }
.telemetry-label { color: var(--muted); font: 650 .74rem/1.25 var(--mono); letter-spacing: .015em; text-transform: uppercase; }
.telemetry-card strong { align-self: center; font: 700 clamp(1.3rem, 2.28vw, 2.2rem)/1.08 var(--mono);
  letter-spacing: -.075em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.telemetry-unit { min-height: .9rem; font: 550 .76rem/1.12 var(--mono); color: var(--blue); }
.anatomy-plate .plate-head { border-bottom-color: var(--strong-line); }
.edit-link { display: none; white-space: nowrap; min-height: 40px; align-items: center; font-size: .875rem; font-weight: 650; }

.screen { margin-top: .8rem; border: 1px solid var(--line); background: var(--surface); padding: .85rem 1rem .95rem; }
.section-head { margin-bottom: .45rem; }
.screen-status { display: inline-flex; align-items: center; gap: .38rem; padding: .23rem .46rem;
  font: 600 .775rem/1.3 var(--mono); color: var(--green); background: var(--green-wash); text-align: right; white-space: nowrap; }
.screen-status[data-state="near"], .screen-status[data-state="limit"] { color: var(--bronze); background: var(--hot-wash); }
.screen-status[data-state="over"], .screen-status[data-state="invalid"] { color: var(--vermilion); background: var(--hot-wash); }
.screen-status[data-state="idle"] { color: var(--muted); background: var(--recess); }
.margin-list { margin: 0; padding: 0; list-style: none; }
.margin-row { padding-top: .56rem; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(5rem, 1fr) 7.5rem;
  align-items: center; gap: .43rem .85rem; }
.margin-row + .margin-row { border-top: 1px solid var(--hairline); margin-top: .43rem; }
.margin-label { min-width: 0; }
.margin-label strong { display: block; font-size: .925rem; }
.margin-label > span { display: block; color: var(--muted); font: .76rem/1.32 var(--mono); overflow-wrap: anywhere; }
.margin-state { font: 650 .74rem/1.2 var(--mono); justify-self: end; text-align: right; color: var(--green); }
.margin-row[data-status="near"] .margin-state, .margin-row[data-status="limit"] .margin-state { color: var(--bronze); }
.margin-row[data-status="over"] .margin-state { color: var(--vermilion); }
.margin-row[data-status="idle"] .margin-state, .margin-help { color: var(--muted); }
meter { width: 100%; height: .67rem; }
meter::-webkit-meter-bar { background: var(--recess); border: 0; border-radius: 0; }
meter::-webkit-meter-optimum-value { background: var(--blue); }
meter::-webkit-meter-suboptimum-value { background: var(--blue); }
meter::-webkit-meter-even-less-good-value { background: var(--bronze); }
.margin-row[data-status="over"] meter::-webkit-meter-even-less-good-value { background: var(--vermilion); }
meter::-moz-meter-bar { background: var(--blue); }

.action-bar { display: flex; flex-wrap: wrap; gap: .4rem; }
.action-bar button { min-height: 42px; background: var(--surface); border: 1px solid var(--strong-line);
  border-radius: 2px; font-size: .875rem; font-weight: 650; padding: .43rem .68rem; }
.action-bar button:not(:disabled):hover { background: var(--blue-wash); }
.action-bar .emphasis { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.action-bar .emphasis:not(:disabled):hover { background: var(--blue); box-shadow: inset 0 0 0 1px var(--on-blue); }
.share-link { margin-top: .53rem; }
.share-link input { width: 100%; min-height: 42px; background: var(--surface); border: 1px solid var(--strong-line);
  border-radius: 2px; padding: .32rem .5rem; font: .82rem var(--mono); }
.share-link label, .action-feedback { font-size: .87rem; color: var(--muted); margin-top: .33rem; }
.action-feedback:empty { display: none; }
.readout-table { background: var(--surface); border: 1px solid var(--line); }
.readout-table h2 { padding: .7rem .95rem; border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .44rem .95rem; border-bottom: 1px solid var(--hairline); }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { font-weight: 500; font-size: .91rem; }
td { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .88rem; }
td[data-output] { min-width: 8.7rem; }

.reference-block { border-top: 1px solid var(--strong-line); margin-top: 1.8rem; padding: 1.05rem 0 .52rem; }
.reference-block p { margin-top: .65rem; max-width: 67ch; color: var(--muted); }
.reference-block .equation { padding: .73rem .83rem; border-left: 2px solid var(--blue); color: var(--ink); background: var(--blue-wash);
  font: .88rem/1.5 var(--mono); overflow-wrap: anywhere; max-width: max-content; }
.model-notes { margin-top: 2.05rem; }
.example-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.6rem; }
.example-notes dl { border: 1px solid var(--line); background: var(--surface); padding: .36rem .72rem; }
.example-notes dl div { display: flex; gap: .6rem; justify-content: space-between; padding: .4rem 0; font-size: .9rem; }
.example-notes dl div + div { border-top: 1px solid var(--hairline); }
.example-notes dd { text-align: right; font-family: var(--mono); }
.example-index ul, .source-list { margin: .4rem 0 0; padding-left: 1.1rem; }
.example-index ul { columns: 2; }
.example-index li { break-inside: avoid; }
.example-index li a { min-height: 42px; display: inline-flex; align-items: center; }
.calculator, .reference { padding-bottom: 3.55rem; }

.reference { max-width: 72rem; }
.reference.narrow { max-width: 53rem; }
.reference-header { padding: 2.6rem 0 1.35rem; }
.reference-header h1, .lost h1 { font-size: clamp(2.7rem, 6vw, 5.25rem); letter-spacing: -.065em; }
.reference-header .eyebrow { margin-bottom: .55rem; }
.reference-header h1 + p { margin-top: .75rem; color: var(--muted); max-width: 65ch; }
.method-nav { display: flex; flex-wrap: wrap; gap: .45rem; border-block: 1px solid var(--line); padding: .62rem 0; }
.method-nav a { display: inline-flex; align-items: center; min-height: 42px; padding: .35rem .57rem;
  background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.method-intro { display: grid; gap: 1.15rem 2rem; grid-template-columns: 1fr 1fr; padding-top: 1.45rem; }
.method-intro h2 { font-size: 1.34rem; }
.method-intro h2 + p { margin-top: .5rem; }
.method-intro p { color: var(--muted); }
.method-card > div { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.source-list { line-height: 1.65; }
.site-footer { border-top: 1px solid var(--strong-line); }
.footer-inner { min-height: 4.35rem; display: flex; justify-content: space-between; gap: .2rem .95rem; align-items: center;
  font-size: .89rem; flex-wrap: wrap; }
.footer-inner p { font-weight: 700; }
.footer-inner p span { font-weight: 400; color: var(--muted); }
.footer-inner nav { display: flex; gap: 1rem; }
.footer-inner nav a { display: inline-flex; align-items: center; min-height: 44px; }
.lost { max-width: 52rem; padding-block: 5rem; }
.lost-mark { display: flex; align-items: center; gap: .52rem; font-weight: 700; margin-bottom: 1.1rem; }
.lost h1 { margin-bottom: .65rem; }
.lost > p { color: var(--muted); margin-bottom: 1.18rem; }

.anatomy-svg .outline, .anatomy-svg .fine, .anatomy-svg .axis, .anatomy-svg .edge, .anatomy-svg .dimension,
.anatomy-svg .ruling, .anatomy-svg .hidden-edge, .anatomy-svg .vector, .anatomy-svg .danger-edge,
.anatomy-svg .coil, .anatomy-svg .coil-active, .anatomy-svg .coil-limit, .anatomy-svg .pitch-ring,
.anatomy-svg .disc-section, .anatomy-svg .disc-nested { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.anatomy-svg .outline, .anatomy-svg .fine { stroke: var(--ink); stroke-width: 1; }
.anatomy-svg .ruling { stroke: var(--line); stroke-width: 1; }
.anatomy-svg .axis { stroke: var(--axis); stroke-width: 1; stroke-dasharray: 9 4 2 4; }
.anatomy-svg .dimension { stroke: var(--axis); stroke-width: 1.25; }
.anatomy-svg .edge { stroke: var(--ink); stroke-width: 1.5; }
.anatomy-svg .hidden-edge { stroke: var(--axis); stroke-width: 1.35; stroke-dasharray: 4 4; }
.anatomy-svg .vector { stroke: var(--vector); stroke-width: 2.6; }
.anatomy-svg .danger-edge { stroke: var(--vermilion); stroke-width: 2.5; }
.anatomy-svg .coil { stroke: var(--ink); stroke-width: 2.45; }
.anatomy-svg .coil-active { stroke: var(--vector); stroke-width: 2.75; }
.anatomy-svg .coil-limit { stroke: var(--vermilion); stroke-width: 2.55; }
.anatomy-svg .pitch-ring { stroke: var(--blue); stroke-width: 1.35; stroke-dasharray: 5 4; }
.anatomy-svg .disc-section { stroke: var(--ink); stroke-width: 5; }
.anatomy-svg .disc-nested { stroke: var(--vector); stroke-width: 2.65; }
.anatomy-svg .steel { fill: var(--metal); stroke: var(--ink); stroke-width: 1.25; }
.anatomy-svg .shaft-face, .anatomy-svg .gear-face { fill: var(--shape); stroke: var(--ink); stroke-width: 1.35; }
.anatomy-svg .cutout { fill: var(--surface); stroke: var(--axis); stroke-width: 1; }
.anatomy-svg .bolt-body { fill: var(--bolt); stroke: var(--ink); stroke-width: 1.25; }
.anatomy-svg .key-face { fill: var(--blue-wash); stroke: var(--blue); stroke-width: 1.5; }
.anatomy-svg .joint-window { fill: var(--blue-wash); stroke: none; }
.anatomy-svg .contact-patch, .anatomy-svg .cold-dot { fill: var(--vector); stroke: var(--surface); stroke-width: 1.2; }
.anatomy-svg .hot-dot { fill: var(--vermilion); stroke: var(--surface); stroke-width: 1.2; }
.anatomy-svg text { fill: var(--ink); font-family: var(--mono); }
.anatomy-svg .notation { font-size: 16px; font-weight: 700; letter-spacing: .7px; }
.anatomy-svg .blue-label, .anatomy-svg .orange-label { fill: var(--blue); font-size: 16px; font-weight: 700; }
.anatomy-svg .orange-label { fill: var(--bronze); }
.anatomy-svg .small-note, .anatomy-svg .legend-label { fill: var(--muted); font-size: 15px; font-weight: 500; }
.anatomy-svg .legend-value { font-size: 18px; font-weight: 700; letter-spacing: -.65px; }
.print-sheet { display: none; }

@media (max-width: 1100px) {
  .shell { width: min(100% - 3.35rem, 82rem); }
  .telemetry-label { font-size: .7rem; }
  .index-line { grid-template-columns: minmax(8.5rem, .8fr) minmax(0, 1.55fr) minmax(5.9rem, .3fr); }
}
@media (max-width: 850px) {
  .shell { width: calc(100% - 2.3rem); }
  .home-hero { gap: 1.7rem; }
  .bench { grid-template-columns: minmax(15.6rem, .64fr) minmax(0, 1fr); gap: .8rem; }
  .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telemetry-card { min-height: 5.1rem; }
  .margin-row { grid-template-columns: minmax(0, 1fr) minmax(3.6rem, .6fr); }
  .margin-state { grid-column: 1 / -1; }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 2rem); }
  .site-nav { min-height: 3.7rem; gap: .45rem; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; padding: 1.75rem 0 1.6rem; }
  .home-intro h1 { font-size: clamp(2.9rem, 12vw, 4.85rem); margin: .53rem 0 .78rem; }
  .desktop-break { display: none; }
  .home-actions { margin-top: .9rem; }
  .hero-figure-foot, .plate-head { padding-inline: .7rem; }
  .diagram-wrap { padding: .25rem .3rem .35rem; }
  .tool-index { margin: 1.25rem 0 2.6rem; }
  .index-head { flex-wrap: wrap; }
  .index-category { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .index-category h3 { padding: .9rem 0 .25rem; }
  .index-line { grid-template-columns: minmax(0, 1fr) auto; gap: .16rem .5rem; padding: .57rem 0 .78rem; }
  .index-line h4 { grid-column: 1; grid-row: 1; }
  .index-line p { grid-column: 1 / -1; grid-row: 2; }
  .cases-link { grid-column: 2; grid-row: 1; }
  .tool-heading { padding: .95rem 0 .95rem; }
  .heading-row { flex-wrap: wrap; align-items: start; gap: .72rem; }
  .heading-row h1 { font-size: clamp(2.12rem, 8.25vw, 3.7rem); }
  .heading-row p { font-size: .97rem; margin-top: .38rem; }
  .unit-control { grid-template-columns: auto auto; align-items: center; gap: .48rem; }
  .unit-toggle button { min-width: 2.85rem; }
  .bench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "readout" "input" "details"; gap: .8rem; }
  .telemetry { gap: .42rem; margin-bottom: .57rem; }
  .telemetry-card { padding: .43rem .55rem; min-height: 4.9rem; }
  .telemetry-card strong { font-size: clamp(1.4rem, 5.3vw, 1.9rem); }
  .edit-link { display: inline-flex; }
  .inputs, .editor-head { padding: .73rem; }
  .field-grid { column-gap: .63rem; }
  .screen { padding: .66rem .72rem .7rem; }
  .margin-row { grid-template-columns: minmax(0, 1fr) minmax(3.1rem, .4fr); gap: .27rem .6rem; }
  .margin-state { grid-column: 2; }
  .section-head h2 { font-size: 1.13rem; }
  th, td { padding-inline: .6rem; }
  td[data-output] { min-width: 6.5rem; }
  .example-notes, .method-intro { grid-template-columns: minmax(0, 1fr); }
  .example-index ul { columns: 1; }
  .reference-header { padding-top: 1.55rem; }
  .method-card > div { flex-wrap: wrap; }
  .footer-inner { padding-block: .65rem; }
}
@media (max-width: 365px) {
  .shell { width: calc(100% - 1.45rem); }
  .brand { font-size: 1rem; gap: .32rem; }
  .brand svg { width: 1.65rem; }
  .nav-controls { gap: .3rem; }
  .theme-button { padding-inline: .46rem; }
  .theme-icon { display: none; }
  .plate-badge { display: none; }
  .section-head { gap: .33rem; }
}

@page { size: A4 portrait; margin: 12mm; }
@page methods { size: A4 portrait; margin: 8mm; }
@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --paper: #fff;
    --surface: #fff;
    --ink: #10151a;
    --muted: #343c40;
    --axis: #626a6d;
    --line: #b4bcbf;
    --blue: #1e3a8a;
    --vector: #245dc2;
    --bronze: #87400c;
    --vermilion: #a83713;
    --metal: #e4e7ea;
    --shape: #f6f6f6;
    --bolt: #c9d1d6;
    --blue-wash: #e9edf7;
  }
  body { font-size: 9pt; line-height: 1.25; background: #fff; }
  .home-page .site-header, .home-page .site-footer,
  .reference-page .site-header, .reference-page .site-footer,
  .home .home-actions, .reference .method-nav { display: none; }
  .home.shell, .reference.shell { width: auto; margin-inline: 0; }
  .home .home-hero { grid-template-columns: 1fr 1.15fr; gap: 5mm; padding: 0 0 4mm; }
  .home-intro h1 { font-size: 27pt; margin: 2mm 0; }
  .home .desktop-break { display: none; }
  .home-description { font-size: 10pt; }
  .home .plate-head, .home .hero-figure-foot { padding: 1.5mm 2mm; }
  .home .hero-figure-foot a { min-height: 0; font-size: 8pt; }
  .home .tool-index { margin: 5mm 0 0; }
  .home .index-head { padding-bottom: 2mm; }
  .home .index-head h2 { font-size: 15pt; }
  .home .index-category { grid-template-columns: 26mm minmax(0, 1fr); }
  .home .index-category h3 { font-size: 10pt; padding: 2.5mm 0; }
  .home .index-line { grid-template-columns: 34mm 1fr 20mm; gap: 2mm; padding: 2mm 0; break-inside: avoid; }
  .home .index-line h4, .home .index-line p, .home .cases-link { font-size: 8pt; }
  .home .index-line h4 a, .home .cases-link { min-height: 0; }
  .reference-page:has(.method-nav) { page: methods; line-height: 1.17; }
  .reference:not(.narrow) { columns: 2; column-gap: 5mm; }
  .reference .reference-header { column-span: all; margin: 0 0 3mm; padding: 0; }
  .reference .reference-header h1 { font-size: 20pt; margin: 0 0 1.5mm; }
  .reference .reference-header p { font-size: 9pt; }
  .reference .method-intro { column-span: all; grid-template-columns: 1fr 1fr; gap: 4mm; padding: 0 0 2mm; }
  .reference .method-intro h2 { margin: 0 0 .5mm; font-size: 10pt; }
  .reference .method-intro p { margin: .7mm 0 0; font-size: 8pt; }
  .reference .reference-block { margin: 0 0 1mm; padding: 1.25mm 0; }
  .reference .method-card > div { break-after: avoid; }
  .reference .reference-block h2 { font-size: 11pt; margin: 0 0 1mm; }
  .reference .reference-block p, .reference .source-list { margin: 1mm 0 0; font-size: 8pt; }
  .reference .reference-block .equation { padding: .75mm 1mm; font-size: 7.6pt; line-height: 1.22; }
  .reference .source-list { line-height: 1.25; }
  .reference .method-card .text-link { min-height: 0; font-size: 8pt; }
  .tool-page > :not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; print-color-adjust: exact; }
  .print-head { border-bottom: .35mm solid var(--blue); padding-bottom: 2.8mm; }
  .print-head span { color: var(--blue); font: 8pt var(--mono); }
  .print-head h1 { font-size: 20pt; letter-spacing: -.04em; margin: 1.5mm 0 1mm; }
  .print-head p { margin: 0; color: var(--muted); }
  .print-sheet .anatomy-svg { width: 132mm; max-width: 100%; margin: 2mm auto; }
  .print-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; align-items: start; }
  .print-tables h2 { margin-bottom: 1mm; font-size: 10.5pt; }
  .print-tables table { border-top: .2mm solid var(--line); }
  .print-tables th, .print-tables td { padding: .78mm .75mm; min-width: 0; font-size: 8.1pt; border-color: var(--line); }
  .print-tables tr { break-inside: avoid; }
  .print-sheet > p { margin: 2.15mm 0 0; font-size: 8.1pt; }
  .print-margins { display: flex; flex-wrap: wrap; gap: .7mm 3mm; border-top: .2mm solid var(--line);
    margin: 2.4mm 0 0; padding: 1.5mm 0 0; font-size: 8pt; list-style: none; }
  .print-equation { border-top: .2mm solid var(--line); padding-top: 2mm; font-family: var(--mono); }
}
