/* Wage by Hour: "precision instrument". Off-white paper, near-black ink, one green accent, figures first. */

@font-face { font-family: "Geist"; src: url(/fonts/geist.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist-mono.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --paper: #FBFBF9;
  --paper-2: #F4F4F0;
  --card: #FFFFFF;
  --ink: #14161A;
  --ink-2: #2F333A;
  --muted: #5F656E;
  --faint: #9298A0;
  --line: #E6E6E0;
  --line-2: #D7D7CF;
  --accent: #0B6E4F;
  --accent-ink: #085A40;
  --accent-soft: #E5F1EA;
  --accent-line: #BBDCCB;
  --warn: #9A5B00;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 28px -12px rgba(20, 22, 26, .14);
  --r: 14px;
  --r-s: 9px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1113;
    --paper-2: #14171A;
    --card: #171A1E;
    --ink: #ECEDE9;
    --ink-2: #D2D4D0;
    --muted: #9AA0A8;
    --faint: #6C727A;
    --line: #24282D;
    --line-2: #30353B;
    --accent: #3CC48F;
    --accent-ink: #5FD6A6;
    --accent-soft: #11261D;
    --accent-line: #1F4A37;
    --warn: #E0A84A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 20px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; line-height: 1.12; margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; }
.mono, td, .receipt-rows .rv, .num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar { position: relative; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { height: 26px; width: auto; flex: none; }
.bm-swiss { height: 22px; }
.brand-word { font-weight: 600; font-size: 19px; letter-spacing: -.035em; }
.brand-word em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0; color: var(--accent); padding: 0 .08em 0 .04em; }
.nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav li > a, .nav li > span { display: block; padding: 7px 11px; border-radius: 8px; font-size: 14.5px; color: var(--muted); text-decoration: none; transition: color .15s, background-color .15s; }
.nav li > a:hover { color: var(--ink); background: var(--paper-2); }
.nav .is-here { color: var(--ink); font-weight: 500; }
.nav-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 8px; }
.nav-toggle { display: none; }

/* ---------- Hero + calculator ---------- */
.hero { padding: 44px 0 72px; border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px;
  position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 30% 20%, transparent 0, var(--paper) 75%); pointer-events: none; }
.hero > .wrap { position: relative; }
.hero-head { margin-bottom: 30px; }
.hero-head h1, .hero-head .lede { max-width: 860px; }
.has-art { position: relative; }
.guide-head.has-art .hero-art { top: 20px; }
.has-art h1, .has-art .lede { max-width: min(820px, calc(100% - 290px)); }
.spot-art { display: block; width: 220px; height: auto; margin: 0 0 8px -12px; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .spot-art { mix-blend-mode: normal; border-radius: 14px; filter: brightness(.9); margin-left: 0; } }
.hero-art { position: absolute; right: 24px; top: -26px; width: 262px; height: auto; mix-blend-mode: multiply; pointer-events: none; user-select: none; }
@media (max-width: 1100px) { .hero-art { width: 230px; } .has-art h1, .has-art .lede { max-width: calc(100% - 250px); } }
@media (prefers-color-scheme: dark) { .hero-art { mix-blend-mode: normal; border-radius: 14px; filter: brightness(.9); } }
@media (prefers-color-scheme: dark) { .has-dark .hero-art, .has-dark .spot-art { mix-blend-mode: lighten; border-radius: 0; filter: none; } .has-dark .spot-art { margin-left: -12px; } }
.art-pic { display: contents; }
@media (max-width: 820px) { .hero-art { display: none; } .has-art h1, .has-art .lede { max-width: none; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: start; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 18px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.eyebrow .arrows { color: var(--accent); font-family: var(--sans); font-size: 15px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -.045em; margin-bottom: 14px; }
.lede { font-size: 19px; color: var(--muted); max-width: 36em; margin-bottom: 0; }
.lede strong { color: var(--ink); font-weight: 600; }

.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 26px 26px 20px; }
.field { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.field > label, .field legend, .field-head label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; padding: 0; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; }
.field-head output { font: 500 14px var(--mono); color: var(--ink); }
.amount { display: flex; align-items: baseline; gap: 6px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; transition: border-color .15s; }
.amount:focus-within { border-color: var(--accent); }
.amount-cur { font: 300 36px var(--sans); color: var(--faint); }
.amount input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 500 clamp(40px, 5vw, 54px)/1.1 var(--sans); letter-spacing: -.045em; padding: 0; outline: none; font-variant-numeric: tabular-nums; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, auto); gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--paper-2); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; white-space: nowrap; padding: 8px 6px; border-radius: 8px; font-size: 14px; color: var(--muted); transition: background-color .15s, color .15s, box-shadow .15s; cursor: pointer; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(20, 22, 26, .08), 0 0 0 1px var(--line-2); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.ruler { position: relative; padding-top: 4px; }
.ruler input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 0; background: transparent; cursor: pointer;
  --pct: 49.4%; }
