@font-face {
  font-family: "Source Sans 3";
  src: url("source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d1d1f;
  background: #e9eef0;
  font-synthesis: none;
  --ink: #1d1d1f;
  --muted: #636368;
  --accent: #17705f;
  --focus: #1f8a7a;
  --accent-soft: #e9f3f0;
  --line: #e8e8ed;
  --border: #d2d2d7;
  --surface: #fff;
  --sidebar: #f4f4f6;
  --navy: #12304a;
  --cash: #1f8a7a;
  --tax: #2866a2;
  --employee-ni: #65a4d8;
  --employer-ni: #123d64;
  --corporation-tax: #74549d;
  --levy: #a65a30;
  --cost: #78869a;
  --loans: #a44767;
  --pension: #f2a33a;
  --retained: #9a7bb9;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; line-height: 1.47; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 650; }
h2 { font-size: 1.375rem; line-height: 1.27; letter-spacing: -.01em; }
h3 { font-size: 1.0625rem; }
a { color: var(--accent); text-underline-offset: .19em; }
button, input, select { font: inherit; }
button, summary, label:has([type="radio"]), select { cursor: pointer; }
button:disabled { opacity: .52; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: 1rem; transform: translateY(-200%); background: white; padding: .75rem; z-index: 2; }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.app-window { width: min(77rem, calc(100% - 3rem)); margin: 1.75rem auto 1.5rem; background: var(--surface); border-radius: .875rem; overflow: clip; box-shadow: 0 0 0 .5px #0003, 0 22px 70px #0002, 0 6px 18px #0001; }
.shell { width: calc(100% - 3.5rem); margin-inline: auto; }
.main-shell { width: 100%; }
.site-header { position: sticky; top: 0; z-index: 1; background: rgba(246, 246, 248, .93); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.site-nav { width: calc(100% - 2rem); min-height: 3.375rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem 1rem; }
.site-nav nav { display: flex; flex-wrap: wrap; gap: .16rem; border-radius: .52rem; background: #e7e7ea; padding: .12rem; }
.site-nav a { color: inherit; text-decoration: none; }
.site-nav nav a { font-size: .88rem; border-radius: .43rem; padding: .27rem .71rem; white-space: nowrap; }
.site-nav nav a[aria-current] { background: var(--surface); font-weight: 650; box-shadow: 0 0 0 .5px #0003, 0 1px 2px #0001; }
.site-nav nav a:hover, .site-nav .privacy-link:hover { color: var(--accent); }
.site-nav .wordmark { display: inline-flex; align-items: center; gap: .42rem; color: var(--navy); font-weight: 650; font-size: .9rem; letter-spacing: -.015em; white-space: nowrap; width: fit-content; }
.wordmark img { flex: none; }
.brand-accent { color: var(--accent); }
.privacy-link { justify-self: end; display: flex; align-items: center; gap: .4rem; font-size: .88rem; white-space: nowrap; }
.privacy-link span { width: .43rem; height: .43rem; background: var(--focus); border-radius: 100%; }
.hero { grid-area: intro; padding: 1.55rem 1.65rem 1rem; }
.hero h1, .pension-heading h1 { font-size: clamp(1.85rem, 3.4vw, 2.15rem); line-height: 1.16; letter-spacing: -.015em; font-weight: 700; }
.hero p { max-width: 44rem; padding-top: .37rem; color: var(--muted); }
.hero .tax-year { font-size: .9rem; padding-top: .36rem; }
.tax-year strong { color: var(--navy); }
.workbench { display: grid; grid-template-columns: minmax(19.5rem, 31.5%) minmax(0, 1fr); grid-template-areas: "form intro" "form estimate"; grid-template-rows: auto 1fr; align-items: start; border-bottom: 1px solid var(--line); }
.paper { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; min-width: 0; }
.form-card { grid-area: form; align-self: stretch; padding: 1.12rem .95rem; border: 0; border-radius: 0; border-right: 1px solid var(--line); background: var(--sidebar); }
.form-card h2 { font-size: 1.25rem; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.text-button { background: none; border: 0; padding: .27rem 0; color: var(--accent); font-size: .88rem; font-weight: 660; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: .2em; }
.comparison-controls { margin-top: .75rem; }
.compare-start { min-height: 2.75rem; padding: .4rem .8rem; border: 1px solid transparent; border-radius: .5rem; background: var(--accent); color: var(--surface); font-size: .95rem; font-weight: 650; }
.compare-start:hover:not(:disabled) { background: #115b4d; }
.offer-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .16rem; padding: .16rem; border-radius: .52rem; background: #e7e7ea; }
.offer-switch button { min-height: 2.45rem; border: 0; border-radius: .43rem; background: none; color: var(--ink); font-size: .9rem; }
.offer-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent); font-weight: 650; box-shadow: 0 0 0 .5px #0003, 0 1px 2px #0001; }
.comparison-controls .hint { margin-top: .48rem; }
.comparison-links { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .15rem .65rem; }
.comparison-links a { font-size: .9rem; font-weight: 650; }
.route-field { border: 0; padding: 0; margin: 1.35rem 0 1.2rem; min-inline-size: 0; }
legend, label { font-size: .9rem; font-weight: 620; }
legend { padding: 0; margin-bottom: .5rem; }
.route-grid, .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.route-grid label { display: block; position: relative; }
.route-grid input { position: absolute; inset: .68rem auto auto .64rem; width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.route-grid label > span { display: block; height: 100%; padding: .48rem .52rem .48rem 1.95rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface); font-size: .92rem; }
.route-grid small, summary small { display: block; font-weight: 400; font-size: .83rem; color: var(--muted); line-height: 1.34; margin-top: .08rem; }
.route-grid label:has(:checked) > span { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); background: var(--accent-soft); color: var(--accent); }
.route-grid label:has(:focus-visible) > span { outline: 3px solid var(--focus); outline-offset: 2px; }
.main-fields { column-gap: .85rem; }
.field-grid > label:not(.checkbox) { display: flex; flex-direction: column; gap: .31rem; min-width: 0; }
.field-grid > label:not(.checkbox) > :is(input, select, .input-wrap) { margin-top: auto; }
label > input:not([type="checkbox"], [type="radio"]), label > select, .input-wrap {
  min-height: 2.68rem;
  width: 100%;
  margin-top: .31rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  color: var(--ink);
  background: var(--surface);
}
label > input:not([type="checkbox"], [type="radio"]), label > select { padding: .46rem .65rem; }
label > select {
  appearance: none;
  padding-right: 2rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 1.12rem center / .32rem .32rem no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right .8rem center / .32rem .32rem no-repeat,
    var(--surface);
}
.input-wrap { display: flex; align-items: center; gap: .3rem; padding: 0 .63rem; }
.input-wrap > span { flex: 0 0 auto; color: var(--muted); font-size: .82rem; font-weight: 450; }
.input-wrap input { width: 100%; min-width: 0; padding: .46rem 0; border: 0; color: var(--ink); background: transparent; font-size: 1.06rem; font-weight: 650; font-variant-numeric: tabular-nums; appearance: textfield; }
.input-wrap input::-webkit-inner-spin-button { appearance: none; }
.input-wrap:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.input-wrap input:focus-visible { outline: 0; }
.hint { font-size: .86rem; line-height: 1.45; color: var(--muted); }
.main-fields + .hint { margin-top: .45rem; }
.region-field { display: block; margin-top: 1rem; }
details { border-top: 1px solid var(--line); }
.form-card > details { margin-top: 1.05rem; }
summary { display: flex; align-items: center; justify-content: space-between; gap: .6rem; list-style: none; min-height: 2.75rem; padding: .65rem 0; font-size: .92rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: 0 0 .46rem; width: .46rem; height: .46rem; margin-right: .22rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-.14rem) rotate(45deg); }
details[open] > summary::after { transform: translateY(.13rem) rotate(225deg); }
.advanced-body { padding: .2rem 0 .75rem; }
.advanced-groups { display: grid; gap: .45rem; }
.advanced-group { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: .64rem; }
.advanced-group > summary { min-height: 2.55rem; padding: .52rem .65rem; }
.advanced-group > summary::after { margin-right: .14rem; }
.advanced-group[open] > summary { border-bottom: 1px solid var(--line); }
.group-fields { display: grid; gap: .6rem; padding: .7rem .65rem; }
.stacked-field { display: block; }
.full-row { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: .48rem; }
.checkbox input { width: 1rem; height: 1rem; flex: 0 0 1rem; accent-color: var(--accent); }
.checkbox.aligned { align-self: end; min-height: 2.68rem; }
.file-actions { display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: center; border-top: 1px solid var(--line); padding-top: .65rem; }
#file-status { flex-basis: 100%; color: var(--muted); font-size: .86rem; }
#file-status:empty { display: none; }
.notice, .warnings { background: #fdf0dc; color: #6b3d06; font-size: .9375rem; border-radius: .5rem; padding: .55rem .75rem; margin: .55rem 0; }
.warnings { padding-left: 1.8rem; }
.warnings li + li { margin-top: .3rem; }
.result-card { grid-area: estimate; margin: 0 1.65rem 1.45rem; border-color: var(--line); }
.pay-header { padding: 1.22rem 1.5rem 1.05rem; background: var(--accent-soft); border-radius: .7rem .7rem 0 0; }
.pay-header h2 { font-size: 1.02rem; font-weight: 600; }
.route-tag { white-space: nowrap; font-size: .875rem; color: var(--muted); }
.pay-value { font-size: clamp(2.65rem, 5.5vw, 3.5rem); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: .42rem; overflow-wrap: anywhere; }
.pay-period { font-size: .91rem; color: var(--muted); margin-top: .1rem; }
.pay-equivalents { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .62rem; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; }
.pay-equivalents div { display: grid; }
.pay-equivalents strong { font-size: 1.23rem; font-variant-numeric: tabular-nums; }
.pay-equivalents span { color: var(--muted); font-size: .88rem; }
.after-costs { margin: 0 1.45rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
#after-costs-amount { font-size: 1.22rem; font-variant-numeric: tabular-nums; }
#after-costs-lines { margin: .42rem 0 0; color: var(--muted); }
.money-flow { padding: 1.02rem 1.45rem .78rem; scroll-margin-top: 4.25rem; }
.money-flow h3 { font-size: 1.2rem; }
.money-flow > .hint { margin-top: .18rem; }
.rate-bars { display: grid; gap: .75rem; margin: .65rem 0 .8rem; }
.rate-caption { display: flex; justify-content: space-between; align-items: baseline; gap: .55rem; margin-bottom: .22rem; font-size: .94rem; font-weight: 650; }
.rate-caption small { display: inline-block; margin-inline-start: .5rem; color: var(--muted); font-size: .84rem; font-weight: 450; }
.rate-caption strong { color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-track { height: 1.12rem; overflow: hidden; border-radius: .23rem; background: #e9edef; }
.rate-bar { display: flex; height: 100%; }
.rate-bar span { flex: 0 0 0; box-shadow: inset -1px 0 #fff6; }
.money-flow .cash { background: var(--cash); }
.money-flow .income-tax { background: var(--tax); }
.money-flow .employee-ni { background: var(--employee-ni); }
.money-flow .employer-ni { background: var(--employer-ni); }
.money-flow .corporation-tax { background: var(--corporation-tax); }
.money-flow .levy { background: var(--levy); }
.money-flow .cost { background: var(--cost); }
.money-flow .loans { background: var(--loans); }
.money-flow .pension { background: var(--pension); }
.money-flow .retained { background: var(--retained); }
.rate-table th, .rate-table td { padding-block: .29rem; }
.rate-table th:first-child { padding-inline-start: 0; }
.rate-table td { white-space: nowrap; }
.rate-table tbody tr:first-child { color: var(--accent); font-weight: 650; }
.rate-table .swatch { display: inline-block; width: .58rem; height: .58rem; margin-right: .38rem; border-radius: .1rem; }
.rate-difference { margin-top: .65rem; padding: .5rem .67rem; border-radius: .35rem; background: var(--accent-soft); color: var(--navy); font-size: .9rem; }
.breakdown, .result-links, .result-card .warnings { margin-inline: 1.45rem; }
.result-links { border-top: 1px solid var(--line); padding: .55rem 0 .8rem; }
.result-links a, .contract-context a { font-size: .9rem; font-weight: 630; }
dl { display: grid; grid-template-columns: 1fr auto; gap: .3rem .55rem; margin: 0 0 .8rem; font-size: .87rem; }
dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 620; }
.comparison, .sponsor { margin-inline: 1.75rem; }
.comparison { margin-top: 1.25rem; padding: 1.35rem 1.45rem; }
.comparison .hint { margin-top: .7rem; }
.pension-page { padding: 1.55rem 1.75rem 1.6rem; border-bottom: 1px solid var(--line); }
.pension-heading { margin-bottom: 1.9rem; }
.pension-heading p { max-width: 45rem; margin-top: .38rem; color: var(--muted); }
.pension-heading .tax-year { font-size: .9rem; }
.contract-facts { display: block; margin: .5rem 0 .45rem; }
.contract-facts > div, .pension-stats > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .6rem; }
.contract-facts > div { padding: .15rem 0; }
.contract-facts dd { font-weight: 500; overflow-wrap: anywhere; }
.contract-facts dt { color: var(--muted); }
.pension-layout { display: grid; grid-template-columns: minmax(14rem, .4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.75rem); align-items: start; padding-inline: 1.25rem; }
.pension-controls { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.pension-controls h2 { margin-bottom: .75rem; }
.pension-controls label { display: block; }
input[type="range"] { width: 100%; margin: 1rem 0 0; accent-color: var(--accent); }
.range-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.pension-controls details { margin-top: .75rem; }
.pension-controls details .hint { padding-bottom: .3rem; }
.pension-result-heading { flex-wrap: wrap; gap: .45rem .9rem; }
.period-switch { display: flex; gap: .16rem; flex: 0 0 auto; min-inline-size: 0; margin: 0; border: 0; border-radius: .52rem; padding: .12rem; background: #e7e7ea; }
.period-switch label { position: relative; font-weight: 450; }
.period-switch span { display: block; padding: .25rem .65rem; border-radius: .43rem; }
.period-switch input:checked + span { background: var(--surface); font-weight: 650; box-shadow: 0 0 0 .5px #0003, 0 1px 2px #0001; }
.period-switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.pension-stats { display: block; margin: .65rem 0 1.2rem; padding: 0 .85rem; background: var(--accent-soft); border-radius: .6rem; }
.pension-stats > div { padding: .64rem 0; }
.pension-stats > div + div { border-top: 1px solid #cddfda; }
.pension-stats dt { font-size: .98rem; }
.pension-stats dd { font-size: 1.25rem; line-height: 1.2; font-weight: 650; }
.pension-average-note { margin-top: .55rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { border-bottom: 1px solid var(--line); padding: .44rem .36rem; }
thead th { color: var(--muted); }
th { text-align: left; font-weight: 600; }
td, th:not(:first-child) { text-align: right; }
td { font-variant-numeric: tabular-nums; }
.content-page { width: min(45rem, calc(100% - 3.5rem)); margin: 2rem auto 2.75rem; font-size: 1.05rem; line-height: 1.65; }
.content-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin-bottom: .75rem; }
.content-page h2 { margin: 2rem 0 .65rem; }
.content-page p, .content-page ul { margin: 0 0 1rem; }
.content-page ul { padding-left: 1.3rem; }
.content-page li + li { margin-top: .3rem; }
.content-page .lede { color: var(--muted); font-size: 1.15rem; }
.content-page .meta { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.content-page .crumb { font-size: .9rem; margin-bottom: .65rem; }
.content-page .article-list { list-style: none; padding: 0; }
.article-list > li { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.article-list h2 { margin: 0 0 .35rem; font-size: 1.2rem; }
.article-list p:last-child { margin-bottom: 0; }
.sponsor { display: flex; gap: 1.3rem; align-items: center; padding: .85rem 0; margin-top: 1.6rem; border-block: 1px solid var(--line); }
.sponsor > span { border: 1px solid var(--border); padding: .12rem .38rem; border-radius: .3rem; color: var(--muted); font-size: .82rem; }
.sponsor p { color: var(--muted); font-size: .92rem; }
.site-footer { margin-top: 2.5rem; padding: 1.5rem 0 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin-bottom: .9rem; }
.site-footer nav a[aria-current="page"] { color: var(--ink); font-weight: 650; }
.site-footer p { margin-bottom: .5rem; }

@media (min-width: 43.01rem) and (min-height: 48rem) {
  .result-card:not(:has(.breakdown[open], .after-costs:not([hidden]))) { position: sticky; top: 4.12rem; }
}

@media (max-width: 56rem) {
  .app-window { width: calc(100% - 2rem); }
  .form-card, .comparison { padding: 1rem; }
  .pension-layout { padding-inline: 0; }
  .result-card { margin-inline: 1rem; }
  .hero { padding-inline: 1rem; }
  .pay-header, .money-flow { padding-inline: 1rem; }
  .after-costs, .breakdown, .result-links, .result-card .warnings { margin-inline: 1rem; }
}
@media (max-width: 43rem) {
  html { scroll-padding-top: 6rem; }
  .app-window { width: 100%; margin: 0; border-radius: 0; box-shadow: none; }
  .site-nav { min-height: auto; padding-block: .63rem .58rem; grid-template-columns: 1fr 1fr; }
  .site-nav nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; gap: .15rem; }
  .site-nav nav a { font-size: .86rem; padding: .32rem .65rem; }
  .hero { padding: 1.3rem 1rem 1rem; }
  .workbench, .pension-layout { grid-template-columns: 1fr; }
  .workbench { grid-template-areas: "intro" "form" "estimate"; grid-template-rows: auto; gap: 0; }
  .form-card { border-block: 1px solid var(--line); border-right: 0; }
  .result-card { margin-block: 1rem; }
  .money-flow { scroll-margin-top: 0; }
  .comparison, .sponsor { margin-inline: 1rem; }
  .content-page, .site-footer { width: calc(100% - 2rem); }
  .pension-page { padding: 1.3rem 1rem 1.15rem; }
  .pension-layout { gap: 1rem; }
}
@media (max-width: 22rem) {
  .route-grid label > span { font-size: .86rem; }
  .field-grid { column-gap: .5rem; }
  .site-nav .privacy-link { font-size: .75rem; }
  .form-card, .comparison { padding: .86rem; }
}

@media (pointer: coarse) {
  label > input:not([type="checkbox"], [type="radio"]), label > select, .input-wrap { min-height: 2.75rem; font-size: 1rem; }
  .file-actions .text-button, .comparison-links .text-button, .offer-switch button, summary { min-height: 2.75rem; }
  .period-switch span { display: grid; align-content: center; min-height: 2.75rem; }
}
