/* 4% rule calculator: page-only styles on top of the shared style.css. */
.swr-big { color: var(--gold); }
.swr-gold { color: var(--gold); }
.swr-rust { color: var(--rust); }
.swr-chip-ok { border-color: var(--gold); border-top-width: 1.6px; }
.swr-chip-out { border-color: var(--rust); }
.swr-chip-unf { border-color: var(--muted); border-top-style: dashed; border-top-width: 1.6px; }
.swr-chip-line { border-color: var(--ink); border-top-style: dashed; border-top-width: 1.5px; }
.swr-sq-ok { background: var(--gold-area); opacity: 0.7; }
.swr-sq-out { background: var(--rust); }
.legend-static .swr-short { display: none; }
@media (max-width: 600px) { .legend-static .swr-long { display: none; } .legend-static .swr-short { display: inline; } }
.swr-custom { width: 5.4rem; }

/* main chart: one line per start year */
.swr-lines svg { cursor: pointer; touch-action: pan-y; }
.swr-lines .swr-l { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.swr-lines .swr-ok { stroke: var(--gold); stroke-width: 1; stroke-opacity: 0.28; }
.swr-lines .swr-unf { stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.55; stroke-dasharray: 3 3; }
.swr-lines .swr-out { stroke: var(--rust); stroke-width: 1.5; stroke-opacity: 0.9; }
.swr-lines .swr-zero { fill: var(--rust); }
.swr-lines .swr-start { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.45; }
.swr-lines .swr-start-t, .swr-lines .swr-cut { fill: var(--muted); font-size: 11px; stroke: var(--paper); stroke-width: 3px; paint-order: stroke; stroke-linejoin: round; }
.swr-lines .swr-pick, .swr-lines .swr-hover { fill: none; stroke-width: 2.6; stroke-opacity: 1; stroke-dasharray: none; stroke-linejoin: round; stroke-linecap: round; }
.swr-lines .swr-hover { stroke-width: 2; }
.swr-lines .swr-pick.swr-ok, .swr-lines .swr-hover.swr-ok { stroke: var(--gold); }
.swr-lines .swr-pick.swr-unf, .swr-lines .swr-hover.swr-unf { stroke: var(--ink); stroke-opacity: 0.8; }
.chart-box .swr-pick-dot { stroke: var(--paper); stroke-width: 2; fill: var(--gold); }
.chart-box .swr-pick-dot.swr-out { fill: var(--rust); }
.chart-box .swr-pick-dot.swr-unf { fill: var(--ink); }
.swr-lines .swr-pick-t { font-size: 12.5px; font-weight: 700; fill: var(--gold); stroke: var(--paper); stroke-width: 3.5px; paint-order: stroke; stroke-linejoin: round; }
.swr-lines .swr-pick-t.swr-out { fill: var(--rust); }
.swr-lines .swr-pick-t.swr-unf { fill: var(--ink); }
.swr-lines .swr-hd-out { fill: var(--rust); }
.tip .t-event.swr-t-unf { color: var(--muted); }

/* by start year */
#by-year { padding-top: 56px; }
.swr-year-head { margin-bottom: 10px; }
.swr-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swr-pick select { width: auto; padding: 6px 28px 6px 10px; font-size: 0.9rem; }
.swr-jumps { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.swr-jumps .preset { padding: 6px 10px; }
#pick-msg b { color: var(--ink); }
#pick-msg b.swr-r { color: var(--rust); }
.swr-bars svg { cursor: pointer; touch-action: pan-y; }
.swr-bars .swr-bar-ok { fill: var(--gold-area); fill-opacity: 0.7; }
.swr-bars .swr-bar-out { fill: var(--rust); }
.swr-bars .swr-rate { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.swr-bars .swr-pick-line { stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.5; }

/* while inputs are invalid, the old result stays but fades */
.swr-invalid .stage, .swr-invalid #by-year { opacity: 0.4; transition: opacity 0.2s; }

/* four numbers in one row, two by two on phones */
.stats.swr-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .stats.swr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .answer .label.swr-label { display: block; flex-basis: 100%; } }
.swr-lines .swr-start-bg { fill: var(--paper); fill-opacity: 0.92; }
/* middle 80% of finished retirements and their median */
.swr-lines .swr-band { fill: var(--gold-soft); fill-opacity: 0.8; stroke: none; }
.swr-lines .swr-med { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-dasharray: 6 4; stroke-opacity: 0.8; }
.chip.swr-sq-band { height: 10px; border: 0; border-radius: 2px; background: var(--gold-soft); }
