/* Follow a paycheck: the walkthrough's own pieces, drawn with site.css's tokens.
   No colors or fonts of its own: every paint here is a var() from site.css's :root, or a system color under forced colors. */

[hidden] { display: none !important; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

html { scroll-padding-top: 4.75rem; }

/* each step's column is a size-query root, so its grids count their own width */
.tool { max-width: 52rem; min-width: 0; container-type: inline-size; }
.tool.wide { max-width: 64rem; }
.tool h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.005em; font-weight: 600; margin: 2.2rem 0 0.6rem; max-width: var(--measure); text-wrap: balance; }
.tool strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.tool dfn { font-style: normal; font-weight: 600; }

/* ---------- the walk's sections: the number as a kicker over a title in the display face, one column at every width ---------- */
.walk .sec { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.walk .sec > header .num { display: block; margin: 0 0 0.3rem; }
.walk .sec > header h2 { margin: 0; }
.walk .sec > header .snapshot { display: block; width: fit-content; max-width: 100%; margin: 0.7rem 0 0; }

/* the page header: a shorter summary, the example at a glance, the one way in */
.intro.sub { padding-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.glance { margin: 1.3rem 0 0; max-width: 52rem; border: 1.5px solid var(--ink); background: var(--card); }
.sec p.glance-h, .glance-h { margin: 0; padding: 0.5rem 0.9rem; border-bottom: 1px solid var(--rule); font-size: 0.92rem; line-height: 1.4; color: var(--ink-2); }
.glance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--rule); }
.glance-grid > div { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 0.55rem 0.9rem 0.65rem; background: var(--card); }
.glance-grid dt { font-size: 0.88rem; line-height: 1.3; color: var(--ink-2); }
.glance-grid dt a { color: inherit; text-decoration-color: var(--flag); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.glance-grid dt a:hover { color: var(--flag-ink); }
.glance-grid dd { margin: 0.15rem 0 0; font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.3rem); line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 720px) { .glance-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.go { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.6rem; margin: 1.3rem 0 0; }
.go .btn { padding: 0.85rem 1.2rem; }
.door-alt { font-size: 1rem; }
.intro .snapshot { margin-top: 1.3rem; }

/* ---------- the walk's thread: answer first, carried values, the end of each step ---------- */
.sec p.answer { font-size: 1.22em; line-height: 1.42; font-weight: 500; margin: 0 0 1.1rem; font-variant-numeric: tabular-nums; text-wrap: pretty; }
.sec p.answer.is-stale { color: var(--ink-2); }
.from { display: inline-flex; align-items: baseline; gap: 0.4em; margin-right: 0.4rem; font-size: 0.85rem; font-weight: 600; line-height: 1.5; color: var(--flag-ink); white-space: nowrap; }
/* the rule is centered on the tag, and the tag's text sits on the sentence's baseline */
.from::before { content: ""; align-self: center; width: 0.9em; height: 0; border-top: 1.5px solid var(--flag-ink); }
.sec p.carried { margin: 0 0 0.2rem; font-size: 0.95rem; color: var(--ink-2); }
.carried strong { color: var(--ink); }
.sec p.privacy { margin: 0; font-size: 0.9rem; color: var(--ink-2); }
.next { margin: 2.4rem 0 0; padding: 0.9rem 0 0; border-top: 2px solid var(--ink); max-width: var(--measure); }
.sec .next p { margin: 0; }
.next a { font-weight: 600; }
.next-k { display: inline-flex; align-items: center; gap: 0.5em; margin-right: 0.35rem; font-weight: 600; color: var(--flag-ink); }
.next-k::before { content: ""; width: 0.6em; height: 0.6em; background: var(--flag); }
.sec p.skipnote { margin: 0 0 1.2rem; padding: 0.6rem 0.8rem; background: var(--paper-2); font-size: 0.95rem; }
.textbtn { font: inherit; color: inherit; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--flag); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.textbtn:hover { color: var(--flag-ink); }

/* the frozen 2026 snapshot, stamped where the published figures appear: the page header, step 02 and Sources */
.snapshot { display: inline-block; margin: 1.1rem 0 0; padding: 0.22rem 0.55rem; border: 1px solid var(--ink-2); background: var(--card);
            font-family: var(--mono); font-size: 0.78rem; line-height: 1.45; letter-spacing: 0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.sec > header .snapshot { display: block; width: fit-content; max-width: 100%; margin: 0.65rem 0 0; }

/* a source marker: a bracketed number in the text's own face and a quieter ink, so it never reads as a step number */
a.src { position: relative; font-size: 0.75rem; font-weight: 400; line-height: 1; vertical-align: 0.45em; margin-left: 0.12em; padding: 0.1em 0.04em;
        color: var(--ink-2); text-decoration: none; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
/* the word joiner (U+2060) before the bracket keeps a marker on the line of the figure it backs */
a.src::before { content: "\2060["; content: "\2060[" / ""; }
a.src::after { content: "]"; content: "]" / ""; }
a.src:hover { color: var(--flag-ink); text-decoration: underline; text-decoration-thickness: 1px; }
.sources li:target { outline: 2px solid var(--flag); outline-offset: 0.35rem; background: var(--card); }

/* ---------- the opening ---------- */
.sec p.hook { margin: 1.4rem 0 0; font-size: 1.1em; }
.sec p.hist { margin: 1.2rem 0 0; font-size: 0.95rem; color: var(--ink-2); }
.fine.noscript { margin: 0 0 1rem; }

/* three made-up examples in step 01, one compact row: the one showing reads as pressed, in its border and in words */
.examples { margin: 1rem 0 0; }
.sec p.ex-k { margin: 0 0 0.5rem; font-size: 0.92rem; color: var(--ink-2); }
.ex-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
@container (min-width: 34rem) { .ex-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ex { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; min-width: 0; padding: 0.45rem 0.65rem 0.5rem;
      font: inherit; font-size: 0.88rem; line-height: 1.3; text-align: left; color: var(--ink); background: var(--card);
      border: 1.5px solid var(--ink-2); border-radius: 0; cursor: pointer; }
.ex b { font-weight: 600; }
.ex span { color: var(--ink-2); }
.ex:hover { background: var(--paper-2); }
.ex[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper-2); }
.ex[aria-pressed="true"] b::after { content: ", showing"; content: ", showing" / ""; color: var(--flag-ink); }

/* ---------- the progress strip: reached, here, ahead; it also navigates ---------- */
.progress { position: sticky; top: 0; z-index: 6; background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 2px solid var(--ink); }
.progress ol { list-style: none; margin: 0 auto; padding: 0; width: min(1160px, 100% - 2 * var(--gutter)); display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.progress a { display: flex; flex-direction: column; justify-content: center; gap: 0.1rem; min-height: 2.75rem; padding: 0.3rem 0.3rem; text-decoration: none; color: var(--ink-2); border-bottom: 3px dotted var(--rule); }
.progress a:hover { background: var(--paper-2); color: var(--ink); }
.progress .pn { display: inline-flex; align-items: center; gap: 0.35em; font-family: var(--mono); font-size: 0.78rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.progress .pt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.progress .is-reached a { color: var(--ink); border-bottom: 3px solid var(--ink); }
.progress .is-skipped a { color: var(--ink-2); border-bottom: 3px dashed var(--ink-2); }
.progress .is-skipped .pn { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.progress .is-current a, .progress .is-current a:hover { background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--flag); }
@media (min-width: 640px) {
  .progress .is-current .pn::before { content: ""; width: 0.6em; height: 0.6em; flex: none; background: var(--flag); }
  .progress a { padding-inline: 0.45rem; }
}
/* at 1100 px and wider each step's short name shows in full, on two lines where it needs them; never cut off */
.progress-now { width: min(1160px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: 0.25rem 0.3rem 0.35rem; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 0.78rem; color: var(--ink); line-height: 1.25; }
@media (min-width: 1100px) {
  .progress a { min-height: 3.7rem; }
  .progress .pt { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; font-size: 0.8rem; line-height: 1.15; }
  .progress-now { display: none; }
}

/* ---------- the two columns: the steps, and the drawing that builds beside them ---------- */
.side { display: none; }
@media (min-width: 1100px) {
  .walk-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(21rem, 30vw, 25rem); column-gap: clamp(2rem, 3vw, 3rem); align-items: start; }
  /* the grid ends a little below the last step, so the sticky column has left the window by the time the finish
     reaches the top (a jump to the finish shows no strip of the drawing under the progress strip) */
  .walk-grid { padding-bottom: 1.25rem; }
  .walk-main section { padding: clamp(2.5rem, 4vw, 3.6rem) 0; }
  /* one sticky thing beside the steps: the drawing, sized by the script to the window's height; in a window too short for
     the current step's part, the column scrolls on its own, so none of it is out of reach (the small bottom padding keeps
     the box's bottom edge in view at the end of that scroll, which stops on a whole pixel) */
  .side { display: block; position: sticky; top: 3.9rem; max-height: calc(100vh - 3.9rem); overflow-y: auto; padding: 0.5rem 0 0.15rem; }
  .pic-step { display: none; }
}
.side-in { margin: 0; padding: 0.65rem 0.85rem 0.55rem; border: 1.5px solid var(--ink); background: var(--card); }
.side-h { margin: 0 0 0.6rem; font-size: 1.05rem; line-height: 1.25; font-weight: 600; }
.pic-cap { display: block; margin: 0.55rem 0 0; }
.pic-cap > span { display: block; }
.pic-read { font-size: 0.85rem; line-height: 1.4; color: var(--ink); }
.pic-ahead { margin-top: 0.3rem; font-size: 0.82rem; line-height: 1.35; color: var(--ink-2); }
.chart-src, .chart-note { font-size: 0.82rem; line-height: 1.4; color: var(--ink-2); }
.pic-cap .chart-src, .pic-cap .ex-note { margin-top: 0.3rem; font-size: 0.82rem; line-height: 1.35; }

/* ---------- the drawing: slots of SVG at their real pixel size, or a one-line summary each ---------- */
.pic { min-width: 0; }
.pic > .slot + .slot { margin-top: 8px; }
.pic .slot-svg { display: block; overflow: visible; }
.slot-mini { margin: 0; padding: 2px 0 3px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--ink);
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pic-step .slot-mini { white-space: normal; }
.pic text { font-family: var(--mono); font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.pic .st { fill: var(--ink-2); }
.pic .lab, .pic .key-t { fill: var(--ink); }
.pic .here { fill: var(--flag); opacity: 0; }
.pic .is-cur .here { opacity: 1; }
.pic .is-cur .st { fill: var(--flag-ink); font-weight: 600; }
.pic .em .lab { fill: var(--flag-ink); font-weight: 600; }
.pic .seg-gross { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.5; }
.pic .ghost { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 3 3; }
.pic .skipcol { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.pic .base { stroke: var(--ink); stroke-width: 1.5; }
.pic .gl { stroke: var(--rule); stroke-width: 1; }
.pic .lead { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.pic .track { fill: var(--card); stroke: var(--ink-2); stroke-width: 1; }
.pic .tgt { stroke: var(--ink); stroke-width: 2.5; }
.pic .lane { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1; }
.pic .lane-open { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.pic .ceil { stroke: var(--ink); stroke-width: 3; }
.pic .zero { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 2; }
.pic .rng-pos { fill: var(--ink); }
.pic .rng-neg { fill: url(#pat-short); stroke: var(--ink); stroke-width: 1; }
.pic .gap { fill: url(#pat-gap); stroke: none; }
.pic .sw.gap { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 1.5; }
.pic .gap-edge { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2.5; }
.pic .plot-box { fill: none; stroke: none; }
.pic .ln { stroke-width: 2; }
.pic .ln-2 { stroke-dasharray: 7 4; }
.pic .ln-3 { stroke-width: 2.5; stroke-dasharray: 0.5 4.5; }
.pic .ln-4 { stroke-dasharray: 10 3 2 3; }

/* below 1100 px: the drawing so far at the end of each step; at the finish: the whole drawing, every part in full */
.pic-step { margin: 2rem 0 0; padding: 0.8rem 0.9rem 0.7rem; border: 1.5px solid var(--ink); background: var(--card); }
.pic-step figcaption, .pic-full-fig figcaption, .chart-box figcaption { margin: 0.6rem 0 0; font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); }
.pic-step figcaption > span, .pic-full-fig figcaption > span, .chart-box figcaption > span { display: block; }
.pic-step figcaption > span:first-child, .pic-full-fig figcaption > span:first-child, .chart-box figcaption > span:first-child { color: var(--ink); }
.ex-note { font-weight: 600; color: var(--ink); }
.pic-full-fig { margin: 1.4rem 0 0; padding: 1rem 1rem 0.8rem; border: 1.5px solid var(--ink); background: var(--card); }
.pic-full { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem 2rem; align-items: start; }
.pic-full > .slot + .slot { margin-top: 0; }
@media (min-width: 640px) { .pic-full { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pic-full { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* motion only answers the visitor: it is armed by their first input, scroll or key, never on load */
@media (prefers-reduced-motion: no-preference) {
  .pic.armed .mv { transition: x 0.35s cubic-bezier(0.16, 1, 0.3, 1), y 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                               width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
  .pic.armed .mvd { transition: d 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
}

/* ---------- each step's concepts, and the full list at the finish ---------- */
.concepts { margin: 1.4rem 0 0; }
.concepts .trail { margin-top: 0.3rem; border-top: 1px solid var(--rule); }
.trail { list-style: none; margin: 0; padding: 0; }
.trail li { padding: 0.55rem 0 0.6rem; border-bottom: 1px solid var(--rule); line-height: 1.4; }
.trail .tt { display: block; font-weight: 600; }
.trail .tl { display: block; font-size: 0.95rem; color: var(--ink-2); max-width: var(--measure); }
.trail .tn { display: block; margin-top: 0.15rem; font-family: var(--mono); font-size: 0.8rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.trail .ts { display: block; margin-top: 0.1rem; font-size: 0.82rem; color: var(--ink-2); }
.trail .ts a { color: var(--flag-ink); text-decoration-thickness: 1px; }
.trail.full { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 2.2rem; border-top: 2px solid var(--ink); }
@media (min-width: 640px) { .trail.full { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- the finish ---------- */
.tablewrap.fin-wrap { max-height: none; }
.sec p.finish-lead { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em; font-weight: 500; max-width: 36ch; text-wrap: balance; margin-bottom: 0.4rem; }
.tablewrap .fin td { text-align: left; white-space: normal; font-family: var(--serif); font-size: 0.98rem; line-height: 1.4; min-width: 14rem; }
.tablewrap .fin tbody th { white-space: normal; min-width: 9rem; vertical-align: top; }
/* from 641 px each step's link stays on one line (below that it wraps, so the table never scrolls sideways) */
@media (min-width: 641px) { .tablewrap .fin tbody th { white-space: nowrap; } }
.tablewrap .fin tbody td { vertical-align: top; }
#pic-numbers .tablewrap { max-height: none; }
.finish-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin: 1.6rem 0 0; }
.finish-acts .btn { font: inherit; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.sec .finish-acts p.fine { margin: 0; }
.print-only { display: none; }
.onward { margin: 0; padding-left: 1.1rem; max-width: var(--measure); }
.onward li { margin-bottom: 0.4rem; }
.onward li::marker { color: var(--flag-ink); }

/* ---------- inputs: labels and keys in sentence case, in the text's own face ---------- */
.fields { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 1rem 1.1rem; margin: 1.4rem 0 0; }
.fields[data-n="1"] { max-width: 22rem; }
/* even rows: a grid of 2, 4 or 6 fields goes two across, 3 or 6 three across, 4 four across, as the column allows */
@container (min-width: 22rem) { .fields[data-n="2"], .fields[data-n="4"], .fields[data-n="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 36rem) { .fields[data-n="3"], .fields[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 46rem) { .fields[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* a grid that holds a select goes across only when each cell has room for the select's longest option, so no option is
   ever cut off (every option is measured at 320-1920 px). Step 01's longest is "Every two weeks"; step 02's is
   "Married filing jointly", so its three fields stay one above another, at a readable width, until the column is wide. */
.fields:has(#pay-freq)[data-n="4"] { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 25rem) { .fields:has(#pay-freq)[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 50rem) { .fields:has(#pay-freq)[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fields:has(#pay-freq)[data-n="3"] { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 38rem) { .fields:has(#pay-freq)[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fields:has(#tax-state)[data-n="3"] { grid-template-columns: minmax(0, 30rem); }
@container (min-width: 50rem) { .fields:has(#tax-state)[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fields:has(#tax-state)[data-n="4"] { grid-template-columns: minmax(0, 30rem); }
@container (min-width: 33rem) { .fields:has(#tax-state)[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field > label { display: flex; align-items: flex-end; font-size: 0.95rem; font-weight: 500; line-height: 1.3; color: var(--ink); }
/* side by side, every label takes two lines' height and sits on its input, so the inputs line up */
@container (min-width: 22rem) { .fields:not([data-n="1"]) .field > label { min-height: 2.6em; } }
.path .fields .field > label, .opt-field > label { min-height: 0; }
/* the select grids above take two-line labels only while their fields sit side by side */
.fields:has(select):not([data-n="1"]) .field > label { min-height: 0; }
@container (min-width: 25rem) { .fields:has(#pay-freq)[data-n="4"] .field > label { min-height: 2.6em; } }
@container (min-width: 38rem) { .fields:has(#pay-freq)[data-n="3"] .field > label { min-height: 2.6em; } }
@container (min-width: 50rem) { .fields:has(#tax-state)[data-n="3"] .field > label { min-height: 2.6em; } }
@container (min-width: 33rem) { .fields:has(#tax-state)[data-n="4"] .field > label { min-height: 2.6em; } }
.tool .fields + p, .tool .fields + .switch, .tool .switch + p, .tool .tablewrap + p, .tool .choice + p, .tool .group + p { margin-top: 1rem; }
.tool p.fine { margin-top: 0.8rem; }
.field input, .field select { width: 100%; min-width: 0; font: inherit; font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0; text-transform: none;
                              color: var(--ink); caret-color: var(--flag-ink); background: var(--card); border: 1.5px solid var(--ink); border-radius: 0; padding: 0.5rem 0.6rem; }
.field input[aria-invalid="true"] { border: 2px dashed var(--flag-ink); padding: calc(0.5rem - 0.5px) calc(0.6rem - 0.5px); }
.sec .field p { margin: 0; max-width: none; line-height: 1.35; }
.field .hint { font-size: 0.85rem; color: var(--ink-2); }
.field .hint .from { margin-right: 0.3rem; }
.field .share { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.field .share:empty { display: none; }
.field .err { font-size: 0.85rem; font-weight: 600; color: var(--flag-ink); }
.field .err:empty { display: none; }
.group { border: 0; margin: 1.4rem 0 0; padding: 0; min-width: 0; }
.group legend { padding: 0; margin: 0 0 0.1rem; font-size: 1rem; font-weight: 600; color: var(--ink); }
.group .fields { margin-top: 0.6rem; }
.sec .group p.group-hint { margin: 0.1rem 0 0; font-size: 0.85rem; color: var(--ink-2); }
.group + .group { margin-top: 1.6rem; }

/* radio choices and the two paths */
.choice { border: 0; margin: 1.6rem 0 0; padding: 0; min-width: 0; }
.choice legend, .path legend { padding: 0; margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; color: var(--ink); }
/* a legend on a bordered fieldset keeps a little room on each side, so the border never runs into its letters */
.take-src > legend, .path > legend { padding-inline: 0.4rem; margin-left: -0.4rem; }
.opt { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.3rem 0; max-width: var(--measure); line-height: 1.4; cursor: pointer; }
.opt input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--ink); transform: translateY(0.18rem); cursor: pointer; }
.opt .from { margin: 0 0 0 0.3rem; }
.opt .from::before { display: none; }
.opt-row { display: flex; align-items: baseline; gap: 0.2rem; }
.choice.inline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1.4rem; }
.choice.inline legend { float: left; margin: 0 0.4rem 0 0; padding-top: 0.15rem; }
.take-src { margin: 0 0 0.4rem; padding: 0.8rem 1rem 0.9rem; border: 1.5px solid var(--ink); background: var(--card); max-width: 34rem; }
.take-src .opt-field { margin-top: 0.5rem; }
.opt-field { max-width: 16rem; margin: 0.4rem 0 0 1.7rem; }
.paths { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.4rem; margin: 1.4rem 0 0; }
@container (min-width: 30rem) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.path { min-width: 0; margin: 0; padding: 0.9rem 1rem 1rem; border: 1.5px solid var(--ink); background: var(--card); }
.path .fields, .path .fields[data-n] { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; margin: 0; max-width: none; }
.path .field > label { flex: none; }

.switch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.9rem 0 0; }
.switch-k { margin-right: 0.3rem; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.switch button { font: inherit; font-size: 0.88rem; text-align: left;
                 color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); border-radius: 0; padding: 0.5rem 0.75rem; cursor: pointer; }
.switch button:hover { background: var(--paper-2); }
/* the second button and the markers for both figures wrap as one, so the markers never start a line of their own */
.sw-end { display: inline-flex; align-items: flex-start; }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- results: even rows, as many across as the column allows ---------- */
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem 1.6rem; margin: 1.4rem 0 0.8rem; padding: 1rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
@container (min-width: 20rem) { .results[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 32rem) { .results[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 44rem) { .results[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.results > div { min-width: 0; }
.results .k { display: block; font-size: 0.92rem; line-height: 1.3; color: var(--ink-2); }
.results strong { font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stale { margin: 1.2rem 0 0; padding: 0.55rem 0.75rem; background: var(--paper-2); font-size: 0.9rem; line-height: 1.45; color: var(--ink); }
.sec p.stale { max-width: var(--measure); margin-bottom: 0; }
.stale:not([hidden]) + .results strong, .stale:not([hidden]) + .tablewrap td { color: var(--ink-2); }

.formula { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); overflow-wrap: anywhere; }
.formula sup { font-size: 0.85em; line-height: 0; }
.math .formula { margin: 0.5rem 0 0; }

/* "Show the math": an entry for every result, its formula on the visitor's numbers, and the source of each published figure */
.mx { margin: 0.5rem 0 0; max-width: 48rem; }
.mx > div { padding: 0.6rem 0 0.65rem; border-bottom: 1px solid var(--rule); }
.mx > div:last-child { border-bottom: 0; }
.mx dt { font-size: 0.95rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.mx dd { margin: 0.15rem 0 0; min-width: 0; }
.sec .mx p { max-width: none; margin: 0.2rem 0 0; }
.mx .formula { font-size: 0.85rem; line-height: 1.5; color: var(--ink); font-variant-numeric: tabular-nums; }
.mx-src { font-size: 0.85rem; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.mx-src a { color: var(--flag-ink); text-decoration-thickness: 1px; }
.work + .mx { margin-top: 0.3rem; }

.work { margin: 1rem 0 0.6rem; padding: 0.55rem 0.9rem; max-width: 34rem; background: var(--paper-2); font-family: var(--mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.work > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.25rem 0; border-bottom: 1px solid var(--rule); }
.work > div:last-child { border-bottom: 0; }
.work dt { color: var(--ink-2); }
.work dd { margin: 0; white-space: nowrap; text-align: right; }
.work .total dt, .work .total dd { color: var(--ink); font-weight: 600; }

/* ---------- tables ---------- */
.tablewrap { position: relative; max-height: 26rem; overflow: auto; border: 1.5px solid var(--ink); background: var(--card); margin-top: 1rem; scrollbar-color: var(--ink-2) var(--paper-2); }
.tablewrap table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.tablewrap caption { text-align: left; padding: 0.6rem 0.8rem; color: var(--ink-2); font-family: var(--serif); font-size: 0.88rem; }
.tablewrap th, .tablewrap td { padding: 0.4rem 0.7rem; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tablewrap thead th { white-space: normal; vertical-align: bottom; }
.tablewrap thead th { position: sticky; top: 0; background: var(--card); font-weight: 600; }
.tablewrap .two-head thead th { position: static; }
.tablewrap thead th[scope="colgroup"] { text-align: center; border-bottom: 0; }
.tablewrap tbody th { text-align: left; font-weight: 400; }
.tablewrap thead th:first-child { text-align: left; }
.tablewrap tbody tr:nth-child(even) { background: var(--paper); }
.tablewrap .total th, .tablewrap .total td { font-weight: 600; border-top: 1.5px solid var(--ink); }
.tablewrap.wraps th, .tablewrap.wraps td { white-space: normal; text-align: left; vertical-align: top; }
.tablewrap.wraps td { min-width: 9rem; }

.numbers { margin: 1rem 0 1rem; }
.numbers summary { width: fit-content; padding: 0.35rem 0; cursor: pointer; font-size: 0.95rem; font-weight: 600; }
.numbers summary:hover { color: var(--flag-ink); }
.numbers summary::marker { color: var(--flag-ink); }
.numbers > p { margin-top: 0.5rem; }

/* ---------- steps 06 and 07: compact cards, the visitor's own numbers first and the rules behind a disclosure ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; margin: 1.2rem 0 0; }
@container (min-width: 34rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { min-width: 0; padding: 0.85rem 1rem 0.5rem; border: 1.5px solid var(--ink); background: var(--card); }
.tool .card h3, .card h4 { margin: 0 0 0.45rem; font-size: 1.08rem; line-height: 1.25; font-weight: 600; letter-spacing: 0; }
.sec .card p { font-size: 0.95rem; }
.sec .card p.mine { margin: 0 0 0.45rem; }
.card .numbers { margin: 0.35rem 0 0.25rem; }
.card .tablewrap { margin-top: 0.6rem; }
.figs { margin: 0 0 0.3rem; }
.figs > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.22rem 0; border-bottom: 1px solid var(--rule); }
.figs dt { font-size: 0.92rem; color: var(--ink-2); }
.figs dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.terms b, .card b { font-weight: 600; }

.quote { margin: 0.6rem 0 0; padding: 0 0 0 1.1rem; border-left: 1px solid var(--ink); max-width: var(--measure); color: var(--ink-2); font-style: italic; }
.sec .quote p { margin: 0; }

/* ---------- charts inside the steps ---------- */
.chart-box { margin: 1.2rem 0 0; padding: 0.9rem 0.9rem 0.7rem; border: 1.5px solid var(--ink); background: var(--card); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--mono); font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart .gl { stroke: var(--rule); stroke-width: 1; }
.chart .base { stroke: var(--ink); stroke-width: 1.5; }
.legend { list-style: none; margin: 0 0 0.7rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.3rem; font-size: 0.88rem; color: var(--ink); }
.legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend svg { flex: none; width: 34px; height: 12px; }
.ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: butt; }
.ln-1 { stroke: var(--ink); }
.ln-2 { stroke: var(--flag); stroke-dasharray: 10 5; }
.ln-3 { stroke: var(--ink-2); stroke-width: 3; stroke-dasharray: 0.5 5.5; stroke-linecap: round; }
.ln-4 { stroke: var(--flag-ink); stroke-dasharray: 14 4 3 4; }

/* the parts of a year of pay, in the drawing and its keys; every light part carries an outline, so it reads at 3:1 or more */
.seg-tax1 { fill: var(--ink); }
.seg-tax2 { fill: var(--ink-2); }
.seg-tax3 { fill: var(--card); stroke: var(--ink); stroke-width: 1; }
.seg-tax4 { fill: var(--rule); stroke: var(--ink-2); stroke-width: 1; }
.seg-k401 { fill: url(#pat-k401); stroke: var(--ink-2); stroke-width: 1; }
.seg-spend1 { fill: var(--rule); stroke: var(--ink-2); stroke-width: 1; }
.seg-spend2 { fill: var(--paper-2); stroke: var(--ink-2); stroke-width: 1; }
.seg-save { fill: var(--flag); }
.seg-left { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 4 3; }
/* a shortfall is a crosshatch with no ground of its own, so the bands it lies over still show through it */
.seg-short { fill: url(#pat-over); stroke: var(--ink); stroke-width: 1.5; }
.bar-edge { stroke: var(--ink); stroke-width: 2.5; }
.pic .gross-tick { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 3; }
.pat-bg { fill: var(--paper); }
.pat-k401-ln { stroke: var(--ink-2); stroke-width: 1.5; }
.pat-short-ln { stroke: var(--ink); stroke-width: 1.2; }
.pat-gap-dot { fill: var(--ink-2); }
.pat-fc-ln { stroke: var(--ink); stroke-width: 1.5; }
.pat-fc-dot { fill: var(--ink); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* the probe the drawing reads a reader's letter and word spacing from: set like the drawing's labels */
.defs text { font-family: var(--mono); font-size: 12px; fill: var(--ink-2); }

/* ---------- method, not covered, sources: after the walk, with its one-column header and no number ---------- */
.after .sec { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.after .sec > header h2 { margin: 0; }
.notes { margin: 0; padding-left: 1.1rem; max-width: var(--measure); }
.notes li { margin-bottom: 0.6rem; }
.notes li::marker { color: var(--flag-ink); }
.sources { margin: 1.2rem 0 0; padding-left: 1.6rem; max-width: var(--measure); }
.sources li { margin-bottom: 0.95rem; overflow-wrap: anywhere; }
.sources li::marker { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); }
.sources .for { display: block; font-size: 0.95rem; color: var(--ink-2); }
.sources .checked { display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--ink-2); }
.sources .host { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); }
.sources .note { display: block; font-size: 0.9rem; color: var(--ink-2); }

@media (max-width: 640px) {
  .tablewrap th, .tablewrap td { padding: 0.4rem 0.5rem; }
  .tablewrap tbody th { white-space: normal; min-width: 6.5rem; }
  .chart-box { padding: 0.7rem 0.6rem 0.6rem; }
  .pic-step, .pic-full-fig { padding: 0.7rem 0.6rem 0.6rem; }
  .opt-field { margin-left: 0; }
  .take-src { padding: 0.7rem 0.75rem 0.8rem; }
  .tablewrap .fin td { min-width: 0; }
  .tablewrap .fin tbody th { min-width: 6.5rem; }
}

/* Windows contrast themes: the charts and the drawing take system colors; dash patterns and hatching keep them apart */
@media (forced-colors: active) {
  .chart text, .pic text, .pic .st, .pic .lab, .pic .key-t { fill: CanvasText; }
  .chart .gl, .pic .gl { stroke: GrayText; }
  .chart .base, .ln-1, .ln-3, .pic .base, .pic .lead { stroke: CanvasText; }
  .ln-2, .ln-4 { stroke: Highlight; }
  .pic .rng-pos { fill: CanvasText; }
  /* the four taxes stay four: solid, a hatch, empty and dotted, each edged so neighbors never merge */
  .seg-tax1 { fill: CanvasText; stroke: Canvas; stroke-width: 1; }
  .seg-tax2 { fill: url(#pat-fc2); stroke: CanvasText; stroke-width: 1; }
  .seg-tax4 { fill: url(#pat-fc4); stroke: CanvasText; stroke-width: 1; }
  .pat-fc-ln { stroke: CanvasText; }
  .pat-fc-dot { fill: CanvasText; }
  .seg-tax3, .seg-spend1, .seg-spend2, .pic .seg-gross, .pic .lane, .pic .track { fill: Canvas; stroke: CanvasText; stroke-width: 1; }
  .pic .gross-tick { stroke: CanvasText; }
  .seg-save { fill: Highlight; }
  .seg-left, .pic .skipcol, .pic .lane-open { fill: Canvas; stroke: CanvasText; }
  .pic .ghost, .pic .gap-edge, .pic .sw.gap { stroke: CanvasText; }
  .pat-bg { fill: Canvas; }
  .pat-gap-dot { fill: CanvasText; }
  .pat-k401-ln, .pat-short-ln, .bar-edge, .pic .tgt, .pic .ceil, .pic .zero, .pic .rng-neg, .seg-k401, .seg-short { stroke: CanvasText; }
  .pic .here { fill: Highlight; }
  .pic .is-cur .st, .pic .em .lab { fill: Highlight; }
  .field input[aria-invalid="true"] { border-color: Highlight; }
  .switch button[aria-pressed="true"], .ex[aria-pressed="true"] { border-width: 3px; }
  .progress .is-current a, .progress .is-current a:hover { forced-color-adjust: none; background: Highlight; color: HighlightText; border-bottom-color: HighlightText; }
  .progress .is-current .pn::before, .next-k::before { background: CanvasText; forced-color-adjust: none; }
  .from::before { border-top-color: CanvasText; }
}

/* print: a one-page summary on US Letter. The title and the snapshot label, the visitor's numbers start to finish, whether
   they are held over or a made-up example's, what the walk doesn't cover, and the sources, compact; no text under 8 pt.
   Printing is the browser's own: the page sends nothing. */
@media print {
  @page { size: letter; margin: 0.35in 0.5in; }
  html { scroll-padding-top: 0; }
  body { font-size: 9pt; line-height: 1.3; }
  .wrap { width: auto; }
  .masthead, footer, .progress, .side, .walk-main, .noscript, .intro .label, .glance, .go, #finish .sec > header, .finish-lead, .finish-acts,
  .pic-full-fig, #pic-numbers, #trail-full-h, .trail-d, .trail.full, #finish h3, .onward, #method, .src-intro, .sources .for, .sources .note, a.src { display: none !important; }
  .print-only { display: block; }
  section { padding: 0 !important; }
  .intro, .intro.sub { padding: 0 0 0.05in; }
  .intro h1, .intro.sub h1 { font-size: 18pt; line-height: 1.05; margin: 0 0 0.04in; }
  .intro .summary, .intro.sub .summary { font-size: 9pt; line-height: 1.3; max-width: none; margin: 0; }
  .snapshot, .intro .snapshot { margin: 0.07in 0 0; padding: 1pt 4pt; font-size: 8.5pt; border-color: var(--ink); background: none; }
  .tool, .tool.wide { max-width: none; container-type: normal; }
  .sec p.fine.print-only { max-width: none; margin: 0.04in 0 0.03in; font-size: 8pt; line-height: 1.3; }
  .sec p#print-ex { font-weight: 600; color: var(--ink); }
  .tablewrap.fin-wrap { max-height: none; overflow: visible; margin: 0; border: 0; background: none; }
  .tablewrap .fin caption { padding: 0 0 2pt; font-family: var(--serif); font-size: 11pt; font-weight: 600; color: var(--ink); }
  .tablewrap .fin thead { display: none; }
  .tablewrap .fin th, .tablewrap .fin td { padding: 2pt 5pt 2pt 0; border-bottom: 0.5pt solid var(--rule); font-size: 8pt; line-height: 1.28; }
  .tablewrap .fin tbody th { width: 1.9in; min-width: 0; padding-right: 10pt; white-space: nowrap; font-family: var(--mono); font-size: 8pt; }
  .tablewrap .fin tbody tr:nth-child(even) { background: none; }
  .tablewrap .fin a { color: inherit; text-decoration: none; }
  #not-covered, #sources { margin-top: 0.09in !important; }
  .sec > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2pt 8pt; margin: 0 0 3pt; }
  .sec > header .label, .after .sec > header h2 { font-size: 8pt; letter-spacing: 0.1em; color: var(--ink); }
  .after .sec > header h2 { font-family: var(--mono); font-weight: 600; line-height: 1.3; text-transform: uppercase; max-width: none; }
  .sec > header .snapshot { margin: 0; padding: 0 3pt; font-size: 8pt; }
  .notes { max-width: none; margin: 0; padding-left: 0.16in; columns: 2; column-gap: 0.3in; font-size: 8pt; line-height: 1.28; }
  .notes li { margin: 0 0 1.5pt; }
  .sources { max-width: none; margin: 0; padding-left: 0.3in; columns: 2; column-gap: 0.3in; font-size: 8pt; line-height: 1.2; }
  .sources li { margin: 0 0 2pt; }
  .sources li::marker { font-size: 8pt; }
  .sources a { text-decoration: none; }
  .sources .host { font-size: 8pt; }
  .sources .checked { display: inline; font-size: 8pt; letter-spacing: 0; }
  .sources .checked.snap { display: none; }
  .sec p.fine.src-note { max-width: none; margin: 0 0 2pt; font-size: 8pt; line-height: 1.3; }
  .tablewrap .fin tr, .notes li, .sources li { break-inside: avoid; }
}
