:root {
  --ink: #1a2330;
  --muted: #3d4b59;
  --green: #1b4332;
  --green-deep: #10281f;
  --paper: #f4f0e6;
  --card: #fffcf7;
  --line: #ddd4c4;
  --brass: #6b430c;
  --focus: #9a3412;
  --radius: 16px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; font-size: 16px; line-height: 1.55; }
a { color: var(--green); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button, a.button { cursor: pointer; }
button, .button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 650;
  min-height: 44px;
  text-decoration: none;
}
button:hover, a.button:hover { background: #f3ecdf; }
button:disabled { opacity: .55; cursor: not-allowed; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.shell { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, .takehome-amount, .comparison-card h3 {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
h1 { font-size: clamp(2.1rem, 8vw, 4.2rem); margin-bottom: 16px; }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin-bottom: 14px; }
.eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 750; color: var(--brass); margin-bottom: 10px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3f7d4e; margin-right: 8px; }
.button-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.primary, button.primary, a.button.primary { background: var(--green); color: #fff; border-color: var(--green); }
.primary:hover, button.primary:hover, a.button.primary:hover { background: var(--green-deep); }
.text-link { font-weight: 700; text-decoration: none; padding: 10px 0; min-height: 44px; }
.skip-link { position: fixed; left: 12px; top: -80px; background: #fff; color: var(--ink); padding: 10px 14px; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.site-header { background: var(--green-deep); color: #f6f1e6; }
.nav-shell { max-width: 1120px; margin: 0 auto; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.brand { color: inherit; font-size: 1.25rem; letter-spacing: -0.04em; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.brand span { font-weight: 750; }
.brand small { font-size: .7rem; margin-left: 2px; opacity: .8; }
.brand-mark { background: #f6f1e6; color: var(--green-deep); border-radius: 8px; padding: 2px 7px 4px; margin-right: 8px; font-weight: 750; }
.brand-mark span { color: var(--brass); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.site-header nav a { color: #f6f1e6; font-size: .92rem; font-weight: 650; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-header .nav-cta { background: #f6f1e6; color: var(--green-deep); border-radius: 999px; padding: 8px 14px; }
.site-header .support-link { color: #f0d7a2; }

.hero { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 28px; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 42rem; }
.hero-note, .hero-caption { color: var(--muted); font-size: .85rem; }
.hero-visual { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0; }
.mini-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; color: var(--brass); margin-bottom: 12px; }
.example-receipt > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.example-receipt strong { font-variant-numeric: tabular-nums; }
.receipt-total { border-bottom: 0 !important; align-items: baseline; }
.receipt-total strong { font-family: Palatino, Georgia, serif; font-size: 1.8rem; letter-spacing: -0.03em; }
.receipt-total strong span { font-size: .85rem; margin-left: 4px; font-family: "Segoe UI", system-ui, sans-serif; }
.journey { background: #ebe4d6; border-block: 1px solid var(--line); }
.journey-inner { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding-top: 14px; padding-bottom: 14px; font-size: .9rem; font-weight: 700; }
.journey b { display: block; color: var(--brass); font-size: .68rem; }

.calculator-section { padding: 28px 0 12px; scroll-margin-top: 12px; }
.section-title { display: grid; gap: 16px; margin-bottom: 16px; }
.section-title p:not(.eyebrow) { color: var(--muted); margin: 0; }
.tax-year { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.tax-year label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 750; }
.tax-year select { width: 100%; border: 0; background: transparent; min-height: 40px; font-weight: 700; padding: 0; }
.calculator-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.calculator-tabs button { border-radius: 12px; background: transparent; }
.calculator-tabs button.active { background: var(--green); color: #fff; border-color: var(--green); }
.calculator-grid, .guide-section, .comparison-grid, .insight-grid, .footer-grid, .recommend { display: grid; gap: 16px; }
.input-panel, .flow-card, .comparison-card, .portfolio-dashboard, .property-files { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel-heading, .property-file-toolbar, .result-top, .retained { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-heading h3, .flow-card h3 { margin: 0 0 4px; }
.count { font-size: .75rem; background: #efe7d8; border-radius: 999px; padding: 4px 8px; }
.group-label { font-size: .72rem; letter-spacing: .1em; color: var(--muted); font-weight: 750; }
.property-editor { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fff; }
.property-editor > .property-toggle, .property-toggle { width: 100%; border: 0; background: transparent; text-align: left; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; }
.property-icon { width: 36px; height: 36px; display: grid; place-items: center; background: #efe7d8; border-radius: 8px; flex: 0 0 36px; }
.property-summary { flex: 1; min-width: 0; }
.property-summary strong, .property-heading h3 { display: block; overflow-wrap: anywhere; }
.property-summary small, .property-heading small { color: var(--muted); }
.property-toggle-label { color: var(--green); font-size: .85rem; }
.property-fields[hidden] { display: none; }
.property-list-tools, .property-actions, .action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.property-list-tools .field-hint { margin: 0; flex: 1; }
.fields { display: grid; gap: 14px; margin: 14px 0; }
.fields > *, .number-field { min-width: 0; }
label, .number-field label { display: block; font-size: .92rem; font-weight: 650; }
label input:not([type=checkbox]), label select, .number-field input { display: block; width: 100%; margin-top: 6px; }
input:not([type=checkbox]):not([type=range]), select {
  background: #fff; border: 1px solid #c9bfae; border-radius: 8px; min-height: 44px; padding: 8px 10px; width: 100%;
}
.unit { font-weight: 450; color: var(--muted); font-size: .8rem; }
.range { width: 100%; accent-color: var(--green); margin-top: 8px; }
.field-error { color: #9f1239; display: block; margin-top: 4px; }
.field-hint, .muted, .result-note, .result-footer { color: var(--muted); font-size: .85rem; }
.check-label { display: flex; gap: 8px; align-items: flex-start; font-weight: 450; margin: 10px 0; }
.check-label input { width: 1.1rem; height: 1.1rem; margin-top: 3px; accent-color: var(--green); flex: 0 0 auto; }
.add-property { width: 100%; border-style: dashed; background: #faf6ee; color: var(--green); }
details { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary > span { color: var(--muted); font-weight: 500; font-size: .85rem; margin-left: auto; }
.action-row { margin-top: 16px; }
.action-row .primary { flex: 1; }

.takehome-card { background: var(--green-deep); color: #f6f1e6; border-radius: var(--radius); padding: 20px; }
.takehome-card .eyebrow, .result-note, .annual-takehome span, .retained small { color: #d9cbb4; }
.result-badge { border: 1px solid #d9cbb4; border-radius: 999px; padding: 2px 8px; font-size: .75rem; }
.takehome-amount { font-size: clamp(2.2rem, 10vw, 3.4rem); margin-top: 12px; font-variant-numeric: tabular-nums; }
.takehome-amount > span { font-size: 1rem; margin-left: 6px; font-family: "Segoe UI", system-ui, sans-serif; color: #d9cbb4; }
.annual-takehome { color: #e7f0c9; font-size: 1.05rem; }
.takehome-rule { border-top: 1px solid #345445; margin: 16px 0; }
.retained strong { font-variant-numeric: tabular-nums; }
.flow-card { margin-top: 12px; }
.money-flow { margin: 8px 0 0; }
.money-flow > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.money-flow dt { color: var(--muted); font-weight: 450; }
.money-flow dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.subtotal { border-top: 1px solid var(--line); }
.flow-total { background: #efe7d8; border-radius: 8px; padding: 10px !important; margin-top: 8px; }
.flow-total dt { color: var(--green); font-weight: 700; }
.per-hundred { font-size: .85rem; padding-top: 12px; }
.tax-bar, .split-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #e7e0d2; margin: 8px 0; }
.tax-bar span, .seg-tax { background: var(--brass); }
.seg-personal { background: var(--green); }
.seg-company { background: #7d9a78; }
.seg-cost { background: #5c6b7a; }
.split-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; padding: 0; margin: 8px 0 0; font-size: .82rem; }
.split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.notice, .law-notice, .law-banner { border: 1px solid #e2d2a2; background: #fbf6ea; border-radius: 12px; padding: 14px; margin: 0 0 14px; }
.law-notice { padding-top: 0; }
.law-notice summary { color: var(--green-deep); }
.law-notice ul, .source-notes { margin: 8px 0 0; padding-left: 1.1rem; }
.law-notice li, .source-notes li { margin: 8px 0; }
.error { border-color: #e7b4b4; background: #fff5f5; }
.portfolio-dashboard { margin-top: 16px; }
.portfolio-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.portfolio-totals span { color: var(--muted); font-size: .8rem; }
.portfolio-totals b { display: block; font-size: 1.15rem; color: var(--ink); }
.table-scroll { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
caption { text-align: left; color: var(--muted); margin-bottom: 8px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
thead th { background: #efe7d8; }
td, .money-flow dd { font-variant-numeric: tabular-nums; }
.comparison-card h3 { font-size: 2rem; margin: 8px 0; }
.comparison-card h3 small { display: block; font-size: .85rem; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 450; letter-spacing: 0; }
.comparison-card button, .share-row button { width: 100%; }
.insight-grid article { background: #efe7d8; border-radius: 12px; padding: 16px; }
.insight-grid p { color: var(--muted); font-size: .9rem; margin: 0; }
.share-row { display: grid; gap: 12px; margin: 18px 0; }
.share-link, .share-link input { width: 100%; }
.page-intro { padding-top: 28px; padding-bottom: 8px; }
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.guide-section { padding-top: 28px; padding-bottom: 12px; }
.guide-copy p, .example-box p { color: var(--muted); }
.example-box { border-left: 4px solid var(--green); background: #efe7d8; padding: 14px 16px; margin: 16px 0; border-radius: 0 12px 12px 0; }
.related { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.related a { display: flex; justify-content: space-between; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; font-weight: 650; }
.tool-directory { padding-top: 8px; }
.tool-directory ul { display: grid; gap: 8px; padding-left: 1.1rem; }
.disclaimer { color: var(--muted); font-size: .85rem; padding-bottom: 28px; }
.site-footer { background: #ebe4d6; border-top: 1px solid var(--line); padding: 28px 16px 16px; }
.site-footer .brand { color: var(--ink); }
.site-footer p, .footer-bottom p { color: var(--muted); font-size: .8rem; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { text-decoration: none; font-weight: 650; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; z-index: 20; box-shadow: 0 12px 40px #10281f33; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: .85rem; color: var(--muted); }
.ad-slot { margin: 8px auto 20px; border: 1px dashed #b7ad9c; border-radius: 12px; padding: 16px; text-align: center; background: repeating-linear-gradient(135deg, transparent, transparent 8px, #efe8da 8px, #efe8da 9px); }
.ad-label { letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; font-weight: 750; color: var(--muted); margin: 0 0 4px; }
.ad-slot p:last-child { margin: 0; color: var(--muted); font-size: .85rem; }
.recommend { margin-bottom: 12px; }
.recommend ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.recommend li { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; display: flex; justify-content: space-between; gap: 8px; }
.recommend li span { color: var(--brass); font-size: .8rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.property-files { margin-bottom: 16px; }
.export-reminder { position: fixed; right: 12px; left: 12px; bottom: 12px; z-index: 15; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 8px 30px #10281f26; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff6df; border-top: 1px solid #c4a15a; padding: 12px; text-align: center; z-index: 30; }
.valid.modified:not([type=checkbox]) { outline: 2px solid #3f7d4e; }
.invalid { outline: 2px solid #9f1239; }

@media (min-width: 720px) {
  .shell { padding-left: 28px; padding-right: 28px; }
  .hero { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 56px; padding-bottom: 40px; }
  .fields.two, .portfolio-totals, .recommend ul { grid-template-columns: 1fr 1fr; }
  .section-title { grid-template-columns: 1fr auto; align-items: end; }
  .tax-year { min-width: 240px; }
  .journey-inner { display: flex; justify-content: space-between; }
  .journey b { display: inline; margin-right: 8px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .cookie-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; left: 50%; right: auto; transform: translateX(-50%); width: min(920px, calc(100% - 32px)); }
  .export-reminder { left: auto; width: min(420px, calc(100% - 24px)); }
}
@media (min-width: 980px) {
  .calculator-grid { grid-template-columns: 1.05fr .95fr; align-items: start; }
  .output-panel { position: sticky; top: 16px; }
  .guide-section { grid-template-columns: 1.7fr .9fr; gap: 40px; align-items: start; }
  .comparison-grid, .insight-grid { grid-template-columns: repeat(3, 1fr); }
  .recommend { grid-template-columns: .8fr 1.2fr; align-items: center; }
  .recommend ul { grid-template-columns: repeat(3, 1fr); }
  .comparison-card button, .share-row button { width: auto; }
  .share-row { grid-template-columns: 1fr auto; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
