:root {
  --navy: #07172e;
  --navy-2: #0b2445;
  --orange: #ec7000;
  --orange-soft: #ff8b22;
  --cream: #f6f1e8;
  --ink: #152039;
  --muted: #657083;
  --line: #e2e5e9;
  --white: #fff;
  --green: #17654b;
  --red: #a52e27;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #3ba5d4; outline-offset: 3px; }
a { color: inherit; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
output { display: block; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; z-index: 50; top: 8px; left: 16px; padding: 12px 18px; background: white; border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.topbar { position: relative; background: var(--navy); color: white; border-bottom: 1px solid rgba(255,255,255,.13); }
.topbar-inner { max-width: 1480px; min-height: 84px; margin: 0 auto; padding: 16px 40px; display: flex; align-items: center; gap: 32px; }
.brand { display: block; flex-shrink: 0; }
.brand img { display: block; width: 168px; height: auto; }
.topbar-title { border-left: 1px solid #314158; padding-left: 28px; color: #c0ccda; font-size: 13px; font-weight: 650; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.button-quiet { color: #e1e9f3; border: 1px solid #40516a; background: transparent; }
.button-quiet:hover { background: rgba(255,255,255,.08); }
.print-button { margin-left: auto; }
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at 82% 90%, rgba(236,112,0,.13), transparent 40%), linear-gradient(120deg, #041126, #0b2445); color: white; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(90deg, transparent 20%, #000); }
.hero-inner { position: relative; max-width: 1480px; margin: 0 auto; padding: 50px 40px 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 80px; align-items: center; }
.eyebrow { margin: 0 0 20px; display: flex; align-items: center; gap: 12px; color: #b7c7da; font-size: 10px; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow > span { width: 28px; height: 2px; background: var(--orange); }
h1 { font-size: clamp(42px, 4.9vw, 68px); line-height: .99; letter-spacing: -.055em; font-weight: 650; margin: 0; }
h1 em { color: var(--orange-soft); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero-lead { max-width: 660px; margin: 24px 0 0; color: #b8c7d8; line-height: 1.7; font-size: 14px; }
.hero-note { padding: 26px 0 26px 28px; border-left: 1px solid #3b4b60; }
.note-kicker { color: var(--orange-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 750; }
.hero-note p { margin: 15px 0; color: #c2ccda; font-size: 18px; line-height: 1.6; letter-spacing: -.025em; }
.hero-note strong { color: white; font-weight: 600; }
.note-rule { width: 38px; height: 2px; background: var(--orange); display: block; margin: 20px 0; }
.hero-note small { color: #a6b7cc; font-size: 12px; line-height: 1.7; display: block; }
.workspace { max-width: 1480px; margin: 0 auto; padding: 32px 40px 64px; display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 24px; align-items: start; }
.workspace > *, .results-column > *, .headline-metrics > *, .metrics-grid > *, .comparison-panel > *, .method-grid > *, .results-heading > *, .partial-result > *, .quantity-summary > * { min-width: 0; }
.controls-panel, .results-panel, .detail-panel, .method-panel { border: 1px solid #e2dfd8; border-radius: 16px; background: white; }
.controls-panel { margin: 0; padding: 25px 24px 24px; }
.panel-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.section-kicker { color: #8d684a; font-size: 9px; line-height: 1.5; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; margin: 0 0 8px; }
h2 { margin: 0; font-size: 23px; line-height: 1.2; font-weight: 650; letter-spacing: -.04em; }
.text-button { border: 0; background: transparent; color: #8b450b; min-height: 38px; padding: 5px 0 5px 10px; text-decoration: underline; text-underline-offset: 3px; font-size: 11px; font-weight: 700; }
.panel-intro { margin: 15px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.65; }
fieldset { padding: 21px 0 23px; margin: 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
legend { float: left; width: 100%; padding: 0 0 18px; display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 750; letter-spacing: -.015em; }
legend + * { clear: both; }
legend > span { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; flex: 0 0 auto; border-radius: 6px; background: #f9eee2; color: #9b4b08; font-size: 9px; }
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 17px 12px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label { min-height: 16px; display: block; margin-bottom: 7px; color: #465063; font-size: 10px; font-weight: 650; line-height: 1.4; }
.input-wrap { display: flex; align-items: center; min-width: 0; height: 43px; border: 1px solid #d7dce3; border-radius: 8px; background: #fcfcfd; transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: #a46431; box-shadow: 0 0 0 3px #fbf1e8; }
.input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 10px; color: var(--navy); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.input-wrap input:focus-visible { outline: none; }
input::placeholder { color: #9299a4; font-weight: 400; font-size: 11px; }
.input-wrap .prefix { color: #8a93a1; font-size: 10px; font-weight: 650; padding-left: 11px; }
.input-wrap .unit { color: #8a93a1; font-size: 9px; font-weight: 650; padding-right: 10px; white-space: nowrap; }
select { width: 100%; min-width: 0; height: 43px; color: var(--ink); border: 1px solid #d7dce3; background: #fcfcfd; border-radius: 8px; padding: 0 6px; font-size: 10px; font-weight: 600; }
.field small { display: block; margin-top: 7px; color: #7c8592; font-size: 10px; line-height: 1.6; }
.field-note { margin: 12px 0 0; color: #7c8592; font-size: 10px; line-height: 1.65; }
.evidence-note { margin: 17px 0 0; padding: 12px 13px; border-left: 2px solid #dfb48b; border-radius: 0 6px 6px 0; background: #faf7f2; color: #817260; font-size: 10px; line-height: 1.65; }
.history-assumption { margin-top: 14px; }
.history-assumption .check-label { font-size: 10px; font-weight: 550; color: #636e7e; }
.history-assumption p { margin: 7px 0 0 25px; color: #8b929d; font-size: 10px; line-height: 1.6; }
.confirmation-box { padding: 15px; border: 1px solid #dfd6c8; border-radius: 9px; background: #faf7f1; }
.check-label { display: flex; align-items: flex-start; gap: 9px; font-size: 11px; font-weight: 650; line-height: 1.55; color: #374153; cursor: pointer; }
.check-label input { flex: 0 0 auto; accent-color: var(--orange); width: 16px; height: 16px; margin: 1px 0 0; cursor: pointer; }
.confirmation-box p { margin: 7px 0 0 25px; color: #7e7b73; font-size: 10px; line-height: 1.5; }
.error-message { color: var(--red); background: #fceeea; border: 1px solid #eac5be; padding: 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; margin: 15px 0 0; }
.results-column { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.results-panel { padding: 25px 24px 20px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 23px; }
.results-heading h2 { font-size: 22px; }
.status-pill { padding: 7px 9px; background: #f8f0e4; color: #90622c; border: 1px solid #eadcc8; border-radius: 7px; font-size: 9px; font-weight: 700; text-align: center; line-height: 1.45; max-width: 160px; }
.status-pill.complete, .status-pill.is-complete { background: #edf6f1; color: var(--green); border-color: #cce1d4; }
.headline-metrics { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 12px; }
.metric { padding: 23px 21px; border-radius: 12px; min-width: 0; }
.metric p { margin: 0 0 14px; font-size: 11px; line-height: 1.5; font-weight: 600; }
.metric output { font-size: clamp(25px, 2.5vw, 39px); letter-spacing: -.065em; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.metric small { display: block; margin-top: 13px; font-size: 10px; line-height: 1.55; }
.metric-primary { background: var(--navy); color: white; position: relative; overflow: hidden; }
.metric-primary::after { content: ""; position: absolute; bottom: 0; left: 21px; width: 44px; height: 3px; background: var(--orange); }
.metric-primary p { color: #c3cfdd; }
.metric-primary small { color: #8ea2b9; }
.metric-contribution { background: #f4f0e9; color: var(--navy); }
.metric-contribution p { color: #6e675c; }
.metric-contribution small { color: #8a8276; }
.partial-result { margin-top: 14px; padding: 13px 2px 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.partial-result span { font-size: 11px; font-weight: 700; color: #536075; }
.partial-result p { margin: 3px 0 0; color: #9198a2; font-size: 10px; line-height: 1.5; }
.partial-result output { flex: 0 1 48%; text-align: right; font-size: 20px; font-weight: 650; letter-spacing: -.04em; color: #5f6a7b; white-space: normal; overflow-wrap: anywhere; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 21px; gap: 24px 16px; }
.small-metric { min-width: 0; }
.small-metric > span { display: block; color: #657083; font-size: 10px; line-height: 1.5; font-weight: 550; min-height: 30px; }
.small-metric output { margin-top: 8px; font-size: 24px; line-height: 1.25; letter-spacing: -.05em; font-weight: 650; overflow-wrap: anywhere; }
.small-metric small { display: block; margin-top: 6px; color: #969da7; font-size: 9px; line-height: 1.55; }
.assumptions-note { margin: 21px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.6; color: #8a765e; }
.detail-panel { padding: 23px 24px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-title-row h2 { font-size: 21px; }
.unit-label { color: #9299a3; font-size: 9px; white-space: nowrap; }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; margin-inline: -2px; padding-inline: 2px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; font-variant-numeric: tabular-nums; }
th { font-weight: 650; }
thead th { color: #7d8795; border-bottom: 1px solid #dce1e7; padding: 9px 10px 11px; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
tbody td, tbody th { padding: 12px 10px; border-bottom: 1px solid #edf0f3; line-height: 1.5; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td:not(:first-child), th:not(:first-child) { text-align: right; }
.breakdown-table td:last-child { width: 37%; font-weight: 650; }
.breakdown-table tbody tr:nth-child(even) { background: #fafbfc; }
.breakdown-table .empty-row { background: transparent; }
.empty-row td { color: #8e98a5; text-align: left; padding: 16px 10px; font-weight: 400 !important; }
.breakdown-table tr.total, .breakdown-table tr.is-total { background: #f1f4f8; color: var(--navy); font-weight: 750; }
.negative { color: var(--red); }
.positive { color: var(--green); }
.section-description { color: #7c8592; margin: -3px 0 17px; font-size: 11px; line-height: 1.65; }
.quantity-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; background: #faf7f2; border: 1px solid #e9e0d5; border-radius: 10px; margin-bottom: 17px; }
.quantity-summary > span { font-size: 10px; color: #827362; }
.quantity-summary > div { display: flex; align-items: baseline; gap: 8px; }
.quantity-summary output { color: #9e4b09; font-size: 25px; font-weight: 700; letter-spacing: -.05em; }
.quantity-summary small { font-size: 9px; color: #9b8c7a; }
.quantity-chart { min-height: 118px; border: 1px solid #e8eaed; border-radius: 10px; background: #fafbfc; margin-bottom: 18px; padding: 18px; }
.chart-empty { display: flex; align-items: center; justify-content: center; min-height: 80px; margin: 0; color: #96a0ac; font-size: 11px; text-align: center; }
.scenario-table { min-width: 430px; }
.scenario-table .featured-row { background: #faf1e7; }
.scenario-table .featured-row th { color: #a8530f; }
.quantity-chart .chart-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) 95px; gap: 10px; align-items: center; font-size: 10px; margin: 12px 0; }
.quantity-chart .chart-track { height: 15px; background: #e6eaf0; border-radius: 4px; overflow: hidden; }
.quantity-chart .chart-bar { height: 100%; background: var(--navy-2); border-radius: 4px; }
.quantity-chart .chart-row:nth-child(2) .chart-bar { background: var(--orange); }
.quantity-chart .chart-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.comparison-panel { background: var(--navy); color: white; padding: 26px 26px 27px; border: 1px solid var(--navy); border-radius: 16px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 25px; }
.comparison-panel .section-kicker { color: var(--orange-soft); }
.comparison-panel h2 { font-size: 25px; line-height: 1.1; }
.comparison-panel h2 em { font-family: Georgia, "Times New Roman", serif; color: var(--orange-soft); font-weight: 400; }
.comparison-copy > p:not(.section-kicker) { color: #9fb0c6; font-size: 10px; line-height: 1.7; margin: 14px 0 15px; }
.comparison-copy a { font-size: 10px; color: #dce7f4; text-underline-offset: 4px; line-height: 1.7; }
.comparison-copy a span { padding-left: 5px; color: var(--orange-soft); }
.comparison-result { border-left: 1px solid #34445a; padding-left: 24px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.comparison-result > span { color: #9fb0c6; text-transform: uppercase; letter-spacing: .09em; font-weight: 750; font-size: 9px; line-height: 1.6; }
.comparison-result output { color: var(--orange-soft); font-size: 32px; line-height: 1.2; letter-spacing: -.055em; font-weight: 700; margin-top: 12px; overflow-wrap: anywhere; }
.comparison-result p { font-size: 10px; color: #b1bfd0; line-height: 1.7; margin: 12px 0 0; }
.method-panel { padding: 23px 24px 24px; background: transparent; border-color: #dfd9cf; }
.method-panel h2 { font-size: 15px; letter-spacing: -.02em; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 25px; margin-top: 14px; }
.method-grid p { font-size: 10px; line-height: 1.7; color: #8a8175; margin: 0; }
.method-grid strong { color: #655b4e; font-weight: 700; }
.footer { max-width: 1480px; margin: 0 auto; padding: 24px 40px 32px; border-top: 1px solid #ddd6cb; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.footer > div { display: flex; gap: 15px; align-items: baseline; }
.footer strong { color: var(--navy); font-size: 16px; letter-spacing: -.04em; }
.footer span, .footer p { color: #8c867c; font-size: 10px; margin: 0; }

@media (min-width: 1600px) {
  .workspace { grid-template-columns: 420px minmax(0, 1fr); gap: 28px; }
  .controls-panel { padding-inline: 27px; }
  .field > label { font-size: 11px; }
  select { font-size: 11px; }
}
@media (max-width: 1180px) {
  .topbar-inner, .hero-inner { padding-inline: 28px; }
  .workspace { padding-inline: 28px; grid-template-columns: 350px minmax(0, 1fr); gap: 18px; }
  .hero-inner { gap: 45px; }
  .controls-panel, .results-panel, .detail-panel { padding-inline: 20px; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .headline-metrics { grid-template-columns: minmax(0, 1fr); }
  .metric { padding: 19px 20px; }
  .metric p { margin-bottom: 8px; }
  .metric output { font-size: 32px; }
  .metric small { margin-top: 9px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 15px; }
  .small-metric > span { min-height: 15px; }
  .comparison-panel { grid-template-columns: minmax(0, 1fr); padding: 23px; gap: 21px; }
  .comparison-result { border-left: 0; border-top: 1px solid #34445a; padding: 19px 0 0; }
  .comparison-result output { font-size: 29px; }
  .footer { margin-inline: 28px; padding-inline: 0; }
}
@media (max-width: 850px) {
  .topbar-inner { min-height: 76px; padding: 15px 24px; gap: 20px; }
  .brand img { width: 144px; }
  .topbar-title { font-size: 11px; padding-left: 20px; }
  .print-button { font-size: 0; gap: 0; min-width: 40px; padding: 0; }
  .print-button svg { width: 18px; height: 18px; }
  .hero-inner { padding: 39px 24px 42px; grid-template-columns: minmax(0, 1fr); gap: 25px; }
  h1 { font-size: 57px; }
  .hero-lead { max-width: 590px; margin-top: 20px; font-size: 13px; }
  .hero-note { border-left: 0; border-top: 1px solid #34445a; padding: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
  .note-kicker { grid-column: 1 / -1; font-size: 9px; }
  .hero-note p { font-size: 15px; margin: 0; }
  .hero-note small { font-size: 11px; }
  .note-rule { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); padding: 24px 24px 44px; gap: 22px; }
  .controls-panel { padding: 23px; }
  .controls-panel fieldset { padding-bottom: 22px; }
  .field-grid { gap: 17px 20px; }
  .field > label { font-size: 11px; }
  .field small, .field-note, .evidence-note { font-size: 11px; }
  select { padding-inline: 10px; font-size: 12px; }
  .input-wrap input { font-size: 14px; }
  .input-wrap, select { height: 46px; }
  .results-heading { flex-direction: row; align-items: center; }
  .headline-metrics { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .small-metric > span { min-height: 30px; }
  .comparison-panel { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 25px; }
  .comparison-result { border-top: 0; border-left: 1px solid #34445a; padding: 0 0 0 24px; }
  .footer { margin-inline: 24px; }
}
@media (max-width: 520px) {
  .topbar-inner { padding-inline: 18px; gap: 14px; min-height: 72px; }
  .brand img { width: 133px; }
  .topbar-title { padding-left: 14px; max-width: 125px; font-size: 10px; line-height: 1.5; }
  .hero-inner { padding: 34px 20px 32px; }
  .eyebrow { font-size: 9px; margin-bottom: 20px; gap: 9px; }
  .eyebrow > span { width: 23px; }
  h1 { font-size: clamp(39px, 11.5vw, 56px); }
  .hero-lead { font-size: 12px; line-height: 1.7; }
  .hero-note { gap: 10px; grid-template-columns: minmax(0, 1fr); padding-top: 18px; }
  .hero-note p { font-size: 14px; }
  .hero-note p br { display: none; }
  .hero-note p strong::before { content: " "; }
  .hero-note small { font-size: 10px; line-height: 1.65; max-width: 330px; }
  .workspace { padding: 18px 12px 35px; }
  .controls-panel, .results-panel, .detail-panel, .method-panel { border-radius: 12px; padding: 21px 18px; }
  h2 { font-size: 22px; }
  .panel-intro { font-size: 11px; }
  .field-grid { gap: 17px 12px; }
  .field > label { font-size: 10px; min-height: 28px; }
  .field-full > label { min-height: 0; }
  .field small, .field-note, .evidence-note { font-size: 10px; }
  select { font-size: 10px; padding-inline: 5px; }
  .input-wrap input { font-size: 13px; padding-inline: 8px; }
  .input-wrap .prefix { padding-left: 9px; }
  .input-wrap .unit { padding-right: 8px; font-size: 8px; }
  .results-heading { display: block; margin-bottom: 19px; }
  .results-heading h2 { font-size: 21px; }
  .status-pill { display: inline-flex; margin-top: 12px; max-width: none; }
  .headline-metrics { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .metric { padding: 20px; }
  .metric p { font-size: 11px; margin-bottom: 10px; }
  .metric output { font-size: 34px; }
  .metric-contribution { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 12px; padding: 17px; }
  .metric-contribution p { margin: 0; align-self: center; font-size: 10px; }
  .metric-contribution output { font-size: 24px; text-align: right; }
  .metric-contribution small { grid-column: 1 / -1; margin-top: 4px; font-size: 9px; }
  .partial-result { align-items: flex-start; }
  .partial-result output { font-size: 17px; }
  .partial-result p { font-size: 9px; max-width: 165px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 17px; }
  .small-metric > span { font-size: 10px; min-height: 30px; }
  .small-metric output { font-size: 23px; }
  .small-metric small { font-size: 9px; }
  .assumptions-note { font-size: 10px; }
  .section-title-row { gap: 12px; align-items: flex-start; }
  .section-title-row h2 { font-size: 20px; }
  .unit-label { padding-top: 3px; font-size: 8px; }
  table { font-size: 10px; }
  thead th { font-size: 8px; padding-inline: 7px; }
  tbody td, tbody th { padding: 11px 7px; }
  .section-description { font-size: 10px; }
  .quantity-chart { padding: 12px; }
  .quantity-chart .chart-row { grid-template-columns: 62px minmax(0, 1fr) 78px; gap: 7px; font-size: 9px; }
  .quantity-chart .chart-track { height: 12px; }
  .comparison-panel { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 23px 21px; border-radius: 12px; }
  .comparison-panel h2 { font-size: 27px; }
  .comparison-copy > p:not(.section-kicker) { font-size: 10px; }
  .comparison-result { border-left: 0; border-top: 1px solid #34445a; padding: 18px 0 0; }
  .comparison-result output { font-size: 32px; }
  .method-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .method-grid p { font-size: 10px; }
  .footer { margin-inline: 20px; flex-direction: column; align-items: flex-start; gap: 14px; padding-block: 23px; }
  .footer p { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  html, body { background: white; color: #152039; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 10pt; }
  .skip-link, .print-button, .text-button { display: none !important; }
  .topbar { background: var(--navy) !important; border: 0; }
  .topbar-inner { min-height: 16mm; padding: 4mm 5mm; }
  .brand img { width: 38mm; }
  .topbar-title { font-size: 8pt; color: white; }
  .hero-inner { padding: 7mm 5mm; grid-template-columns: 1fr; gap: 0; }
  h1 { font-size: 28pt; }
  h1 br { display: none; }
  h1 em::before { content: " "; }
  .eyebrow { margin-bottom: 3mm; font-size: 6pt; }
  .hero-lead { margin-top: 4mm; font-size: 8pt; max-width: none; }
  .hero-note { display: none; }
  .workspace { display: block; padding: 6mm 0 0; }
  .controls-panel { padding: 5mm; border-radius: 0; margin-bottom: 5mm; }
  .controls-panel .panel-intro { font-size: 7pt; margin: 3mm 0; }
  .panel-heading h2, .results-heading h2 { font-size: 16pt; }
  fieldset { display: inline-block; width: 48.5%; vertical-align: top; padding: 4mm 2mm 4mm 0; margin-right: 1%; break-inside: avoid; }
  legend { font-size: 8pt; padding-bottom: 3mm; }
  legend > span { width: 5mm; height: 5mm; font-size: 6pt; }
  .field-grid { gap: 3mm; }
  .field > label { font-size: 6.5pt; min-height: 0; margin-bottom: 1mm; }
  .input-wrap, select { height: 8mm; border-radius: 1mm; }
  .input-wrap input { font-size: 8pt; padding: 1mm; }
  select { font-size: 6pt; }
  .input-wrap .prefix, .input-wrap .unit { font-size: 6pt; }
  input { appearance: textfield; }
  input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; }
  .field small, .field-note, .evidence-note { font-size: 6pt; line-height: 1.4; }
  .evidence-note { padding: 2mm; margin-top: 3mm; }
  .field-note { margin-top: 2mm; }
  .confirmation-box { padding: 3mm; break-inside: avoid; }
  .confirmation-box p, .check-label { font-size: 7pt; }
  .results-column { display: block; }
  .results-panel, .detail-panel, .method-panel, .comparison-panel { padding: 5mm; margin-bottom: 5mm; border-radius: 0; break-inside: avoid; }
  .results-panel { break-before: page; }
  .results-heading { display: flex; flex-direction: row; margin-bottom: 4mm; }
  .status-pill { font-size: 6pt; padding: 2mm; }
  .headline-metrics { display: grid; grid-template-columns: 1fr 1fr; }
  .metric { padding: 5mm; border-radius: 2mm; }
  .metric p { font-size: 8pt; }
  .metric output { font-size: 24pt; }
  .metric small { font-size: 6.5pt; }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); gap: 5mm; padding-top: 4mm; }
  .small-metric > span { font-size: 7pt; min-height: 7mm; }
  .small-metric output { font-size: 17pt; }
  .small-metric small { font-size: 6pt; }
  .partial-result span, .partial-result p, .assumptions-note { font-size: 7pt; }
  .partial-result output { font-size: 14pt; }
  .assumptions-note { margin-top: 4mm; padding-top: 3mm; }
  .section-title-row h2 { font-size: 15pt; }
  .section-kicker, .unit-label { font-size: 6pt; }
  .section-description { font-size: 7pt; }
  table { font-size: 8pt; }
  thead { display: table-header-group; }
  thead th { font-size: 6pt; }
  tbody td, tbody th { padding: 2.5mm; }
  .table-scroll { overflow: visible; }
  .scenario-table { min-width: 0; }
  .quantity-chart { min-height: 0; padding: 3mm; margin-bottom: 3mm; }
  .chart-empty { min-height: 12mm; font-size: 7pt; }
  .comparison-panel { display: grid; grid-template-columns: 1.2fr 1fr; color: white; }
  .comparison-panel h2 { font-size: 17pt; }
  .comparison-result { border-top: 0; border-left: 1px solid #34445a; padding-left: 5mm; }
  .comparison-copy > p:not(.section-kicker), .comparison-copy a, .comparison-result p { font-size: 6.5pt; }
  .comparison-result output { font-size: 22pt; }
  .method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
  .method-grid p { font-size: 6.5pt; }
  .footer { padding: 4mm 0; margin: 0; }
  .footer p, .footer span { font-size: 6pt; }
}

/* Preços, comissão e apuração estimada do Simples. */
.brand {background:#faf9f5;border-radius:5px;padding:5px 8px;}
.brand img {width:180px;max-width:100%;height:auto;}
.spaced-fields {margin-top:17px;}
.calculated-field {padding:14px;background:#f6f1e8;border-radius:8px;}
.calculated-field > span {font-size:11px;color:#70695f;}
.calculated-field output {font-size:25px;font-weight:700;margin-top:6px;}
.tax-confirm {padding-top:16px;}
.tax-flow {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.tax-flow > div {padding:16px;background:#f6f8fa;border-radius:8px;min-width:0;}
.tax-flow span {font-size:10px;color:#647083;display:block;}
.tax-flow output {font-size:24px;letter-spacing:-.045em;font-weight:700;margin-top:8px;}
.tax-flow .tax-highlight {background:#fff0e1;}
.tax-highlight output {color:#9b4b08;}
.tax-calculation {display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:20px 0 14px;margin-bottom:14px;font-size:11px;line-height:1.6;}
.tax-calculation strong {white-space:nowrap;font-size:18px;}
.source-link {font-size:10px;line-height:1.6;display:inline-block;margin-top:10px;text-underline-offset:3px;}
@media(max-width:520px){.brand img{width:138px;}.topbar-inner{gap:10px;}.topbar-title{padding-left:10px;}.tax-flow output{font-size:22px;}.tax-calculation{flex-direction:column;gap:6px;}}

/* Símbolo oficial, nome registrado e slogan da marca. */
.brand{display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;flex:0 0 auto;background:transparent;padding:0;border:0;border-radius:0;color:white;text-decoration:none;font-size:29px;font-weight:750;line-height:1;letter-spacing:-1.3px;white-space:nowrap}
.brand .brand-icon{display:block;width:40px;height:40px;max-width:none;object-fit:contain;flex:0 0 40px}
.brand .brand-copy{display:flex;flex-direction:column;align-items:flex-start;min-width:0;color:inherit;font-size:inherit}
.brand .brand-name{font-size:inherit;line-height:1;color:inherit}
.brand sup{font-size:10px;letter-spacing:0;vertical-align:super;margin-left:2px}
.brand small{font-size:10px;line-height:1.3;letter-spacing:.15px;font-weight:400;margin-top:5px;color:inherit}
.topbar .brand-icon{filter:brightness(0) invert(1)}
.footer>.brand-footer{align-items:center;gap:10px;color:var(--navy)}
@media(max-width:520px){.brand{font-size:24px;gap:8px}.brand .brand-icon{width:32px;height:32px;flex-basis:32px}.brand sup{font-size:8px}.brand small{font-size:9px;margin-top:4px}.topbar-inner{display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:8px 12px;padding:14px 18px}.topbar-inner>.brand{grid-column:1;grid-row:1}.topbar-title{grid-column:1;grid-row:2;max-width:none;padding-left:40px;border-left:0;font-size:10px}.print-button{grid-column:2;grid-row:1/3;margin-left:0}}
@media print{.topbar .brand{color:white}.footer>.brand-footer{color:#14213b}}

.selic-monthly-card{padding:16px;margin-bottom:24px;background:#eef4fa;border:1px solid #d8e3f0;border-radius:8px;min-width:0}
.selic-monthly-card>span{display:block;font-size:11px;font-weight:600;color:#4e627c}
.selic-monthly-card>output{display:block;margin:8px 0;font-size:28px;font-weight:750;letter-spacing:-.04em;color:var(--navy);line-height:1.25}
.selic-monthly-card>p{font-size:11px;line-height:1.6;margin:0;color:#53637a}
.selic-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px}
.selic-actions>a{font-size:10px;line-height:1.6;text-underline-offset:3px;color:#294b78}
.selic-actions>button{border:1px solid #bdcde0;border-radius:4px;background:white;color:#294b78;padding:8px 12px;font:inherit;font-size:10px;cursor:pointer}
.selic-actions>button:disabled{opacity:.65;cursor:wait}
.selic-monthly-card>.selic-error{margin-top:12px;color:#943923}
@media print{.selic-actions>button{display:none}}

.return-button{margin-left:auto;background:var(--orange);border:1px solid var(--orange);color:var(--navy);text-decoration:none;white-space:nowrap;flex-shrink:0}
.return-button:hover{background:var(--orange-soft);border-color:var(--orange-soft)}
.topbar-inner>.print-button{margin-left:0}
@media(max-width:1020px){.topbar-inner{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px 16px}.topbar-inner>.brand{grid-column:1;grid-row:1}.topbar-title{grid-column:1;grid-row:2;border-left:0;padding-left:50px;max-width:none}.return-button{grid-column:2;grid-row:1/3}.topbar-inner>.print-button{grid-column:3;grid-row:1/3}}
@media(max-width:680px){.topbar-inner{grid-template-columns:minmax(0,1fr) 40px;gap:8px 12px}.topbar-inner>.print-button{grid-column:2;grid-row:1/3}.return-button{grid-column:1/-1;grid-row:3;justify-self:start;margin:8px 0 0}.topbar-title{padding-left:50px}}
@media(max-width:520px){.topbar-title{padding-left:40px}}
@media print{.return-button{display:none!important}.topbar-inner{display:flex}.topbar-title{padding-left:28px}}
