/* Fonts are self-hosted so no visitor data goes to a font service. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

:root {
  --green: #12583D;
  --green-deep: #0C3F2C;
  --green-wash: #E6EFEA;
  --danfo: #F2B705;
  --danfo-wash: #FDF3D0;
  --paper: #F7F8F6;
  --white: #FFFFFF;
  --ink: #14201B;
  --muted: #5E6E66;
  --line: #D5DDD8;
  --error: #B3261E;
  --error-wash: #FBE9E7;
  --body: "Atkinson Hyperlegible", "Bricolage Grotesque", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --measure: 68ch;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img, svg { max-width: 100%; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--danfo); outline-offset: 2px; border-radius: 2px; }
/* Atkinson's slashed zero is noisy in long figures, so figures use Bricolage's tabular numbers. */
.num, td.num, .figure, .rung-tax, .facts dd, input.money, .ladder-inputs input, .ladder-year strong { font-family: var(--display); font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--white); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font: 750 1.45rem/1 var(--display); color: var(--green); text-decoration: none; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 0.45rem; }
.brand-mark { width: 14px; height: 22px; background: linear-gradient(var(--danfo) 0 33%, var(--green) 33% 66%, var(--danfo) 66%); border-radius: 2px; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink); }
.site-nav a:hover { color: var(--green); text-decoration: underline; }
.site-nav form { margin: 0; }
.site-foot { margin-top: 5rem; padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
.site-foot a { color: var(--muted); }

/* Buttons and forms */
.button, button.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.3rem; border: 2px solid var(--green);
  background: var(--green); color: var(--white); font: 700 1rem/1.2 var(--body); border-radius: var(--radius); cursor: pointer; text-decoration: none; }
.button:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.button.secondary { background: transparent; color: var(--green); }
.button.secondary:hover { background: var(--green-wash); color: var(--green-deep); }
.button.danger { background: transparent; border-color: var(--error); color: var(--error); }
.button.danger:hover { background: var(--error-wash); }
.button.big { padding: 0.95rem 1.6rem; font-size: 1.08rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.linkish.danger { color: var(--error); }

label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.92rem; margin-top: 0.1rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=file], select, textarea {
  width: 100%; max-width: 28rem; padding: 0.65rem 0.75rem; border: 1.5px solid #9AA9A1; border-radius: var(--radius); background: var(--white);
  font: inherit; color: var(--ink); }
