:root {
  color-scheme: light;
  /* TaxMeld v2: white header, cool blue-gray canvas, indigo accent. */
  --canvas: #edf1f8; --paper: #fff; --ink: #1b2436; --muted: #566279;
  --line: #d6dde9; --control: #9aa6bb;
  --navy: #1b2c4f; --navy-light: #c6d0e4;
  --accent: #2f45a5; --accent-hover: #24377f; --accent-soft: #e8eefc;
  --green: #1d5a45; --green-soft: #e8f4ee;
  --amber: #7a5410; --amber-soft: #fdf3dd;
  --danger: #9d2a4b; --danger-soft: #fdeef3;
  --radius: 14px;
  --display: Iowan Old Style, "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; color: var(--ink); background: var(--canvas); font: 1rem/1.55 var(--body); }
::selection { color: #fff; background: var(--accent); }
a { color: var(--accent); text-underline-offset: .22em; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: #dfe5f4; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, dl { margin: 0; }
h1 { font: 400 clamp(2.7rem, 4.6vw, 4rem)/1.04 var(--display); letter-spacing: -.024em; text-wrap: balance; }
h2 { font-family: var(--display); font-size: 1.38rem; font-weight: 500; line-height: 1.24; letter-spacing: -.014em; }
h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -.01em; }
p { text-wrap: pretty; }
p + p { margin-top: .75rem; }
.small, small { font-size: .875rem; }
.muted { color: var(--muted); }
svg.icon { display: inline-block; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.icon.sm { width: 16px; height: 16px; }
.wrap { width: min(1200px, 100% - 80px); margin-inline: auto; }
.skip { position: fixed; inset: .5rem auto auto .5rem; z-index: 4; padding: .75rem; background: var(--paper); }
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: .6rem; color: var(--ink); text-decoration: none; font-size: 1.24rem; font-weight: 640; letter-spacing: -.028em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--navy); }
.brand-mark svg { width: 24px; height: 24px; stroke-width: 1.8; }
.brand-mark .mark-inner { stroke-width: .9; opacity: .62; }
.nav { display: flex; align-items: center; gap: .2rem; }
.nav a { padding: .55rem .8rem; display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; border-radius: 8px; font-size: .94rem; font-weight: 500; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.layout { display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(272px, 1fr); align-items: start; gap: clamp(22px, 3.2vw, 46px); margin-block: 40px 58px; }
main, aside { min-width: 0; }
main:focus { outline: none; }
.stack { display: grid; gap: 20px; }
.stack > * { min-width: 0; }
.result-zone > * { min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3.2vw, 30px); }
.hero { padding: clamp(10px, 1.4vw, 18px) 0 clamp(18px, 2.4vw, 26px); }
.hero h1 { max-width: 20ch; font-size: clamp(2.9rem, 5.1vw, 4.35rem); }
.hero h1 .accent-line { display: block; color: var(--accent); }
.hero p { margin-top: 1rem; color: var(--muted); max-width: 44ch; font-size: 1.04rem; line-height: 1.55; }
.entry h2, .panel > h2 { margin-bottom: .2rem; }
.entry-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.badge.tax-year { background: var(--accent-soft); color: var(--accent); font-size: .74rem; font-weight: 600; padding: .26rem .55rem; }
.entry-head + .divider { margin: .9rem 0 1.05rem; }
.entry-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.entry.compact { padding: 19px 24px; }
.entry.compact .entry-form { margin-top: .65rem; }
.entry.compact h2 { font-size: 1.08rem; }
.entry-note { margin-top: .7rem; }
.entry-links { margin-top: 1.05rem; display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.home-extra { padding: 1rem .1rem .1rem; display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.situations > p { margin-top: .35rem; }
.situation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 1rem; }
.situation-card { text-align: left; display: grid; gap: .28rem; padding: .85rem .95rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: .88rem; line-height: 1.42; }
.situation-card strong { font-size: .92rem; }
.situation-card span { color: var(--muted); }
.situation-card:hover { border-color: #a9b6d4; background: #f6f9fe; }
.planned-block { margin-top: 1rem; padding: .85rem .95rem; background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; }
.draft-summary { margin-bottom: .85rem; }
.feature-list + p { margin-top: .8rem; }
.planned-title { font-size: .95rem; margin-bottom: .2rem; }
.planned-block > p { margin-bottom: .5rem; }
.pay-list.planned { border-top-color: transparent; }
.pay-list.planned li:last-child { border-bottom: none; padding-bottom: 0; }
.timing { margin-top: .6rem; }
.timing div { font-size: .88rem; }
.w4-timing { margin-top: .6rem; }
.w4-timing div { font-size: .88rem; }
.reserve-slot { min-height: 74px; display: grid; place-items: center; padding: .7rem; border: 1px dashed #b3bfd4; border-radius: 12px; color: #6d7890; background: #f7f9fd; font-size: .82rem; letter-spacing: .01em; }
.side { display: grid; gap: 18px; }
.side .panel { padding: 0; overflow: hidden; }
.side h2 { font-size: 1.06rem; margin-bottom: .4rem; }
.side p { font-size: .92rem; color: var(--muted); }
.side-body { padding: 20px 22px 22px; }
.side-title { display: flex; gap: .55rem; align-items: center; }
.side-title svg { color: var(--accent); }
.side-rule { margin: 1.05rem 0; border: 0; border-top: 1px solid var(--line); }
.feature-list { list-style: none; padding: 0; margin: .85rem 0 0; display: grid; gap: .75rem; }
.feature-list li { display: flex; align-items: center; gap: .6rem; font-size: .89rem; color: var(--ink); }
.feature-list svg { color: var(--accent); }
.side .plans { background: #f7f9fd; border-color: var(--line); }
.side .plans .side-body { padding: 20px 22px 22px; }
.side .plans a, .side .plans button { margin-top: .55rem; }
.about-visual { position: relative; display: grid; place-items: center; min-height: 156px; color: #fff; background: linear-gradient(150deg, #dfe7f7, #b9c7e6); }
.about-visual .monogram { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 14px; background: var(--navy); box-shadow: 0 10px 22px #1b2c4f40; }
.about-visual .monogram svg { width: 38px; height: 38px; stroke-width: 1.6; }
.about-visual .about-scene { width: 100%; height: 100%; min-height: 156px; display: block; }
/* The photo-and-caption card is the home page treatment. Interior pages use
   the compact light introduction card from the approved v2 set. */
body:not([data-page="home"]) .about-visual { display: none; }
body:not([data-page="home"]) .about-caption { background: var(--accent-soft); color: var(--ink); padding: 18px 22px; }
body:not([data-page="home"]) .about-caption span { color: var(--muted); }
.about-caption { padding: 16px 22px 18px; background: var(--navy); color: #fff; }
.about-caption strong { display: block; font-size: 1.02rem; font-weight: 620; letter-spacing: -.01em; }
.about-caption span { display: block; margin-top: .25rem; color: #c9d3e8; font-size: .88rem; line-height: 1.45; }
.button { border: 1px solid transparent; border-radius: 9px; min-height: 46px; padding: .63rem 1.05rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-size: .93rem; font-weight: 620; line-height: 1.26; text-align: center; text-decoration: none; }
.primary { background: var(--accent); color: #fff; }
.secondary { background: var(--paper); color: var(--accent); border-color: #b3c0da; }
.danger { background: var(--danger); color: #fff; }
.text-button { display: inline-flex; align-items: center; min-height: 44px; gap: .4rem; color: var(--accent); border: none; background: transparent; padding: .3rem 0; font-weight: 560; font-size: .9rem; text-decoration: underline; text-underline-offset: .22em; text-align: left; }
@media (hover: hover) {
  .nav a:hover, .secondary:hover { background: var(--accent-soft); }
  .primary:hover { background: var(--accent-hover); }
  .text-button:hover { color: var(--accent-hover); }
  .danger:hover { background: #84223f; }
}
.field { min-width: 0; display: grid; align-content: start; gap: .35rem; font-size: .88rem; font-weight: 600; }
.field small { color: var(--muted); font-weight: 400; line-height: 1.4; }
select, input:not([type="radio"]):not([type="checkbox"]) { width: 100%; min-width: 0; min-height: 46px; border-radius: 8px; border: 1px solid var(--control); color: var(--ink); background: var(--paper); padding: .53rem .65rem; font-size: 1rem; font-weight: 400; }
input::placeholder { color: var(--muted); opacity: 1; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="radio"] { flex: 0 0 1.04rem; width: 1.04rem; height: 1.04rem; accent-color: var(--accent); margin: .2rem 0 0; }
select[aria-invalid="true"], input[aria-invalid="true"] { border-color: var(--danger); }
.money-field { position: relative; }
.money-field > span { position: absolute; inset: 50% auto auto .72rem; transform: translateY(-50%); color: var(--muted); }
.money-field input:not([type="radio"]) { padding-inline-start: 1.7rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field-wide { grid-column: 1 / -1; }
.fields-title { margin-bottom: .75rem; }
.fields-title + p { margin-bottom: .85rem; }
.fieldset-note { margin-top: .65rem; }
.guide-list { list-style: none; margin: .9rem 0 0; padding: 0; }
.guide-list li { border-top: 1px solid var(--line); padding: .95rem 0; display: grid; gap: .15rem; }
.guide-list li:last-child { padding-bottom: 0; }
.guide-list a { display: inline-flex; align-items: center; gap: .45rem; font-size: 1.02rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.guide-list a::after { content: '→'; color: var(--accent); font-weight: 500; }
.guide-list a:hover { color: var(--accent); text-decoration: underline; }
.guide-list p { color: var(--muted); font-size: .9rem; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: .55rem; font-weight: 660; }
.form-stack { display: grid; gap: 1.45rem; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 1.4rem; }
.form-row.start { justify-content: flex-start; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.choice { cursor: pointer; padding: .72rem .82rem; display: flex; align-items: flex-start; gap: .65rem; border: 1px solid var(--line); border-radius: 9px; font-size: .9rem; }
.choice:has(input:checked) { background: var(--accent-soft); border-color: #a3b6e0; }
.choice strong, .choice small { display: block; }
.choice small { margin-top: .1rem; color: var(--muted); }
.choices { display: grid; gap: .55rem; }
.notice { color: #24387f; background: var(--accent-soft); border-radius: 10px; padding: .8rem .95rem; display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.5; }
.notice svg { margin-top: .1rem; }
.notice .text-button { display: inline; min-height: 0; padding: 0; color: inherit; font-size: inherit; font-weight: 620; }
.notice.warning { background: var(--amber-soft); color: var(--amber); }
.notice.error, .field-error { color: var(--danger); }
.notice.error { background: var(--danger-soft); }
.field .field-error { color: var(--danger); font-weight: 600; }
[hidden] { display: none !important; }
.work-head { margin: .35rem .07rem .55rem; }
.work-head p { margin-top: .55rem; color: var(--muted); max-width: 56ch; }
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; gap: .7rem; padding: 0; margin: 0 0 .55rem; }
.stepper li { border-top: 2px solid #cfd8e7; padding-top: .5rem; min-width: 0; }
.stepper li.done { border-color: #98aad2; }
.stepper li[aria-current="step"] { border-color: var(--accent); font-weight: 600; }
.stepper a, .stepper span { color: var(--muted); font-size: .84rem; text-decoration: none; }
.stepper li[aria-current="step"] span { color: var(--accent); }
.stepper a { display: inline-block; min-height: 28px; text-decoration: underline; }
.stepper .step-number { font-variant-numeric: tabular-nums; }
.payment-group { display: grid; gap: .85rem; }
.pay-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pay-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; padding: .72rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.pay-list li span { display: block; }
.pay-list .num { font-weight: 600; }
.pay-list .record-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .75rem; }
.pay-list .record-actions button { font-size: .85rem; }
.result-context { margin-top: .45rem; }
.review-dialog .choices { margin-top: .8rem; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.result-zone { margin-top: .2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.result-actions { display: grid; gap: 14px; }
.result-actions > details.panel { padding: clamp(18px, 2.6vw, 26px); }
.result-actions summary { font-weight: 640; }
.result { padding: clamp(18px, 2.4vw, 26px); }
.result.federal { color: #fff; background: var(--navy); border-color: var(--navy); }
.result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .9rem; }
.result h2 { font-size: 1.08rem; margin: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 5px; padding: .19rem .42rem; color: var(--green); background: var(--green-soft); font-size: .72rem; font-weight: 640; line-height: 1.25; }
.badge.muted-badge { background: var(--accent-soft); color: var(--accent-hover); }
.badge.warning { color: var(--amber); background: var(--amber-soft); }
.result-big { font-family: var(--display); font-size: clamp(2.2rem, 4.5vw, 3.5rem); font-weight: 500; line-height: 1.02; letter-spacing: -.03em; margin-block: .35rem .5rem; }
.result.federal .muted { color: #c9d3e7; }
.result dl { margin-top: 1.1rem; }
.result dl div { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; border-top: 1px solid var(--line); padding: .5rem 0; font-size: .8rem; }
.result.federal dl div { border-color: #3c4e71; }
.result dd { margin: 0; font-weight: 600; flex-shrink: 0; }
.result .not-ready { font-size: 1.18rem; font-weight: 620; margin-block: .85rem .45rem; }
.result .result-note { margin-top: .85rem; }
.result-help { display: flex; align-items: center; justify-content: space-between; gap: .85rem; }
.result-help p { margin-top: .3rem; }
.calc-breakdown, .reserve-readout { margin: .35rem 0 0; }
.calc-breakdown div, .reserve-readout div { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.calc-breakdown dt, .reserve-readout dt { color: var(--muted); }
.calc-breakdown dd, .reserve-readout dd { margin: 0; font-weight: 600; }
.table-scroll { max-width: 100%; overflow-x: auto; margin-top: .75rem; }
.schedule { width: 100%; border-collapse: collapse; font-size: .88rem; }
.schedule th, .schedule td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.schedule th { font-weight: 600; color: var(--muted); }
.schedule .num { text-align: right; }
.schedule td:last-child { white-space: normal; }
.page-head { padding: .35rem .06rem .2rem; }
.page-head h1 { font-size: clamp(2.55rem, 4.4vw, 3.8rem); max-width: 20ch; }
.page-head .lead { color: var(--muted); font-size: 1.06rem; margin: .85rem 0 .1rem; max-width: 62ch; }
.page-head .text-button { margin-bottom: .55rem; }
.article { padding: clamp(24px, 4vw, 44px); }
.article h1 { font-size: clamp(2.55rem, 4.4vw, 3.8rem); max-width: 18ch; }
.article .lead { color: var(--muted); font-size: 1.06rem; margin: .9rem 0 1.3rem; }
.article .prose { max-width: 66ch; }
.article h2 { margin: 1.5rem 0 .45rem; }
.article .ledger-note { margin-block: 1.15rem; padding: 1rem 1.05rem; background: var(--accent-soft); border-radius: 10px; }
.article .ledger-note h2 { font-size: 1.04rem; margin: 0 0 .35rem; }
.article a.inline-link { display: inline-block; margin-top: .4rem; }
details { padding: 0; }
details > summary { font-weight: 600; min-height: 44px; display: flex; align-items: center; padding-block: .25rem; }
details.panel { padding: 0 clamp(16px, 2.4vw, 24px); }
details.panel > summary { min-height: 58px; }
details.panel > summary::after { content: '+'; margin-left: auto; font-size: 1.2rem; font-weight: 400; color: var(--accent); }
details.panel[open] > summary::after { content: '−'; }
details.panel[open] > summary { margin-bottom: .5rem; }
.form-details { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .35rem; }
.form-details > summary { min-height: 48px; font-weight: 600; display: flex; align-items: center; }
.form-details > summary::after { content: '+'; margin-left: auto; font-size: 1.2rem; font-weight: 400; color: var(--accent); }
.form-details[open] > summary::after { content: '−'; }
.form-details[open] > summary { margin-bottom: .4rem; }
.annualized-grid { display: grid; gap: .85rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1rem 0 .5rem; }
.annualized-column { border: 1px solid var(--line); border-radius: 10px; padding: .75rem; }
.annualized-column h2 { font-size: .95rem; margin: 0 0 .5rem; }
@media (max-width: 900px) { .annualized-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.summary-list { margin: .35rem 0 0; display: grid; gap: .45rem; }
.summary-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: .75rem; border-top: 1px solid var(--line); padding: .5rem 0; font-size: .92rem; }
.summary-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .summary-list > div { grid-template-columns: 1fr; gap: .1rem; } }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-block: 1.1rem; }
.plan-column { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.15rem; background: #fbfcfe; }
.plan-column h2 { font-size: 1.12rem; margin: 0 0 .55rem; }
.plan-column ul { margin: .2rem 0 0; padding-left: 1.15rem; }
.plan-column li { margin-top: .4rem; }
.plan-column p { margin-top: .85rem; }
.placeholder-fields { display: grid; gap: .4rem; margin: .9rem 0; }
.placeholder-fields > div { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: .6rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.placeholder-fields dt { color: var(--muted); font-size: .86rem; }
.placeholder-fields dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.guide-meta { max-width: 62ch; margin-top: 1.7rem; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.source-list { margin: .6rem 0 1rem; padding-left: 1.15rem; font-size: .92rem; }
.source-list li { margin-top: .35rem; }
.calculator-guide .prose > h2:first-child { margin-block-start: 0; }
.calculator-fields { display: grid; gap: .8rem; }
.calculator-fields dt, .example-values dt { font-weight: 600; overflow-wrap: break-word; }
.calculator-fields dd { margin-inline-start: 0; color: var(--muted); }
.calculator-guide .ledger-note h3 { margin-block: .75rem .25rem; }
.calculator-guide .ledger-note .summary-list > div { border-top-color: #c6d2ec; }
.example-values dd { font-variant-numeric: tabular-nums; }
.keeper-card { display: grid; gap: .55rem; }
.keeper-card .keeper-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.keeper-card .keeper-head h2 { margin: 0; }
.keeper-tag { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .12rem .55rem; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; }
.keeper-card .button { justify-self: start; }
@media (max-width: 620px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .placeholder-fields > div { grid-template-columns: 1fr; gap: .1rem; }
}

@media print {
  .skip, .top, .side, .footer, .stepper, .work-head, .notice, dialog,
  #official-actions, #withholding-plan, #special-details, #annualized-details,
  #reserve-details, .result-help, .form-row, .reserve-slot, #keeper-card,
  .result-zone,
  #calculator > .stack > *:not(#summary-panel):not(.result-actions) { display: none !important; }
  /* The written summary now sits inside the result action group, so the group
   * itself stays in print while its sibling actions are hidden. */
  .result-actions { display: block !important; margin: 0; }
  .result-actions > *:not(#summary-panel) { display: none !important; }
  body { background: #fff; }
  .layout { display: block; }
  main { max-width: 100%; }
  #summary-panel { display: block; border: 0; padding: 0; }
  #summary-panel > summary { display: none; }
  #summary-panel details { display: none; }
  .calculator-guide { display: none !important; }
  .summary-list > div { break-inside: avoid; }
}

@media (max-width: 560px) { .annualized-grid { grid-template-columns: 1fr; } }
.footer { background: #dde6f2; border-top: 1px solid #cbd6e6; }
.footer .wrap { display: flex; gap: .8rem 1rem; align-items: center; justify-content: space-between; min-height: 78px; padding-block: .55rem; flex-wrap: wrap; color: #3f4c64; }
.footer .meta { display: flex; flex-wrap: wrap; gap: .05rem .95rem; align-items: center; }
.footer .meta .text-button, .footer .text-button { color: #33446a; font-size: .84rem; }
.footer .brand-line { font-size: .84rem; color: #48556d; }
dialog { color: var(--ink); width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); border: 1px solid transparent; border-radius: var(--radius); padding: 26px; box-shadow: 0 18px 38px #1b2c4f38; overscroll-behavior: contain; }
dialog::backdrop { background: #1b243675; }
dialog h2 { margin-bottom: .55rem; }
dialog .fields { margin-top: .9rem; }
dialog .form-row { margin-top: 1rem; }
dialog .description { color: var(--muted); font-size: .92rem; }
@media (max-width: 950px) {
  .wrap { width: calc(100% - 48px); }
  .layout { gap: 22px; }
  .hero { padding-top: 4px; }
  .side .panel { padding: 0; }
}
@media (max-width: 780px) {
  .layout { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
  .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side .plans { grid-column: 1 / -1; }
  .hero { padding: 6px 0 14px; }
  .hero h1 { font-size: clamp(2.75rem, 7.4vw, 3.9rem); }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 32px); }
  .top .wrap { min-height: 62px; gap: .3rem; }
  .brand { gap: .45rem; font-size: 1.1rem; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .nav { gap: .12rem; }
  .nav a { font-size: .85rem; padding: .43rem .48rem; }
  .layout { gap: 20px; margin-block: 18px 36px; }
  .stack { gap: 16px; }
  .hero { padding: 2px 0 10px; }
  .hero h1 { max-width: 15ch; font-size: clamp(2.55rem, 10.4vw, 3.4rem); }
  .hero p { margin-top: .8rem; font-size: .95rem; }
  .entry-form, .result-zone, .side, .fields, .situation-grid { grid-template-columns: minmax(0, 1fr); }
  .entry-form { gap: 9px; }
  .entry.compact { padding: 17px 18px; }
  .entry-links, .home-extra, .result-help { align-items: flex-start; flex-direction: column; gap: .1rem; }
  .result-help .secondary { margin-top: .4rem; }
  .stepper { gap: .42rem; }
  .stepper a, .stepper span { font-size: .73rem; }
  .result { padding: 19px; }
  .result-big { font-size: 2.8rem; }
  .footer .wrap { gap: .15rem; }
  .footer .meta { column-gap: .85rem; }
  dialog { padding: 19px; }
}
@media (max-width: 430px) {
  .top .wrap { flex-wrap: wrap; padding-block: .45rem; gap: .1rem; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding-inline: .32rem; }
}
@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) { .button, .nav a { transition: background-color 140ms ease-out; } }
}