:root {
  /* Colours: Google — Material 3 interface tokens as used in Google Workspace
     (https://m3.material.io/styles/color) and Google's chart colours. */
  --bg: #f8fafd;            /* surface (Workspace) */
  --surface: #ffffff;
  --surface-2: #f0f4f9;     /* surface-container */
  --ink: #1f1f1f;           /* on-surface */
  --ink-soft: #444746;      /* on-surface-variant */
  --line: #e1e3e1;          /* outline-variant (light) */
  --accent: #0b57d0;        /* primary */
  --accent-strong: #0b57d0;
  --on-accent: #ffffff;     /* on-primary */
  --accent-soft: #d3e3fd;   /* primary-container */
  --pos: #146c2e;
  --neg: #b3261e;           /* error */
  /* chart series (validated as a set, all pairs) */
  --series-net: #1a73e8;    /* Google Blue 600 */
  --series-tax: #d93025;    /* Google Red 600 */
  --series-con: #f29900;    /* Google Yellow 700 */
  --series-marginal: #d93025;
  --tint-net: #e8f0fe;      /* Blue 50 */
  --band: linear-gradient(180deg, #d3e3fd 0%, #e8f0fe 55%, var(--bg) 100%);
  --tint-tax: #fce8e6;      /* Red 50 */
  --tint-con: #fef7e0;      /* Yellow 50 */
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 31, 31, .06), 0 2px 6px rgba(31, 31, 31, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Google Material 3 dark tokens; chart series use the Google logo blue/red */
    --bg: #131314; --surface: #1e1f20; --surface-2: #282a2c; --ink: #e3e3e3; --ink-soft: #c4c7c5; --line: #444746;
    --accent: #a8c7fa; --accent-strong: #a8c7fa; --on-accent: #062e6f; --accent-soft: rgba(168, 199, 250, .16);
    --pos: #6dd58c; --neg: #f2b8b5;
    --series-net: #4285f4; --series-tax: #ea4335; --series-con: #f29900;
    --series-marginal: #ea4335;
    --tint-net: rgba(66, 133, 244, .16); --tint-tax: rgba(234, 67, 53, .16); --tint-con: rgba(242, 153, 0, .16);
  --band: linear-gradient(180deg, rgba(66, 133, 244, .22) 0%, rgba(66, 133, 244, .08) 60%, var(--bg) 100%);
    --shadow: none; color-scheme: dark;
}
}
:root[data-theme="dark"] {
  /* Google Material 3 dark tokens; chart series use the Google logo blue/red */
  --bg: #131314; --surface: #1e1f20; --surface-2: #282a2c; --ink: #e3e3e3; --ink-soft: #c4c7c5; --line: #444746;
  --accent: #a8c7fa; --accent-strong: #a8c7fa; --on-accent: #062e6f; --accent-soft: rgba(168, 199, 250, .16);
  --pos: #6dd58c; --neg: #f2b8b5;
  --series-net: #4285f4; --series-tax: #ea4335; --series-con: #f29900;
  --series-marginal: #ea4335;
  --tint-net: rgba(66, 133, 244, .16); --tint-tax: rgba(234, 67, 53, .16); --tint-con: rgba(242, 153, 0, .16);
  --band: linear-gradient(180deg, rgba(66, 133, 244, .22) 0%, rgba(66, 133, 244, .08) 60%, var(--bg) 100%);
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .4em; }
h2 { font-size: 1.3rem; margin: 0 0 .8em; }
h3 { font-size: 1.05rem; margin: 1.6em 0 .6em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-strong); color: var(--on-accent); font-weight: 700; }
.country-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.country-nav a { padding: 6px 10px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: .92rem; }
.country-nav a:hover { background: var(--accent-soft); color: var(--ink); }
.country-nav a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.site-footer {
  margin-top: 48px; padding: 32px 0 40px; background: var(--accent-strong); color: var(--on-accent); font-size: .9rem;
  /* Same primary band as the take-home card (.res-hero): everything inside reads on-primary */
  --ink: var(--on-accent); --ink-soft: var(--on-accent); --accent: var(--on-accent);
  --accent-soft: color-mix(in srgb, var(--on-accent) 16%, transparent);
}
.site-footer p { opacity: .9; }
.site-footer a { color: var(--on-accent); }

