:root {
  color-scheme: light;
  --paper: #f7fafc;
  --sheet: #ffffff;
  --panel: #e8f1f5;
  --ink: #0f1e2e;
  --secondary: #3c586b;
  --line: #c5d6e0;
  --line-strong: #9db7c7;
  --grid: #dfeaf1;
  --blue: #0284c7;
  --blue-text: #075985;
  --blue-plate: #dceff9;
  --teal: #0f766e;
  --teal-plate: #e1f3ee;
  --red: #b91c1c;
  --red-plate: #fbe9e7;
  --water-fill: #ccebf8;
  --structure: #d1dee6;
  --soil: #e2e7e7;
  --button: #124562;
  --button-ink: #ffffff;
  --logo: #114460;
  --logo-ink: #c8ecfb;
  --shadow: #0f1e2e0d;
  --sans: "Avenir Next", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101d2a;
  --sheet: #152737;
  --panel: #1b3041;
  --ink: #edf6fd;
  --secondary: #afc5d3;
  --line: #385368;
  --line-strong: #58788d;
  --grid: #29465b;
  --blue: #6ac8f2;
  --blue-text: #9bdbfb;
  --blue-plate: #224157;
  --teal: #75d6c5;
  --teal-plate: #234842;
  --red: #ffa49f;
  --red-plate: #4b3037;
  --water-fill: #285b75;
  --structure: #40586a;
  --soil: #344555;
  --button: #9bdbfb;
  --button-ink: #112839;
  --logo: #b2e4f9;
  --logo-ink: #153e55;
  --shadow: #060c1578;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.55; }
[hidden] { display: none !important; }
a { color: var(--blue-text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.14; letter-spacing: -.035em; }
button, input, select, summary { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button, input, select, summary, .button { min-height: 42px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
svg { display: block; }
.wrap { width: min(calc(100% - 72px), 1256px); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 5; top: .4rem; left: .4rem; padding: .55rem .8rem; background: var(--sheet); }
.site-header { background: var(--sheet); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; font-size: 1.18rem; letter-spacing: -.045em; font-weight: 750; }
.brand > svg { flex: 0 0 auto; }
.brand > span > span { color: var(--blue-text); }
.logo-bg { fill: var(--logo); }
.logo-line { fill: none; stroke: var(--logo-ink); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.logo-dot { fill: var(--logo-ink); }
.header-actions, .wide-nav { display: flex; align-items: center; gap: 27px; }
.wide-nav a, .site-footer nav a { color: var(--secondary); font-size: .88rem; text-decoration: none; font-weight: 650; }
.wide-nav a[aria-current], .wide-nav a:hover, .site-footer nav a:hover { color: var(--blue-text); }
.theme-button {
  display: grid; place-items: center; color: var(--ink); width: 44px; min-height: 44px;
  padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
}
.theme-button:hover, .button.compact:hover, .quiet-button:hover { border-color: var(--line-strong); background: var(--blue-plate); }
.theme-button svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.theme-button .sun, [data-theme="dark"] .theme-button .moon { display: none; }
[data-theme="dark"] .theme-button .sun { display: block; }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  display: flex; align-items: center; gap: 5px; padding: 0 7px; cursor: pointer;
  font-size: .8rem; font-weight: 700; color: var(--secondary); list-style: none;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav {
  position: absolute; z-index: 4; right: -46px; top: calc(100% + 9px); min-width: 165px; padding: 5px;
  border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 8px 20px var(--shadow); background: var(--sheet);
}
.mobile-nav a { display: flex; align-items: center; min-height: 42px; padding: 0 10px; text-decoration: none; font-size: .85rem; }
.mobile-nav a:hover { background: var(--panel); }
.site-footer { margin-top: 58px; background: var(--panel); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding-block: 25px; }
.footer-brand { font-weight: 750; color: var(--ink); text-decoration: none; }
.site-footer p { color: var(--secondary); font-size: .82rem; margin-top: 3px; }
.site-footer nav { display: flex; align-items: center; gap: 21px; flex-wrap: wrap; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-align: center;
  padding: .62rem 1rem; background: var(--sheet); color: var(--ink); border: 1px solid var(--line);
  border-radius: 5px; font-size: .88rem; font-weight: 700; line-height: 1.25; text-decoration: none;
}
.button.primary { background: var(--button); color: var(--button-ink); border-color: var(--button); }
.button.primary:hover { filter: brightness(1.12); }
.button.secondary:hover { background: var(--panel); border-color: var(--line-strong); }
.button.compact { padding: .42rem .73rem; font-size: .78rem; }
.eyebrow {
  display: flex; align-items: center; gap: 9px; color: var(--blue-text); font-family: var(--mono);
  font-weight: 650; font-size: .69rem; text-transform: uppercase; letter-spacing: .12em;
}
.eyebrow > span { width: 14px; height: 1px; background: var(--blue); }

.home-hero {
  display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1fr); align-items: center;
  gap: clamp(24px, 5vw, 77px); padding: 62px 0 53px;
}
.hero-copy h1 { margin: 14px 0 17px; font-size: clamp(3rem, 5.6vw, 5.35rem); font-weight: 660; line-height: 1.01; letter-spacing: -.052em; }
.hero-deck { max-width: 510px; color: var(--secondary); font-size: clamp(1.02rem, 1.48vw, 1.18rem); line-height: 1.52; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-meta { margin-top: 18px; color: var(--secondary); font-size: .77rem; font-family: var(--mono); }
.hero-meta span { color: var(--blue-text); padding-inline: 2px; }
.hero-figure { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); box-shadow: 0 5px 16px var(--shadow); }
.hero-figure figcaption {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  min-height: 44px; padding-inline: 17px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .71rem; font-weight: 650; letter-spacing: .015em; color: var(--secondary);
}
.hero-figure figcaption span:first-child { color: var(--blue-text); text-transform: uppercase; letter-spacing: .09em; }
.hero-drawing { width: 100%; height: auto; flex: 1 1 auto; }
.hero-drawing text { fill: var(--ink); font: 600 12px var(--mono); letter-spacing: .045em; }
.hero-grid { stroke: var(--line); stroke-width: .7; fill: none; }
.hero-concrete { fill: var(--structure); stroke: none; }
.hero-water { fill: var(--water-fill); opacity: .92; }
.hero-water-line, .hero-structure-line, .hero-dimension, .hero-flow { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hero-water-line, .hero-flow { stroke: var(--blue); stroke-width: 2.35; }
.hero-structure-line { stroke: var(--ink); stroke-width: 2.05; }
.hero-dimension { stroke: var(--secondary); stroke-width: 1; stroke-dasharray: 4 3; }
.hero-mark { fill: var(--blue); stroke: var(--sheet); stroke-width: 1; }
.tool-section { border-top: 1px solid var(--line-strong); padding-top: 25px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(1.55rem, 2.25vw, 2rem); }
.section-head p { margin-top: 4px; color: var(--secondary); font-size: .87rem; }
.text-link { font-weight: 700; font-size: .85rem; }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 152px; padding: 15px 16px 16px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--sheet); color: var(--ink); text-decoration: none;
}
.tool-card:hover, .case-grid a:hover, .guide-card:hover { border-color: var(--blue); background: var(--panel); }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.tool-card-top > span:first-child { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: var(--blue-plate); }
.tool-icon { fill: none; stroke: var(--blue-text); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.family { color: var(--secondary); font-size: .66rem; font-family: var(--mono); }
.tool-card h3 { font-size: 1.03rem; line-height: 1.22; }
.tool-card p { margin-top: 5px; max-width: 30ch; font-size: .83rem; line-height: 1.42; color: var(--secondary); padding-right: 14px; }
.tool-card-arrow { position: absolute; right: 13px; bottom: 10px; color: var(--blue-text); font-size: .95rem; }
.home-guides { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 25px; }
.guide-card { padding: 17px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; background: var(--sheet); text-decoration: none; }
.guide-card h2 { display: flex; justify-content: space-between; gap: 6px; font-size: 1.22rem; }
.guide-card h2 span { color: var(--blue-text); }
.guide-card p { color: var(--secondary); margin-top: 6px; font-size: .86rem; }

.breadcrumb { margin-block: 20px 14px; color: var(--secondary); font-size: .76rem; }
.breadcrumb ol { padding: 0; list-style: none; display: flex; gap: .45rem; row-gap: .15rem; flex-wrap: wrap; align-items: center; }
.breadcrumb li + li::before { content: '/'; margin-right: .45rem; color: var(--line-strong); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.calc-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 0 0 19px; }
.calc-heading h1, .editorial h1, .error-page h1 { margin: 7px 0 7px; font-size: clamp(1.85rem, 4vw, 3.15rem); line-height: 1.09; letter-spacing: -.056em; }
.calc-heading > div:first-child > p:last-child { color: var(--secondary); font-size: .95rem; max-width: 76ch; }
.calc-actions { display: flex; flex: 0 0 auto; gap: 8px; padding-bottom: 1px; }
.jump-results { display: none; }
.unit-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 5px; background: var(--sheet); }
.unit-toggle button { padding: .25rem .65rem; min-width: 42px; color: var(--secondary); font-family: var(--mono); font-size: .77rem; font-weight: 700; border: 0; background: transparent; border-radius: 4px; }
.unit-toggle button[aria-pressed="true"] { color: var(--blue-text); background: var(--blue-plate); box-shadow: inset 0 0 0 1px var(--line-strong); }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; gap: 14px; }
.input-panel, .output-panel { min-width: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--sheet); }
.panel-head {
  display: flex; min-height: 53px; align-items: center; justify-content: space-between; gap: 7px;
  padding: 7px 14px; border-bottom: 1px solid var(--line); background: var(--panel); border-radius: 5px 5px 0 0;
}
.panel-head h2 { font-size: 1.13rem; white-space: nowrap; }
.quiet-button { min-height: 42px; border: 1px solid transparent; padding: .35rem .6rem; border-radius: 4px; background: transparent; color: var(--blue-text); font-size: .8rem; font-weight: 700; }
.fields { padding: 12px 13px 16px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset + fieldset { margin-top: 15px; }
fieldset > legend { display: block; width: 100%; padding: 0 0 5px; margin-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--blue-text); font-size: .72rem; font-family: var(--mono); font-weight: 650; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.field-select { grid-column: 1 / -1; }
.field label, dialog label { display: block; color: var(--ink); font-size: .76rem; font-weight: 700; line-height: 1.28; }
.field small { display: block; color: var(--secondary); font-size: .66rem; line-height: 1.35; }
.numeric { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); min-width: 0; }
.numeric:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.numeric:has([aria-invalid="true"]) { border-color: var(--red); }
.numeric input {
  width: 100%; min-width: 0; padding: .4rem .48rem; border: 0; outline: none; border-radius: inherit;
  background: transparent; color: var(--ink); font-family: var(--mono); font-size: .87rem; font-variant-numeric: tabular-nums;
  appearance: textfield;
}
.numeric input::-webkit-inner-spin-button, .numeric input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.unit { padding-right: .4rem; flex: 0 0 auto; font-size: .65rem; color: var(--secondary); white-space: nowrap; }
.field select, dialog input {
  width: 100%; min-width: 0; padding: .4rem .5rem; border-radius: 4px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); font-size: .84rem;
}
.results-head h2 { white-space: normal; }
.status {
  max-width: 55%; padding: 4px 7px; border-radius: 3px; background: var(--blue-plate); color: var(--blue-text);
  font-size: .71rem; font-weight: 750; line-height: 1.27; text-align: right;
}
.status[data-tone="safe"] { color: var(--teal); background: var(--teal-plate); }
.status[data-tone="alert"] { color: var(--red); background: var(--red-plate); }
.diagram-host { background: var(--paper); border-bottom: 1px solid var(--line); }
.live-diagram { width: 100%; height: auto; max-width: 100%; }
.svg-text { fill: var(--ink); font-family: var(--sans); font-size: 13px; font-variant-numeric: tabular-nums; }
.svg-title { font-size: 15px; font-weight: 690; }
.svg-key { font-size: 12px; font-weight: 630; fill: var(--secondary); }
.svg-legend .svg-key { font-size: 11.4px; }
.svg-meta { font-family: var(--mono); letter-spacing: .4px; font-size: 11.5px; font-weight: 650; fill: var(--blue-text); }
.svg-value { font-family: var(--mono); font-size: 17.6px; letter-spacing: -.48px; font-weight: 700; }
.svg-value-long { font-size: 13px; letter-spacing: -.2px; }
.svg-paper { fill: var(--paper); }
.svg-card, .svg-panel { fill: var(--sheet); stroke: var(--line); stroke-width: 1; }
.svg-card { fill: var(--panel); }
.grid { stroke: var(--grid); stroke-width: .8; }
.axis, .dim { fill: none; stroke: var(--secondary); stroke-width: 1.08; }
.ink-stroke, .water-stroke, .critical-stroke, .alert-stroke, .reference-stroke, .water-guide, .guide, .thin-critical, .thin-water {
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.ink-stroke { stroke: var(--ink); stroke-width: 1.65; }
.water-stroke { stroke: var(--blue); stroke-width: 2.45; }
.critical-stroke { stroke: var(--teal); stroke-width: 1.9; stroke-dasharray: 5 3; }
.alert-stroke { stroke: var(--red); stroke-width: 1.85; }
.reference-stroke { stroke: var(--secondary); stroke-width: 1.45; stroke-dasharray: 6 4; }
.guide { stroke: var(--secondary); stroke-width: .95; stroke-dasharray: 4 4; }
.water-guide { stroke: var(--blue); stroke-width: 1.05; stroke-dasharray: 3 3; }
.thin-water { stroke: var(--blue); stroke-width: .94; }
.thin-critical { stroke: var(--teal); stroke-width: .82; stroke-dasharray: 3 2; }
.water-fill { fill: var(--water-fill); }
.alert-fill { fill: var(--red-plate); }
.structure { fill: var(--structure); stroke: var(--secondary); stroke-width: 1.15; }
.soil { fill: var(--soil); }
.safe-window { fill: var(--teal-plate); stroke: var(--teal); stroke-width: .9; }
.water-solid, .water-dot { fill: var(--blue); }
.safe-solid, .safe-dot { fill: var(--teal); }
.alert-solid, .alert-dot { fill: var(--red); }
.water-dot, .safe-dot, .alert-dot { stroke: var(--sheet); stroke-width: 1.45; }
.sediment-dot { fill: var(--structure); stroke: var(--secondary); stroke-width: .8; }
.gauge-track { stroke: var(--line); stroke-width: 5; stroke-linecap: round; }
.gauge-window { stroke: var(--teal); stroke-width: 4; stroke-linecap: round; opacity: .5; }
.input-error { color: var(--red); margin: 13px; padding: 16px; border: 1px solid var(--red); border-radius: 4px; background: var(--red-plate); font-size: .86rem; }
.export-strip { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 11px 12px 5px; }
.file-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.share-button { color: var(--blue-text); }
.feedback { color: var(--blue-text); font-size: .75rem; padding: 0 13px 5px; }
.feedback:empty, .notes:empty, .readings:empty { display: none; }
.notes { padding: 3px 12px 8px; }
.result-notes {
  border-left: 2px solid var(--blue); background: var(--panel); padding: 7px 10px 7px 22px; color: var(--secondary);
  font-size: .74rem; line-height: 1.4;
}
.result-notes li + li { margin-top: 3px; }
.readings { padding: 7px 12px 12px; }
.results-detail h3, .schedule h3, .print-values h3 { margin-bottom: 6px; font-size: .91rem; }
.result-grid, .print-values dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; font-size: .73rem; }
.result-grid > div, .print-values dl > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 6px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.result-grid dt, .print-values dt { color: var(--secondary); }
.result-grid dd, .print-values dd { color: var(--ink); margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 650; word-break: break-word; }
.schedule { margin-top: 13px; }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.schedule-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .74rem; }
.schedule-table th, .schedule-table td { padding: 4px 7px; text-align: right; white-space: nowrap; }
.schedule-table th { background: var(--panel); color: var(--ink); font-weight: 700; }
.schedule-table th span { display: block; color: var(--secondary); font-size: .65rem; font-weight: 500; }
.schedule-table td { border-top: 1px solid var(--line); font-family: var(--mono); }
.schedule-table tbody tr:nth-child(even) { background: var(--paper); }
.print-values { display: none; }
.method-block, .cases { margin-top: 22px; }
.method-block { background: var(--sheet); border: 1px solid var(--line); border-radius: 5px; padding: 16px; }
.method-block h2 { font-size: 1.36rem; }
.method-block p { color: var(--secondary); margin-top: 7px; font-size: .86rem; }
.method-block .case-interpretation { color: var(--ink); }
.formula {
  background: var(--panel); border-left: 2px solid var(--teal); padding: 6px 9px; color: var(--ink) !important;
  font-family: var(--mono); font-size: .79rem !important; overflow-wrap: anywhere;
}
.source-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.source-chips a { border: 1px solid var(--line); border-radius: 3px; padding: 4px 7px; font-size: .73rem; text-decoration: none; }
.source-chips a:hover { border-color: var(--blue); }
.case-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.case-grid li { display: flex; min-width: 0; }
.case-grid a {
  position: relative; width: 100%; display: block; padding: 10px 25px 10px 11px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--sheet); color: var(--ink); text-decoration: none; font-size: .86rem; line-height: 1.4;
}
.case-grid a span { position: absolute; top: 9px; right: 10px; color: var(--blue-text); }
.case-grid a small { display: block; margin-top: 4px; color: var(--secondary); font-size: .76rem; }
dialog {
  max-width: min(30rem, calc(100vw - 28px)); width: 100%; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--sheet); color: var(--ink); padding: 0; box-shadow: 0 12px 30px var(--shadow);
}
dialog::backdrop { background: #0e213b7a; }
.dialog-inner { padding: 17px; }
.dialog-inner h2 { font-size: 1.4rem; }
.dialog-inner p { margin: 7px 0 11px; color: var(--secondary); font-size: .86rem; }
.dialog-inner input { margin: 4px 0 12px; font-family: var(--mono); font-size: .74rem; }
.dialog-inner > div { display: flex; gap: 6px; }

.editorial-heading { border-bottom: 1px solid var(--line-strong); padding-bottom: 16px; margin-bottom: 16px; }
.editorial-heading > p:last-child, .error-page > p { color: var(--secondary); }
.editorial-intro, .field-guide-layout > section, .method-tiles > section, .reference-list { border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); padding: 16px; }
.editorial-intro h2, .method-tiles h2, .field-guide-layout h2, .reference-list h2 { font-size: 1.3rem; }
.editorial p:not(.eyebrow) { font-size: .91rem; }
.editorial section p:not(.eyebrow) { margin-top: 6px; color: var(--secondary); max-width: 93ch; }
.method-tiles, .field-guide-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-block: 13px; }
.method-tiles h2 a { text-decoration: none; }
.reference-list { margin-top: 13px; }
.bibliography { padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-top: 6px; }
.bibliography li { display: grid; gap: 2px; border-top: 1px solid var(--line); padding: 7px 0 3px; min-width: 0; }
.bibliography cite { font-size: .87rem; font-style: normal; font-weight: 690; }
.bibliography span { color: var(--secondary); font-size: .78rem; }
.bibliography small { color: var(--blue-text); font: .66rem var(--mono); overflow-wrap: anywhere; }
.editorial-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.error-page { padding-block: clamp(60px, 16vh, 165px) 50px; }
.error-page .button { margin-top: 17px; }

