:root {
  --ink: #14202e;
  --text: #253141;
  --muted: #5b6878;
  --line: #e1e6ec;
  --line-strong: #c9d1db;
  --band: #f3f6fa;
  --navy: #0f2c4c;
  --blue: #1f5fbf;
  --blue-dark: #174a96;
  --blue-soft: #e8f0fb;
  --net: #1d7a4c;
  --net-soft: #e6f4ec;
  --tax: #d9653b;
  --super: #3f7fd8;
  --error: #b42318;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 33, 54, 0.05), 0 6px 18px rgba(16, 33, 54, 0.06);
  --max: 1080px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font: 17px/1.65 "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.015em; }
h1 { font-size: 38px; line-height: 1.15; margin: 0 0 12px; font-weight: 800; }
h2 { font-size: 24px; line-height: 1.3; margin: 44px 0 12px; font-weight: 700; }
h3 { font-size: 18px; margin: 26px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
strong { color: var(--ink); }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; line-height: 1; color: var(--navy); text-decoration: none; letter-spacing: -0.025em; }
.logo:hover { color: var(--navy); }
.logo-mark { width: 32px; height: 32px; flex: none; display: block; }
.logo-word { display: inline-flex; align-items: flex-start; white-space: nowrap; }
.logo-after { font-weight: 500; }
.logo-au { margin: 1px 0 0 3px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; line-height: 1; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; padding: 7px 12px; border-radius: 7px; }
.nav a:hover { background: var(--band); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.badge { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--net); background: var(--net-soft); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }

/* Hero band */
.hero { background: linear-gradient(180deg, var(--band) 0%, #fff 100%); border-bottom: 1px solid var(--line); padding: 30px 0 34px; }
.hero h1 { max-width: 760px; }
.intro { font-size: 19px; color: var(--muted); max-width: 720px; margin-bottom: 20px; }
.intro strong { color: var(--net); }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
main { padding: 8px 0 56px; }
.updated { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Calculator */
/* Calculator: form card on the left, result card on the right that stays in view while you scroll */
.calc { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; margin: 6px 0 16px; }
.calc-inputs { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; }
.form-section { font-size: 15px; font-weight: 700; color: var(--ink); margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); letter-spacing: 0; }
.form-section .hint { font-weight: 400; margin-left: 6px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.field.wide { grid-column: 1 / -1; }
.field select, .field input { font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; min-height: 46px; width: 100%; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field select:focus, .field input:focus, .money-input:focus-within { outline: 3px solid #bcd4f5; border-color: var(--blue); }
.money-input { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; min-height: 58px; padding-left: 14px; }
.money-input span { font-size: 24px; font-weight: 600; color: var(--muted); }
.money-input input { border: 0; outline: 0; min-height: 56px; font-size: 26px; font-weight: 700; padding: 8px 12px 8px 6px; font-variant-numeric: tabular-nums; }
.money-input input:focus { outline: 0; }
.error { color: var(--error); font-size: 14px; font-weight: 500; min-height: 1.2em; }

/* Overtime and bonus extras */
.extras { grid-column: 1 / -1; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; }
.extras summary { cursor: pointer; font-weight: 600; color: var(--blue); font-size: 15px; list-style: none; }
.extras summary::-webkit-details-marker { display: none; }
.extras summary::before { content: "+"; display: inline-block; width: 18px; font-weight: 700; }
.extras[open] summary::before { content: "−"; }
.extras[open] summary { margin-bottom: 12px; }
.money-input.small { min-height: 46px; }
.money-input.small span { font-size: 17px; }
.money-input.small input { min-height: 44px; font-size: 16px; font-weight: 400; }
.field > input { margin-top: 0; }

/* Toggle-button groups (replace native dropdowns) */
.seg-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg-field legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.segmented { display: flex; background: var(--band); border: 1px solid var(--line); border-radius: 10px; padding: 4px; gap: 4px; }
.segmented label { flex: 1 1 auto; min-width: 0; position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; min-height: 40px; padding: 6px 10px; border-radius: 7px; font-size: 15px; font-weight: 500; color: var(--muted); line-height: 1.25; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.segmented label:hover span { color: var(--ink); }
.segmented input:checked + span { background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 1px 2px rgba(16, 33, 54, 0.12), 0 0 0 1px var(--line-strong); }
.segmented input:focus-visible + span { outline: 3px solid #bcd4f5; outline-offset: 1px; }

.calc-result { background: var(--navy); color: #dfe8f3; padding: 24px; border-radius: 14px; box-shadow: var(--shadow); position: sticky; top: 84px; min-height: 240px; display: flex; flex-direction: column; justify-content: center; }
.calc-result .kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #a9bcd3; margin: 0 0 4px; }
.calc-result .big { font-size: 46px; font-weight: 800; line-height: 1.1; color: #fff; margin: 0 0 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.calc-result .big.muted { color: #6f87a3; }
.calc-result .big.bill { color: #ffb08f; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.calc-result .sub { color: #a9bcd3; font-size: 15px; margin: 0; }
.calc-result table { margin: 14px 0 6px; }
.calc-result th, .calc-result td { border-bottom-color: rgba(255, 255, 255, 0.12); color: #dfe8f3; }
.calc-result thead th { background: transparent; color: #a9bcd3; border-bottom-color: rgba(255, 255, 255, 0.22); }
.calc-result tbody tr.total td { color: #fff; background: rgba(255, 255, 255, 0.08); font-weight: 700; }
.calc-result .note { color: #a9bcd3; }
.calc-result .legend li { color: #dfe8f3; }
.calc-result .split { background: rgba(255, 255, 255, 0.12); }

.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.trust li { margin: 0; padding-left: 20px; position: relative; }
.trust li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 6px; border-left: 2px solid var(--net); border-bottom: 2px solid var(--net); transform: rotate(-45deg); }

/* Summary + split bar */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
.sum-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 2px rgba(16, 33, 54, 0.04); }
.sum-card span { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.sum-card strong { display: block; font-size: clamp(18px, 2.4vw, 24px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sum-card-main { border-color: #b9dcc8; background: var(--net-soft); }
.sum-card-main strong { color: var(--net); }
.split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); max-width: 720px; }
.seg-net { background: var(--net); }
.seg-tax { background: var(--tax); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.legend li { margin: 0; display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot-net { background: var(--net); }
.dot-tax { background: var(--tax); }
.dot-super { background: var(--super); }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0 18px; }
.calc-result .table-scroll { border: 0; margin: 0; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 16px; }
caption { text-align: left; font-weight: 700; color: var(--ink); padding: 12px 14px 4px; }
th, td { text-align: right; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--band); text-transform: none; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfd; }
.calc-result tbody tr:hover td { background: transparent; }
tbody tr.total td { font-weight: 700; color: var(--ink); background: var(--band); }
table.compact th, table.compact td { padding: 8px 0; }
table.compact th + th, table.compact td + td { padding-left: 12px; white-space: nowrap; }

/* Lists of links, cards, misc */
.links { columns: 4 160px; column-gap: 24px; padding: 0; list-style: none; font-size: 15px; }
.links li { margin-bottom: 6px; break-inside: avoid; }
.more { display: flex; gap: 24px; flex-wrap: wrap; font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 0; font-weight: 600; flex-wrap: wrap; }
.pager a { text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.pager a:hover { border-color: var(--blue); background: var(--blue-soft); }
.box { background: var(--blue-soft); border: 1px solid #cddcf2; border-radius: var(--radius); padding: 14px 18px; margin: 22px 0; }
.box p:last-child { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; list-style: none; }
.cards li { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.cards li:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.cards a { font-weight: 700; text-decoration: none; color: var(--ink); line-height: 1.35; display: block; }
.cards a:hover { color: var(--blue); }
.cards p { font-size: 15px; color: var(--muted); margin: 6px 0 0; }
.note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

/* Footer */
.site-footer { background: var(--navy); color: #b9c8d9; font-size: 15px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
.site-footer h2 { color: #fff; font-size: 15px; margin: 0 0 12px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #d6e1ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.logo-light { color: #fff; margin-bottom: 10px; }
.logo-light:hover { color: #fff; }
.logo-light .logo-au { color: #8fb6ec; }
.footer-about p { max-width: 300px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; padding-bottom: 30px; font-size: 13px; color: #94a7bd; }
.footer-bottom p { max-width: 860px; }

@media (max-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-result { position: static; min-height: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .footer-about p { max-width: none; }
  .badge { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 29px; }
  h2 { font-size: 21px; }
  .summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .sum-card { padding: 12px; min-width: 0; }
  .sum-card strong { font-size: 20px; }
  .cards { grid-template-columns: 1fr; }
  .calc-inputs, .calc-result { padding: 18px; }
  .calc-result .big { font-size: 38px; }
  th, td { padding: 9px 10px; font-size: 15px; }
}
@media (max-width: 400px) {
  .calc-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Page-level tax year tabs */
.year-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.year-bar-label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.year-tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.year-tabs label { position: relative; cursor: pointer; }
.year-tabs input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.year-tabs span { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: 15px; font-weight: 700; color: var(--ink); transition: background 0.15s, border-color 0.15s, color 0.15s; }
.year-tabs small { font-size: 12px; font-weight: 500; color: var(--muted); }
.year-tabs label:hover span { border-color: var(--blue); }
.year-tabs input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.year-tabs input:checked + span small { color: #a9bcd3; }
.year-tabs input:focus-visible + span { outline: 3px solid #bcd4f5; outline-offset: 2px; }
.badge-estimate { color: #8a4b0f; background: #fdf0e1; }

.calc-grid.wide { grid-column: 1 / -1; }

/* "?" help tooltips */
.field, .seg-field, .year-bar { position: relative; }
.tip { display: inline-flex; vertical-align: 1px; margin-left: 4px; }
.tip-btn { position: relative; display: inline-grid; place-items: center; width: 13px; height: 13px; padding: 0; border-radius: 50%; border: 1px solid #c3cad3; background: #fff; color: #7a8594; font: 700 8.5px/1 "Public Sans", system-ui, sans-serif; cursor: help; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.tip-btn::after { content: ""; position: absolute; inset: -8px; } /* bigger tap target without a bigger icon */
.tip-btn:hover, .tip-btn:focus-visible, .tip.open .tip-btn { background: var(--navy); border-color: var(--navy); color: #fff; outline: none; }
.tip-text { display: none; position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 30; max-width: 420px; padding: 10px 12px; border-radius: 8px; background: var(--navy); color: #eef3f9; font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 24px rgba(16, 33, 54, 0.22); }
legend .tip-text, .field > span .tip-text { top: 26px; }
.year-bar .tip-text { top: 34px; }
.tip:hover .tip-text, .tip-btn:focus-visible + .tip-text, .tip.open .tip-text { display: block; }
.field > span:first-child { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }

/* Very narrow screens: let long toggle labels wrap rather than overflow */
@media (max-width: 380px) { .segmented span { white-space: normal; padding: 6px 6px; } }
/* Phones: groups with four options become a 2x2 grid so every label stays on one line */
@media (max-width: 480px) {
  .segmented:has(label:nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; }
  .segmented:has(label:nth-child(4)) span { white-space: nowrap; }
}

/* Phone result bar */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--navy); color: #fff; box-shadow: 0 -6px 20px rgba(16, 33, 54, 0.2); }
.mobile-bar .mb-text { min-width: 0; }
.mobile-bar .mb-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #a9bcd3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-bar .mb-value { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; color: #fff; }
.mobile-bar .mb-value.bill { color: #ffb08f; }
.mobile-bar .mb-go { flex: none; border: 0; border-radius: 8px; padding: 10px 14px; background: #fff; color: var(--navy); font: 700 14px/1 "Public Sans", system-ui, sans-serif; cursor: pointer; }
body.has-mobile-bar { padding-bottom: 76px; }
@media (min-width: 901px) { .mobile-bar { display: none !important; } body.has-mobile-bar { padding-bottom: 0; } }

/* Small phones */
@media (max-width: 480px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .hero { padding: 22px 0 26px; }
  h1 { font-size: 26px; }
  .intro { font-size: 17px; }
  .calc-inputs, .calc-result { padding: 16px; border-radius: 12px; }
  .calc-result .big { font-size: 34px; }
  th, td { padding: 8px 7px; font-size: 14px; }
  caption { padding: 10px 8px 2px; }
  .summary { gap: 8px; }
  .sum-card { padding: 10px; }
  .sum-card strong { font-size: 18px; }
  .links { columns: 2; }
  .pager { flex-direction: column; }
  .pager a { text-align: center; }
  .year-bar { gap: 8px; }
  .year-tabs span { padding: 6px 11px; font-size: 14px; }
  .footer-grid { gap: 22px; }
}
/* Scrollable tables: a soft shadow on the right edge hints there's more to swipe */
.table-scroll { background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 24px 100% no-repeat local, linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right / 24px 100% no-repeat local, radial-gradient(farthest-side at 100% 50%, rgba(16,33,54,0.16), transparent) right / 10px 100% no-repeat scroll; }
.calc-result .table-scroll { background: none; }

/* Phones: wide tables become one small card per row */
@media (max-width: 680px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; }
  table.stack caption { display: block; text-align: left; padding: 12px 12px 4px; }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.stack tbody tr:last-child { border-bottom: 0; }
  table.stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 0; border: 0; text-align: right; font-size: 14px; background: transparent !important; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; }
  table.stack td:first-child { grid-column: 1 / -1; justify-content: flex-start; text-align: left; font-weight: 700; font-size: 15px; padding-bottom: 4px; }
  table.stack td:first-child::before { content: none; }
  table.stack tr.total { background: var(--band); }
  table.stack tbody tr:hover td { background: transparent; }
  .table-scroll:has(table.stack) { overflow: visible; background: none; }
}
@media (max-width: 400px) {
  table.stack tr { grid-template-columns: 1fr; }
}

/* Ad slots: space reserved so the page doesn't jump when an ad loads */
.ad { margin: 28px 0; text-align: center; }
.ad-label { display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #8a94a1; margin-bottom: 4px; }
.ad ins.adsbygoogle { min-height: 250px; }
.ad-preview .ad-box { display: grid; place-items: center; min-height: 250px; border: 1px dashed var(--line-strong); border-radius: 10px; background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 10px, #f3f5f7 10px, #f3f5f7 20px); color: var(--muted); font-size: 14px; }
@media (max-width: 480px) { .ad ins.adsbygoogle, .ad-preview .ad-box { min-height: 280px; } }

/* Phone header: logo + Menu button; links open in a panel below */
.menu-btn { display: none; }
@media (max-width: 720px) {
  .header-inner { gap: 12px; min-height: 56px; flex-wrap: nowrap; }
  .js .menu-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: 600 15px/1 "Public Sans", system-ui, sans-serif; cursor: pointer; }
  .js .menu-btn:focus-visible { outline: 3px solid #bcd4f5; outline-offset: 2px; }
  .menu-icon { position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: background 0.15s; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.2s; }
  .menu-icon::before { top: -5px; }
  .menu-icon::after { top: 5px; }
  .nav-open .menu-icon { background: transparent; }
  .nav-open .menu-icon::before { transform: translateY(5px) rotate(45deg); }
  .nav-open .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 2px; padding: 8px 14px 14px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 14px 28px rgba(16, 33, 54, 0.14); }
  .js .nav-open .nav { display: flex; }
  .js .nav a { padding: 13px 12px; font-size: 16px; border-radius: 8px; }
  .js .nav a[aria-current="page"] { font-weight: 700; }
  /* Without JavaScript: links in a single scrollable row */
  html:not(.js) .nav { flex-wrap: nowrap; overflow-x: auto; }
}
@media (max-width: 400px) {
  .site-footer nav ul { columns: 2; column-gap: 16px; }
  .site-footer nav li { break-inside: avoid; }
}

/* Code samples (developers page): wrap long lines so phones never scroll sideways */
pre { margin: 14px 0 18px; padding: 14px 16px; background: #f6f8fa; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
pre code { font-size: inherit; }
td code { white-space: nowrap; }

/* Six nav links between the phone menu and full desktop: tighten so they stay on one line */
@media (min-width: 721px) and (max-width: 880px) {
  .header-inner { gap: 14px; }
  .nav { gap: 0; flex-wrap: nowrap; }
  .nav a { padding: 7px 8px; font-size: 14px; }
}
/* Keep "2026–27" together in headings */
[data-year-label] { white-space: nowrap; }
/* Very narrow phones: room for six-figure amounts in the result card */
@media (max-width: 400px) {
  .calc-result { padding: 20px 16px; }
  .calc-result table.compact th, .calc-result table.compact td { font-size: 13px; }
  table.compact th + th, table.compact td + td { padding-left: 8px; }
}
@media (max-width: 560px) { td code { white-space: normal; overflow-wrap: anywhere; } }
