/* JobSalary styles. Same family as Life in the UK Explained: white page, navy ink, plaque blue,
   Caslon headings, Source Sans text.
   One bold element per page: the percentile chart (assets drawn by tools/build_site.py).
   Everything else stays quiet: rules instead of cards, no pills, one blue.
   Percentiles always use the same light-to-dark blue ramp (--q1 … --q5), on the chart, the
   figure row and the table range bars, so "darker = higher-paid" reads the same everywhere. */

:root {
  --page: #ffffff;
  --ink: #1d2433;
  --ink-soft: #586071;
  --rule: #d5d9e0;
  --rule-soft: #eceef2;
  --tint: #f3f6fa;
  --blue: #1f4e8c;
  --blue-deep: #163a6b;
  --q1: #d3dff0;
  --q2: #a8c0e3;
  --q3: #6f93cc;
  --q4: #3b67a8;
  --q5: #1f4e8c;
  --line-mid: #163a6b;   /* history chart: median */
  --line-inner: #3f7fd6; /* P25 / P75 */
  --line-outer: #c27400; /* P10 / P90, dashed */
  --focus: #f2b705;

  --head: "Libre Caslon Text", Georgia, serif;
  --body: "Source Sans 3", -apple-system, "Segoe UI", system-ui, sans-serif;
  --measure: 38rem;
  --wide: 68rem;
}
html[lang^="zh"] {
  --head: "Libre Caslon Text", "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --body: "Source Sans 3", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
/* Simplified Chinese: same layout rules as zh-TW (html[lang^="zh"]), Simplified fonts */
html[lang="zh-Hans-CN"] {
  --head: "Libre Caslon Text", "Songti SC", "Noto Serif SC", "SimSun", serif;
  --body: "Source Sans 3", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #15191f; --ink: #e6e8ed; --ink-soft: #a7adb9; --rule: #343b47; --rule-soft: #262c36; --tint: #1b2230;
    --blue: #93b6ea; --blue-deep: #b9d0f2;
    --q1: #263550; --q2: #34507c; --q3: #4a70a8; --q4: #6e95d0; --q5: #93b6ea;
    --line-mid: #dbe7fb; --line-inner: #6fa4ef; --line-outer: #f0b04f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #15191f; --ink: #e6e8ed; --ink-soft: #a7adb9; --rule: #343b47; --rule-soft: #262c36; --tint: #1b2230;
    --blue: #93b6ea; --blue-deep: #b9d0f2;
    --q1: #263550; --q2: #34507c; --q3: #4a70a8; --q4: #6e95d0; --q5: #93b6ea;
    --line-mid: #dbe7fb; --line-inner: #6fa4ef; --line-outer: #f0b04f;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
html[lang^="zh"] body { line-height: 1.8; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num, td.n, .fig, .figrow b { font-variant-numeric: tabular-nums lining-nums; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.prose { max-width: var(--measure); overflow-wrap: anywhere; }  /* long URLs as link text must not widen a phone page */
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); margin: 0.5em 0 0.35em; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.2em 0 0.6em; }
h3 { font-size: 1.08rem; margin: 1.6em 0 0.4em; }
html[lang^="zh"] h1, html[lang^="zh"] h2 { letter-spacing: 0.02em; }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: var(--measure); margin-top: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.88rem; }
.en-name { color: var(--ink-soft); font-size: 0.8em; font-weight: 400; font-family: var(--body); }
h1 .en-name { display: block; font-size: 0.48em; margin-top: 0.35em; letter-spacing: 0; }
.x { position: relative; color: var(--ink-soft); cursor: help; text-decoration: underline dotted; text-underline-offset: 0.25em; outline: none; }
/* explanation box for [data-tip] (x markers): placed by theme.js so it always stays on screen */
.tip { position: fixed; z-index: 50; max-width: min(17rem, calc(100vw - 16px)); background: var(--ink); color: var(--page);
  font-size: 0.82rem; line-height: 1.45; padding: 7px 10px; border-radius: 6px; box-shadow: 0 6px 18px rgb(0 0 0 / 0.2); pointer-events: none; }
.tip[hidden] { display: none; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* ---------- Header / footer ---------- */
.site-header { border-top: 4px solid var(--blue); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { font-family: var(--head); font-size: 1.3rem; color: var(--ink); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 9px; }
.brand img { display: block; flex: none; }
.brand b { color: var(--blue); }
.brand .tld { color: var(--ink-soft); font-size: 0.72em; }
.site-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--ink); padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current] { border-bottom-color: var(--blue); }
/* language menu, same as Life in the UK Explained */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 0.92rem; white-space: nowrap; padding: 4px 0; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { color: var(--blue); }
.lang-menu summary .globe { width: 15px; height: 15px; flex: none; }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); z-index: 20; list-style: none; margin: 0; padding: 6px 0; min-width: 11rem;
  background: var(--page); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