.share-card { width: 1200px; height: 630px; display: grid; place-content: center; padding: 56px 60px; overflow: hidden; }
.share-card .home-hero { grid-template-columns: .91fr 1fr; gap: 45px; padding: 16px 0; }
.share-card .hero-copy h1 { font-size: 64px; }
.share-card .brand { padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 46px); }
  .home-hero { padding-block: 41px 36px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-card { min-height: 128px; }
  .calc-layout { grid-template-columns: minmax(252px, .94fr) minmax(0, 1.7fr); }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 24px); }
  .header-inner { min-height: 61px; gap: 5px; }
  .header-actions { gap: 4px; }
  .brand { gap: 6px; font-size: 1.02rem; }
  .brand svg { width: 32px; height: 32px; }
  .wide-nav { display: none; }
  .mobile-nav { display: block; }
  .theme-button { width: 42px; min-height: 42px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 23px 25px; }
  .hero-copy h1 { font-size: clamp(2.65rem, 11.1vw, 4rem); margin-block: 9px 12px; }
  .hero-deck { font-size: .99rem; }
  .hero-actions { gap: 6px; margin-top: 15px; }
  .hero-actions .button { font-size: .76rem; padding-inline: 8px; gap: 5px; }
  .hero-meta { margin-top: 10px; font-size: .66rem; }
  .hero-figure figcaption { min-height: 36px; padding-inline: 9px; font-size: .61rem; }
  .tool-section { padding-top: 16px; }
  .section-head { align-items: start; flex-direction: column; gap: 5px; margin-bottom: 10px; }
  .tool-grid, .home-guides { gap: 7px; }
  .tool-card { min-height: 134px; padding: 9px 8px 11px; }
  .tool-card-top { margin-bottom: 7px; }
  .tool-card h3 { font-size: .88rem; }
  .tool-card p { font-size: .73rem; padding-right: 6px; }
  .tool-card-arrow { right: 6px; bottom: 6px; font-size: .78rem; }
  .home-guides { margin-top: 14px; }
  .guide-card { padding: 9px; }
  .guide-card h2 { font-size: .98rem; }
  .guide-card p { font-size: .75rem; }
  .site-footer { margin-top: 30px; }
  .footer-inner { flex-direction: column; align-items: start; padding-block: 13px; gap: 9px; }
  .site-footer nav { gap: 10px; }
  .site-footer nav a { font-size: .78rem; }
  .breadcrumb { margin-block: 12px 10px; font-size: .7rem; }
  .calc-heading { align-items: start; flex-direction: column; padding-bottom: 11px; gap: 9px; }
  .calc-heading h1, .editorial h1, .error-page h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .calc-heading > div:first-child > p:last-child { font-size: .83rem; }
  .calc-layout { display: flex; flex-direction: column; gap: 9px; }
  .input-panel, .output-panel { width: 100%; }
  .jump-results { display: inline-flex; }
  .panel-head { padding: 4px 9px; min-height: 49px; }
  .panel-head h2 { font-size: 1rem; }
  .fields { padding: 8px 8px 12px; }
  fieldset + fieldset { margin-top: 11px; }
  .numeric input, .field select { font-size: 16px; }
  .export-strip { padding-inline: 7px; gap: 5px; }
  .file-actions { gap: 3px; }
  .export-strip .button { padding-inline: .43rem; font-size: .72rem; }
  .notes, .readings { padding-inline: 7px; }
  .method-block, .cases { margin-top: 13px; }
  .method-block { padding: 10px; }
  .case-grid, .method-tiles, .field-guide-layout, .bibliography { grid-template-columns: minmax(0, 1fr); }
  .editorial-intro, .field-guide-layout > section, .method-tiles > section, .reference-list { padding: 10px; }
}
@media (max-width: 358px) {
  .hero-meta { font-size: .6rem; }
  .field label { font-size: .71rem; }
  .field select { font-size: .85rem; }
  .schedule-table th, .schedule-table td { padding-inline: 4px; font-size: .68rem; }
  .family { font-size: .63rem; }
}

