:root {
  color-scheme: light;
  --page: #f7fafc;
  --surface: #fff;
  --surface-alt: #f9fcfe;
  --panel: #eaf1f6;
  --ink: #0f1d2b;
  --muted: #476175;
  --line: #ccdae4;
  --strong-line: #a6becd;
  --accent: #0284c7;
  --accent-strong: #04689b;
  --accent-bg: #e9f6fd;
  --action-ink: #fff;
  --ok: #0f766e;
  --ok-bg: #dcf1ed;
  --warn: #d97706;
  --warn-ink: #8a4a00;
  --warn-bg: #fff0d7;
  --fail: #dc2626;
  --fail-ink: #b42329;
  --fail-bg: #fde8e8;
  --glass: #d9eff9;
  --glass-alt: #b9ddec;
  --linework: #587a8e;
  --hot: #f9d78f;
  --hot-inner: #ffe8b7;
  --hot-outer: #f2e5ca;
  --shadow: 0 14px 34px -27px #1647676b;
  --font: "Avenir Next", "Segoe UI", Aptos, system-ui, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d1822;
  --surface: #142431;
  --surface-alt: #162a39;
  --panel: #1c3344;
  --ink: #e9f4fa;
  --muted: #a8c4d4;
  --line: #365365;
  --strong-line: #567b90;
  --accent: #64c5ef;
  --accent-strong: #8dd5f5;
  --accent-bg: #173749;
  --action-ink: #0c2534;
  --ok: #7ce0cc;
  --ok-bg: #183e3b;
  --warn: #ffc473;
  --warn-ink: #ffcd8d;
  --warn-bg: #4a341c;
  --fail: #ff8e88;
  --fail-ink: #ffb3ad;
  --fail-bg: #482a2e;
  --glass: #234c63;
  --glass-alt: #2e6077;
  --linework: #9dbdce;
  --hot: #755223;
  --hot-inner: #5f482c;
  --hot-outer: #494134;
  --shadow: 0 12px 30px -23px #000b;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 0; scroll-padding-top: 18px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 500 15px/1.56 var(--font);
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
h1, h2, h3 { line-height: 1.16; font-weight: 650; }
p { max-width: 76ch; }
svg text { font-family: var(--font); }
.wrap { width: min(1240px, calc(100% - 72px)); margin-inline: auto; }
.reduced { width: min(960px, calc(100% - 72px)); }
.sr, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 8px 16px; border-radius: 5px; background: var(--surface); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-layout { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 24px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.055em;
  text-decoration: none;
}
.brand svg { flex: 0 0 auto; }
.navbar { display: flex; align-items: center; gap: 27px; }
.navbar a { font-size: 13px; color: var(--muted); font-weight: 650; text-decoration: none; white-space: nowrap; padding-block: 10px; }
.navbar a:hover, .navbar a[aria-current] { color: var(--accent-strong); text-decoration: underline; }
.theme-toggle {
  min-width: 42px; min-height: 42px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 5px; color: var(--accent-strong); background: var(--surface);
}
.theme-toggle:hover { background: var(--accent-bg); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .sun, [data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-layout { display: flex; gap: 22px; align-items: center; justify-content: space-between; min-height: 94px; }
.footer-layout .brand { font-size: 18px; }
.footer-layout .brand svg { width: 26px; height: 26px; }
.footer-layout nav { display: flex; flex-wrap: wrap; gap: 12px 23px; }
.footer-layout nav a { color: var(--muted); font-size: 13px; }
.site-footer small { font-size: 12px; color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  align-items: stretch;
  min-height: 388px;
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 33px 43px 36px; }
.hero h1 { max-width: 12ch; font-size: clamp(42px, 5.05vw, 72px); letter-spacing: -.065em; line-height: .99; }
.hero p { margin-top: 20px; max-width: 43ch; font-size: 16px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.button, .button-minimal {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--strong-line);
  border-radius: 5px;
  color: var(--ink); background: var(--surface);
  font-size: 13px; font-weight: 650; line-height: 1.22; text-align: center; text-decoration: none;
}
.button:hover, .button-minimal:hover { background: var(--accent-bg); text-decoration: none; }
.button.primary { background: var(--accent-strong); color: var(--action-ink); border-color: var(--accent-strong); }
.button.primary:hover { background: var(--accent); }
.button-minimal { color: var(--accent-strong); border-color: var(--line); }
.hero-image { background: var(--panel); border-left: 1px solid var(--strong-line); min-width: 0; }
.hero-art { width: 100%; height: 100%; min-height: 320px; }
.art-paper { fill: var(--panel); }
.art-grid { fill: none; stroke: var(--strong-line); stroke-width: .55; opacity: .52; }
.art-airline { fill: none; stroke: var(--accent); opacity: .34; stroke-width: .7; stroke-dasharray: 5 4; }
.art-glass-a { fill: var(--glass); }
.art-glass-b { fill: var(--glass-alt); }
.art-glass-c { fill: var(--accent-bg); }
.art-glass-d { fill: var(--surface-alt); }
.art-side { fill: var(--glass-alt); }
.art-side-grid { fill: none; stroke: var(--linework); stroke-width: 1.8; }
.art-plinth { fill: var(--strong-line); }
.art-mullion { fill: none; stroke: var(--linework); stroke-width: 3; }
.art-transom { fill: none; stroke: var(--linework); stroke-width: 1.7; }
.art-perimeter { fill: none; stroke: var(--linework); stroke-width: 2.25; }
.art-reflections { fill: var(--surface); opacity: .5; }
.art-dim { fill: none; stroke: var(--accent-strong); stroke-width: 1; }
.art-nodes { fill: var(--surface); stroke: var(--accent-strong); }
.art-annotation { fill: var(--accent-strong); font-size: 11.5px; font-weight: 650; }
.art-corners { stroke: var(--accent-strong); stroke-width: 1.25; fill: none; opacity: .8; }

.home-section { margin-top: 45px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--strong-line); }
.section-title h2 { font-size: 28px; letter-spacing: -.053em; }
.section-title p { font-size: 13px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.tool-card {
  display: grid; position: relative; align-content: start; gap: 10px;
  min-width: 0; min-height: 174px; padding: 16px 18px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); box-shadow: var(--shadow); text-decoration: none;
}
.tool-card:hover { border-color: var(--accent); background: var(--surface-alt); }
.tool-card-top { display: flex; justify-content: space-between; align-items: center; color: var(--accent-strong); }
.tool-card-top svg { flex: none; }
.tool-card h3 { font-size: 17px; letter-spacing: -.035em; }
.tool-card p { font-size: 13px; color: var(--muted); line-height: 1.4; }
.examples-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 15px; }
.examples-index section, .related-section { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.examples-index h3 { font-size: 16px; margin-bottom: 11px; }
.examples-index h3 > a { color: inherit; }
.case-list { padding: 0; list-style: none; }
.case-list li + li { border-top: 1px solid var(--line); }
.case-list a { display: block; font-size: 13px; line-height: 1.35; padding-block: 8px; }
.reference-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding: 15px 17px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; }
.reference-banner nav { display: flex; flex-wrap: wrap; gap: 10px; }

.breadcrumb { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px; font-size: 12px; margin-top: 23px; color: var(--muted); }
.breadcrumb > a { color: var(--muted); }
.tool-heading, .article-heading { padding: 16px 0 21px; }
.tool-heading h1, .article-heading h1 { font-size: clamp(32px, 4.45vw, 55px); letter-spacing: -.048em; }
.tool-heading p, .article-heading p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.standard-link { display: inline-block; margin-top: 11px; font-size: 12px; font-weight: 650; letter-spacing: .01em; }
.case-banner {
  display: flex; align-items: start; gap: 10px; margin-bottom: 16px; padding: 12px 15px;
  background: var(--accent-bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 5px; color: var(--muted); font-size: 13px; line-height: 1.45;
}
.case-banner strong { color: var(--ink); }
.workbench-nav { display: none; }
.workbench { display: grid; grid-template-columns: minmax(300px, .46fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.inputs, .result-card, .actions, .appendix, .scope-note {
  min-width: 0;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.section-head, .result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.section-head { align-items: center; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.section-head h2, .result-head h2, .appendix h2 { font-size: 21px; letter-spacing: -.042em; }
.unit-switch { display: flex; flex-shrink: 0; gap: 2px; border: 1px solid var(--line); padding: 2px; border-radius: 5px; background: var(--panel); }
.unit-switch button { min-height: 40px; min-width: 40px; padding: 4px 9px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.unit-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent-strong); box-shadow: 0 0 0 1px var(--line); }
.fields { min-width: 0; border: 0; padding: 0; margin: 13px 0 0; }
.fields + .fields { border-top: 1px solid var(--line); padding-top: 4px; }
.fields legend { padding: 0 8px 0 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.field { display: grid; min-width: 0; align-content: start; gap: 4px; }
[data-calculator="plate"] [data-field-wrap="limit"] { grid-column: 1 / -1; }
.field label { display: block; min-height: 29px; font-size: 12px; font-weight: 650; line-height: 1.22; align-content: end; }
.field-control { display: flex; min-width: 0; position: relative; align-items: center; background: var(--page); border: 1px solid var(--strong-line); border-radius: 4px; }
.field-control:focus-within { border-color: var(--accent); }
.field-control input, .field-control select {
  width: 100%; min-width: 0; min-height: 42px; padding: 5px 8px;
  color: var(--ink); background: transparent; border: 0; border-radius: 3px; font-size: 13px; line-height: 1.2;
}
.field-control input { flex: 1 1 0; font-variant-numeric: tabular-nums; }
.field-control select { padding-right: 5px; overflow: hidden; text-overflow: ellipsis; }
.field-control select option { color: var(--ink); background: var(--surface); }
.field-control .unit { flex: 0 0 auto; padding-inline: 3px 7px; font-size: 10px; line-height: 1.1; color: var(--muted); white-space: nowrap; }
.field:has([aria-invalid]) .field-control { border-color: var(--fail); }
.field-hint, .field-error { color: var(--muted); font-size: 11px; line-height: 1.35; }
.field-error { color: var(--fail-ink); font-weight: 720; overflow-wrap: anywhere; }
.input-foot { margin-top: 14px; }

.result-column { display: grid; min-width: 0; gap: 12px; }
.result-head { align-items: flex-start; }
.verdict-note { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 4px; }
.verdict { display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; padding: 4px 8px; font-size: 12px; font-weight: 760; white-space: nowrap; }
.verdict > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.verdict-pass { background: var(--ok-bg); color: var(--ok); }
.verdict-warn { background: var(--warn-bg); color: var(--warn-ink); }
.verdict-fail { background: var(--fail-bg); color: var(--fail-ink); }
.telemetry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 11px; }
.telemetry-cell { min-width: 0; padding: 9px 10px 8px; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 5px; }
.telemetry-cell dt { color: var(--muted); font-size: 11px; font-weight: 730; line-height: 1.25; }
.telemetry-cell dd { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 5px; font-variant-numeric: tabular-nums; line-height: 1.12; margin-top: 4px; }
.telemetry-value { font-size: clamp(18px, 2.5vw, 29px); font-weight: 650; letter-spacing: -.045em; }
.telemetry-unit { font-size: 11px; color: var(--muted); white-space: nowrap; }
.diagram-area { overflow: hidden; }
.engineering-svg { width: 100%; height: auto; }
.diagram-empty { display: grid; min-height: 180px; border: 1px dashed var(--strong-line); color: var(--muted); place-content: center; text-align: center; margin-top: 14px; padding: 12px; background: var(--surface-alt); }
.actions { padding: 11px 14px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.action-buttons button { font-size: 12px; flex: 1 0 auto; }
.share-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 9px; }
.share-panel label { grid-column: 1 / -1; color: var(--muted); font-weight: 720; font-size: 12px; }
.share-panel input { min-width: 0; width: 100%; min-height: 42px; padding: 5px 8px; border: 1px solid var(--strong-line); border-radius: 4px; background: var(--page); color: var(--ink); }
.action-message:not(:empty) { color: var(--muted); margin-top: 7px; font-size: 12px; }
.appendix { display: grid; gap: 12px; }
.appendix + .appendix { margin-top: 12px; }
.readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.readings > div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding-block: 6px; border-bottom: 1px solid var(--line); font-size: 12px; }
.readings dt { color: var(--muted); }
.readings dd { flex: 0 1 47%; text-align: right; font-weight: 720; font-variant-numeric: tabular-nums; }
.trace { display: grid; gap: 7px; list-style: none; padding: 0; }
.trace li { min-width: 0; border-left: 2px solid var(--accent); padding: 7px 9px; background: var(--surface-alt); }
.trace h3 { font-size: 13px; }
.trace p { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 2px; }
.trace p.equation { color: var(--ink); font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.scope-note { font-size: 13px; color: var(--muted); }
.scope-note h2 { font-size: 16px; color: var(--ink); margin-bottom: 5px; }
.scope-note p + p { margin-top: 7px; }
.related-section { margin-top: 23px; }
.related-section h2 { font-size: 21px; }
.related-section .case-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 16px; margin-top: 7px; }
.related-section .case-list li { border-top: 1px solid var(--line); }

.reference-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: 5px 0 20px; }
.reference-nav a { font-size: 12px; }
.reference-article { padding: 19px 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); margin-top: 13px; }
.reference-article h2 { font-size: 23px; letter-spacing: -.04em; }
.reference-article p { margin-top: 8px; color: var(--muted); }
.reference-article ul { padding-left: 20px; margin-top: 8px; overflow-wrap: anywhere; }
.reference-article li { margin-block: 3px; }
.reference-article .open-tool { display: inline-block; margin-top: 8px; font-weight: 700; }
.print-sheet { display: none; }

.d-panel { fill: var(--surface-alt); stroke: var(--line); stroke-width: 1; }
.d-title { fill: var(--ink); font-size: 13.5px; font-weight: 650; letter-spacing: -.18px; }
.d-label { fill: var(--ink); font-size: 12px; font-weight: 620; }
.d-tick, .d-small { fill: var(--muted); font-weight: 650; font-size: 10.5px; }
.d-grid, .d-rule, .d-dash, .d-fine, .d-amber, .d-amber-dash, .d-blue, .d-line-accent, .d-line-teal, .d-line-amber, .d-mass {
  fill: none; stroke-linejoin: round; stroke-linecap: round;
}
.d-grid { stroke: var(--line); stroke-width: .7; }
.d-rule { stroke: var(--linework); stroke-width: 1.15; }
.d-dash { stroke: var(--linework); stroke-width: 1; stroke-dasharray: 3 3; }
.d-fine { stroke: var(--accent); stroke-width: .9; opacity: .65; }
.d-blue, .d-line-accent { stroke: var(--accent-strong); stroke-width: 1.7; }
.d-line-teal { stroke: var(--ok); stroke-width: 1.7; }
.d-amber, .d-line-amber { stroke: var(--warn-ink); stroke-width: 1.7; }
.d-amber-dash { stroke: var(--warn-ink); stroke-width: 1.45; stroke-dasharray: 4 3; }
.d-mass { stroke: var(--linework); stroke-width: 1.1; stroke-dasharray: 2.5 2.5; opacity: .78; }
.d-frame { fill: var(--panel); stroke: var(--linework); stroke-width: 1.1; }
.d-glass { fill: var(--glass); stroke: var(--accent-strong); stroke-width: 1.25; }
.d-air { fill: var(--surface); stroke: var(--line); stroke-width: .8; }
.d-structural { fill: var(--ok-bg); stroke: var(--ok); stroke-width: 1.3; }
.d-support { fill: var(--glass-alt); stroke: var(--linework); }
.d-metal { fill: var(--linework); stroke: var(--linework); stroke-width: 2; }
.d-mullion { fill: var(--panel); fill-rule: evenodd; stroke: var(--linework); stroke-width: 1.45; }
.d-tributary { fill: var(--glass-alt); stroke: var(--accent); stroke-width: 1; opacity: .75; }
.d-pin { fill: var(--surface); stroke: var(--linework); stroke-width: 1.2; }
.d-point, .d-teal-point, .d-amber-point { stroke: var(--surface); stroke-width: 1; }
.d-point { fill: var(--accent-strong); }
.d-teal-point { fill: var(--ok); }
.d-amber-point { fill: var(--warn); }
.d-shade { fill: var(--glass-alt); stroke: var(--linework); }
.d-sun-outer { fill: var(--hot-outer); }
.d-sun-inner { fill: var(--hot-inner); }
.d-absorbed { fill: var(--hot); }
.d-track { fill: var(--panel); stroke: var(--line); stroke-width: .8; }
.d-window { fill: var(--ok-bg); stroke: var(--ok); stroke-width: .7; }
.d-indicator { stroke: var(--ink); stroke-width: 2.9; stroke-linecap: round; }
.d-indicator.d-pass { stroke: var(--ok); }
.d-indicator.d-warn { stroke: var(--warn-ink); }
.d-indicator.d-fail { stroke: var(--fail); }

@media (max-width: 1000px) {
  .wrap, .reduced { width: min(1240px, calc(100% - 36px)); }
  .hero h1 { font-size: clamp(39px, 6.5vw, 63px); }
  .hero-copy { padding: 24px; }
  .tool-grid, .examples-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench { grid-template-columns: minmax(265px, .58fr) minmax(0, 1fr); gap: 10px; }
  .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .workbench-nav { display: flex; gap: 8px; margin-bottom: 10px; }
  .workbench-nav > * { flex: 1; }
  .inputs, .result-card, .actions, .appendix, .scope-note { padding: 12px; }
  .related-section .case-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap, .reduced { width: calc(100% - 26px); }
  .header-layout { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 1px 8px; min-height: 0; padding: 9px 0 2px; }
  .brand { justify-self: start; font-size: 19px; }
  .brand svg { width: 32px; height: 32px; }
  .navbar { display: contents; }
  .navbar .theme-toggle { grid-column: 2; grid-row: 1; }
  .nav-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 19px; }
  .navbar a { min-height: 40px; display: inline-flex; align-items: center; }
  .hero { margin-top: 16px; grid-template-columns: 1fr; }
  .hero-copy { padding: 22px 17px; }
  .hero h1 { font-size: clamp(35px, 10.2vw, 52px); letter-spacing: -.054em; }
  .hero p { margin-top: 12px; font-size: 14px; }
  .hero-actions { margin-top: 15px; }
  .hero-image { border-left: 0; border-top: 1px solid var(--strong-line); }
  .hero-art { height: auto; min-height: 0; }
  .home-section { margin-top: 29px; }
  .section-title { gap: 10px; align-items: baseline; }
  .section-title h2 { font-size: 24px; }
  .section-title p { text-align: right; font-size: 12px; }
  .tool-grid, .examples-index { gap: 7px; margin-top: 9px; }
  .tool-card { min-height: 158px; padding: 10px; gap: 6px; }
  .tool-card h3 { font-size: 15px; }
  .tool-card p { font-size: 12px; line-height: 1.33; }
  .examples-index section { padding: 10px; }
  .examples-index h3 { font-size: 14px; }
  .case-list a { min-height: 40px; }
  .reference-banner { align-items: start; flex-direction: column; }
  .site-footer { margin-top: 33px; }
  .footer-layout { flex-direction: column; align-items: start; gap: 11px; padding: 16px 0; }
  .breadcrumb { margin-top: 15px; }
  .tool-heading, .article-heading { padding: 13px 0 14px; }
  .tool-heading h1, .article-heading h1 { font-size: clamp(29px, 8.8vw, 44px); }
  .tool-heading p, .article-heading p { font-size: 14px; }
  .case-banner { padding: 9px; margin-bottom: 9px; }
  .field-grid { gap: 8px; }
  .field-control input, .field-control select { font-size: 16px; min-height: 42px; }
  .field-control select { font-size: 13px; }
  .readings { grid-template-columns: minmax(0, 1fr); }
  .telemetry-cell { padding: 8px; }
  .telemetry-value { font-size: clamp(19px, 6.9vw, 27px); }
  .reference-article { padding: 13px; }
}
@media (min-width: 601px) {
  .nav-links { display: flex; gap: 23px; }
}
@media (max-width: 350px) {
  .telemetry-cell dd { column-gap: 3px; }
  .telemetry-unit { font-size: 10px; }
  .result-head h2, .section-head h2 { font-size: 18px; }
  .action-buttons .button { flex: 1 0 auto; }
}
@page { size: A4 portrait; margin: 12mm 13mm; }
@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --page: #fff; --surface: #fff; --surface-alt: #fff;
    --panel: #eaf1f6; --ink: #0f1d2b; --muted: #35485a;
    --line: #c9d7df; --strong-line: #8da3b2; --linework: #446070;
    --accent: #0284c7; --accent-strong: #04689b; --accent-bg: #e9f6fd;
    --glass: #e2f3fb; --glass-alt: #c6e0ea; --ok: #0f665e; --ok-bg: #e6f1ee;
    --warn: #a15c13; --warn-ink: #815015; --fail: #ac282c;
    --hot: #f9d78f; --hot-inner: #ffe8b7; --hot-outer: #f2e5ca;
  }
  body { font-size: 9pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body.tool-page > :not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; break-inside: avoid; }
  .print-head { border-bottom: 1.4pt solid var(--accent-strong); padding-bottom: 2mm; }
  .print-head p { font-weight: 650; color: var(--muted); font-size: 8pt; }
  .print-head h1 { font-size: 19pt; margin: 1mm 0; letter-spacing: -.035em; }
  .print-verdict { font-size: 8pt; margin: 1.9mm 0; }
  .print-tables { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 4mm; }
  .print-tables h2, .print-trace h2 { font-size: 10pt; margin-bottom: 1mm; }
  .print-tables dl > div { display: flex; justify-content: space-between; gap: 2mm; border-bottom: .4pt solid var(--line); font-size: 7.3pt; line-height: 1.23; padding: .45mm 0; }
  .print-tables dd { flex: none; font-weight: 700; text-align: right; max-width: 49%; }
  .print-svg { width: 140mm; height: auto; margin: 2.5mm auto; }
  .print-trace .trace { grid-template-columns: 1fr 1fr; gap: 1mm 3mm; }
  .print-trace .trace li { padding: .8mm 1.1mm; }
  .print-trace .trace h3 { font-size: 7.8pt; }
  .print-trace .trace p { font-size: 7pt; line-height: 1.19; margin-top: .4mm; }
  .print-foot { border-top: .6pt solid var(--linework); margin-top: 2mm; padding-top: 1.1mm; font-size: 7.3pt; color: var(--muted); }
}