.lang-menu li { margin: 0; }
.site-nav .lang-menu a { display: block; padding: 6px 16px; color: var(--ink); font-size: 1rem; line-height: 1.6; border: 0; }
.site-nav .lang-menu a:hover { background: var(--tint); text-decoration: none; }
.site-nav .lang-menu a[aria-current] { font-weight: 700; color: var(--blue); }
.theme-toggle { background: none; border: 1px solid var(--rule); border-radius: 50%; width: 30px; height: 30px; padding: 5px; color: var(--ink); cursor: pointer; line-height: 0; }
.theme-toggle svg { width: 18px; height: 18px; }
:root[data-theme-now="dark"] .theme-toggle .moon, :root:not([data-theme-now="dark"]) .theme-toggle .sun { display: none; }
.crumbs { font-size: 0.88rem; color: var(--ink-soft); margin-top: 18px; }
.crumbs a { color: var(--ink-soft); }
.site-footer { border-top: 1px solid var(--rule); margin-top: 72px; padding: 24px 0 40px; font-size: 0.86rem; color: var(--ink-soft); }
.site-footer a { color: var(--ink-soft); }
.site-footer .links { display: flex; gap: 6px 20px; flex-wrap: wrap; margin-bottom: 8px; }
.site-footer p { max-width: 52rem; }

/* ---------- Headline figure (median) + percentile row, after levels.fyi ---------- */
.headline { margin: 18px 0 8px; }
.headline .fig { font-family: var(--head); font-size: clamp(2.6rem, 7vw, 3.6rem); font-weight: 700; line-height: 1; color: var(--blue-deep); }
.headline .what { color: var(--ink-soft); margin-top: 6px; }
.headline .net { margin: 8px 0 0; font-size: 0.95rem; }
.headline .net a { font-weight: 600; }
.headline .net .muted { font-size: 0.85rem; }
.figrow { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 22px 0 8px; padding: 0; list-style: none; }
.figrow li { min-width: 6.5rem; }
.figrow .sw { display: block; height: 5px; width: 3.2rem; border-radius: 3px; margin-bottom: 8px; }
.figrow b { display: block; font-size: 1.3rem; line-height: 1.2; }
.figrow span { font-size: 0.85rem; color: var(--ink-soft); }
.sw.q1 { background: var(--q1); } .sw.q2 { background: var(--q2); } .sw.q3 { background: var(--q3); } .sw.q4 { background: var(--q4); } .sw.q5 { background: var(--q5); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 18px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule-soft); font-size: 0.95rem; color: var(--ink-soft); }
.facts b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Range bar (HTML from build_site.py: pchart) ----------
   After Glassdoor: grey track, light P10–P90, dark P25–P75, median dot.
   Labels after Payscale, on two rows: r1 = 10%, median, 90%; r2 = 25%, 75%. */