@page { size: A4; margin: 9mm 11mm; }
@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --paper: #fff; --sheet: #fff; --panel: #edf4f7; --ink: #0f1e2e; --secondary: #3c586b;
    --line: #c5d6e0; --line-strong: #9db7c7; --grid: #dfeaf1; --blue: #0284c7; --blue-text: #075985;
    --blue-plate: #dceff9; --teal: #0f766e; --teal-plate: #e1f3ee; --red: #b91c1c; --red-plate: #fbe9e7;
    --water-fill: #ccebf8; --structure: #d1dee6; --soil: #e2e7e7;
  }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body { font-size: 8pt; line-height: 1.22; }
  .wrap { width: 100%; margin: 0; }
  .site-header, .site-footer, .skip-link, .breadcrumb, .calc-actions, .input-panel, .export-strip, .feedback,
  .cases, dialog, .hero-actions, .hero-meta, .home-guides, .editorial-actions, .source-chips, .section-head .text-link { display: none; }
  .calc-heading { margin: 0 0 4px; padding: 0; display: block; }
  .calc-heading h1, .editorial h1, .error-page h1 { font-size: 19pt; margin: 3px 0; }
  .calc-heading > div:first-child > p:last-child, .eyebrow, .editorial p:not(.eyebrow) { font-size: 7.2pt; }
  .calc-layout { display: block; }
  .output-panel { border: 0; }
  .panel-head { min-height: 0; padding: 4px 5px; border: 0; }
  .panel-head h2 { font-size: 10pt; }
  .status { padding: 2px 4px; font-size: 7pt; }
  .diagram-host { border: 0; }
  .live-diagram { height: 238px; width: 100%; }
  .print-values { display: block; margin: 3px 0; }
  .print-values h3, .results-detail h3, .schedule h3 { font-size: 8pt; margin-bottom: 2px; }
  .print-values dl, .result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 6px; font-size: 6.7pt; }
  .print-values dl > div, .result-grid > div { padding: 2px 0; gap: 1px 3px; }
  .notes, .readings { padding: 2px 0; }
  .result-notes { padding: 3px 4px 3px 15px; font-size: 6.7pt; }
  .result-notes li + li { margin-top: 1px; }
  .schedule { margin-top: 4px; }
  .table-scroll { overflow: visible; }
  .schedule-table { font-size: 6.5pt; }
  .schedule-table th, .schedule-table td { padding: 1px 3px; font-size: 6.5pt; }
  .schedule-table th span { display: inline; margin-left: 3px; font-size: 6.2pt; }
  .method-block { margin-top: 5px; padding: 5px; }
  .method-block h2, .reference-list h2, .method-tiles h2, .field-guide-layout h2, .editorial-intro h2 { font-size: 10pt; }
  .method-block p { font-size: 7.1pt; margin-top: 3px; }
  .formula { font-size: 7pt !important; padding: 3px 5px; }
  .home-hero { padding-block: 5px 12px; gap: 15px; grid-template-columns: 1fr 1fr; }
  .hero-copy h1 { font-size: 29pt; margin: 4px 0; }
  .hero-deck { font-size: 9pt; }
  .hero-figure figcaption { min-height: 23px; font-size: 7pt; }
  .tool-section { padding-top: 7px; }
  .section-head h2 { font-size: 13pt; }
  .section-head p { font-size: 7pt; }
  .tool-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .tool-card { min-height: auto; padding: 5px; }
  .tool-card h3 { font-size: 8pt; }
  .tool-card p, .family { font-size: 6.8pt; }
  .tool-card-top { margin-bottom: 3px; }
  .editorial-heading { margin-bottom: 5px; padding-bottom: 4px; }
  .editorial-intro, .field-guide-layout > section, .method-tiles > section, .reference-list { padding: 5px; }
  .editorial section p:not(.eyebrow) { margin-top: 3px; }
  .method-tiles, .field-guide-layout { grid-template-columns: 1fr 1fr; gap: 4px; margin-block: 5px; }
  .reference-list { margin-top: 5px; }
  .bibliography { grid-template-columns: 1fr 1fr; gap: 0 9px; margin-top: 3px; }
  .bibliography li { padding: 2px 0; gap: 1px; }
  .bibliography cite { font-size: 7pt; }
  .bibliography span { font-size: 6.5pt; }
  .bibliography small { font-size: 5.9pt; }
  .error-page { padding: 20mm 0; }
}
