@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin.woff") format("woff");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  color-scheme: light;
  --canvas: #f6f7f2; --paper: #ffffff; --ink: #142e34; --muted: #516464;
  --accent: #126557; --action: #0d5148; --on-action: #fff; --line: #ccd4cb;
  --subtle: #edf1e9; --light-mint: #e5f2eb; --mint-edge: #318674; --mint-text: #146758;
  --amber: #b56c20; --amber-text: #85501e; --amber-bg: #fbf2e3;
  --footer: #142f32; --header: #102e33; --header-text: #f0f6f0;
  --display: "DM Sans", Inter, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: var(--display); color: var(--ink); background: var(--canvas);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #122327; --paper: #1a2f33; --ink: #e6eeea; --muted: #b1c5bd;
  --accent: #9fdbc4; --action: #a4e1c8; --on-action: #173730; --line: #39514f;
  --subtle: #233a3b; --light-mint: #203e37; --mint-edge: #85c8ae; --mint-text: #aee1c8;
  --amber: #daa361; --amber-text: #f0c486; --amber-bg: #403629;
  --footer: #0e2125; --header: #0c2024;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .19em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid var(--mint-edge); outline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-weight: 615; letter-spacing: -.045em; word-spacing: .025em; line-height: 1.03; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.15; font-weight: 650; letter-spacing: -.033em; }
