/* Pensioen: rules beyond src/ui/style.css (SPEC §6.9a). */

/*
 * The comparison's lines, one colour each by their place, in the table's swatches and the charts
 * alike. Validated as a categorical palette (dataviz validator, 2026-10-21) on light and dark;
 * three light ones sit below 3:1 against the surface, which the table beside the charts relieves.
 */
:root {
  --p1: #2a78d6; --p2: #eb6834; --p3: #1baf7a; --p4: #eda100; --p5: #e87ba4; --p6: #6250d6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --p1: #3987e5; --p2: #d95926; --p3: #199e70; --p4: #c98500; --p5: #d55181; --p6: #9085e9;
  }
}
:root[data-theme="dark"] {
  --p1: #3987e5; --p2: #d95926; --p3: #199e70; --p4: #c98500; --p5: #d55181; --p6: #9085e9;
}
.chart .ln.p1 { stroke: var(--p1); } .sw.p1 { background: var(--p1); }
.chart .ln.p2 { stroke: var(--p2); } .sw.p2 { background: var(--p2); }
.chart .ln.p3 { stroke: var(--p3); } .sw.p3 { background: var(--p3); }
.chart .ln.p4 { stroke: var(--p4); } .sw.p4 { background: var(--p4); }
.chart .ln.p5 { stroke: var(--p5); } .sw.p5 { background: var(--p5); }
.chart .ln.p6 { stroke: var(--p6); } .sw.p6 { background: var(--p6); }

.pensions .intro { margin: 0 0 4px; }

/* the comparison table: the year column stays in view while the table scrolls sideways */
.pension-compare th, .pension-compare td { padding-left: 10px; }
.pension-compare th:first-child, .pension-compare td:first-child { padding-left: 0; }
.pension-compare th:first-child, .pension-compare td.yr {
  position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: nowrap;
}
.pension-compare th { vertical-align: bottom; }
.pension-compare th .nm { color: var(--fg); white-space: normal; }
/* on a phone a line's name wraps, so more of the lines fit beside the year */
body.phone .pension-compare th.num { min-width: 64px; white-space: normal; }
.pension-compare th .kind { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.pension-compare td.num { font-variant-numeric: tabular-nums; }
.pension-compare td.infl, .pension-compare th.infl { color: var(--muted); }
.pension-compare .mark { color: var(--muted); margin-left: 1px; }
.pension-compare .thru { font-size: 11.5px; color: var(--faint); }
/* the combined rows: the same height as a year's, set apart by a rule only */
.pension-compare tbody.periods tr:first-child td { border-top: 2px solid var(--rule-strong); }
.pension-compare tbody.periods td.yr { color: var(--muted); }
.pension-compare tr.running td.yr { color: var(--muted); }
.pension-compare .rowopen, .pension-years .rowopen { position: static; white-space: normal; }

.pension-year .pr span { min-width: 0; }
.pension-year .pr .sw { vertical-align: 0; }
.pension-year .pr.infl { background: var(--panel); }

.chart-key { margin-top: 2px; }
.pensions .note.published a { color: var(--accent); }

/* a pension */
.card.pension { margin-bottom: 14px; }
.pension-name h3 { margin: 0; font-size: 16px; }
.pension .herorow .sub.small { margin: 2px 0 6px; }
.pension .fresh .doclink { display: inline-flex; }
.pension .kv { margin-top: 8px; }
.pension-years { margin-top: 8px; }
.pension-years td.doc-cell, .pension-years th:last-child { white-space: nowrap; padding-left: 18px; }
/* an opened year stays as wide as the phone's card, while the table scrolls sideways under it */
body.phone .pension-years td.rowopen > div { position: sticky; left: 0; max-width: calc(100vw - 84px); }
.pension-person .note.apart { margin-top: 0; }
