/* Compound Interest Calculator: the shared finance panel, plus the balance chart.
   Series colours come from the shared panel (--fin-s1…3); everything else uses theme tokens. */
@import url('/src/utils/financeCalculator.css');
.cic [hidden] { display: none !important; }
.cic .cic-currency { display: flex; align-items: center; gap: .5rem; margin-left: auto; font-weight: 600; }
.cic .cic-currency select { width: auto; min-width: 9rem; }

.cic-chart { margin: 1rem 0 0; padding: .75rem .75rem .5rem; background: var(--bg-2); border: 1.5px solid var(--border-soft); border-radius: 6px; }
.cic-chart figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .4rem; }
.cic-chart-title { font-weight: 700; }
.cic-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: var(--ink-soft); }
.cic-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.cic-key { display: inline-block; flex: none; width: 14px; height: 0; border-top: 2px solid currentColor; border-radius: 2px; }
.cic-key.cic-s1 { color: var(--fin-s1); }
.cic-key.cic-s2 { color: var(--fin-s2); }
.cic-key.cic-s3 { color: var(--fin-s3); }

.cic-plot { position: relative; }
.cic-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.cic-svg:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.cic-grid line { stroke: var(--border-faint); stroke-width: 1; }
.cic-grid .cic-axis { stroke: var(--border-soft); }
.cic-svg text { font: 500 11px var(--font-mono); fill: var(--ink-soft); }
.cic-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cic-line.cic-s1 { stroke: var(--fin-s1); }
.cic-line.cic-s2 { stroke: var(--fin-s2); }
.cic-line.cic-s3 { stroke: var(--fin-s3); }
.cic-labels text { fill: var(--ink); font-weight: 600; }
.cic-leader { fill: none; stroke: var(--border-soft); stroke-width: 1; }
.cic-cross line { stroke: var(--ink-soft); stroke-width: 1; }
.cic-dot { stroke: var(--bg-2); stroke-width: 2; }
.cic-dot.cic-s1 { fill: var(--fin-s1); }
.cic-dot.cic-s2 { fill: var(--fin-s2); }
.cic-dot.cic-s3 { fill: var(--fin-s3); }
.cic-hit { fill: transparent; cursor: crosshair; }

.cic-tip { position: absolute; z-index: 2; min-width: 11rem; padding: .5rem .65rem; pointer-events: none; background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 6px; box-shadow: 3px 3px 0 var(--shade); }
.cic-tip p { display: flex; align-items: center; gap: .45rem; margin: .15rem 0 0; font-size: .82rem; color: var(--ink-soft); }
.cic-tip .cic-tip-title { margin: 0 0 .2rem; font-weight: 700; color: var(--ink); }
.cic-tip strong { font: 700 .9rem var(--font-mono); color: var(--ink); }

@media (max-width: 560px) {
  .cic .cic-currency { margin-left: 0; width: 100%; }
  .cic .cic-currency select { flex: 1; }
  .cic-svg text { font-size: 13px; }
}

/* Space the page holds for this view until it mounts (see .tool-view-placeholder in _workspace.css).
   Each height is a little under the space the view takes at that width, measured as how far the
   content below moves when the view replaces the placeholder, so nothing below it moves. Re-measure
   after changing the view's layout: node scripts/measure-tool-views.js --apply compound-interest-calculator. */
.tool-view-placeholder[data-tool="compound-interest-calculator"] { min-height: 2326px; }
@media (max-width: 604px) { .tool-view-placeholder[data-tool="compound-interest-calculator"] { min-height: 2724px; } }
@media (max-width: 432px) { .tool-view-placeholder[data-tool="compound-interest-calculator"] { min-height: 3722px; } }