.pchart { margin: 22px 0 6px; max-width: 46rem; }
.rbar { position: relative; padding-top: 30px; }
.rb-track { position: relative; height: 14px; background: var(--rule-soft); border-radius: 7px; }
.rb-track span { position: absolute; top: 0; bottom: 0; }
.rb-all { background: var(--q2); border-radius: 7px; }
.rb-mid { background: var(--q4); border-radius: 7px; }
.rb-dot { width: 20px; height: 20px; top: -3px !important; margin-left: -10px; background: var(--page); border: 5px solid var(--blue-deep); border-radius: 50%; z-index: 2; }
.rb-uk { top: -10px !important; bottom: -6px !important; width: 0; border-left: 1.5px dashed var(--ink); z-index: 1; }
.rb-med { position: absolute; top: 0; white-space: nowrap; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.rb-med.start { transform: translateX(-10px); }
.rb-med.end { transform: translateX(calc(-100% + 10px)); }
.rb-med b { color: var(--blue-deep); font-size: 1.05rem; }
.rb-med em { font-style: normal; font-size: 0.8rem; color: var(--ink-soft); }
.rb-key { margin: 6px 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.rb-key i { display: inline-block; height: 14px; border-left: 1.5px dashed var(--ink); vertical-align: -2px; margin: 0 8px 0 4px; }
/* labels share one row; .stacked (default, removed by rangebar.js when they fit) puts 25%/75% on a second row */
.rb-labels { position: relative; height: 40px; margin-top: 8px; }
.rbar.stacked .rb-labels { height: 82px; }
.rb-labels > span { position: absolute; top: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; line-height: 1.25; }
.rbar.stacked .rb-labels > span.r2 { top: 42px; }
.rb-labels > span.start { transform: none; text-align: left; }
.rb-labels > span.end { transform: translateX(-100%); text-align: right; }
.rb-labels b { display: block; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.rb-labels em { display: block; font-style: normal; font-size: 0.78rem; color: var(--ink-soft); }
.rbar.stacked .rb-labels > span.r2::before { content: ""; position: absolute; left: 50%; top: -44px; height: 40px; border-left: 1px dotted var(--rule); }
@media (max-width: 560px) { .rb-labels b { font-size: 0.85rem; } }
.chart-note { font-size: 0.85rem; color: var(--ink-soft); max-width: var(--measure); margin-top: 10px; }

/* ---------- Pay by year (HTML + stretched SVG from build_site.py: history_chart) ---------- */
.lchart { margin: 14px 0 6px; max-width: 42rem; padding-left: 3.2rem; padding-right: 3.6rem; }
.lc-plot { position: relative; height: 240px; }
.lc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc-plot polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.lc-plot polyline.p10, .lc-plot polyline.p90 { stroke: var(--line-outer); stroke-width: 2; stroke-dasharray: 5 4; }
.lc-plot polyline.p25, .lc-plot polyline.p75 { stroke: var(--line-inner); stroke-width: 2.5; }
.lc-plot polyline.median { stroke: var(--line-mid); stroke-width: 4; }
.lc-plot .gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--rule-soft); }
.lc-plot .gl em { position: absolute; right: 100%; margin-right: 8px; transform: translateY(-50%); font-style: normal; font-size: 0.75rem; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc-plot .d { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--page); border: 2px solid var(--line-inner); cursor: help; z-index: 1; }
.lc-plot .d.p10, .lc-plot .d.p90 { border-color: var(--line-outer); }
.lc-plot .d.median { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border: 3px solid var(--line-mid); }
.lc-plot .tag { position: absolute; margin-left: 10px; transform: translateY(-50%); font-size: 0.75rem; font-weight: 700; white-space: nowrap; line-height: 1; }
.lc-plot .tag.p10, .lc-plot .tag.p90 { color: var(--line-outer); }
.lc-plot .tag.p25, .lc-plot .tag.p75 { color: var(--line-inner); }
.lc-plot .tag.median { color: var(--line-mid); }
.lc-x { position: relative; height: 2.6em; margin-top: 6px; font-size: 0.8rem; color: var(--ink-soft); }
.lc-x span { position: absolute; transform: translateX(-50%); text-align: center; line-height: 1.2; white-space: nowrap; }
.lc-x small { display: block; font-size: 0.7rem; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0 -3.2rem; font-size: 0.8rem; color: var(--ink-soft); }
.lc-legend .sw { display: inline-block; width: 22px; height: 0; vertical-align: middle; margin-right: 6px; }
.lc-legend .sw.p10 { border-top: 2px dashed var(--line-outer); }
.lc-legend .sw.p25 { border-top: 2.5px solid var(--line-inner); }
.lc-legend .sw.median { border-top: 4px solid var(--line-mid); }
.hist-table { margin: 8px 0; }
.hist-table td.med { font-weight: 700; }
@media (max-width: 400px) {
  /* very narrow phones: small tables wrap their headings, shrink a little and, as a last resort, scroll inside themselves */
  .pct-table { display: block; overflow-x: auto; }
  .pct-table th, .pct-table td { padding: 7px 4px; font-size: 0.82rem; }
  .pct-table th.n { white-space: normal; }
  .result .opt { display: none; }  /* calculator: drop the weekly column, keep year and month */
}
@media (max-width: 480px) { .lc-plot { height: 200px; } .lchart { padding-left: 2.8rem; padding-right: 3.2rem; } .lc-legend { margin-left: -2.8rem; } }

.ons-line { margin: -4px 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.sal-links { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: 4px 12px; font-variant-numeric: tabular-nums; max-width: 52rem; }
.sal-links li[aria-current] a { font-weight: 700; color: var(--ink); text-decoration: none; }
.sal-table tr.median td { color: var(--blue-deep); }

/* ---------- Tables ---------- */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
th { font-size: 0.86rem; color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
td.n, th.n { text-align: right; white-space: nowrap; }
.pct-table { max-width: 30rem; }
@media (max-width: 380px) { .pct-table th, .pct-table td { padding: 8px 4px; font-size: 0.88rem; } }
.pct-table tr.median td { font-weight: 700; }
.pct-table td .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }

/* ---------- Occupation list (home) ---------- */
.tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px 14px; align-items: end; margin: 30px 0 8px; }
@media (max-width: 720px) { .tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tools .search { grid-column: 1 / -1; } }
.tools select { width: 100%; }
.tools label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 4px; }
.search input { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--page); color: var(--ink); }
.search input:focus { outline: 3px solid var(--focus); outline-offset: 0; }
/* own chevron, set in from the edge (the browser's sits against the border); drawn with gradients so it follows the theme colours */
select { font: inherit; padding: 9px 2.6rem 9px 12px; border: 1px solid var(--ink-soft); border-radius: 0; color: var(--ink); max-width: 100%;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-color: var(--page);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat; }
select:hover { border-color: var(--ink); }
.count { font-size: 0.88rem; color: var(--ink-soft); margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.count a { font-weight: 600; }
.jobs-table { line-height: 1.5; }
.jobs-table td { padding-top: 13px; padding-bottom: 13px; }
.jobs-table th button { all: unset; cursor: pointer; }
.jobs-table th button:hover, .jobs-table th button:focus-visible { color: var(--blue); text-decoration: underline; }
.jobs-table th[aria-sort] button::after { content: " ▾"; }
.jobs-table th[aria-sort="ascending"] button::after { content: " ▴"; }
.jobs-table td.occ a { font-weight: 600; text-decoration: none; }
.jobs-table td.occ a:hover { text-decoration: underline; }
.jobs-table td.occ .en-name { display: block; }
.jobs-table .soc { color: var(--ink-soft); font-size: 0.8rem; margin-left: 6px; font-variant-numeric: tabular-nums; }
.jobs-table .titles { display: block; font-size: 0.8rem; line-height: 1.55; color: var(--ink-soft); margin-top: 5px; }
.jobs-table .titles .more { color: var(--blue); }
.titles-dialog { width: min(44rem, calc(100vw - 24px)); max-height: min(80vh, 46rem); padding: 20px 22px; border: 1px solid var(--rule);
  border-radius: 8px; background: var(--page); color: var(--ink); box-shadow: 0 16px 48px rgb(0 0 0 / 0.25); }
.titles-dialog::backdrop { background: rgb(20 25 35 / 0.45); }
.titles-dialog h2 { margin: 0 2.2rem 4px 0; font-size: 1.25rem; }
.titles-dialog .title-list { margin: 14px 0; }
.td-close { position: sticky; top: 0; float: right; margin: -8px -10px 0 0; }
.td-close button { all: unset; cursor: pointer; font-size: 1.6rem; line-height: 1; width: 36px; height: 36px; text-align: center; border-radius: 50%; color: var(--ink-soft); background: var(--page); }
.td-close button:hover { background: var(--tint); color: var(--ink); }
.td-close button:focus-visible { outline: 3px solid var(--focus); }
.jobs-table .hit { display: block; font-size: 0.82rem; margin-top: 3px; }
.jobs-table .hit mark { background: #fff1b8; color: #1d2433; padding: 0 2px; }
.jobs-table td.med { font-weight: 700; }
.jobs-table tr[hidden] { display: none; }
/* wide screens: give the occupation column the room, so the preview titles fit on one line */
@media (min-width: 1060px) {
  .jobs-table td.occ { min-width: 31rem; }
    .jobs-table .titles { white-space: nowrap; }
}
@media (max-width: 760px) { .jobs-table .opt { display: none; } th, td { padding: 9px 6px; } }
@media (max-width: 560px) { .nav-method { display: none; } .jobs-table .opt2 { display: none; } .jobs-table td.occ { overflow-wrap: anywhere; } }

/* home: UK chart beside the intro on wide screens */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px 48px; align-items: end; }
@media (max-width: 900px) { .home-top { grid-template-columns: 1fr; } }
.home-top .pchart { margin: 0 0 8px; }

/* ---------- Lists ---------- */
.title-list { columns: 3 13rem; column-gap: 28px; padding: 0; list-style: none; font-size: 0.92rem; }
.title-list li { break-inside: avoid; padding: 2px 0; }
details > summary { cursor: pointer; color: var(--blue); }
.bars { list-style: none; padding: 0; margin: 0; max-width: 52rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); align-items: center; }
.bars .b { height: 5px; background: var(--q2); margin-top: 5px; }
.bars .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.group-list { columns: 2 22rem; column-gap: 40px; padding: 0; list-style: none; }
.group-list li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--rule-soft); display: flex; justify-content: space-between; gap: 12px; }
.group-list .v { font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; }
.note { border-left: 4px solid var(--blue); padding: 4px 0 4px 16px; max-width: var(--measure); }
.source { font-size: 0.85rem; color: var(--ink-soft); max-width: var(--measure); margin-top: 32px; }

