/* tdx-xy-chart.css: the take-home calculator's chart (assets/tdx-xy-chart.js). Loaded only by
   tax-calculator.html. Every colour is a --txy-* token: light on :root, dark under html[data-theme="dark"],
   which tdx-theme.js also sets from the OS preference. (It removes the attribute for a saved light choice,
   so an OS-preference media block here could not tell that choice from no choice, and would override it.)
   The series hues keep their identity in both themes and were checked for colour-vision-deficiency
   separation and 3:1 contrast on white, cream, #1a2521 and #0f1714; text tokens are 4.5:1 or more.
   tests/tdx-xy-chart.test.js keeps LIGHT and PAINT in the JS equal to this file. */
:root{--txy-s1:#16784a;--txy-s2:#3466b0;--txy-s3:#a8701a;--txy-s4:#8e4bb0;--txy-ink:#1c1c1c;--txy-muted:#5c574d;--txy-grid:#e7e2d8;--txy-zero:#8a8270;--txy-mark:#8a8270;--txy-cliff:#b03030;--txy-ref:#5c574d;--txy-you:#1c1c1c;--txy-halo:#ffffff}
html[data-theme="dark"]{--txy-s1:#3fa874;--txy-s2:#5b8fd6;--txy-s3:#c08626;--txy-s4:#b07ad6;--txy-ink:#e9e1cb;--txy-muted:#b8b09a;--txy-grid:#2b3833;--txy-zero:#8f8775;--txy-mark:#8f8775;--txy-cliff:#f07b6e;--txy-ref:#b8b09a;--txy-you:#e9e1cb;--txy-halo:#1a2521}

.txy{position:relative;font-size:.875rem;line-height:1.45}
.txy [hidden]{display:none!important}
.txy-legend{display:flex;flex-wrap:wrap;gap:4px 18px;margin:0 0 6px;padding:0;list-style:none}
.txy-legend li{display:flex;align-items:center;gap:8px;margin:0;padding:0;color:inherit}
.txy-sw{display:inline-block;width:26px;border-top:3px solid var(--txy-s1)}
.txy-sw2{border-top-color:var(--txy-s2)}
.txy-sw3{border-top-color:var(--txy-s3)}
.txy-sw4{border-top-color:var(--txy-s4)}
.txy-swd{border-top-style:dashed}
/* The readout strip sits above the plot so a finger never covers it; its height is reserved. */
.txy-readout{min-height:4.4em;margin:0 0 6px;padding:2px 0 2px 10px;border-left:3px solid var(--txy-mark);font-variant-numeric:tabular-nums}
.txy-readout b,.txy-readout span{display:block}
.txy-plot{position:relative;width:100%;aspect-ratio:16/10;touch-action:pan-y;cursor:crosshair;-webkit-user-select:none;user-select:none}
@media (max-width:600px){.txy-plot{aspect-ratio:4/3}}
.txy-plot>svg{display:block;width:100%;height:100%;overflow:visible;forced-color-adjust:none}

/* PAINT: the PNG embeds these rules with the light values (keep them one selector per rule). */
.txy-svg text{fill:var(--txy-muted)}
.txy-svg .txy-ink{fill:var(--txy-ink)}
.txy-halo{stroke:var(--txy-halo)}
.txy-grid line{stroke:var(--txy-grid)}
.txy-grid .txy-zero{stroke:var(--txy-zero)}
.txy-s1{stroke:var(--txy-s1)}
.txy-s2{stroke:var(--txy-s2)}
.txy-s3{stroke:var(--txy-s3)}
.txy-s4{stroke:var(--txy-s4)}
.txy-mk-mark{stroke:var(--txy-mark)}
.txy-mk-cliff{stroke:var(--txy-cliff)}
.txy-mk-ref{stroke:var(--txy-ref)}
.txy-badge circle{fill:var(--txy-halo)}
.txy-you circle{fill:var(--txy-you);stroke:var(--txy-halo)}
/* Page only: crosshair and its dots. */
.txy-cross{stroke:var(--txy-muted);stroke-width:1}
.txy-dot{stroke:var(--txy-halo);stroke-width:2}
.txy-f1{fill:var(--txy-s1)}
.txy-f2{fill:var(--txy-s2)}
.txy-f3{fill:var(--txy-s3)}
.txy-f4{fill:var(--txy-s4)}

.txy-key{display:flex;flex-wrap:wrap;gap:4px 16px;margin:6px 0 0;padding:0;list-style:none;font-size:.8125rem}
.txy-key li{display:flex;align-items:center;gap:6px;margin:0;padding:0}
/* With labels on the plot (wide screens) the key lists the same markers in words, without badge numbers. */
.txy-kl .txy-n{display:none}
.txy-n{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border:1px solid var(--txy-mark);border-radius:50%;font-size:.6875rem;font-weight:700;line-height:1}
.txy-explore{margin-top:8px}
.txy-explore label{display:block;margin:0 0 2px;font-size:.8125rem;font-weight:700}
.txy-explore input{display:block;max-width:100%;height:28px;margin:0;accent-color:var(--txy-s1);cursor:pointer}
.txy-tbtn{margin-top:8px;min-height:36px;padding:6px 14px;font:inherit;font-weight:700;color:inherit;background:transparent;border:1px solid var(--txy-mark);border-radius:4px;cursor:pointer}
.txy-tbtn:focus-visible,.txy-explore input:focus-visible,.txy-twrap:focus-visible{outline:3px solid var(--txy-s2);outline-offset:2px}
.txy-twrap{margin-top:8px;overflow-x:auto}
.txy-twrap table{width:100%;font-variant-numeric:tabular-nums}
.txy-twrap caption{padding:0 0 4px;text-align:left;font-weight:700}
.txy-twrap .num{text-align:right}
.txy-twrap .txy-yrow>*{font-weight:700;box-shadow:inset 0 -2px 0 var(--txy-s1)}
.txy-sr{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}

@media (pointer:coarse),(max-width:767px){.txy-explore input{height:44px}.txy-tbtn{min-height:44px}}
@media (prefers-reduced-motion:reduce){.txy *{transition:none!important;animation:none!important}}
/* Windows high contrast: system colours, and dash patterns so series never rely on colour. */
@media (forced-colors:active){
  .txy-svg text,.txy-svg .txy-ink{fill:CanvasText}
  .txy-halo,.txy-dot,.txy-you circle,.txy-badge circle{stroke:Canvas}
  .txy-badge circle{fill:Canvas}
  .txy-grid line{stroke:CanvasText;stroke-opacity:.3}
  .txy-line,.txy-grid .txy-zero,.txy-mk{stroke:CanvasText;stroke-opacity:1}
  .txy-badge circle{stroke:CanvasText}
  .txy-line.txy-s2{stroke-dasharray:9 4}
  .txy-line.txy-s3{stroke-dasharray:2 4}
  .txy-line.txy-s4{stroke-dasharray:12 4 3 4}
  .txy-you circle,.txy-dot{fill:Highlight}
  .txy-cross{stroke:Highlight}
  .txy-sw{border-top-color:CanvasText}
  .txy-sw2{border-top-style:dashed}
  .txy-sw3{border-top-style:dotted}
  .txy-sw4{border-top-style:double}
}
@media print{.txy-explore,.txy-tbtn,.txy-hover{display:none}.txy-readout{border-left-color:#000}}