.ruler input[type=range]::-webkit-slider-runnable-track { height: 34px; border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 16 - 1px), var(--line-2) calc(100% / 16 - 1px) calc(100% / 16)) 0 100% / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 4 - 1px), var(--faint) calc(100% / 4 - 1px) calc(100% / 4)) 0 100% / 100% 16px no-repeat,
    linear-gradient(var(--accent-soft), var(--accent-soft)) 0 0 / var(--pct) 100% no-repeat,
    var(--paper-2);
  border: 1px solid var(--line); }
.ruler input[type=range]::-moz-range-track { height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 16 - 1px), var(--line-2) calc(100% / 16 - 1px) calc(100% / 16)) 0 100% / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 4 - 1px), var(--faint) calc(100% / 4 - 1px) calc(100% / 4)) 0 100% / 100% 16px no-repeat,
    var(--paper-2); }
.ruler input[type=range]::-moz-range-progress { height: 34px; background: var(--accent-soft); border-radius: 8px 0 0 8px; }
.ruler input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 44px; margin-top: -6px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.ruler input[type=range]::-moz-range-thumb { width: 4px; height: 44px; border: 0; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.ruler-marks { display: flex; justify-content: space-between; font: 400 11.5px var(--mono); color: var(--faint); margin-top: 6px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row .field { margin-bottom: 12px; }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; background: var(--card); }
.stepper:focus-within { border-color: var(--accent); }
.stepper input { flex: 1; min-width: 0; text-align: center; border: 0; background: none; color: var(--ink); font: 500 17px var(--mono); padding: 9px 0; outline: none; }
.stepper button { width: 40px; border: 0; background: var(--paper-2); color: var(--muted); font-size: 18px; cursor: pointer; transition: background-color .15s, color .15s; }
.stepper button:hover { background: var(--line); color: var(--ink); }
.hint { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; line-height: 1.5; }

/* Receipt */
.receipt { position: sticky; top: 24px; filter: drop-shadow(0 18px 30px rgba(20, 22, 26, .10)); }
.receipt-in { background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; padding: 28px 28px 18px; }
.receipt-tear { height: 14px; background:
  radial-gradient(circle at 7px 14px, transparent 6px, var(--card) 6.5px) 0 0 / 14px 14px repeat-x; }
.receipt-kicker { font: 500 12.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.receipt-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 18px; }
.odo { font: 600 clamp(44px, 5.4vw, 66px)/1 var(--sans); letter-spacing: -.05em; color: var(--ink); font-variant-numeric: tabular-nums; display: inline-flex; overflow: hidden; }
.odo .d { display: inline-block; height: 1em; overflow: hidden; position: relative; }
.odo .d > span { display: flex; flex-direction: column; transition: transform .55s cubic-bezier(.2, .8, .2, 1); }
.odo .d > span > i { font-style: normal; height: 1em; line-height: 1; }
.receipt-per { font-size: 18px; color: var(--muted); }
.receipt-rows { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px dashed var(--line-2); }
.receipt-rows li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: 15.5px; }
.receipt-rows .rl { color: var(--ink-2); }
.receipt-rows .lead { flex: 1; border-bottom: 1px dotted var(--line-2); transform: translateY(-4px); }
.receipt-rows .rv { font-size: 15.5px; color: var(--ink); }
.receipt-rows li.is-input .rl { color: var(--accent-ink); font-weight: 500; }
.receipt-rows li.is-input .rv { color: var(--accent-ink); }
.receipt-rows li.is-out .rv { font-weight: 600; }
.receipt-foot { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
.receipt-next { font-size: 14px; color: var(--muted); margin: 14px 4px 0; filter: none; }
.arrow { color: var(--accent-ink); font-weight: 500; text-decoration: none; white-space: nowrap; }
.arrow::after { content: " \2192"; }
span.arrow { color: var(--muted); font-weight: 400; }
span.arrow::after { content: ""; }

/* ---------- Sections ---------- */
.band { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 80px 0; }
.sec-head { max-width: 640px; margin-bottom: 36px; }
.sec-head h2, .prose h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -.035em; }
.sec-sub { color: var(--muted); margin: 10px 0 0; }
.ledgers { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ledger { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 10px; }
.ledger h3 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.ledger h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead th { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--line-2); }
thead th:first-child { text-align: left; }
tbody th { text-align: left; font-weight: 600; font-variant-numeric: tabular-nums; padding: 8px 6px; }
tbody td { text-align: right; padding: 8px 6px; color: var(--ink-2); }
tbody tr + tr > * { border-top: 1px solid var(--line); }
tbody tr.hl > * { background: var(--accent-soft); color: var(--accent-ink); }
tbody tr.hl > :first-child { border-radius: 6px 0 0 6px; }
tbody tr.hl > :last-child { border-radius: 0 6px 6px 0; }
tbody tr:hover > * { background: var(--paper-2); }
tbody tr.hl:hover > * { background: var(--accent-soft); }