/* hero */
.hero { padding: 36px 0 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; color: var(--accent); margin: 0 0 .5em; }
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 640px; margin: 0; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 0 0 20px; }

/* form */
.calc-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--ink-soft); }
.field input, .field select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-amount input { font-size: 1.4rem; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.schedule summary { cursor: pointer; font-size: .9rem; color: var(--accent); font-weight: 500; }
.hint { margin: 0; font-size: .82rem; color: var(--ink-soft); }

/* results */
.results .net { margin: 0; font-size: 1rem; color: var(--ink-soft); }
.results .net span { display: block; font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.net-sub { margin: 4px 0 18px; color: var(--ink-soft); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.stats span { display: block; font-size: .78rem; color: var(--ink-soft); }
.stats b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
/* series colours: validated categorical slots 1-3 (all pairs, light + dark) */
.s-net { --c: var(--series-net); } .s-tax { --c: var(--series-tax); } .s-con { --c: var(--series-con); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; margin-right: 8px; }

.results-head, .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin-bottom: .2em; }
.card-head p { margin: 0 0 12px; }
.results-head .eyebrow { margin: 0; }
.seg-tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-tabs button {
  font: inherit; font-size: .85rem; font-weight: 500; color: var(--ink-soft); background: none; border: 0;
  padding: 6px 11px; border-radius: 7px; cursor: pointer;
}
.seg-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-tabs button:focus-visible { outline: 2px solid var(--accent); }
.results .net small { display: block; font-size: .9rem; margin-top: 4px; }
.results .net { margin: 14px 0 18px; }

.result-body { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: center; margin-bottom: 18px; }
@media (max-width: 600px) { .result-body { grid-template-columns: minmax(0, 1fr); justify-items: center; } .bd-list { width: 100%; } }
.donut { position: relative; margin: 0; width: 170px; height: 170px; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut-track { stroke: var(--line); }
.donut-seg { stroke: var(--c); cursor: pointer; transition: stroke-width .12s; outline: none; }
.donut-seg:hover, .donut-seg:focus { stroke-width: 26px; }
.donut figcaption { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut figcaption b { font-size: 1.45rem; line-height: 1; font-variant-numeric: tabular-nums; }
.donut figcaption span { font-size: .8rem; color: var(--ink-soft); }

.bd-list { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.bd-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.bd-list li > span { display: flex; align-items: center; }
.bd-group > span, .bd-net > span { white-space: nowrap; }
.bd-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-list em { font-style: normal; color: var(--ink-soft); font-size: .82rem; margin-left: 6px; }
.bd-gross { border-bottom: 1px solid var(--line); font-weight: 600; }
.bd-group { font-weight: 600; margin-top: 4px; }
.bd-item { padding: 2px 0 2px 18px !important; color: var(--ink-soft); font-size: .88rem; }
.bd-item b { font-weight: 500; }
.bd-net { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px !important; font-weight: 700; font-size: 1.02rem; }

/* compare salaries */
.multi-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.multi-row { display: flex; gap: 8px; align-items: center; }
.multi-row .tag { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.multi-row input, .multi-row select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; min-width: 0;
}
.multi-row input { flex: 1 1 140px; font-weight: 600; }
.multi-row select { flex: 1 1 160px; }
.multi-row input:focus, .multi-row select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-btn { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 9px; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.icon-btn:hover { color: var(--neg); border-color: var(--neg); }
.add-btn { font: inherit; font-weight: 600; font-size: .9rem; color: var(--accent); background: none; border: 1px dashed var(--accent); border-radius: 9px; padding: 8px 14px; cursor: pointer; margin-bottom: 18px; }
.add-btn:hover { background: var(--accent-soft); }
.series-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; padding: 0; margin: 0 0 12px; font-size: .88rem; color: var(--ink-soft); }
.series-legend li { display: flex; align-items: center; }
.cbars { display: grid; gap: 10px; margin-bottom: 8px; }
.cbar { display: grid; grid-template-columns: minmax(120px, 30%) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: .9rem; }
.cbar-label { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbar-label b { color: var(--ink); margin-right: 4px; }
.cbar-track { display: flex; gap: 2px; height: 22px; }
.cbar-track span { display: block; height: 100%; background: var(--c); cursor: pointer; }
.cbar-track span:first-child { border-radius: 4px 0 0 4px; }
.cbar-track span:last-child { border-radius: 0 4px 4px 0; }
.cbar-track span:only-child { border-radius: 4px; }
.cbar-value { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 80px; }
@media (max-width: 560px) { .cbar { grid-template-columns: minmax(0, 1fr) auto; } .cbar-track { grid-column: 1 / -1; order: 3; } }
.multi-table td .pos { color: var(--pos); } .multi-table td .neg { color: var(--neg); }

.viz-tip {
  position: absolute; z-index: 50; display: none; pointer-events: none; max-width: 280px;
  background: var(--ink); color: var(--surface); font-size: .82rem; font-weight: 500; padding: 6px 10px; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 600; }
tbody th { font-weight: 500; }
caption { text-align: left; font-weight: 600; padding: 0 0 8px; }
.row-gross th, .row-gross td { font-weight: 600; }
.row-net th, .row-net td { font-weight: 700; background: var(--accent-soft); border-bottom: 0; }
tr.current th, tr.current td { background: var(--accent-soft); font-weight: 600; }
td.pos { color: var(--pos); } td.neg { color: var(--neg); }
.employer { padding-left: 18px; }
.employer b { font-variant-numeric: tabular-nums; }
.all-brackets summary { cursor: pointer; color: var(--accent); font-weight: 500; margin-bottom: 12px; }

.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.sources a { word-break: break-word; }

/* hub */
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.country-card {
  display: grid; gap: 2px; padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.country-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.country-card .cc { font-size: .75rem; font-weight: 700; color: var(--accent); letter-spacing: .08em; }
.country-card .cn { font-size: 1.15rem; font-weight: 600; }
.country-card .cy { font-size: .85rem; color: var(--ink-soft); }

/* ads */
.ad-slot { margin: 24px auto; text-align: center; min-height: 100px; }
.ad-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 4px; }
.ad-placeholder { border: 1px dashed var(--line); border-radius: 10px; padding: 34px 12px; color: var(--ink-soft); font-size: .85rem; }
.ad-placeholder code { font-size: .8rem; color: var(--accent); }

@media (max-width: 520px) {
  .card { padding: 18px 16px; }
  .stats b { font-size: 1rem; }
  th, td { padding: 8px 7px; }
}
@media print {
  .site-header, .ad-slot, .site-footer, .calc-form { display: none; }
}

@media (max-width: 560px) {
  .multi-row { flex-wrap: wrap; }
  .multi-row input { flex: 1 1 0; }
  .multi-row select { order: 5; flex: 1 1 100%; margin-left: 36px; }
  .multi-row + .multi-row { padding-top: 6px; border-top: 1px solid var(--line); }
}
#multi-tabs { margin-bottom: 12px; }



/* marginal rate card */
.explain { max-width: 760px; color: var(--ink-soft); }
.explain p { margin: 0 0 .7em; }
.explain b { color: var(--ink); }
.callout { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin: 16px 0 18px; }
.key-marginal { background: var(--series-marginal); height: 3px; width: 16px; border-radius: 2px; }
.key-avg { background: none; height: 0; width: 16px; border-top: 2px dashed var(--ink-soft); border-radius: 0; }
.key-you { background: none; height: 12px; width: 0; border-left: 1.5px dashed var(--ink-soft); border-radius: 0; margin-right: 10px; }
.chart { width: 100%; margin-bottom: 8px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--ink-soft); stroke-width: 1; }
.chart .tick { fill: var(--ink-soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line-marginal { fill: none; stroke: var(--series-marginal); stroke-width: 2; stroke-linejoin: round; }
.chart .line-avg { fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-dasharray: 5 4; }
.chart .dlabel { font-size: 12px; font-weight: 600; fill: var(--ink); }
.chart .you-line, .chart .cross { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .cross { stroke-dasharray: none; opacity: .6; }
.chart .you-label { fill: var(--ink-soft); font-size: 11px; font-weight: 600; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot-marginal { fill: var(--series-marginal); }
.chart .dot-avg { fill: var(--ink-soft); }
.chart .hit { fill: transparent; cursor: crosshair; }
table.bands .why { color: var(--ink-soft); font-size: .88rem; }
table.bands .you { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-left: 6px; }

/* take-home card: colour refresh */
.bd-group { border-radius: 8px; padding: 6px 8px !important; margin: 6px -8px 0; }
.bd-group:has(.s-tax) { background: var(--tint-tax); }
.bd-group:has(.s-con) { background: var(--tint-con); }
.bd-net { background: var(--tint-net); border-top: 0; border-radius: 10px; margin: 10px -8px 0; padding: 10px 8px !important; color: var(--accent); }
:root[data-theme="dark"] .bd-net { color: var(--ink); }
.donut figcaption b { color: var(--accent); }
.seg-tabs button[aria-selected="true"] { background: var(--accent-strong); color: var(--on-accent); box-shadow: none; }
.callout { background: var(--accent-soft); }
.multi-row .tag { background: var(--accent-soft); color: var(--accent); }
/* Google-style pill tabs */
.seg-tabs, .seg-tabs button { border-radius: 999px; }
.seg-tabs button { padding: 6px 14px; }

/* country menu (top right) */
.header-inner { flex-wrap: nowrap; }
  list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-weight: 500; font-size: .93rem; white-space: nowrap;
}
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: var(--ink); text-decoration: none; font-size: .93rem;
}
.cm-code { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-soft); width: 22px; }
.cm-cur { margin-left: auto; font-size: .75rem; color: var(--ink-soft); }
.footer-countries a { color: var(--ink-soft); }

/* two-column calculator: inputs + sidebar ad on the left, results on the right */
.wrap-wide { max-width: 1240px; }
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.side { display: grid; gap: 20px; min-width: 0; }
.side .calc-form { margin: 0; }
.main-col { min-width: 0; }
.ad-side { margin: 0; min-height: 600px; }
.ad-side .ad-placeholder { min-height: 600px; display: grid; place-content: center; }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side { gap: 0; }
  .side .calc-form { margin-bottom: 20px; }
  .ad-side { display: none; }
}

/* feedback label (header) */
.feedback-link {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .9rem;
  text-decoration: none; white-space: nowrap; flex: none;
}
.feedback-link:hover { filter: brightness(.97); text-decoration: underline; }
.feedback-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.feedback-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.header-inner { gap: 10px; }
.header-inner .brand { margin-right: 10px; }
@media (max-width: 640px) {
  .feedback-link { padding: 0; width: 38px; justify-content: center; }
  .feedback-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* "Salary after tax [Canada]" title with inline country dropdown */
.title-wrap { position: relative; }
.title-country {
  font: inherit; color: var(--accent); background: none; border: 0; padding: 0 4px 0 6px; margin-left: -2px;
  border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; letter-spacing: inherit;
  text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.title-country:hover { background: var(--accent-soft); }
.title-country:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.title-country svg { width: .55em; height: .55em; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.title-country[aria-expanded="true"] svg { transform: rotate(180deg); }
.title-menu {
  position: absolute; z-index: 45; min-width: 250px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px; box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
.title-menu ul { list-style: none; margin: 0; padding: 0; }
.title-menu li a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.title-menu li a:hover, .title-menu li a:focus-visible { background: var(--surface-2); outline: none; }
.title-menu li a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* flags */
.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }

/* ⋯ menu: share + dark mode */
.more-menu { position: relative; }
.more-menu summary {
  list-style: none; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft);
}
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary:hover { color: var(--ink); border-color: var(--ink-soft); }
.more-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.more-menu summary .ui-ico { fill: currentColor; stroke: none; }
.mm-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 250px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
.mm-head { display: flex; align-items: center; gap: 10px; margin: 4px 10px 6px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.mm-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--ink); font: inherit; font-size: .93rem; text-align: left; text-decoration: none; cursor: pointer;
}
.mm-item:hover, .mm-item:focus-visible { background: var(--surface-2); outline: none; }
.mm-item.copied { color: var(--pos); }
.mm-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.ui-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mm-head .ui-ico { width: 15px; height: 15px; }
.brand-ico { width: 18px; height: 18px; flex: none; fill: currentColor; color: var(--ink-soft); }
.mm-item:hover .brand-ico { color: var(--ink); }
.switch { margin-left: auto; width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
#theme-toggle[aria-checked="true"] .switch { background: var(--accent-strong); }
#theme-toggle[aria-checked="true"] .switch::after { transform: translateX(14px); }

/* feedback page */
.narrow { max-width: 720px; }
.fb-form { display: grid; gap: 18px; }
.fb-topics { border: 0; padding: 0; margin: 0; }
.fb-topics legend { font-size: .88rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: .9rem; cursor: pointer; user-select: none;
}
.chip span:hover { border-color: var(--ink-soft); }
.chip input:checked + span { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-form textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; resize: vertical; min-height: 140px;
}
.fb-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fb-form .row2 { margin-top: 0; }
@media (max-width: 560px) { .fb-form .row2 { grid-template-columns: minmax(0, 1fr); } }
.req, .opt { font-style: normal; font-size: .75rem; font-weight: 500; margin-left: 6px; color: var(--ink-soft); }
.req { color: var(--neg); }
.counter { justify-self: end; color: var(--ink-soft); font-size: .78rem; font-weight: 400; }
.fb-include { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); }
.fb-include input { margin-top: 3px; accent-color: var(--accent-strong); }
.fb-include code { word-break: break-all; color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fb-actions p { margin: 0; flex: 1 1 220px; }
.btn-primary {
  font: inherit; font-weight: 600; font-size: 1rem; color: var(--on-accent); background: var(--accent-strong);
  border: 0; border-radius: 999px; padding: 11px 24px; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fb-status { margin: 0; min-height: 1.2em; font-size: .9rem; }
.fb-status.err { color: var(--neg); }
.fb-done h2 { margin-top: 0; }
.linklike { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* ===== redesign: calculator band ===== */
.calc-band { background: var(--band); padding-bottom: 36px; }
.calc-band .hero { padding: 30px 0 22px; }
.calc-band .layout > .card { margin: 0; }
.calc-band + .wrap { margin-top: 28px; }
@media (max-width: 820px) { .calc-band .layout { gap: 18px; } .calc-band { padding-bottom: 24px; } }

/* salary field */
.money-input { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.money-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.money-input .cur { font-size: 1.5rem; font-weight: 600; color: var(--ink-soft); margin-right: 6px; }
.field-amount .money-input input {
  border: 0; outline: none; background: transparent; padding: 12px 0; font-size: 1.7rem; font-weight: 700;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; min-width: 0; width: 100%;
}
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.quick button {
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border: 0; border-radius: 999px; padding: 5px 10px; cursor: pointer;
}
.quick button:hover { filter: brightness(.96); }
.quick button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.period { border: 0; margin: 0; padding: 0; }
.period legend { font-size: .88rem; font-weight: 500; color: var(--ink-soft); padding: 0; margin-bottom: 6px; }
.period-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.period-opts input { position: absolute; opacity: 0; pointer-events: none; }
.period-opts span {
  display: block; text-align: center; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .86rem; font-weight: 500; color: var(--ink); cursor: pointer; background: var(--surface);
}
.period-opts span:hover { border-color: var(--ink-soft); }
.period-opts input:checked + span { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); font-weight: 600; }
.period-opts input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* results card: solid brand header */
.results { overflow: hidden; }
.res-hero { margin: -24px -24px 22px; padding: 22px 24px 20px; background: var(--accent-strong); color: var(--on-accent); }
@media (max-width: 520px) { .res-hero { margin: -18px -16px 18px; padding: 18px 16px; } }
.res-hero .eyebrow { color: var(--on-accent); opacity: .85; }
.res-hero .seg-tabs { background: color-mix(in srgb, var(--on-accent) 14%, transparent); border-color: transparent; }
.res-hero .seg-tabs button { color: var(--on-accent); }
.res-hero .seg-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); }
.results .res-hero .net { margin: 14px 0 2px; color: var(--on-accent); }
.results .res-hero .net span#res-net { display: inline; color: var(--on-accent); font-size: clamp(2.6rem, 6.5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.res-hero .per { font-size: 1.05rem; opacity: .9; }
.res-from { margin: 4px 0 14px; opacity: .85; font-size: .95rem; }
.res-sentence { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.5; max-width: 560px; }
.res-rates { margin: 0; font-size: .9rem; opacity: .92; }
.res-link { font: inherit; font-size: .85rem; color: inherit; background: none; border: 0; padding: 0 0 0 6px; text-decoration: underline; cursor: pointer; }
.donut-seg { transition: stroke-dasharray .45s ease, stroke-dashoffset .45s ease, stroke-width .12s; }
@media (prefers-reduced-motion: reduce) { .donut-seg { transition: none; } }
.bd-net { color: var(--ink); }

/* details: tabs */
.details { padding-top: 8px; }
.tabbar { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 -24px 20px; padding: 0 20px; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
@media (max-width: 520px) { .tabbar { margin: 0 -16px 16px; padding: 0 12px; } }
.tabbar [role="tab"] {
  font: inherit; font-size: .93rem; font-weight: 500; color: var(--ink-soft); background: none; border: 0;
  padding: 14px 12px 12px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabbar [role="tab"]:hover { color: var(--ink); }
.tabbar [role="tab"][aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent-strong); font-weight: 600; }
.tabbar [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.panel-title { font-size: 1.15rem; margin-bottom: .6em; }

/* method: collapsible */
.method > summary { list-style: none; cursor: pointer; display: grid; gap: 2px; position: relative; padding-right: 36px; }
.method > summary::-webkit-details-marker { display: none; }
.method > summary h2 { margin: 0; }
.method > summary::after {
  content: ""; position: absolute; right: 4px; top: 6px; width: 10px; height: 10px; border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform .15s;
}
.method[open] > summary::after { transform: rotate(-135deg); top: 12px; }
.method[open] > summary { margin-bottom: 14px; }
.method > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.results .res-hero .net span.per { display: inline; font-size: 1.1rem; font-weight: 500; letter-spacing: 0; color: var(--on-accent); opacity: .9; }
.results .res-hero .net span.per { margin-left: .35em; }

/* ===== feedback page in the calculator style ===== */
.hero-sub { margin: 6px 0 0; color: var(--ink-soft); font-size: 1.05rem; max-width: 620px; }
.fb-layout { grid-template-columns: minmax(0, 1fr) 340px; }
.fb-layout > .card { margin: 0; }
@media (max-width: 820px) { .fb-layout { grid-template-columns: minmax(0, 1fr); } }
.fb-form { padding: 26px; }
.fb-form textarea { background: var(--bg); border-radius: 12px; font-size: 1.05rem; min-height: 170px; padding: 12px 14px; }
.fb-form .field input, .fb-form .field select { border-radius: 12px; }
.fb-info { overflow: hidden; }
.fb-info .res-hero { margin-bottom: 18px; }
.fb-info-lead { margin: 6px 0 0; font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.fb-steps { margin: 0 0 16px; padding-left: 1.2em; display: grid; gap: 12px; font-size: .93rem; color: var(--ink-soft); }
.fb-steps b { color: var(--ink); }
.fb-steps li::marker { color: var(--accent); font-weight: 700; }
.fb-done { margin: 0; }
.fb-done h2 { font-size: 1.5rem; }

/* the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

/* faded country flag behind the take-home banner (decorative) */
.res-hero { position: relative; isolation: isolate; overflow: hidden; }
.res-hero > :not(.res-flag) { position: relative; z-index: 1; }
.res-flag {
  position: absolute; z-index: 0; right: -36px; bottom: -44px; width: 340px; height: auto;
  opacity: .2; transform: rotate(-8deg); pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(105deg, transparent 8%, #000 70%);
          mask-image: linear-gradient(105deg, transparent 8%, #000 70%);
}
:root[data-theme="dark"] .res-flag { opacity: .26; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .res-flag { opacity: .26; } }
@media (max-width: 600px) { .res-flag { width: 230px; right: -30px; bottom: -30px; opacity: .17; } }

/* support */
.support-link {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9rem;
  text-decoration: none; white-space: nowrap; margin-left: auto;
}
.donut-img { display: block; border-radius: 50%; object-fit: cover; }
.support-link .donut-img { width: 22px; height: 22px; }
.support-link:hover { border-color: var(--ink-soft); }
.support-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.support-link + .feedback-link { margin-left: 0; }
@media (max-width: 640px) {
  .support-link { padding: 0; width: 38px; justify-content: center; }
  .support-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.support {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center;
  background: linear-gradient(120deg, var(--tint-net), var(--surface) 70%); scroll-margin-top: 16px;
}
.support-icon { width: 120px; height: 120px; border-radius: 50%; box-shadow: var(--shadow); }
.support-icon .donut-img { width: 100%; height: 100%; }
.support h2 { font-size: 1.15rem; margin: 0 0 .35em; }
.support p { margin: 0; color: var(--ink-soft); max-width: 620px; }
.support p + p { margin-top: .6em; }
.support-cta { display: grid; justify-items: center; gap: 6px; }
.support-cta .btn-primary { text-decoration: none; white-space: nowrap; }
.support-pending { color: var(--ink-soft); max-width: 200px; text-align: center; }
@media (max-width: 760px) {
  .support { grid-template-columns: auto minmax(0, 1fr); }
  .support-cta { grid-column: 1 / -1; justify-items: start; }
  .support-pending { text-align: left; max-width: none; }
  .support-icon { width: 72px; height: 72px; }
}

/* decorative silk ribbon sweeping across the calculator band */
.calc-band { position: relative; overflow: hidden; }
.calc-band > .wrap { position: relative; z-index: 1; }
.band-ribbon { position: absolute; z-index: 0; top: 0; right: 0; width: 1200px; height: 460px; pointer-events: none; opacity: .95; }
.band-ribbon svg { display: block; }
.rb-sway { stroke: url(#silk); }
.rb-sway { transform-origin: 40% 0%; animation: rb-sway 16s ease-in-out infinite alternate; }
.rb-strands { animation: rb-shimmer 7s ease-in-out infinite alternate; }
@keyframes rb-sway {
  0%   { transform: rotate(-3deg) translateX(-10px); }
  100% { transform: rotate(4deg)  translateX(18px); }
}
@keyframes rb-shimmer { 0% { opacity: .75; } 100% { opacity: 1; } }
:root[data-theme="dark"] .band-ribbon { opacity: .6; }
:root[data-theme="dark"] .rb-sway { stroke: url(#silk-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .band-ribbon { opacity: .6; }
  :root:not([data-theme="light"]) .rb-sway { stroke: url(#silk-dark); }
}
@media (max-width: 820px) { .band-ribbon { opacity: .5; right: -380px; } }
@media (prefers-reduced-motion: reduce) { .rb-sway, .rb-strands { animation: none; } }

/* skyscraper: salary as floors of income */
.skyline .card-head p { max-width: 720px; }
.sky { display: grid; align-items: stretch; margin: 8px 0 4px; }
.sky-art svg { display: block; overflow: visible; }
.sky-labels { position: relative; }
.sky-label { position: absolute; left: 6px; right: 0; transform: translateY(-50%); line-height: 1.3; font-size: .9rem; }
.sky-label > b { display: block; font-variant-numeric: tabular-nums; }
.sky-label > span { color: var(--ink-soft); }
.sky-label > span b { color: var(--ink); }
.sky-tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; margin-bottom: 2px; }
.sky-label.is-top { color: var(--ink); }
.sky-net { fill: var(--series-net); }
.sky-tax { fill: var(--series-tax); }
.sky-con { fill: var(--series-con); }
.sky-window { fill: #fff; opacity: .28; }
.sky-roof { fill: var(--ink-soft); opacity: .55; }
.sky-antenna { stroke: var(--ink-soft); stroke-width: 2; opacity: .55; }
.sky-beacon { fill: var(--series-tax); animation: sky-blink 2.4s ease-in-out infinite; }
.sky-ground { stroke: var(--ink-soft); stroke-width: 2; opacity: .5; }
.sky-tick { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.sky-top-ring { fill: none; stroke: var(--accent); stroke-width: 2; }
.sky-floor { cursor: default; }
.sky-floor:hover rect:not(.sky-windows) { filter: brightness(1.1); }
.sky { grid-template-columns: 210px minmax(220px, 1fr) minmax(220px, 280px); gap: 0 12px; }
.sky-side { align-self: center; display: grid; gap: 16px; }
.sky-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.sky-legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.sky-legend .key { margin: 0; }
.sky-legend b { font-variant-numeric: tabular-nums; }
.sky-total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; }
.sky-total .key { background: transparent; }
.sky-raise { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tint-net); font-size: .92rem; line-height: 1.45; }
.sky-note { margin: 6px 0 0; }
.sky-rise .sky-floor { animation: sky-rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 45ms); transform-box: fill-box; transform-origin: bottom; }
@keyframes sky-rise { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: none; } }
@keyframes sky-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (max-width: 1100px) {
  .sky { grid-template-columns: 210px minmax(0, 1fr); }
  .sky-side { grid-column: 1 / -1; margin-top: 16px; }
}
@media (max-width: 560px) {
  .sky { grid-template-columns: 120px minmax(0, 1fr); }
  .sky-art svg { width: 120px; height: auto; }
  .sky-label { font-size: .8rem; white-space: nowrap; }
  .sky-wide { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sky-beacon, .sky-rise .sky-floor { animation: none; } }

/* footer site navigation (Home, Blog, About Us, Contact, Privacy) */
.footer-nav ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.footer-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .98rem; font-weight: 500; }
.footer-nav a:hover { background: var(--accent-soft); }
.footer-nav a[aria-current] { color: var(--accent); background: var(--accent-soft); }
.footer-nav .ui-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* content pages: About Us, Contact, blog */
.content-page { max-width: 820px; }
.content-page .prose h2 .ui-ico { width: 22px; height: 22px; vertical-align: -4px; margin-right: 4px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.contact-grid > .card { margin: 0; }
.contact-grid h2 { font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 16px 0 8px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }
.post-card h2 { margin: .2em 0 .4em; font-size: 1.25rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { margin: 0 0 .6em; }
.post-meta { margin-top: 0; }
.post .table-wrap { margin: 12px 0 8px; }
.post caption { text-align: left; color: var(--ink-soft); font-size: .85rem; padding-bottom: 6px; }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
.post table.bands td:first-child { white-space: nowrap; }
