.tax-page {
  --tax-blue: #003580;
  --tax-ink: #17283d;
  --tax-muted: #4c6077;
  --tax-line: #dbe5f0;
  --tax-soft: #f2f7fd;
  background: #f6f8fc;
  color: var(--tax-ink);
}
.tax-page a { color: var(--tax-blue); text-underline-offset: 3px; }
.tax-wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.tax-hero { position: relative; isolation: isolate; min-height: 540px; padding: clamp(44px, 6vw, 90px) 0 62px; background: #102d46; }
.tax-intro { max-width: min(100%, 620px); color: #fff; }
.tax-kicker { margin: 0 0 12px; color: #ffe27b; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.tax-intro h1 { margin: 0; font-size: clamp(35px, 4.4vw, 59px); font-weight: 800; letter-spacing: -.05em; line-height: 1.04; }
.tax-lead { margin: 16px 0 22px; color: #f0f5fc; font-size: clamp(16px, 2vw, 20px); max-width: 44ch; }
.tax-jump { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 800; }
.tax-jump a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; }
.tax-jump a:focus-visible, .tax-photo a:focus-visible { outline-color: #ffe27b; }
.tax-photo { position: absolute; inset: 0; margin: 0; }
.tax-photo img, .tax-photo::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.tax-photo img { display: block; object-fit: cover; object-position: center 49%; }
.tax-photo::after { content: ''; background: linear-gradient(90deg, #071b31f5 0%, #071b31e8 30%, #071b3194 55%, #071b311a 82%); }
.tax-hero-inner { position: relative; z-index: 1; }
.tax-photo figcaption { position: absolute; z-index: 1; right: max(14px, calc((100% - 1160px) / 2)); bottom: 12px; padding: 5px 9px; border-radius: 6px; background: #071b31e8; color: #fff; font-size: 11px; }
.tax-photo figcaption a { color: inherit; text-decoration: underline; }
.tax-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tax-workspace { padding-block: 28px; }
.tax-panel, .tax-hero-search { min-width: 0; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--tax-line); border-radius: 16px; background: #fff; scroll-margin-top: 105px; }
.tax-hero-search { padding: 14px; color: var(--tax-ink); }
.tax-panel h2, .tax-faq h2, .tax-register h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 8px; }
.tax-muted, .tax-hint, .tax-source-note { color: var(--tax-muted); font-size: 14px; margin: 0; }
.tax-lookup, .tax-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.tax-lookup { grid-template-columns: 1.2fr .8fr; margin-top: 0; }
.tax-lookup > div, .tax-calc-actions > div { min-width: 0; }
.tax-page label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.tax-page input, .tax-page select { width: 100%; min-width: 0; min-height: 46px; padding: 10px; border: 1px solid #bccbdd; border-radius: 8px; color: var(--tax-ink); background: #fff; font: inherit; font-size: 16px; }
.tax-page :focus-visible { outline: 3px solid #0071c2; outline-offset: 3px; }
.tax-hint { margin: 10px 0; font-size: 13px; }
.tax-hint:empty, .tax-matches:empty { display: none; }
.tax-matches { display: grid; gap: 6px; margin: 10px 0 14px; }
.tax-matches button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--tax-line); border-radius: 8px; background: #fff; color: var(--tax-blue); font: inherit; text-align: left; cursor: pointer; }
.tax-matches button:hover { background: var(--tax-soft); border-color: var(--tax-blue); }
.tax-region-result { margin-top: 16px; padding: 15px; border-radius: 10px; background: var(--tax-soft); overflow-wrap: anywhere; }
.tax-region-result p { margin: 0 0 7px; }
.tax-region-result p:last-child { margin-bottom: 0; }
.tax-region-result a { display: inline-block; margin: 3px 12px 3px 0; font-weight: 700; }
.tax-source-note { margin-top: 16px; font-size: 13px; }
.tax-fields fieldset { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--tax-line); border-radius: 10px; }
.tax-fields legend { padding: 0 4px; color: var(--tax-blue); font-size: 13px; font-weight: 800; }
.tax-fields input + label { margin-top: 10px; }
.tax-calc-actions { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.tax-calc-actions > div { flex: 1; }
.tax-button { min-height: 46px; padding: 9px 16px; border: 0; border-radius: 8px; background: var(--tax-blue); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.tax-button:hover { background: #00539d; }
.tax-rate-action { margin: 5px 10px 5px 0; min-height: 44px; padding: 7px 12px; background: #fff; border: 1px solid #a6bdd9; border-radius: 8px; color: var(--tax-blue); font: inherit; font-weight: 700; cursor: pointer; }
.tax-result { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--tax-soft); }
.tax-result span { font-size: 13px; font-weight: 700; color: var(--tax-muted); }
.tax-amount { display: block; color: var(--tax-blue); font-size: clamp(27px, 4vw, 36px); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tax-result p { font-size: 13px; color: var(--tax-muted); margin: 5px 0 0; }
.tax-faq { padding: 8px 0 44px; }
.tax-register { padding-bottom: 28px; scroll-margin-top: 105px; }
.tax-register-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tax-register-filters { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; margin-top: 14px; }
.tax-register-filters > div { min-width: 0; }
.tax-form input[readonly] { background: var(--tax-soft); }
.tax-register-row { padding: 14px; border: 1px solid var(--tax-line); border-radius: 10px; background: #fff; }
.tax-register-row h3 { margin: 0; font-size: 16px; }
.tax-register-row p { margin: 5px 0; color: var(--tax-muted); font-size: 14px; }
.tax-register-row a { font-size: 14px; }
@media (min-width: 801px) {
  #calculator { display: grid; grid-template-columns: 1fr minmax(230px, .43fr); column-gap: 26px; }
  #calculator h2, #calculator > .tax-muted, .tax-form { grid-column: 1; }
  .tax-result { grid-column: 2; grid-row: 1 / span 3; align-self: start; margin-top: 0; }
}
.tax-faq details { margin-top: 9px; border: 1px solid var(--tax-line); border-radius: 10px; box-shadow: none; background: #fff; }
.tax-faq details::before, .tax-faq summary::before { content: none; }
.tax-faq summary::before { content: none; }
.tax-faq summary { padding: 12px 14px; font-weight: 800; }
.tax-faq summary::after { content: '+'; font: 600 22px/1 Arial, sans-serif; flex: 0 0 30px; }
.tax-faq details[open] summary::after { content: '−'; }
.tax-faq details p { max-width: 80ch; padding: 0 16px 16px; }
.tax-footer-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 16px; font-size: 14px; }
@media (max-width: 800px) {
  .tax-photo::after { background: linear-gradient(90deg, #071b31f2, #071b3180); }
  .tax-workspace { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 600px) {
  .tax-wrap { width: calc(100% - 28px); }
  .tax-lookup, .tax-register-list, .tax-register-filters { grid-template-columns: 1fr; }
  .tax-hero { min-height: 0; padding-top: clamp(128px, 35vw, 200px); }
  .tax-photo img { object-position: 54% 45%; }
  .tax-photo::after { background: linear-gradient(180deg, #071b310d, #071b31d9 138px, #071b3194 320px, #071b31d9); }
  .tax-lead { margin: 12px 0 16px; }
  .tax-workspace { padding-block: 18px; }
  .tax-fields { gap: 8px; }
  .tax-fields fieldset { padding: 7px; }
  .tax-calc-actions > div { min-width: 90px; }
}
