:root {
  color-scheme: light;
  --bg: #f4ecdc; --paper: #fffdf7; --ink: #1a2a22; --muted: #4e5a52;
  --green: #1f4031; --green-mid: #2a5f3f; --soft: #e8ede1; --border: #ded5c1;
  --gold: #dbb96f; --red: #a2392a; --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button, a, summary, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #936916; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 26px; font-weight: 500; letter-spacing: -.6px; line-height: 1.22; margin-bottom: 14px; }
h3 { font-size: 17px; }
img { max-width: 100%; height: auto; }
.site-header, main, .site-footer { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 24px; border-bottom: 1px solid var(--border); }
.site-header img { display: block; width: 150px; }
.header-link { font-size: 14px; font-weight: 500; text-decoration: none; padding-block: 10px; }
.header-link span { margin-left: 14px; }
.intro { padding: 38px 0 26px; max-width: 810px; }
.eyebrow { display: flex; gap: 9px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-mid); }
h1 { font-family: var(--sans); font-size: clamp(38px, 4.5vw, 58px); font-weight: 500; line-height: 1.08; letter-spacing: -2px; max-width: 750px; text-wrap: balance; }
.lead { max-width: 650px; margin-top: 24px; font-size: 18px; color: var(--muted); }
.privacy-line { margin-top: 13px; font-size: 13px; color: var(--muted); }
.scope-note { margin-bottom: 26px; padding: 15px 20px; border: 1px solid var(--border); border-radius: 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.scope-note a { margin-left: 3px; white-space: nowrap; }
.calculator-layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 28px; align-items: start; scroll-margin-top: 20px; }
.calculator-layout > *, .results-column, .panel, form, .field { min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 4px 16px rgba(31,64,49,.025); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 8px; }
.panel-heading h2 { font-size: 19px; letter-spacing: -.3px; margin: 0; }
.year-tag { background: var(--soft); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--green); }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.field { margin-top: 21px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; line-height: 1.4; }
input, select { display: block; width: 100%; min-height: 47px; padding: 11px 13px; border: 1px solid #b8bead; border-radius: 9px; background: #fffefa; color: var(--ink); font-size: 16px; line-height: 1.4; font-variant-numeric: tabular-nums; }
input:focus, select:focus { border-color: var(--green); }
.number-field { position: relative; }
.number-field input { padding-right: 54px; }
.number-field > span { position: absolute; right: 14px; top: 12px; font-size: 14px; color: var(--muted); pointer-events: none; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.help { font-size: 12px; line-height: 1.5; margin-top: 7px; color: var(--muted); }
.input-details { border-top: 1px solid var(--border); margin-top: 25px; padding-top: 18px; }
summary { font-size: 14px; font-weight: 600; line-height: 1.5; }
summary::marker { color: var(--green-mid); }
.text-button { min-height: 44px; padding: 8px 0; margin-top: 17px; background: none; border: 0; color: var(--green); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.mobile-result-link { display: none; }
#results { scroll-margin-top: 18px; }
.input-footnote { margin-top: 3px; font-size: 12px; }
.tabs { display: flex; gap: 4px; padding: 5px; border: 1px solid var(--border); background: #eae3d3; border-radius: 12px; margin-bottom: 18px; }
.tabs button { flex: 1; min-height: 44px; padding: 11px 7px; border: none; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.tabs button[aria-selected=true] { background: var(--paper); color: var(--green); box-shadow: 0 1px 5px #1f403113; }
.tabs button:hover { color: var(--green); }
[role=tabpanel]:focus-visible { outline-offset: 7px; }
.panel.result-summary { padding: 0; }
.net-result { background: var(--green); color: var(--paper); border-radius: 19px 19px 0 0; padding: 28px 30px; }
.result-body { padding: 24px 30px; }
.net-result .eyebrow { color: #dae6ce; margin-bottom: 18px; font-size: 11px; }
.net-label { font-size: 16px; font-weight: 400; letter-spacing: 0; margin: 0; color: #e1ead8; }
.net-amount { font-family: var(--sans); font-size: clamp(36px, 4vw, 52px); font-weight: 500; letter-spacing: -2px; line-height: 1.22; font-variant-numeric: tabular-nums; margin-top: 4px; overflow-wrap: anywhere; }
.amount-unit { font-size: 20px; font-weight: 400; letter-spacing: 0; color: #e1ead8; white-space: nowrap; }
.annual-net { font-size: 15px; color: #e1ead8; margin-top: 8px; }
.flow-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.flow-heading h3 { font-size: 16px; font-weight: 500; }
.flow-heading > span { font-size: 12px; color: var(--muted); }
.help.result-caveat { margin-top: 17px; }
.rows { margin: 0; }
.rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding-block: 11px; border-bottom: 1px solid #e9e4d6; font-size: 14px; }
.rows dt { color: var(--muted); }
.rows dd { flex-shrink: 0; margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.rows .total { border-bottom: 0; padding-top: 16px; }
.rows .total dt, .rows .total dd { color: var(--green); font-weight: 600; }
.breakdown { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 20px; }
.breakdown h3 { margin-top: 24px; margin-bottom: 10px; font-size: 14px; }
.breakdown .rows > div { font-size: 13px; }
.breakdown .help { margin-top: 14px; }
.context-note { background: var(--soft); color: #374f3d; border-radius: 10px; padding: 15px 17px; font-size: 13px; line-height: 1.65; margin-block: 20px; }
.error-box { background: #fbede6; color: #872f23; padding: 16px; border: 1px solid #daac99; border-radius: 12px; font-size: 14px; margin-bottom: 18px; }
.field-error { margin-top: 7px; color: var(--red); font-size: 12px; line-height: 1.45; }
[aria-invalid=true] { border-color: var(--red); background: #fff8f4; }
.negative { color: var(--red); }
.check-label { display: flex !important; gap: 10px; align-items: center; }
.check-label input { width: 18px; min-height: 18px; height: 18px; flex-shrink: 0; accent-color: var(--green); }
.outcome { margin-top: 24px; padding: 23px; background: var(--soft); border-radius: 13px; }
.outcome h3 { font-size: 17px; font-weight: 500; }
.outcome-amount { font-size: clamp(28px, 3vw, 38px); font-weight: 500; letter-spacing: -1px; margin-top: 5px; }
.outcome .amount-unit { color: var(--muted); }
.outcome .help { margin-top: 9px; }
.automatic-split { margin-block: 22px; }
.automatic-split h3 { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.comparison-assumptions { font-size: 12px; color: var(--muted); margin-top: 17px; }
.comparison-cards { margin-top: 20px; }
.comparison-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comparison-card { background: #f1eee3; border: 1px solid var(--border); padding: 20px; border-radius: 13px; }
.comparison-card:last-child { background: var(--soft); border-color: #c8d3bd; }
.comparison-card h3 { font-size: 16px; margin-bottom: 19px; }
.comparison-label { font-size: 12px; color: var(--muted); }
.comparison-amount { font-size: clamp(23px, 2.3vw, 31px); letter-spacing: -1px; font-weight: 500; margin-block: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.comparison-monthly { font-size: 12px; color: var(--muted); margin-bottom: 17px; }
.retained { padding-top: 13px; border-top: 1px solid #c6cbb8; font-size: 12px; color: var(--muted); }
.retained strong { display: block; font-size: 21px; color: var(--green); font-weight: 500; margin-block: 4px; }
.comparison-note { font-size: 13px; line-height: 1.65; color: var(--muted); margin-top: 19px; }
.method-section { display: grid; gap: 12px; margin-top: 32px; }
.method-section .panel { padding: 21px 26px; border-radius: 14px; box-shadow: none; }
.prose { color: var(--muted); font-size: 14px; max-width: 880px; padding-top: 17px; }
.prose p + p, .prose h3 { margin-top: 17px; }
.prose h3 { color: var(--ink); margin-bottom: 9px; }
.prose ul { padding-left: 21px; }
.prose li { margin-block: 9px; }
.cta-panel { margin-top: 36px; border-radius: 22px; background: var(--green); color: var(--paper); display: flex; justify-content: space-between; align-items: center; gap: 35px; padding: 40px; }
.cta-panel .eyebrow { color: #dbe4cf; font-size: 11px; }
.cta-panel h2 { font: 400 clamp(29px, 3.2vw, 42px)/1.08 var(--serif); max-width: 570px; letter-spacing: -.6px; }
.cta-panel p:not(.eyebrow) { color: #dbe4cf; font-size: 14px; margin-top: 15px; }
.primary-button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 18px; padding: 15px 20px; border-radius: 10px; background: var(--paper); color: var(--green); text-decoration: none; font-size: 14px; font-weight: 600; }
.primary-button:hover { background: #e9ecd9; }
.site-footer { display: flex; flex-wrap: wrap; gap: 24px; padding-block: 28px 36px; color: var(--muted); font-size: 12px; }
.site-footer span { margin-right: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px 18px; background: var(--green); color: white; z-index: 10; }
.skip-link:focus { top: 15px; }
@media (max-width: 960px) {
  .calculator-layout { grid-template-columns: 310px minmax(0, 1fr); gap: 18px; }
  .panel { padding: 23px; }
  .company-fields, .comparison-cards { grid-template-columns: 1fr; }
  .cta-panel { align-items: flex-start; flex-direction: column; gap: 25px; }
}
@media (max-width: 760px) {
  .site-header, main, .site-footer { width: calc(100% - 32px); }
  .site-header { padding-block: 18px; }
  .site-header img { width: 126px; }
  .header-link { font-size: 12px; }
  .header-link span { margin-left: 5px; }
  .intro { padding-block: 28px 22px; }
  h1 { font-size: clamp(38px, 8.4vw, 55px); letter-spacing: -1.1px; }
  .lead { font-size: 16px; margin-top: 20px; }
  .privacy-line { font-size: 12px; }
  .scope-note { padding: 14px 16px; font-size: 12px; margin-bottom: 19px; }
  .calculator-layout { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .mobile-result-link { display: flex; justify-content: space-between; margin-top: 23px; padding: 13px 16px; background: var(--green); color: var(--paper); border-radius: 9px; text-decoration: none; font-size: 14px; font-weight: 500; }
  .panel { border-radius: 16px; padding: 23px; }
  .tabs { position: static; }
  .tabs button { font-size: 13px; }
  .net-result { padding: 24px; border-radius: 15px 15px 0 0; }
  .result-body { padding: 22px 24px; }
  .net-amount { font-size: 44px; }
  .company-fields { grid-template-columns: 1fr; }
  .comparison-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .comparison-card { padding: 16px 13px; }
  .comparison-amount { font-size: 24px; }
  .retained strong { font-size: 21px; }
  .rows > div { font-size: 13px; gap: 10px; }
  .method-section .panel { padding: 18px 20px; }
  .cta-panel { padding: 28px; border-radius: 17px; }
  .primary-button { padding: 14px 16px; font-size: 13px; }
  .site-footer { gap: 18px; }
}
@media (max-width: 370px) {
  .panel { padding: 18px; }
  .net-result, .result-body { padding: 20px; }
  .comparison-cards { grid-template-columns: 1fr; }
  .tabs button { font-size: 12px; padding-inline: 3px; }
  .net-amount { font-size: 37px; }
  .primary-button { white-space: normal; }
}
@media (prefers-reduced-motion: no-preference) {
  .tabs button, .primary-button { transition: background-color .15s, color .15s; }
}
@media print {
  body { background: white; }
  .site-header, .tabs, .cta-panel, .site-footer, .text-button { display: none; }
  main { width: 100%; }
  .calculator-layout { grid-template-columns: 32% minmax(0, 1fr); gap: 20px; }
  .net-result { color: var(--ink); background: white; border: 1px solid var(--border); }
  .net-result p, .net-result span { color: var(--ink); }
}