input.money { max-width: 16rem; text-align: right; font-variant-numeric: tabular-nums; }
textarea { max-width: 100%; min-height: 10rem; font-size: 0.92rem; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid var(--danfo); outline-offset: 0; }
.field { margin-bottom: 1.4rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; accent-color: var(--green); }
fieldset { border: 0; padding: 0; margin: 0 0 2.2rem; }
legend { font: 650 1.25rem/1.2 var(--display); margin-bottom: 0.4rem; padding: 0; }
fieldset > p { color: var(--muted); }
.radios { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.radios label { font-weight: 400; display: flex; gap: 0.45rem; align-items: center; }
.radios input { accent-color: var(--green); width: 1.1rem; height: 1.1rem; }
.actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* Messages */
.notice { padding: 0.9rem 1.1rem; border-left: 5px solid var(--green); background: var(--green-wash); margin: 0 0 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: 46rem; }
.notice.error { border-color: var(--error); background: var(--error-wash); }
.notice.warn { border-color: var(--danfo); background: var(--danfo-wash); }
.notice ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.notice p:last-child { margin-bottom: 0; }

/* Home: hero and band ladder */
.hero { background: var(--green); color: var(--white); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.hero h1 { color: var(--white); max-width: 14ch; }
.hero .lede { color: #DCE8E1; max-width: 38ch; }
.hero .button { background: var(--danfo); border-color: var(--danfo); color: var(--ink); }
.hero .button:hover { background: #FFD03A; border-color: #FFD03A; color: var(--ink); }
.hero .after-cta { color: #B9CEC3; font-size: 0.95rem; margin-top: 0.9rem; }
.deadline { display: inline-block; font: 650 1rem/1.3 var(--display); color: var(--danfo); margin-bottom: 1rem; }

.ladder { background: var(--white); color: var(--ink); border-radius: 10px; padding: 1.5rem 1.5rem 1.25rem; box-shadow: 0 18px 40px -24px rgba(5, 30, 20, 0.6); }
.ladder-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.ladder-inputs label { font-size: 0.95rem; }
.ladder-inputs input { max-width: none; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ladder-year { margin: 0 0 1rem; font-size: 0.98rem; }
.ladder-year strong { font-size: 1.1rem; }
.rungs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 6px; }
.rung { display: grid; grid-template-columns: 7.5rem 1fr 6.5rem; gap: 0.75rem; align-items: center; font-size: 0.9rem; max-width: none; }
.rung-label { color: var(--muted); line-height: 1.25; }
.rung-label b { color: var(--ink); font-size: 1rem; }
.rung-bar { position: relative; height: 30px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 4px; overflow: hidden; }
.rung-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--danfo); transition: width 0.45s cubic-bezier(.2,.7,.2,1); }
.rung[data-rate="0"] .rung-fill { background: #BFD6C9; }
.rung-tax { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ladder-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 2px solid var(--ink); margin-top: 1rem; padding-top: 0.8rem; }
.ladder-total .figure { font: 750 1.9rem/1 var(--display); }
.ladder-note { font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0; }
@media (prefers-reduced-motion: reduce) { .rung-fill { transition: none; } }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.section > .wrap > h2 { max-width: 24ch; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 4rem; }
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.4rem; }
.steps-list li { counter-increment: step; display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; max-width: 42rem; }
.steps-list li::before { content: counter(step); font: 750 1.6rem/1 var(--display); color: var(--green); border-bottom: 4px solid var(--danfo); align-self: start; padding-bottom: 0.25rem; text-align: center; }
.steps-list h3 { margin-bottom: 0.25rem; }
.steps-list p { margin: 0; color: var(--muted); }
.plain-list { padding-left: 1.2rem; }
.plain-list li { margin-bottom: 0.45rem; }
.price { font: 750 2.4rem/1 var(--display); color: var(--green); margin: 0.4rem 0 0.6rem; }
.faq dt { font-weight: 700; margin-top: 1.25rem; }
.faq dd { margin: 0.25rem 0 0; max-width: var(--measure); color: var(--ink); }

/* App pages */
.page { padding: 2.5rem 0 0; }
.page-head { margin-bottom: 2rem; }
.page-head p { color: var(--muted); }
.return-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.stepper { list-style: none; margin: 0; padding: 0; counter-reset: s; position: sticky; top: 1.5rem; }
.stepper li { counter-increment: s; }
.stepper a { display: grid; grid-template-columns: 2rem 1fr; align-items: center; gap: 0.6rem; padding: 0.55rem 0.6rem; text-decoration: none; color: var(--muted); border-radius: var(--radius); }
.stepper a::before { content: counter(s); width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); font-weight: 700; color: var(--muted); background: var(--white); }
.stepper .done a::before { content: "✓"; background: var(--green); border-color: var(--green); color: var(--white); }
.stepper .current a { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: inset 4px 0 0 var(--danfo); }
.stepper .current a::before { border-color: var(--green); color: var(--green); }
.stepper a:hover { color: var(--ink); background: var(--white); }
.stepper-meta { margin-top: 1.5rem; font-size: 0.9rem; color: var(--muted); padding-left: 0.6rem; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.5rem; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: 0.88rem; border-bottom: 2px solid var(--ink); }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.table-scroll { overflow-x: auto; margin: 0 -0.25rem; padding: 0 0.25rem; }
.tx-desc { max-width: 26rem; }
.tx-desc small { display: block; color: var(--muted); }
tr.counted { background: #FFFBEA; }
tr.counted td:first-child { box-shadow: inset 4px 0 0 var(--danfo); }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--green-wash); color: var(--green); white-space: nowrap; }
.tag.yes { background: var(--danfo); color: var(--ink); }
.tag.mine { background: var(--ink); color: var(--white); }
.tx-actions form { display: inline; }
.tx-actions .linkish { font-size: 0.9rem; white-space: nowrap; }
.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: 0.5rem 0; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-color: var(--green); }

.big-figure { font: 750 clamp(2.4rem, 6vw, 3.6rem)/1 var(--display); letter-spacing: -0.03em; margin: 0.25rem 0 0.5rem; font-variant-numeric: tabular-nums; }
.result-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: end; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem 2rem; margin: 1.5rem 0 0; }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 0.1rem 0 0; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.locked { position: relative; }
.locked-cover { border: 2px dashed var(--green); border-radius: 10px; padding: 1.5rem; background: var(--green-wash); }

.returns-list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1rem; }
.returns-list li { max-width: none; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.returns-list h3 { margin: 0; font-size: 1.4rem; }
.mini-progress { display: flex; gap: 4px; margin-top: 0.5rem; }
.mini-progress span { width: 28px; height: 6px; border-radius: 3px; background: var(--line); }
.mini-progress span.on { background: var(--green); }

.danger-zone { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.danger-zone summary { cursor: pointer; color: var(--error); font-weight: 700; }

.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }

@media (max-width: 860px) {
  .hero .wrap, .two-col, .return-layout { grid-template-columns: 1fr; }
  .stepper { position: static; display: flex; overflow-x: auto; gap: 0.25rem; }
  .stepper a { grid-template-columns: 2rem; white-space: nowrap; }
  .stepper a .label { display: none; }
  .stepper .current a .label { display: inline; }
  .stepper .current a { grid-template-columns: 2rem auto; box-shadow: inset 0 -4px 0 var(--danfo); }
  .stepper-meta { display: none; }
  .result-head { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .ladder { padding: 1.1rem; }
  .ladder-inputs { grid-template-columns: 1fr; }
  .rung { grid-template-columns: 5.5rem 1fr 5.2rem; gap: 0.5rem; font-size: 0.82rem; }
  .site-nav { gap: 0.9rem; font-size: 0.95rem; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tx-actions { min-width: 9.5rem; }
.tx-desc { overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .site-nav .nav-extra { display: none; }
  .site-nav .button { padding: 0.5rem 0.8rem; font-size: 0.95rem; }
}