.prose-grid { display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 300px); gap: 72px; justify-content: space-between; padding-top: 88px; padding-bottom: 40px; }
.prose h2 { margin-bottom: 18px; }
.prose h3 { font-size: 21px; letter-spacing: -.02em; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.formula { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); font: 400 14.5px/1.5 var(--mono); }
.formula p { display: grid; grid-template-columns: 64px 22px 1fr; margin: 0; padding: 6px 0; color: var(--ink-2); }
.formula p + p { border-top: 1px dashed var(--line); }
.formula .f-l { color: var(--accent-ink); font-weight: 500; }
.formula .f-eq { color: var(--faint); }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding: 0 0 0 26px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 12px; height: 2px; background: var(--accent); border-radius: 2px; }
.side-note { position: sticky; top: 24px; align-self: start; margin-top: 60px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 15px; color: var(--ink-2); }
.side-k { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-bottom: 10px; }
.side-note .mono { color: var(--ink); font-weight: 500; }

.faq { padding-top: 48px; padding-bottom: 96px; }
.faq-list { border-top: 1px solid var(--line-2); max-width: 820px; }
.faq-list details { border-bottom: 1px solid var(--line-2); }
.faq-list summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-size: 18px; font-weight: 500; letter-spacing: -.015em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat; transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--accent-ink); }
.faq-list details p { color: var(--ink-2); max-width: 680px; margin: -4px 0 22px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--paper-2); padding: 56px 0 28px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand p { color: var(--muted); max-width: 300px; margin-top: 14px; }
.foot-h { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; color: var(--muted); }
.foot li a { color: var(--ink-2); text-decoration: none; }
.foot li a:hover { color: var(--accent-ink); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot-base p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .receipt { position: static; }
  .prose-grid { grid-template-columns: 1fr; gap: 0; }
  .side-note { position: static; margin-top: 8px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); cursor: pointer; padding: 0 11px; }
  .nav-toggle span:not(.sr) { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
  .nav-toggle[aria-expanded=true] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav-toggle[aria-expanded=true] span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }
  .nav ul { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav ul.open { display: flex; }
  .nav li > a, .nav li > span { padding: 12px 8px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-sep { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16.5px; }
  .hero { padding: 32px 0 44px; }
  .lede { font-size: 17px; margin-bottom: 22px; }
  .calc { padding: 20px 18px 16px; }
  .receipt-in { padding: 22px 20px 14px; }
  .ledgers { grid-template-columns: 1fr; }
  .ledger { padding: 16px 14px 6px; }
  .hide-s { display: none; }
  .band { padding: 56px 0; }
  .prose-grid { padding-top: 56px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-brand { grid-column: 1 / -1; }
  .seg { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seg span { padding: 8px 4px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Take-home pay ---------- */
.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row; }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; }
.seg-mini { padding: 2px; border-radius: 9px; }
.seg-mini span { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.select select { width: 100%; appearance: none; -webkit-appearance: none; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); color: var(--ink); font: 500 16px var(--sans); padding: 10px 36px 10px 12px; cursor: pointer; }
.select select:focus { border-color: var(--accent); outline: none; }
.suffix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); overflow: hidden; }
.suffix:focus-within { border-color: var(--accent); }
.suffix input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 500 16px var(--sans); padding: 10px 12px; outline: none; font-variant-numeric: tabular-nums; }
.suffix span { padding: 0 12px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.more { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }
.more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: 6px; font: 500 14px/1 var(--mono); color: var(--muted); }
.more[open] summary::before { content: "\2212"; }
.more[open] summary { margin-bottom: 16px; }
.receipt-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.receipt-top .receipt-kicker { margin: 0; }
.split { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 0 0 10px; background: var(--paper-2); }
.split span { display: block; height: 100%; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.s-net { background: var(--accent); }
.s-fed { background: var(--ink); }
.s-fica { background: var(--faint); }
.s-state { background: #C9A15A; }
.split-key { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0 0 16px; padding: 0; font-size: 12.5px; color: var(--muted); }
.split-key i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.receipt-rows li small { color: var(--faint); font-size: 12px; }
.receipt-rows li.minus .rv { color: var(--ink-2); }
.receipt-rows li.gross .rl, .receipt-rows li.gross .rv { font-weight: 500; }
.receipt-rows li.total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.receipt-rows li.total .rl, .receipt-rows li.total .rv { font-weight: 600; color: var(--accent-ink); }
.receipt-rows li.total .lead { border-color: transparent; }
.ledger-wide { overflow-x: auto; }
.ledger-wide table { min-width: 640px; }
.state-table { margin: 24px 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 6px 18px 10px; }
.state-table thead th:nth-child(2) { text-align: left; }
.state-table td.rk { text-align: left; color: var(--faint); width: 36px; }
.state-table tbody th { font-weight: 500; }
.fine { font-size: 13.5px; color: var(--muted); }
@media (prefers-color-scheme: dark) { .s-state { background: #B8924E; } }
@media (max-width: 720px) {
  .seg-3 span { font-size: 12.5px; }
  .receipt-top { flex-direction: column; align-items: flex-start; }
}

/* ---------- Overtime / shared tool bits ---------- */
.seg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.day { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.day span { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); text-align: center; }
.day input { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); color: var(--ink); text-align: center; font: 500 17px var(--sans); padding: 10px 0; outline: none; font-variant-numeric: tabular-nums; }
.day input:focus { border-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 16px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.stats > div { background: var(--card); padding: 10px 12px; }
.stats .k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.stats .v { font-size: 17px; font-weight: 600; color: var(--ink); }
@media (max-width: 720px) {
  .days { gap: 4px; }
  .day input { font-size: 15px; padding: 9px 0; }
  .stats .v { font-size: 15px; }
}

/* ---------- Pay period calendar ---------- */
.date { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); color: var(--ink); font: 500 16px var(--sans); padding: 9px 12px; outline: none; }
.date:focus { border-color: var(--accent); }
.opt { font-weight: 400; color: var(--faint); margin-left: 4px; }
.cals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; }
.cal.is-three { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.cal-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.cal-n { font: 500 11.5px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.cal.is-three .cal-n { color: var(--accent-ink); }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cal-g span { line-height: 26px; height: 26px; border-radius: 7px; color: var(--ink-2); position: relative; }
.cal-g .cal-w { font: 500 10.5px var(--mono); color: var(--faint); height: 20px; line-height: 20px; }
.cal-g .pd { background: var(--accent); color: #fff; font-weight: 600; }
.cal-g .hol::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #C9A15A; }
.cal-g .pd.hol::after { background: #fff; }
.key-pd, .key-hol { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); margin: 0 4px 0 10px; vertical-align: -1px; }
.key-pd { margin-left: 0; }
.key-hol { background: #C9A15A; border-radius: 50%; width: 7px; height: 7px; vertical-align: 1px; }
.hol-list { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; }
.hol-list li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.hol-list .mono { color: var(--muted); min-width: 48px; }
@media (prefers-color-scheme: dark) { .cal-g .pd { color: #0F1113; } }
@media (max-width: 1020px) { .cals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .cal { padding: 10px 8px 8px; } .cal-g span { height: 22px; line-height: 22px; font-size: 11.5px; } }
@media (max-width: 400px) { .cals { grid-template-columns: minmax(0, 1fr); } }
.rule-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.rule-for { font-size: 14px; color: var(--muted); }
@media (max-width: 720px) { .rule-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* ---------- Guides ---------- */
.guide-head { padding-top: 48px; padding-bottom: 36px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.guide-head h1 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.04em; max-width: 900px; margin: 14px 0 16px; }
.guide-head .lede { max-width: 760px; margin-bottom: 22px; }
.crumbs { display: flex; gap: 8px; font: 500 12.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin: 0; }
.byline span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); margin-right: 18px; vertical-align: middle; }
.guide-grid { display: grid; grid-template-columns: 240px minmax(0, 700px); gap: 72px; padding-bottom: 80px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.toc-k { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0 0 28px; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; transition: color .15s, border-color .15s; }
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--ink); border-left-color: var(--accent); }
.toc-tool { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 16px; color: var(--ink-2); transition: border-color .15s; }
.toc-tool:hover { border-color: var(--accent-line); color: var(--ink-2); }
.toc-tool-k { display: block; font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-bottom: 6px; }
.toc-tool strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.toc-tool strong::after { content: " \2192"; color: var(--accent-ink); }
.toc-tool span:last-child { font-size: 13.5px; color: var(--muted); }
.guide-body { font-size: 17.5px; line-height: 1.7; }
.guide-body > p:first-child { font-size: 19px; color: var(--ink); }
.guide-body h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.03em; margin: 52px 0 16px; scroll-margin-top: 24px; }
.guide-body h3 { font-size: 20px; margin: 32px 0 10px; }
.guide-body a { color: var(--accent-ink); text-decoration-color: var(--accent-line); }
.guide-body ul, .guide-body ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.guide-body li { margin-bottom: 6px; }
.guide-body li::marker { color: var(--accent); }
.guide-body strong { font-family: inherit; font-size: inherit; }
.guide-body table { margin: 24px 0 28px; font-size: 15px; display: block; overflow-x: auto; }
.guide-body table thead th { text-align: left; }
.guide-body table td { text-align: left; font-variant-numeric: tabular-nums; }
.guide-body table tbody tr:first-child > * { border-top: 0; }
.guide-body aside.note { margin: 28px 0; padding: 20px 22px; border: 1px solid var(--accent-line); border-radius: var(--r); background: var(--accent-soft); font-size: 16px; }
.guide-body aside.note p:last-child { margin-bottom: 0; }
.faq-list.in-guide { margin: 8px 0 0; }
.faq-list.in-guide summary { font-size: 17px; padding: 18px 40px 18px 0; line-height: 1.4; }
.faq-list.in-guide details p { font-size: 16.5px; line-height: 1.65; margin: -2px 0 20px; }
.faq-list.in-guide details[open] summary { color: var(--accent-ink); }
.guide-foot { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources { font-size: 14.5px; color: var(--muted); padding-left: 1.2em; }
.sources a { color: var(--ink-2); }
.related { padding: 56px 0; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 32px; }
.related-list li { border-bottom: 1px solid var(--line-2); }
.related-list a { display: block; padding: 16px 0; font-size: 19px; font-weight: 500; letter-spacing: -.015em; text-decoration: none; }
.related-list a::after { content: " \2192"; color: var(--accent-ink); }
@media (max-width: 1020px) {
  .guide-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; margin-bottom: 32px; }
  .toc ol { display: none; }
  .toc-k { display: none; }
}

/* ---------- Info pages and forms ---------- */
.narrow { max-width: 760px; padding-bottom: 88px; }
.guide-head + .narrow { margin-top: 0; }
.text { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); color: var(--ink); font: 400 16px/1.5 var(--sans); padding: 10px 12px; outline: none; }
.text:focus { border-color: var(--accent); }
textarea.text { resize: vertical; min-height: 150px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; background: var(--ink); color: var(--paper); font: 500 15.5px var(--sans); padding: 12px 20px; cursor: pointer; transition: background-color .15s; }
.btn:hover { background: var(--accent); }
.err { color: #B42318; font-size: 13.5px; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.calc.done h2 { font-size: 28px; margin: 4px 0 12px; }
.contact .hint { margin-top: 14px; }
.src-table { padding: 6px 14px 10px; overflow-x: auto; }
.src-table table { font-size: 14px; min-width: 560px; display: table; margin: 0; }
.src-table tbody th { font-weight: 500; }
.src-table td a { color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .err { color: #F97066; } }
.field-row { align-items: end; }
@media (max-width: 1020px) {
  .toc:not(:has(.toc-tool)) { display: none; }
}
@media (max-width: 720px) {
  .byline { flex-direction: column; gap: 2px; }
  .byline span + span::before { display: none; }
}

/* ---------- Home: explore ---------- */
.explore { border-top: 1px solid var(--line); }
.explore-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; }
.explore h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; margin-bottom: 24px; }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tool-list a { display: block; height: 100%; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 16px; color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.tool-list a:hover { border-color: var(--accent-line); box-shadow: var(--shadow); color: var(--ink-2); }
.tl-k { display: block; font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-bottom: 8px; }
.tool-list strong { display: block; font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -.015em; margin-bottom: 4px; }
.tool-list strong::after { content: " \2192"; color: var(--accent-ink); }
.tool-list a > span:last-child { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.guide-list { list-style: none; counter-reset: g; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.guide-list li { counter-increment: g; border-bottom: 1px solid var(--line-2); }
.guide-list a { display: flex; gap: 16px; align-items: baseline; padding: 15px 0; font-size: 18px; font-weight: 500; letter-spacing: -.015em; text-decoration: none; }
.guide-list a::before { content: counter(g, decimal-leading-zero); font: 500 13px var(--mono); color: var(--faint); }
@media (max-width: 1020px) { .explore-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
@media (max-width: 560px) { .tool-list { grid-template-columns: minmax(0, 1fr); } }

/* Mobile result bar */
.resbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: none; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--ink); color: var(--paper); font: inherit; text-align: left; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .35); cursor: pointer; opacity: 0; transition: opacity .2s; }
.resbar.on { display: flex; opacity: 1; }
.rb-k { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .65; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-v { flex: 1; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-go { font-size: 13px; font-weight: 500; color: var(--accent-soft); }
.rb-go::after { content: " \2193"; }
@media (min-width: 1021px) { .resbar { display: none !important; } }
@media (prefers-color-scheme: dark) { .resbar { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); } .rb-go { color: var(--accent); } }
@media (max-width: 720px) { .seg-3 span { white-space: normal; line-height: 1.2; padding: 7px 4px; display: flex; align-items: center; justify-content: center; height: 100%; } }

/* ---------- Hubs, drafts ---------- */
.hub-head { margin-bottom: 0; border-bottom: 0; padding-bottom: 12px; }
.hub { padding-bottom: 96px; }
.hub-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); max-width: 900px; }
.hub-list li { border-bottom: 1px solid var(--line-2); }
.hub-list a { display: block; padding: 28px 0; text-decoration: none; color: var(--ink-2); }
.hub-list h2 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.03em; margin-bottom: 8px; transition: color .15s; }
.hub-list a:hover h2 { color: var(--accent-ink); }
.hub-list p { color: var(--muted); max-width: 720px; margin-bottom: 10px; }
.hub-meta { font: 500 12.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.draft-flag { display: inline-block; margin: 0 0 16px; padding: 6px 12px; border-radius: 8px; background: #FEF3C7; color: #92400E; font-size: 14px; font-weight: 500; }
.more-link { color: var(--accent-ink) !important; }

/* Article photos */
.hero-img { margin: -12px auto 48px; }
.hero-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); background: var(--paper-2); }
.hero-img figcaption { font-size: 12.5px; color: var(--faint); margin-top: 8px; text-align: right; }
.hero-img figcaption a { color: var(--faint); }
.hub-list a.has-img { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.hub-list a.has-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-s); }
@media (max-width: 720px) { .hub-list a.has-img { grid-template-columns: minmax(0, 1fr); gap: 14px; } .hero-img { margin-bottom: 32px; } }
@media (min-width: 1021px) { .hero-img img { aspect-ratio: 21 / 9; } }
.topic-guides { padding-top: 56px; }
.topic-guides .guide-list { max-width: 820px; }

.stale { opacity: .4; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Worked example in an article: a small pay receipt instead of a paragraph of arithmetic. */
.guide-body .calc { margin: 30px 0; max-width: 600px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px 18px; }
.guide-body .calc-kicker { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; }
.guide-body .calc-title { font-size: 18px; font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.guide-body .calc ul { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line-2); }
.guide-body .calc li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: baseline; padding: 10px 0; margin: 0; border-bottom: 1px dashed var(--line-2); }
.guide-body .calc li span { color: var(--ink-2); font-size: 15.5px; }
.guide-body .calc li small { grid-column: 1; font: 13px var(--mono); color: var(--muted); }
.guide-body .calc li b { grid-row: 1; grid-column: 2; font: 500 15.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.guide-body .calc li.minus b { color: var(--muted); }
.guide-body .calc li.total { border-bottom: 0; border-top: 1.5px solid var(--ink); margin-top: -1px; padding-top: 12px; }
.guide-body .calc li.total span { font-weight: 600; color: var(--ink); font-size: 16.5px; }
.guide-body .calc li.total b { font-size: 21px; font-weight: 600; color: var(--accent-ink); }
.guide-body .calc-foot { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); }
/* A step that is not money taken out (taxed income): shown, but quieter, with the value in brackets-style grey. */
.guide-body .calc li.info span { color: var(--muted); }
.guide-body .calc li.info b { color: var(--muted); font-weight: 400; }
.guide-body .calc li.plus b { color: var(--accent-ink); }

.receipt-cut { margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.receipt-cut .mono { color: var(--ink); font-weight: 500; }
/* Previous value under the amount in calc receipts: <em>was $X</em> after <b> */
.guide-body .calc li b { justify-self: end; }
.guide-body .calc li em { grid-column: 2; grid-row: 2; justify-self: end; font: 12.5px var(--mono); font-style: normal; color: var(--muted); white-space: nowrap; }
.guide-body .calc li.total em { font-size: 13.5px; }

/* Invalid number (WBH.num): red rule or border on the input's wrapper, message in .err below it */
.amount:has(input[aria-invalid]), .stepper:has(input[aria-invalid]), .suffix:has(input[aria-invalid]) { border-color: #B42318; }
@media (prefers-color-scheme: dark) { .amount:has(input[aria-invalid]), .stepper:has(input[aria-invalid]), .suffix:has(input[aria-invalid]) { border-color: #F97066; } }
