/*
    Investments, neutral selections and chart colors (2026-11-18). Loaded after every investments-*.css sheet.

    - Selected buttons and chips across the area (chart toolbars Inspect / Measure / Points / High-low / Log / Pins,
      benchmark and holding chips, Growth sources Month / 90 days / YTD, return-calendar toggles, retirement view bar
      and presets, rule pills and presets, dividend months): no 1px colored ring and no green label. The label stays
      the theme's ink (dark text in light, white in dark); the selection is the site's neutral lift (toolbars) or a
      slight neutral gradient (chips). Toolbar tracks are the shared recess, like every segmented menu.
    - Charts: no violet. The 200-day average, the cumulative return line and its tags, the average guide, the
      retirement median swatch, the "outside" bucket, the capital-gain / bought columns and palette slot 3 are slate.
      Series colors that carry meaning (gain green, loss red, benchmark blue, 50-day amber) are unchanged.
*/

:root {
    --iv-sel: linear-gradient(180deg, rgba(11, 15, 25, .075) 0%, rgba(11, 15, 25, .04) 100%);
    --iv-chart-ink: #475569;
    --iv-capgain: #64748B;
    --iv-slice-3: #475569;
    --iva-kind-buy: #64748B;
    --scx-sma200: #475569;
}

[data-bs-theme="dark"] {
    --iv-sel: linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .07) 100%);
    --iv-chart-ink: #CBD5E1;
    --iv-capgain: #94A3B8;
    --iv-slice-3: #CBD5E1;
    --iva-kind-buy: #94A3B8;
    --scx-sma200: #CBD5E1;
}

/* The chart sheets set these inside their own scopes; restate them there so the slate wins. */
.scx { --scx-sma200: var(--iv-chart-ink); }
.iva, .iva-page { --iva-kind-buy: var(--iv-capgain); }
.rp, .rp-page { --rp-bucket-outside: var(--iv-chart-ink); }

/* ------------------------------------------------------------------ Chart toolbars (security chart, series charts) */

.scx-seg,
.scx-group {
    border-color: transparent;
    background: var(--tx-seg-recess);
}

.scx-seg-glider {
    background: var(--tx-seg-pill);
    box-shadow: 0 2px 8px var(--tx-seg-pill-shadow);
}

.scx-seg-btn.is-on,
.scx-seg-btn.is-on .fa-solid {
    color: var(--iv-text);
}

.scx-btn.is-on {
    color: var(--iv-text);
    background: var(--tx-seg-pill);
    box-shadow: 0 2px 8px var(--tx-seg-pill-shadow);
}

/* Return calendar toggles and year buttons */
.rcx-seg {
    border-color: transparent;
    background: var(--tx-seg-recess);
}

.rcx-seg-btn.is-on {
    background: var(--tx-seg-pill);
    color: var(--iv-text);
    box-shadow: 0 2px 8px var(--tx-seg-pill-shadow);
}

.rcx-yb.is-on {
    border-color: var(--iv-tile-border);
    background: var(--iv-sel);
    color: var(--iv-text);
    box-shadow: none;
}

.rcx .rcx-year.is-selected,
.rcx .rcx-col.is-selected {
    color: var(--iv-text);
    text-decoration: none;
}

.rcx .rcx-total.is-selected,
.rcx .rcx-avg.is-selected {
    background: var(--iv-sel);
}

/* ------------------------------------------------------------------ Chips, presets, picks */

.iv-chip.is-selected,
.iv-chip[aria-pressed="true"],
.iv-chip[aria-checked="true"],
.rp-preset.is-selected,
.ivr-pill.is-selected,
.ivr-preset.is-selected {
    border-color: transparent;
    background: var(--iv-sel);
    color: var(--iv-text);
}

.rp-viewbar-btn.is-on {
    color: var(--iv-text);
}

.ivd-month.is-selected {
    border-color: var(--iv-tile-border);
    background: var(--iv-sel), var(--ivd-month);
}

.ivd-month.is-selected .ivd-month-name {
    color: var(--iv-text);
}

/* ------------------------------------------------------------------ Chart lines and labels that were violet */

.rcx-cum { stroke: var(--iv-chart-ink); }
.rcx-cum-dot { stroke: var(--iv-chart-ink); }
.rcx-cum-tag,
.rcx-legend-cum { fill: var(--iv-chart-ink); }
.rcx-avg-line { stroke: var(--iv-chart-ink); }
.ivs-overlay-sma200 { background: var(--iv-chart-ink); }
.rp-swatch-median { background: var(--iv-chart-ink); }
.ivp-compare-legend .is-benchmark { background: var(--iv-neutral-soft); }

/* Chart layer chips (Portfolio value / Cost basis / Trend / benchmark): shown layers sit on the neutral gradient with no
   colored ring; the short key in front still carries the line's color. Hidden layers keep their dashed outline. */