/* ---------- Calculator ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); gap: 32px 48px; align-items: start; margin-top: 20px; }
@media (max-width: 820px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.calc label, .calc legend { font-weight: 700; font-size: 0.92rem; display: block; margin-bottom: 5px; }
.calc fieldset { border: 0; padding: 0; margin: 0; }
.calc .row { display: flex; gap: 8px; align-items: center; }
.calc .row > * { min-width: 0; }  /* let inputs shrink instead of pushing the select off a phone screen */
.calc .row select { flex: 0 1 auto; }
.calc .row #pension { flex: 1 1 auto; }
.calc input[type="number"], .calc input[type="text"] { font: inherit; width: 100%; padding: 9px 10px; border: 2px solid var(--ink); border-radius: 0; background: var(--page); color: var(--ink); }
.calc .money { position: relative; flex: 1; }
.calc .money span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.calc .money input { padding-left: 24px; }
.calc .radios { display: grid; gap: 6px; }
.calc .radios label, .calc .check { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 0; cursor: pointer; }
.calc input[type="radio"], .calc input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); }
.calc .hint { display: block; font-size: 0.82rem; color: var(--ink-soft); font-weight: 400; margin-top: 4px; }
.calc .error { color: #b3262e; font-size: 0.85rem; }
.result .fig { font-family: var(--head); font-size: clamp(2.4rem, 6vw, 3.2rem); font-weight: 700; line-height: 1; color: var(--blue-deep); }
.result .what { color: var(--ink-soft); margin: 6px 0 0; }
.result tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.stack { display: flex; height: 12px; overflow: hidden; margin: 22px 0 8px; background: var(--rule-soft); }
.stack span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.c-net { background: var(--q5); } .c-tax { background: var(--q3); } .c-ni { background: var(--q2); } .c-loan { background: #9aa3b2; } .c-pen { background: var(--q1); }
.presets { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0; list-style: none; }

/* ---------- Ads: fixed height so the page doesn't jump when an ad loads ---------- */
.ad { margin: 36px 0; min-height: 280px; border-top: 1px solid var(--rule-soft); padding-top: 6px; }
.ad::before { content: attr(data-label); display: block; font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 4px; }
.ad ins { display: block; width: 100%; }
.ad { max-width: 46rem; }
.ad.in-table { margin: 4px 0; min-height: 250px; border-top: 0; }
.jobs-table tr.ad-row td { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.ad-preview { display: flex; flex-direction: column; }
.ad-preview span { display: flex; flex: 1; width: 100%; align-items: center; justify-content: center; border: 2px dashed var(--rule); color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Root language chooser ---------- */
.chooser { max-width: 26rem; margin: 18vh auto; padding: 0 16px; }
.chooser a { display: block; font-size: 1.25rem; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