h3 { font-size: 1.18rem; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; }
.container, .header-inner, .footer-inner { width: min(1140px, calc(100% - 88px)); margin-inline: auto; }
.skip-link { position: fixed; top: -6rem; left: 1rem; z-index: 10; padding: .65rem 1rem; background: var(--paper); color: var(--ink); }
.skip-link:focus { top: .5rem; }
.site-header { background: var(--header); color: var(--header-text); border-bottom: 2px solid #496b60; }
.header-inner { min-height: 66px; display: flex; align-items: center; gap: 28px; }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: .63rem; text-decoration: none; color: inherit; font-size: 1.42rem; line-height: 1; letter-spacing: -.055em; font-weight: 680; white-space: nowrap; }
.brand b, .footer-brand b { color: #ace0c9; font-weight: inherit; }
.brand-mark { display: inline-flex; }
.brand-mark img { width: 33px; height: 33px; border: 1px solid #557d71; border-radius: 8px; }
.main-nav { display: flex; align-self: stretch; align-items: stretch; margin-left: auto; gap: clamp(16px, 2.7vw, 38px); }
.main-nav a { display: flex; align-items: center; text-decoration: none; color: #c3d3ce; font-size: .9rem; font-weight: 530; padding: 3px 0 0; border-bottom: 3px solid transparent; }
.main-nav a[aria-current="page"], .main-nav a:hover { color: white; border-bottom-color: #a1d5bd; }
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; background: transparent; color: #cfdfd8; border: 1px solid #46625f; border-radius: 6px; padding: 8px; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle:hover { background: #24454a; }
.theme-toggle .sun, [data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
.hero { display: grid; grid-template-columns: 1.08fr 1fr; align-items: center; gap: clamp(32px, 6vw, 88px); padding: clamp(38px, 5.3vw, 72px) 0 clamp(32px, 4.7vw, 63px); border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: .65rem; font: 650 .72rem/1.45 var(--mono); color: var(--accent); letter-spacing: .115em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 1.35rem; height: 2px; background: var(--mint-edge); }
.hero h1 { margin: 14px 0 15px; font-size: clamp(3.1rem, 5.15vw, 4.85rem); }
.hero h1 span { display: block; color: var(--accent); }
.hero-copy > p, .article-hero > p:last-of-type { max-width: 51ch; font-size: clamp(1rem, 1.45vw, 1.18rem); line-height: 1.5; color: var(--muted); }
.hero-diagram { width: 100%; border: 1px solid #b8cbbf; border-radius: 8px; overflow: hidden; background: #eaf1eb; }
.hero-diagram svg { display: block; height: auto; }
.workbench { padding: 35px 0 0; }
.section-heading, .chart-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading { margin-bottom: 19px; }
.section-heading p { margin-top: 4px; color: var(--muted); font-size: .95rem; }
.section-heading .eyebrow { margin-bottom: 8px; }
.preset-control { display: flex; align-items: center; gap: 11px; flex: none; font-size: .84rem; font-weight: 590; }
.preset-control select { width: auto; min-width: 166px; }
.streams { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stream-card, .settings-panel, .panel { min-width: 0; margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.stream-card { position: relative; padding: 0 22px 22px; border-top: 3px solid var(--mint-edge); }
.stream-two { border-top-color: var(--amber); }
.stream-head { float: left; display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px 0 14px; font-size: 1.13rem; font-weight: 680; letter-spacing: -.025em; color: var(--mint-text); }
.stream-two .stream-head { color: var(--amber-text); }
.stream-dot { width: 20px; height: 11px; background: var(--mint-edge); clip-path: polygon(0 30%, 65% 30%, 65% 0, 100% 50%, 65% 100%, 65% 70%, 0 70%); }
.stream-two .stream-dot { background: var(--amber); }
.inputs, .options-grid { display: grid; gap: 15px 18px; }
.inputs { clear: both; grid-template-columns: repeat(2,minmax(0,1fr)); }
.field-title, .inputs label, .options-grid label { display: block; min-width: 0; }
.field-title { margin-bottom: 5px; color: var(--ink); font-size: .815rem; font-weight: 600; }
.unit { color: var(--muted); font-size: .73rem; font-weight: 480; white-space: nowrap; margin-left: .3em; }
input, select { display: block; width: 100%; min-width: 0; min-height: 41px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; background-color: var(--canvas); padding: 8px 11px; font-size: .94rem; line-height: 1.35; }
input[type="number"] { font-variant-numeric: tabular-nums; font-weight: 530; }
input:hover, select:hover { border-color: var(--mint-edge); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='m3 4 4 4 4-4' fill='none' stroke='%234f7067' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 14px; padding-right: 32px; }
[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='m3 4 4 4 4-4' fill='none' stroke='%23bddacb' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.settings-panel { margin-top: 16px; padding: 17px 22px 20px; }
.settings-heading h3 { margin-bottom: 11px; font-size: 1.05rem; }
.options-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 15px; }
.terms-choice { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; font-size: .95rem; }
.terms-choice input { flex: none; width: 19px; height: 19px; min-height: 0; padding: 0; margin: 0; accent-color: var(--action); cursor: pointer; }
.terms-choice label { display: inline-block; padding-block: 5px; font-weight: 600; cursor: pointer; }
.terms-choice a { display: inline-block; margin-inline-start: 5px; }
.form-note, .result-note, .under-table, .subtitle-small { font-size: .87rem; color: var(--muted); }
.primary-btn { display: inline-flex; justify-content: center; align-items: center; gap: 19px; background: var(--action); color: var(--on-action); border: 1px solid var(--action); border-radius: 6px; padding: 12px 19px; font-size: .98rem; font-weight: 650; }
.primary-btn:hover { filter: brightness(1.14); }
.primary-btn:disabled { opacity: .67; cursor: default; }
.error { margin-top: 15px; padding: 12px 16px; color: #7e2e19; background: #fff2e8; border-left: 3px solid #b05e32; border-radius: 3px; }
.result-section, .reading-section { margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--line); }
.status { border-radius: 4px; padding: 5px 10px; background: var(--light-mint); border: 1px solid var(--mint-edge); color: var(--mint-text); font-size: .84rem; font-weight: 610; }
.status.condensing { color: var(--amber-text); background: var(--amber-bg); border-color: var(--amber); }
.results-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.metric { display: grid; align-content: space-between; gap: 5px; border: 1px solid var(--line); border-radius: 6px; padding: 15px; background: var(--paper); }
.metric > span { font-size: .79rem; font-weight: 540; color: var(--muted); }
.metric strong { font-size: clamp(1.05rem,2.1vw,1.6rem); letter-spacing: -.045em; font-weight: 625; font-variant-numeric: tabular-nums; }
.primary-metric { background: var(--light-mint); }
.result-note, .under-table { margin-top: 12px; }
.panel { margin-top: 20px; padding: clamp(14px,2.5vw,25px); }
.chart-header { margin-bottom: 12px; }
svg#chart { display: block; border-radius: 5px; background: #f6f8f3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 15px; color: var(--muted); font-size: .8rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: block; width: 10px; height: 10px; border-radius: 50%; }
.stream-one-swatch { background: #188778; }.stream-two-swatch { background: #b6671d; }.virtual-swatch { background: #8063a0; }.final-swatch { background: #124e43; }.sat-swatch { background: #566a6d; height: 2px; width: 17px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .89rem; font-variant-numeric: tabular-nums; }
table caption { padding: 0 0 9px; text-align: left; color: var(--muted); font-size: .84rem; font-weight: 550; }
th, td { padding: 10px 12px; }
thead { background: var(--subtle); }
thead th { font-weight: 650; } tbody th { font-weight: 540; }
th, td { border-bottom: 1px solid var(--line); }
.breakdown-panel td, .breakdown-panel thead th:not(:first-child) { text-align: right; }
.reading-section { margin-bottom: clamp(38px,5vw,68px); }
.reading-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.reading-card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 20px 22px; text-decoration: none; }
.reading-card:hover { background: var(--light-mint); border-color: var(--mint-edge); }
.reading-card h3 { display: flex; justify-content: space-between; align-items: center; color: var(--accent); }
.reading-card p { font-size: .94rem; color: var(--muted); margin-top: 7px; }
.site-footer { background: var(--footer); color: #e6eee9; }
.footer-inner { min-height: 112px; padding-block: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand { font-size: 1.2rem; }.footer-brand .brand-mark img { width: 27px; height: 27px; }
.footer-inner p { margin-top: 7px; font-size: .8rem; color: #bdcfc7; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-inner nav a { color: #d2e3d9; font-size: .85rem; }
.article-main { padding-bottom: clamp(45px,6vw,84px); }
.article-hero { padding: clamp(38px,5.8vw,77px) 0 29px; border-bottom: 1px solid var(--line); }
.article-hero h1 { margin: 12px 0 14px; max-width: 19ch; font-size: clamp(2.7rem,5.1vw,4.5rem); }
.article-hero > p:last-of-type { max-width: 68ch; }
.article-body { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: clamp(35px,7vw,110px); align-items: start; }
.article-contents { order: 2; padding: 27px 0 0; position: sticky; top: 0; }
.article-contents > p { font-size: .78rem; font-weight: 670; color: var(--muted); margin-bottom: 9px; }
.article-contents a { display: block; padding: 6px 0; color: var(--accent); text-decoration: none; font-size: .88rem; }
.article-contents a:hover { text-decoration: underline; }
.article-content { max-width: 79ch; min-width: 0; }
.article-section { scroll-margin-top: 1rem; }
.article-section + .article-section { border-top: 1px solid var(--line); }
.article-section { padding: 27px 0 24px; }
.article-section > * + * { margin-top: 12px; }
.article-section p, .article-section li { line-height: 1.65; }
.article-section h2 { font-size: clamp(1.45rem,2.6vw,1.95rem); }
.article-section h3 { margin-top: 19px; }
.article-section ul { padding-left: 1.3rem; }.article-section li + li { margin-top: .52rem; }
.article-section .table-scroll { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; margin-block: 18px; }
.article-section table caption { padding: 10px 12px; }
.article-section table tbody tr:last-child > * { border-bottom: none; }
.formula { padding: 16px 20px; background: var(--light-mint); border-left: 3px solid var(--mint-edge); color: var(--ink); font-size: 1.07rem; }
.text-link { font-weight: 620; }
@media (max-width: 900px) {
  .container, .header-inner, .footer-inner { width: calc(100% - 48px); }
  .hero { gap: 25px; }
  .article-body { grid-template-columns: minmax(0,1fr) 165px; gap: 35px; }
  .stream-card { padding-inline: 15px; }
  .inputs { gap: 12px; }.field-title { font-size: .79rem; }
}
@media (max-width: 680px) {
  .container, .header-inner, .footer-inner { width: calc(100% - 32px); }
  .header-inner { gap: 0 12px; flex-wrap: wrap; padding-top: 12px; }
  .brand { font-size: 1.28rem; }.brand-mark img { width: 29px; height: 29px; }
  .theme-toggle { margin-left: auto; width: 32px; height: 32px; padding: 5px; }
  .main-nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 8px; }
  .main-nav a { min-height: 42px; padding-top: 3px; font-size: .85rem; }
  .hero { grid-template-columns: 1fr; gap: 19px; padding: 28px 0; }
  .hero h1 { margin: 9px 0; font-size: clamp(2.65rem,10vw,3.8rem); }.hero h1 span { display: inline; }
  .hero-copy > p { max-width: 57ch; }
  .hero-diagram { width: 100%; max-width: 470px; }
  .workbench { padding-top: 24px; }
  .section-heading { flex-wrap: wrap; gap: 12px; }
  .preset-control { gap: 8px; font-size: .82rem; }.preset-control select { min-width: 155px; }
  .streams { grid-template-columns: 1fr; gap: 13px; }
  .inputs { gap: 12px 14px; }.stream-card { padding: 0 15px 16px; }.stream-head { padding: 11px 0; }
  .settings-panel { padding: 14px 15px 16px; }
  .options-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.options-grid label:last-child { grid-column: 1 / -1; }
  .form-actions { flex-wrap: wrap; }.form-note:empty { display: none; }.primary-btn { width: 100%; }
  .results-grid, .reading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chart-header { align-items: flex-start; flex-wrap: wrap; gap: 4px; }
  .breakdown-panel table { min-width: 540px; }.reading-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .article-body { display: flex; flex-direction: column; gap: 0; }
  .article-contents { position: static; order: 0; display: none; }
  .article-content { max-width: 100%; width: 100%; }
  .article-section table { font-size: .82rem; }.article-section :is(td,th) { padding: 8px; }
  input, select { font-size: 1rem; }
}
@media (max-width: 365px) {
  .container, .header-inner, .footer-inner { width: calc(100% - 24px); }
  .inputs, .options-grid { grid-template-columns: 1fr; }
  .results-grid { gap: 6px; }.metric { padding: 10px; }
}
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; --paper: white; --canvas: white; --ink: black; --muted: #333; --accent: #163e35; --subtle: #eee; --light-mint: #eee; --line: #aaa; }
  .main-nav, .theme-toggle, .site-footer, .form-actions, .reading-section, .preset-control, .article-contents { display: none; }
  .container, .header-inner { width: 100%; }.site-header { color: black; background: white; }
  .article-body { display: block; }.article-content { max-width: unset; }
  .hero, .article-hero { padding: 1rem 0; }.hero h1, .article-hero h1 { font-size: 2.4rem; }
  .panel, .stream-card, .metric { break-inside: avoid; }
}
.footer-inner p a, .footer-inner .privacy-options { color: #d2e3d9; }
.input-guide-link { margin-top: 16px; font-size: .9rem; }
.privacy-options { border: 0; padding: 0; background: none; text-decoration: underline; text-underline-offset: .19em; font-size: .85rem; }

.skip-link:not(:focus) { clip-path: inset(50%); }
.action-notes p + p:not(:empty) { margin-top: 4px; }