.scx-layer.is-on {
    border-color: transparent;
    background: var(--iv-sel);
}

.scx-layer.is-on:hover {
    background: var(--iv-sel), var(--tx-seg-hover);
}

/* ------------------------------------------------------------------ Chart bubbles (2026-11-19)
   The bubble surface itself (solid card in the chart's own color, hairline, inset, shadow) lives in charts-neutral.css
   for every chart on the site. Here: what sits inside the Investments and net worth bubbles. Gain and loss show only in
   the icons and the numbers (badge glyph, big figure, chip text, tile icons, footer figures, button glyphs); chips,
   buttons and trade pills sit on the neutral icon pill with no 1px ring. */

/* Header badge: neutral pill, the glyph carries the tone. */
.scx-isl-badge,
.rcx-badge {
    box-shadow: none;
}

/* Change chips: neutral pill, toned text and glyph. */
.scx-chip,
.rcx-fig-chip,
.rcx-fig-chip.tone-up,
.rcx-fig-chip.tone-down,
.rcx-chip {
    background: var(--ci-icon-pill);
}

/* Bubble buttons (Zoom in, Pin, Open day, the drill's step arrows): neutral pill, ink label, toned glyph, no ring. */
.scx-isl-btn,
.scx-isl-btn.is-quiet {
    border-color: transparent;
    background: var(--ci-icon-pill);
    color: var(--iv-text);
}

.scx-isl-btn .fa-solid { color: var(--scx-tone); }
.scx-isl-btn.is-quiet,
.scx-isl-btn.is-quiet .fa-solid { color: var(--iv-muted); }

.scx-isl-btn:hover:not(:disabled),
.scx-isl-btn.is-quiet:hover {
    background: var(--iv-sel), var(--ci-icon-pill);
    color: var(--iv-text);
}

.rcx-btn,
.rcx-btn.is-quiet {
    border-color: transparent;
    background: var(--ci-icon-pill);
}

.rcx-btn.is-quiet { color: var(--iv-muted); }

.rcx-btn:hover:not(:disabled) {
    background: var(--iv-sel), var(--ci-icon-pill);
}

.rcx-btn.is-quiet:hover { color: var(--iv-text); }

/* The drill's jumps lift on the neutral gradient; the glyph keeps the tone. */
.rcx-jump { border-color: transparent; background: var(--ci-icon-pill); }

.rcx-jump:hover {
    border-color: transparent;
    background: var(--iv-sel), var(--ci-icon-pill);
    color: var(--iv-text);
}

.rcx-link { color: var(--iv-text); text-decoration: none; }
.rcx-link:hover { color: var(--rcx-tone); }

/* Trades on the day and the underwater "why" line: neutral, the glyph carries buy / sell or the tone. */
.scx-trade.is-buy,
.scx-trade.is-sell {
    background: var(--ci-icon-pill);
    color: var(--iv-text);
}

.scx-trade.is-buy .fa-solid { color: var(--scx-up); }
.scx-trade.is-sell .fa-solid { color: var(--scx-down); }

.scx-isl-why {
    border-color: transparent;
    background: var(--scx-tile);
}

/* ------------------------------------------------------------------ Range bars (2026-11-19)
   The range pickers on every Investments page (Performance period, Securities range, the security chart's groups,
   the Retirement spend toggle): no green. The track is the shared segmented recess, a step darker than the card it
   sits on, and the chosen range rides the same clean neutral lift as every other segmented menu, so the bar reads as
   part of the page. The Overview hero's minimal chip row keeps its own look (investments-area.css). */
:root {
    --iv-range-bg: var(--tx-seg-recess);
    --iv-range-pill: var(--tx-seg-pill);
}

[data-bs-theme="dark"] {
    --iv-range-bg: var(--tx-seg-recess);
    --iv-range-pill: var(--tx-seg-pill);
}

.iv-range:not(.iv-range-hero) .iv-range-pill {
    opacity: 1;
    box-shadow: 0 2px 8px var(--tx-seg-pill-shadow);
}

.iv-range:not(.iv-range-hero) .iv-range-chip { transition: color .15s ease; }
.iv-range:not(.iv-range-hero) .iv-range-chip:hover:not(:disabled):not(.is-selected) { color: var(--iv-text); }
.rp-spend-seg-btn[aria-checked="true"] { box-shadow: 0 2px 8px var(--tx-seg-pill-shadow); }

/* The top section on Performance (the period bar) and Securities (the chart controls): no 1px border, the card's
   surface alone sets it apart. */
.ivp-toolbar,
.rc-card.ivs-controls,
[data-bs-theme="dark"] .rc-card.ivs-controls {
    border-color: transparent;
}
