/*
    The section heroes on the Dashboard hero's recipe (hx-): Accounts and Liabilities. One panel in the area's hue with soft
    radial light from the top-left; the figure floats over the quiet top of a chart that reads any day (hs-, the canvas in
    js/hero-scrub.js); the range and the legend sit under it; an optional glass pane sits blended on the right (the
    Accounts period summary, as Bills before payday on the Dashboard); the figures run underneath, as on the Investments
    hero. Dark mode follows the site's data-bs-theme="dark" on <html>. The Investments hero keeps its own layout and only
    takes the chart (hs-investments, below).

    The chart fills the stage to near its top (--hs-top on .hx .hsc) and drops below the reading's island while a day is
    read (js/hero-scrub.js "room", the Dashboard pulse chart's drop). The Reports Overview hero (hx-reports) floats the
    month's pace as a see-through glass pane over the chart's right end (.hx-float); it fades while a day is read. The
    skeletons (hx-skeleton, Components/Pages/Admin/Charts/HeroSectionSkeleton.razor) are the same panel in bones.
*/

/* ------------------------------------------------------------------ Tokens */
.hx {
    --hx-hue: #0D9488;
    --hx-hue-soft: #CCFBF1;
    --hx-glow-1: rgba(13, 148, 136, .14);
    --hx-glow-2: rgba(45, 212, 191, .10);
    --hx-base: linear-gradient(180deg, #FFFFFF 0%, #F9FDFC 100%);
    --hx-border: #CBE9E5;
    --hx-line-soft: rgba(13, 148, 136, .14);
    --hx-ink: #0B0F19;
    --hx-ink-2: #3F4459;
    --hx-muted: #6A6F86;
    --hx-pos: #15803D;
    --hx-neg: #DC2626;
    --hx-caution: #B45309;
    --hx-glass: rgba(255, 255, 255, .74);
    --hx-glass-line: rgba(13, 148, 136, .16);
    --hx-tile: rgba(255, 255, 255, .78);
    --hx-tile-line: rgba(15, 23, 42, .07);
    --hx-range-bg: rgba(13, 148, 136, .07);
    --hx-range-on: #FFFFFF;
    --hx-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(13, 80, 74, .28);
    --hx-font: var(--ci-font);
    --hx-display: var(--ci-font);
}

[data-bs-theme="dark"] .hx {
    --hx-hue: #2DD4BF;
    --hx-hue-soft: #163A3B;
    --hx-glow-1: rgba(45, 212, 191, .17);
    --hx-glow-2: rgba(76, 195, 138, .10);
    --hx-base: linear-gradient(180deg, #0F1D22 0%, #0C1317 100%);
    --hx-border: rgba(45, 212, 191, .16);
    --hx-line-soft: rgba(45, 212, 191, .12);
    --hx-ink: #E6E8F2;
    --hx-ink-2: #C3C7D8;
    --hx-muted: #9BA1B8;
    --hx-pos: #4ADE80;
    --hx-neg: #F87171;
    --hx-caution: #FBBF24;
    --hx-glass: rgba(255, 255, 255, .04);
    --hx-glass-line: rgba(255, 255, 255, .08);
    --hx-tile: rgba(255, 255, 255, .035);
    --hx-tile-line: rgba(255, 255, 255, .07);
    --hx-range-bg: rgba(255, 255, 255, .05);
    --hx-range-on: rgba(255, 255, 255, .1);
    --hx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -24px rgba(0, 0, 0, .7);
}

/* The Accounts hero's "up" (the change, the assets dot, the period tiles) in its own aqua. */
.hx.hx-accounts { --hx-pos: #0D9488; }
[data-bs-theme="dark"] .hx.hx-accounts { --hx-pos: #2DD4BF; }

.hx.hx-liabilities {
    --hx-hue: #E11D48;
    --hx-hue-soft: #FFE4E8;
    --hx-glow-1: rgba(225, 29, 72, .11);
    --hx-glow-2: rgba(248, 113, 113, .10);
    --hx-base: linear-gradient(180deg, #FFFFFF 0%, #FFFAFB 100%);
    --hx-border: #F3D2DA;
    --hx-line-soft: rgba(225, 29, 72, .12);
    --hx-glass-line: rgba(225, 29, 72, .14);
    --hx-range-bg: rgba(225, 29, 72, .06);
    --hx-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(120, 20, 45, .26);
}

[data-bs-theme="dark"] .hx.hx-liabilities {
    --hx-hue: #FB7185;
    --hx-hue-soft: #3A1F27;
    --hx-glow-1: rgba(251, 113, 133, .16);
    --hx-glow-2: rgba(148, 163, 184, .06);
    --hx-base: linear-gradient(180deg, #1C141D 0%, #110F16 100%);
    --hx-border: rgba(251, 113, 133, .16);
    --hx-line-soft: rgba(251, 113, 133, .12);
    --hx-glass-line: rgba(255, 255, 255, .08);
    --hx-range-bg: rgba(255, 255, 255, .05);
}

.hx.hx-reports {
    --hx-hue: #4F46E5;
    --hx-hue-soft: #E0E7FF;
    --hx-glow-1: rgba(79, 70, 229, .13);
    --hx-glow-2: rgba(129, 140, 248, .11);
    --hx-base: linear-gradient(180deg, #FFFFFF 0%, #F9F9FF 100%);
    --hx-border: #D9D6F6;
    --hx-line-soft: rgba(79, 70, 229, .12);
    --hx-glass-line: rgba(79, 70, 229, .15);
    --hx-range-bg: rgba(79, 70, 229, .06);
    --hx-float: rgba(255, 255, 255, .44);
    --hx-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(49, 46, 129, .28);
}

[data-bs-theme="dark"] .hx.hx-reports {
    --hx-hue: #A5B4FC;
    --hx-hue-soft: #2E2868;
    --hx-glow-1: rgba(129, 140, 248, .2);
    --hx-glow-2: rgba(192, 132, 252, .08);
    --hx-base: linear-gradient(180deg, #171A33 0%, #10121D 100%);
    --hx-border: rgba(165, 180, 252, .16);
    --hx-line-soft: rgba(165, 180, 252, .12);
    --hx-glass-line: rgba(255, 255, 255, .09);
    --hx-range-bg: rgba(255, 255, 255, .05);
    --hx-float: rgba(18, 20, 40, .42);
}

/* The figure keeps a soft halo in the panel's color: the chart now runs behind it. */
.hx { --hx-halo: rgba(255, 255, 255, .92); }
[data-bs-theme="dark"] .hx { --hx-halo: rgba(10, 14, 22, .78); }

/* The charts' tokens (js/hero-scrub.js reads them from the chart's host). */
.hsc {
    --hs-text: #0B0F19;
    --hs-muted: #5D6278;
    --hs-good: #15803D;
    --hs-bad: #DC2626;
    --hs-caution: #B45309;
    --hs-glass: rgba(255, 255, 255, .72);
    --hs-glass-2: rgba(246, 250, 252, .86);
    --hs-glass-line: #D5E6E3;
    --hs-panel: #FFFFFF;
    --hs-dot: #FFFFFF;
    --hs-font: var(--ci-font);
    --hs-display: var(--ci-font);
    --hs-top: .36;
    --hs-bottom: 34;
}

[data-bs-theme="dark"] .hsc {
    --hs-text: #E6E8F2;
    --hs-muted: #A3A9C0;
    --hs-good: #4ADE80;
    --hs-bad: #F87171;
    --hs-caution: #FBBF24;
    --hs-glass: rgba(255, 255, 255, .08);
    --hs-glass-2: rgba(255, 255, 255, .045);
    --hs-glass-line: rgba(255, 255, 255, .12);
    --hs-panel: #101A1F;
    --hs-dot: #F4F6FC;
}

/* Accounts: the section's aqua (the mobile AccountsHeroPositive* keys), "good" readings included, not the shared green. */
.hsc.hs-accounts {
    --hs-line: #0F766E;
    --hs-line-neg: #DC2645;
    --hs-area: rgba(13, 148, 136, .22);
    --hs-area-neg: rgba(220, 38, 69, .2);
    --hs-second: #64748B;
    --hs-good: #0D9488;
}

[data-bs-theme="dark"] .hsc.hs-accounts {
    --hs-line: #2DD4BF;
    --hs-line-neg: #E0707F;
    --hs-area: rgba(45, 212, 191, .28);
    --hs-area-neg: rgba(224, 112, 127, .26);
    --hs-good: #2DD4BF;
}

.hsc.hs-liabilities {
    --hs-line: #DC2626;
    --hs-line-neg: #DC2626;
    --hs-area: rgba(220, 38, 38, .17);
    --hs-area-neg: rgba(220, 38, 38, .17);
    --hs-second: #64748B;
    --hs-glass-line: #F1D4DA;
}

[data-bs-theme="dark"] .hsc.hs-liabilities {
    --hs-line: #F87171;
    --hs-line-neg: #F87171;
    --hs-area: rgba(248, 113, 113, .24);
    --hs-area-neg: rgba(248, 113, 113, .24);
    --hs-second: #A9B4C6;
    --hs-glass-line: rgba(255, 255, 255, .12);
    --hs-panel: #18121A;
}

.hsc.hs-investments {
    --hs-line: var(--iv-hero-line, #0B6E4F);
    --hs-line-neg: var(--iv-hero-line, #0B6E4F);
    --hs-area: var(--iv-hero-area, rgba(11, 110, 79, .25));
    --hs-area-neg: var(--iv-hero-area, rgba(11, 110, 79, .25));
    --hs-second: var(--iv-hero-secondary, #4FA582);
    --hs-glass-line: #CFE4D8;
    --hs-top: .4;
    --hs-bottom: 108;
    --hs-pill: 100;
}

.hsc.hs-reports {
    --hs-line: #4F46E5;
    --hs-line-neg: #DC2645;
    --hs-area: rgba(99, 102, 241, .2);
    --hs-area-neg: rgba(220, 38, 69, .18);
    --hs-second: #64748B;
    --hs-glass-line: #DAD7F6;
}

[data-bs-theme="dark"] .hsc.hs-reports {
    --hs-line: #A5B4FC;
    --hs-line-neg: #F0828F;
    --hs-area: rgba(129, 140, 248, .3);
    --hs-area-neg: rgba(240, 130, 143, .24);
    --hs-glass-line: rgba(255, 255, 255, .12);
    --hs-panel: #14162A;
}

/* In a section hero the chart fills the stage to near its top (the figure floats over it, as on the Dashboard). */
.hx .hsc { --hs-top: .1; }

[data-bs-theme="dark"] .hsc.hs-investments {
    --hs-glass-line: rgba(255, 255, 255, .12);
    --hs-panel: #0F1A15;
}

/* ------------------------------------------------------------------ The chart host */
.hsc {
    position: absolute;
    inset: 0;
    transition: opacity .2s ease;
}

.hs-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.hs-canvas:focus { outline: none; }
.hs-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--hx-hue, var(--hs-line)); border-radius: 14px; }
.hsc.is-loading .hs-canvas { cursor: progress; }

.hs-empty {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40%;
    margin: 0;
    padding: 0 16px;
    text-align: center;
    font: 500 12.5px/1.4 var(--hs-font);
    color: var(--hs-muted);
    pointer-events: none;
}

/* ------------------------------------------------------------------ The panel */
.hx-wrap { container: hxwrap / inline-size; }

.hx {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hx-border);
    border-radius: 22px;
    background:
        radial-gradient(820px 380px at -6% -24%, var(--hx-glow-1), transparent 62%),
        radial-gradient(620px 340px at 58% -34%, var(--hx-glow-2), transparent 64%),
        var(--hx-base);
    box-shadow: var(--hx-shadow);
    color: var(--hx-ink);
    font-family: var(--hx-font);
    animation: hx-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes hx-rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.hx-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 22px 24px 16px;
    container: hxmain / inline-size;
}

/* The stage: the figure over the chart on a wide cell, stacked above it on a narrow one. */
.hx-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

.hx-fg {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    transition: opacity .14s ease-out;
}

.hx-kicker { display: flex; align-items: center; gap: 10px; min-width: 0; }

.hx-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--ci-icon-pill);
    color: var(--hx-hue);
    font-size: 14px;
}

.hx-label {
    margin: 0;
    font: 700 13px/1.2 var(--hx-font);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--hx-ink-2);
}

.hx-help { margin-left: 2px; }

.hx-refresh {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-left: 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--hx-hue);
    opacity: .7;
    cursor: pointer;
    transition: opacity .15s ease, background-color .15s ease;
}

.hx-refresh:hover:not(:disabled) { opacity: 1; background: var(--hx-range-bg); }
.hx-refresh:disabled { cursor: progress; }
.hx-refresh:focus-visible { outline: 2px solid var(--hx-hue); outline-offset: 2px; opacity: 1; }

/* Top right of the chart (Liabilities): when the figures last synced and the sync glyph, the Investments hero's tools on
   the section-hero glass. Wide: pinned to the stage's top right, level with the kicker. Narrow: its own row above the
   kicker, right-aligned, so it never collides with the label. Fades with the figure while a day is read. */
.hx-sync {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    transition: opacity .14s ease-out;
}

.hx-sync-updated {
    padding: 4px 9px;
    border-radius: 8px;
    background: var(--hx-glass);
    border: 1px solid var(--hx-glass-line);
    color: var(--hx-muted);
    font: 600 11.5px/1.25 var(--hx-font);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hx-sync-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--hx-glass-line);
    border-radius: 10px;
    background: var(--hx-glass);
    color: var(--hx-hue);
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.hx-sync-btn:hover:not(:disabled) { background: var(--hx-range-bg); border-color: color-mix(in srgb, var(--hx-hue) 40%, transparent); }
.hx-sync-btn:active:not(:disabled) { transform: scale(.94); }
.hx-sync-btn:disabled { cursor: progress; }
.hx-sync-btn:focus-visible { outline: 2px solid var(--hx-hue); outline-offset: 2px; }

.hx-stage.is-reading > .hx-sync { opacity: 0; pointer-events: none; }

.hx-bone-sync { display: inline-block; width: 7.25rem; height: 24px; border-radius: 8px; }
.hx-bone-sync-btn { display: inline-block; width: 30px; height: 30px; border-radius: 10px; }

@container hxmain (max-width: 619.98px) {
    .hx-sync { position: static; order: -1; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
    .hx-sync, .hx-sync-btn { transition: none; }
}

.hx-figure-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; min-width: 0; }

.hx-figure {
    font: 600 clamp(30px, 2.1rem + 1vw, 44px)/1.08 var(--hx-display);
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--hx-ink);
    white-space: nowrap;
    text-shadow: 0 0 14px var(--hx-halo), 0 0 3px var(--hx-halo);
}

.hx-figure.is-negative { color: var(--hx-neg); }

.hx-delta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--hx-glass);
    border: 1px solid var(--hx-glass-line);
    font-size: 12.5px;
    color: var(--hx-muted);
    white-space: nowrap;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hx-delta b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--hx-ink); }
.hx-delta.is-positive i, .hx-delta.is-positive b { color: var(--hx-pos); }
.hx-delta.is-caution i, .hx-delta.is-caution b { color: var(--hx-caution); }
.hx-delta.is-neutral i { color: var(--hx-muted); }
.hx-delta.is-negative i, .hx-delta.is-negative b { color: var(--hx-neg); }

/* Under the pill: accounts added this month, which the like-for-like change leaves out. */
.hx-delta-note { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--hx-muted); min-width: 0; }
.hx-delta-note i { font-size: 11px; opacity: .8; }

.hx-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.hx-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--hx-glass);
    border: 1px solid var(--hx-glass-line);
    font-size: 12px;
    color: var(--hx-muted);
    white-space: nowrap;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hx-pill b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--hx-ink); }
.hx-pill-glyph { color: var(--hx-hue); font-size: 11px; }
.hx-dot { width: 7px; height: 7px; border-radius: 50%; }
.hx-dot.is-positive { background: var(--hx-pos); }
.hx-dot.is-negative { background: var(--hx-neg); }

/* The chart's box. */
.hx-plot { position: relative; height: 290px; margin: 0 -24px 0 -24px; }

.hx-plot-wave { position: absolute; inset: 0; }
.hx-plot-wave .ah-chart-wave { position: absolute; inset: 12% 0 34px 0; width: 100%; height: auto; }

/* Wide cell: the figure floats over the chart's quiet top band (as the mobile pills do) and fades under the island. */
@container hxmain (min-width: 620px) {
    .hx-stage { grid-template-areas: "stage"; }
    .hx-stage > * { grid-area: stage; }
    .hx-fg { position: relative; z-index: 2; align-self: start; pointer-events: none; }
    .hx-fg button, .hx-fg a, .hx-fg [role="button"] { pointer-events: auto; }
    /* The chart fills whatever height the row gives it (the side pane can be the taller one). */
    .hx-stage { flex: 1 1 auto; }
    .hx-plot { height: auto; min-height: clamp(360px, 40cqi, 450px); margin: -8px -24px 0 -24px; }
    .hx-stage.is-reading .hx-fg { opacity: 0; transition: opacity .14s ease-in; }
    .hx-stage.is-reading .hx-fg button { pointer-events: none; }
    /* Debt has no prediction and one scale for balance and available: a calmer, shorter chart. */
    .hx-liabilities .hx-plot { min-height: clamp(330px, 30cqi, 390px); }
}

/* Narrow cell: the figure sits above the chart, so the chart takes its whole box and drops under the island to read. */
@container hxmain (max-width: 619.98px) {
    .hx-plot .hsc { --hs-top: .12; }
}

/* ------------------------------------------------------------------ Foot: range, legend, insight */
.hx-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-width: 0;
}

.hx-ranges {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    background: var(--hx-range-bg);
}

.hx-range {
    min-width: 42px;
    padding: 5px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font: 700 12.5px/1.2 var(--hx-font);
    color: var(--hx-muted);
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.hx-range:hover:not(:disabled):not(.is-on) { color: var(--hx-ink); }
.hx-range.is-on { background: var(--hx-range-on); color: var(--hx-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--hx-glass-line); }
.hx-range:disabled { cursor: default; }
.hx-range:focus-visible { outline: 2px solid var(--hx-hue); outline-offset: 1px; }

.hx-legend {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    font: 600 11px/1.2 var(--hx-font);
    letter-spacing: .03em;
    color: var(--hx-muted);
}

.hx-key { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.hx-swatch { display: inline-block; width: 16px; height: 0; border-top: 2.5px solid var(--hx-hue); border-radius: 2px; }
.hx-accounts .hx-swatch.is-line { border-top-color: var(--hx-pos); }
.hx-swatch.is-predicted,
.hx-swatch.is-dashed { height: 2px; border-top: 0; background: repeating-linear-gradient(90deg, var(--hx-pos) 0 5px, transparent 5px 8px); }
.hx-liabilities .hx-swatch.is-line { border-top-color: var(--hx-neg); }
.hx-liabilities .hx-swatch.is-predicted { background: repeating-linear-gradient(90deg, var(--hx-neg) 0 5px, transparent 5px 8px); }
.hx-reports .hx-swatch.is-line { border-top-color: var(--hx-hue); }
.hx-reports .hx-swatch.is-zero { height: 0; border-top: 1.5px dashed var(--hx-neg); background: none; }
.hx-swatch.is-dashed { background: repeating-linear-gradient(90deg, #9F7AEA 0 5px, transparent 5px 8px); }
[data-bs-theme="dark"] .hx-swatch.is-dashed { background: repeating-linear-gradient(90deg, #C4B5FD 0 5px, transparent 5px 8px); }
/* Liabilities: the Available line is the chart's neutral slate (--hs-second), never violet beside the rose. */
.hx-liabilities .hx-swatch.is-dashed { background: repeating-linear-gradient(90deg, #64748B 0 5px, transparent 5px 8px); }
[data-bs-theme="dark"] .hx-liabilities .hx-swatch.is-dashed { background: repeating-linear-gradient(90deg, #A9B4C6 0 5px, transparent 5px 8px); }

.hx-insight {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    max-width: min(46%, 380px);
    margin-left: auto;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: right;
    cursor: pointer;
}

.hx-insight-scope {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 700 10px/1.2 var(--hx-font);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hx-hue);
}

.hx-insight-text {
    font: 600 12.5px/1.35 var(--hx-font);
    color: var(--hx-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hx-insight:hover .hx-insight-text { color: var(--hx-hue); }

/* ------------------------------------------------------------------ Side pane (the Accounts period summary, blended) */
.hx-side {
    min-width: 0;
    margin: 0 12px 12px;
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: var(--hx-glass);
    border: 1px solid var(--hx-glass-line);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.hx-side > .acx-card,
.hx-side .acx-period {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
}

.hx-side .acx-head { margin-bottom: 14px; }

.hx-side .acx-chip {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--ci-icon-pill);
    color: var(--hx-hue);
}

.hx-side .acx-title { font: 700 15px/1.3 var(--hx-font); color: var(--hx-ink); }
.hx-side .acx-headline { font-size: 12.5px; }

.hx-side .acx-tile {
    position: relative;
    gap: 3px;
    padding: 11px 12px 10px;
    border-radius: 14px;
    border: 1px solid var(--hx-tile-line);
    background: var(--hx-tile);
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.hx-side button.acx-tile:hover { border-color: color-mix(in srgb, var(--hx-hue) 40%, transparent); transform: translateY(-1px); }
.hx-side .acx-tile-caption { display: inline-flex; align-items: center; gap: 6px; color: var(--hx-muted); }
.hx-side .acx-tile-value { font-family: var(--hx-display); color: var(--hx-ink); }

.acx-tile-glyph { font-size: 10px; color: var(--hx-hue, var(--acx-chip-fg)); opacity: .9; }
.acx-tile-glyph.is-positive { color: var(--hx-pos, var(--acx-positive)); }
.acx-tile-glyph.is-negative { color: var(--hx-neg, var(--acx-negative)); }

.hx-side .acx-changes {
    padding: 12px 12px 10px;
    border-radius: 14px;
    background: var(--hx-tile);
    border: 1px solid var(--hx-tile-line);
}

.hx-side .acx-change-list li { color: var(--hx-ink-2); }
.hx-side .acx-change-dot { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }

/* The period summary on its own (the hero couldn't load): its card returns. */
.hx-side-solo { margin-top: 1.25rem; }

/* ------------------------------------------------------------------ Figures underneath */
.hx-metrics {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px 12px;
    border-top: 1px solid var(--hx-line-soft);
    background: linear-gradient(180deg, color-mix(in srgb, var(--hx-glass) 60%, transparent), transparent);
}

.hx-metric {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid var(--hx-tile-line);
    background: var(--hx-tile);
}

.hx-metric-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--ci-icon-pill);
    color: var(--hx-hue);
    font-size: 13px;
}

.hx-metric-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.hx-metric-caption {
    font: 700 10.5px/1.25 var(--hx-font);
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--hx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hx-metric-value {
    font: 600 16px/1.3 var(--hx-display);
    font-variant-numeric: tabular-nums;
    color: var(--hx-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hx-metric-sub {
    font-size: 11.5px;
    color: var(--hx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hx-refreshed {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin: 2px 2px 0;
    font-size: 11.5px;
    color: var(--hx-muted);
}

.hx-refreshed .tx-glyph { font-size: 10.5px; }

/* ------------------------------------------------------------------ Glass pane over the chart (the Reports month's pace) */
/* On a wide cell it sits over the chart's right end, see-through so the line's latest months show behind it; it lets
   the pointer through to the chart and fades while a day is read, so the reading's island has the room. On a narrow
   cell it sits under the chart. */
.hx .hx-float {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--hx-glass-line);
    background: var(--hx-float, var(--hx-glass));
    -webkit-backdrop-filter: blur(2.5px) saturate(1.1);
    backdrop-filter: blur(2.5px) saturate(1.1);
    box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .45);
    transition: opacity .14s ease-out;
}

.hx .hx-float .rp-eyebrow-sm { color: var(--hx-hue); }
.hx .hx-float .rp-pace-value { font-family: var(--hx-display); color: var(--hx-ink); }
.hx .hx-float .rp-pace-sub,
.hx .hx-float .rp-pace-legend { color: var(--hx-muted); }

.hx .hx-float-skeleton { gap: 9px; }

@container hxmain (min-width: 620px) {
    .hx .hx-stage > .hx-float {
        align-self: start;
        justify-self: end;
        width: clamp(250px, 30%, 340px);
        margin: 6px 0 0;
        pointer-events: none;
    }
    .hx .hx-stage.is-reading > .hx-float { opacity: 0; transition: opacity .14s ease-in; }
    /* The figure and its pills keep clear of the pane. */
    .hx .hx-stage:has(> .hx-float) > .hx-fg { padding-right: calc(clamp(250px, 30%, 340px) + 16px); }
}

/* Figures that open a report (the Reports snapshot): the whole tile is the link. */
.hx-metrics-auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
a.hx-metric { color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease, background-color .15s ease; }
a.hx-metric:hover { border-color: color-mix(in srgb, var(--hx-hue) 40%, transparent); transform: translateY(-1px); color: inherit; }
a.hx-metric:focus-visible { outline: 2px solid var(--hx-hue); outline-offset: 2px; }

/* ------------------------------------------------------------------ Skeleton (the same panel in plain-ink bones; the chip keeps its hue) */
.hx-skeleton { animation: none; }
.hx-skeleton .hx-plot { pointer-events: none; }
.hx-bone-figure { display: inline-block; width: min(15rem, 70%); height: 38px; border-radius: 12px; }
.hx-bone-delta { display: inline-block; width: 9rem; height: 24px; border-radius: 999px; }
.hx-bone-pill { display: inline-block; height: 25px; border-radius: 999px; }
.hx-bone-ranges { background: transparent; gap: 4px; }
.hx-bone-range { display: inline-block; width: 42px; height: 26px; border-radius: 9px; }
.hx-bone-range.is-wide { width: 58px; }
.hx-bone-legend { display: inline-block; width: 7.5rem; height: 10px; border-radius: 6px; }
.hx-bone-insight { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; }
.hx-bone-chip { background-color: var(--dsh-bone); }
.hx-bone-text { flex: 1 1 auto; align-self: stretch; gap: 6px; }
.hx-bone-text > .dsh-bone { display: block; }

/* ------------------------------------------------------------------ Layout by the panel's width */
@container hxwrap (min-width: 720px) {
    .hx-metrics-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hx-metrics-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container hxwrap (min-width: 1000px) {
    .hx.has-side { grid-template-columns: minmax(0, 1fr) clamp(340px, 32%, 460px); }
    .hx.has-side .hx-side { margin: 14px 14px 14px 0; }
}

@container hxwrap (min-width: 1240px) {
    .hx-metrics-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@container hxwrap (min-width: 1400px) {
    .hx-metrics-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .hx-metric { flex-direction: column; align-items: flex-start; gap: 8px; }
    .hx.has-side { grid-template-columns: minmax(0, 1fr) clamp(400px, 31%, 520px); }
}

@container hxwrap (max-width: 560px) {
    .hx { border-radius: 18px; }
    .hx-main { padding: 18px 16px 14px; }
    .hx-plot { margin-inline: -16px; height: 270px; }
    .hx-side { margin: 0 8px 8px; padding: 16px 14px 14px; }
    .hx-metrics { padding: 12px 10px 10px; gap: 8px; }
    .hx-metric { padding: 9px 10px; gap: 9px; }
    .hx-metric-chip { display: none; }
    .hx-metric-caption { white-space: normal; font-size: 10px; }
    .hx-metric-value { font-size: 14.5px; }
    .hx-insight { max-width: 100%; margin-left: 0; align-items: flex-start; text-align: left; }
    .hx-bone-insight { margin-left: 0; align-items: flex-start; }
    .hx-figure { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .hx { animation: none; }
    .hx-fg, .hsc, .hx-float { transition: none; }
}

/* ------------------------------------------------------------------ Investments: the chart reads too */
/* The canvas takes the pointer; the figures over it let it through except their buttons, and fade under the island. */
.ivo-hero .ah-chart.ivo-hero-chart { pointer-events: auto; }
.ivo-hero .ah-content { pointer-events: none; }
.ivo-hero .ah-content button, .ivo-hero .ah-content a { pointer-events: auto; }
.ivo-hero .ah-content, .ivo-hero .ivo-hero-tools, .ivo-hero .ivo-hero-overlay { transition: opacity .14s ease-out; }
.ivo-hero .ah-hero.is-reading .ah-content,
.ivo-hero .ah-hero.is-reading .ivo-hero-tools,
.ivo-hero .ah-hero.is-reading .ivo-hero-overlay { opacity: 0; pointer-events: none; transition: opacity .14s ease-in; }
.ivo-hero .ah-hero.is-reading .ah-content button { pointer-events: none; }

/* Dividends & Income: the lifetime income line reads too (the same recipe; the lifetime corner fades with the figures). */
.ivd-hero .ah-chart.ivd-hero-chart { pointer-events: auto; }
.ivd-hero .ah-content { pointer-events: none; }
.ivd-hero .ah-content button, .ivd-hero .ah-content a { pointer-events: auto; }
.ivd-hero .ah-content, .ivd-hero .ivd-hero-context { transition: opacity .14s ease-out; }
.ivd-hero .ah-hero.is-reading .ah-content,
.ivd-hero .ah-hero.is-reading .ivd-hero-context { opacity: 0; pointer-events: none; transition: opacity .14s ease-in; }
.ivd-hero .ah-hero.is-reading .ah-content button { pointer-events: none; }
.ivd-hero .ivd-hero-context { pointer-events: none; }
.ivo-swatch-predicted { height: 2px; border-top: 0 !important; background: repeating-linear-gradient(90deg, var(--iv-hero-line) 0 5px, transparent 5px 8px); }

/* ------------------------------------------------------------------ Reports Overview: the month's pace, as one readable bar */
/* Blended on the hero's right (the Accounts "This month" pane's place), so the chart and its prediction keep the full
   width: clear glass (a deeper blur, a lit top edge, a soft hue glow from the corner). The bar:
   the rail, what is still to come (striped hue), spent so far (solid hue, fading at its edge like every bar on the site,
   blend-bars.css), and last month's total as a flagged marker. A legend names each part with its figure; the day line
   says where the month stands. */
.hx.hx-reports {
    --rp2-glass-1: rgba(255, 255, 255, .62);
    --rp2-glass-2: rgba(246, 245, 255, .5);
    --rp2-edge: rgba(255, 255, 255, .9);
    --rp2-rail: rgba(79, 70, 229, .09);
    --rp2-spent-1: #818CF8;
    --rp2-spent-2: #4F46E5;
    --rp2-ahead: rgba(99, 102, 241, .28);
    --rp2-last: #312E81;
    --rp2-tile: rgba(255, 255, 255, .6);
}

[data-bs-theme="dark"] .hx.hx-reports {
    --rp2-glass-1: rgba(30, 32, 64, .5);
    --rp2-glass-2: rgba(14, 16, 32, .38);
    --rp2-edge: rgba(255, 255, 255, .14);
    --rp2-rail: rgba(255, 255, 255, .07);
    --rp2-spent-1: #C7D2FE;
    --rp2-spent-2: #818CF8;
    --rp2-ahead: rgba(165, 180, 252, .3);
    --rp2-last: #EEF0FF;
    --rp2-tile: rgba(255, 255, 255, .04);
}

.hx .hx-side.rp-pace2 {
    display: flex;
    flex-direction: column;
    /* Fills the hero's height beside the chart: the parts spread over it, the bar block in the middle. */
    justify-content: space-between;
    align-self: stretch;
    gap: 14px;
    padding: 18px 18px 16px;
    border-radius: 20px;
    border-color: color-mix(in srgb, var(--hx-hue) 22%, transparent);
    background:
        radial-gradient(240px 140px at 100% 0%, color-mix(in srgb, var(--hx-hue) 14%, transparent), transparent 70%),
        linear-gradient(160deg, var(--rp2-glass-1), var(--rp2-glass-2));
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    backdrop-filter: blur(14px) saturate(1.35);
    box-shadow:
        inset 0 1px 0 var(--rp2-edge),
        0 18px 40px -26px color-mix(in srgb, var(--hx-hue) 60%, rgba(15, 23, 42, .6));
}

.rp-pace2-head { display: flex; align-items: center; gap: 9px; min-width: 0; }

.rp-pace2-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--ci-icon-pill);
    color: var(--hx-hue);
    font-size: 12.5px;
}

.rp-pace2-title {
    min-width: 0;
    font: 700 11px/1.2 var(--hx-font);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hx-ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-pace2-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 999px;
    font: 700 11px/1.2 var(--hx-font);
    white-space: nowrap;
    background: color-mix(in srgb, currentColor 12%, transparent);
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}

.rp-pace2-badge span { font-weight: 600; opacity: .8; }
.rp-pace2-badge-negative { color: var(--hx-neg); }
.rp-pace2-badge-caution { color: var(--hx-caution); }
.rp-pace2-badge-positive { color: var(--hx-pos); }
.rp-pace2-badge-neutral { color: var(--hx-muted); }

.rp-pace2-figure { display: flex; flex-direction: column; gap: 2px; }
.rp-pace2-figure strong { font: 600 34px/1.05 var(--hx-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--hx-ink); }
.rp-pace2-figure span { font-size: 11.5px; line-height: 1.35; color: var(--hx-muted); }

.rp-pace2-track { position: relative; height: 12px; margin: 18px 0 2px; }

.rp-pace2-rail,
.rp-pace2-ahead,
.rp-pace2-track .rp-pace2-spent {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 999px;
}

.rp-pace2-rail { right: 0; background: var(--rp2-rail); box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08); }

.rp-pace2-ahead {
    background: repeating-linear-gradient(-45deg, var(--rp2-ahead) 0 5px, color-mix(in srgb, var(--rp2-ahead) 45%, transparent) 5px 10px);
}

.rp-pace2-track .rp-pace2-spent {
    right: auto;
    background: linear-gradient(90deg, var(--rp2-spent-1), var(--rp2-spent-2));
    box-shadow: 0 0 14px -2px color-mix(in srgb, var(--rp2-spent-2) 55%, transparent);
}

.rp-pace2-last {
    position: absolute;
    top: -5px;
    bottom: -5px;
    width: 2px;
    margin-left: -1px;
    border-radius: 2px;
    background: var(--rp2-last);
    opacity: .85;
}

.rp-pace2-last em {
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 6px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--rp2-last) 10%, transparent);
    font: 700 9.5px/1.4 var(--hx-font);
    font-style: normal;
    letter-spacing: .03em;
    color: var(--hx-ink-2);
    white-space: nowrap;
}

.rp-pace2-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }

.rp-pace2-legend > div {
    min-width: 0;
    padding: 7px 8px 6px;
    border-radius: 11px;
    /* As the Net Worth pace pane's tiles: a soft tint toward the corner where the angled watermark sits (tile-marks.css). */
    background: linear-gradient(145deg, var(--rp2-tile), color-mix(in srgb, var(--rp2-spent-2) 9%, var(--rp2-tile)));
    border: 1px solid var(--hx-glass-line);
}

.rp-pace2-legend dt {
    display: flex;
    align-items: center;
    gap: 5px;
    font: 700 9.5px/1.25 var(--hx-font);
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--hx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-pace2-legend dd {
    margin: 3px 0 0;
    font: 600 14px/1.2 var(--hx-display);
    font-variant-numeric: tabular-nums;
    color: var(--hx-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-pace2-key { flex: 0 0 auto; width: 10px; height: 6px; border-radius: 3px; }
.rp-pace2-key.is-spent { background: linear-gradient(90deg, var(--rp2-spent-1), var(--rp2-spent-2)); }
.rp-pace2-key.is-ahead { background: repeating-linear-gradient(-45deg, var(--rp2-ahead) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--rp2-ahead); }
.rp-pace2-key.is-last { width: 2px; height: 10px; border-radius: 1px; background: var(--rp2-last); }

.rp-pace2-days { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--hx-muted); }
.rp-pace2-dayline { position: relative; flex: 0 0 64px; height: 4px; border-radius: 999px; background: var(--rp2-rail); overflow: hidden; }
.rp-pace2-dayline > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--hx-hue); opacity: .7; }
.rp-pace2-daytext { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-pace2-daytext span { color: var(--hx-ink-2); font-weight: 600; }


.hx-reports .hx-swatch.is-predicted { background: repeating-linear-gradient(90deg, var(--hx-hue) 0 5px, transparent 5px 8px); }

/* ------------------------------------------------------------------ Reports Overview: landing */
/* Everything plays once, as the hero mounts (fill-mode backwards: once played, the elements are back to their own styles,
   so the pane can still fade under the reading's island). The figure's count-up is hero-scrub.js's. */
@keyframes hx-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes hx-in-pane {
    from { opacity: 0; transform: translateX(22px) scale(.97); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes rp-pace-grow {
    from { clip-path: inset(-20px 100% -20px 0); }
    to { clip-path: inset(-20px 0 -20px 0); }
}

@keyframes rp-pace-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rp-pace-drop {
    from { opacity: 0; transform: translateY(-9px); }
    to { opacity: .85; transform: none; }
}

.hx-reports .hx-kicker { animation: hx-in-up .5s .05s cubic-bezier(.2, .8, .2, 1) backwards; }
.hx-reports .hx-figure-row { animation: hx-in-up .55s .12s cubic-bezier(.2, .8, .2, 1) backwards; }
.hx-reports .hx-pill { animation: hx-in-up .45s .26s cubic-bezier(.2, .8, .2, 1) backwards; }
.hx-reports .hx-pill:nth-child(2) { animation-delay: .34s; }
.hx-reports .hx-pill:nth-child(3) { animation-delay: .42s; }
.hx-reports .hx-foot { animation: rp-pace-fade .6s .7s ease-out backwards; }
.hx .hx-side.rp-pace2 { animation: hx-in-pane .7s .3s cubic-bezier(.2, .8, .2, 1) backwards; }
.rp-pace2-track .rp-pace2-spent { animation: rp-pace-grow 1.15s .7s cubic-bezier(.22, .9, .25, 1) backwards; }
.rp-pace2-ahead { animation: rp-pace-fade .7s 1.45s ease-out backwards; }
.rp-pace2-last { animation: rp-pace-drop .5s 1.65s cubic-bezier(.34, 1.4, .64, 1) backwards; }
.rp-pace2-legend > div { animation: hx-in-up .45s 1s cubic-bezier(.2, .8, .2, 1) backwards; }
.rp-pace2-legend > div:nth-child(2) { animation-delay: 1.08s; }
.rp-pace2-legend > div:nth-child(3) { animation-delay: 1.16s; }
.rp-pace2-dayline > span { animation: rp-pace-grow .9s 1.1s ease-out backwards; }
.hx-reports .hx-metric { animation: hx-in-up .45s .55s cubic-bezier(.2, .8, .2, 1) backwards; }
.hx-reports .hx-metric:nth-child(2) { animation-delay: .61s; }
.hx-reports .hx-metric:nth-child(3) { animation-delay: .67s; }
.hx-reports .hx-metric:nth-child(4) { animation-delay: .73s; }
.hx-reports .hx-metric:nth-child(5) { animation-delay: .79s; }
.hx-reports .hx-metric:nth-child(6) { animation-delay: .85s; }

/* A narrow pane (a phone, or a tight side column): the badge drops its words and the legend's names may wrap. */
.hx .hx-side.rp-pace2 { container: rppace / inline-size; }

@container rppace (max-width: 380px) {
    .rp-pace2-badge span { display: none; }
    .rp-pace2-legend { gap: 5px; }
    .rp-pace2-legend > div { padding: 6px 7px 5px; }
    .rp-pace2-legend dt { align-items: flex-start; white-space: normal; font-size: 9px; letter-spacing: .03em; }
    .rp-pace2-key { margin-top: 2px; }
    .rp-pace2-legend dd { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .hx-reports .hx-kicker, .hx-reports .hx-figure-row, .hx-reports .hx-pill, .hx-reports .hx-foot, .hx .hx-side.rp-pace2,
    .rp-pace2-track .rp-pace2-spent, .rp-pace2-ahead, .rp-pace2-last, .rp-pace2-legend > div, .rp-pace2-dayline > span,
    .hx-reports .hx-metric { animation: none; }
}

/* The pace pane fills the hero beside the chart: the bar and its legend get a touch more air when there is room. */
.hx.has-side .hx-side.rp-pace2 .rp-pace2-track { margin-top: 22px; }
.hx.has-side .hx-side.rp-pace2 .rp-pace2-legend > div { padding: 12px 11px 11px; }
/* Beside the chart the pane is as tall as the hero: a larger figure, a thicker bar and roomier tiles use the height. */
.hx.has-side .hx-side.rp-pace2 .rp-pace2-figure strong { font-size: 44px; }
.hx.has-side .hx-side.rp-pace2 .rp-pace2-figure span { font-size: 12.5px; }
.hx.has-side .hx-side.rp-pace2 .rp-pace2-track { height: 14px; }
.hx.has-side .hx-side.rp-pace2 .rp-pace2-legend dt { font-size: 10px; }
.hx.has-side .hx-side.rp-pace2 .rp-pace2-legend dd { margin-top: 6px; font-size: 17px; }
.hx.has-side .hx-side.rp-pace2 .rp-pace2-days { font-size: 12px; }
.hx.has-side .hx-side.rp-pace2 .rp-pace2-dayline { flex-basis: 96px; }

/* ------------------------------------------------------------------ Reports Net Worth: own / owe split under the pills */
.rp-nwh-split {
    position: relative;
    width: min(260px, 70%);
    height: 6px;
    margin-top: 2px;
    border-radius: 999px;
    background: var(--hx-glass-line);
    overflow: hidden;
}

/* The own / owe split is the app's blended bar (BlendBar: the colors fade into each other at the seam); it sweeps in. */
.rp-nwh-split .rp-nwh-split-bar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    animation: rp-pace-grow 1s .45s cubic-bezier(.22, .9, .25, 1) backwards;
}

/* ------------------------------------------------------------------ Reports Net Worth: where the pace leads */
/* The pane beside the chart, filling its height: the pace a month as a badge, a year out (counting up), the road from
   today to six and twelve months (a gradient that fills, nodes that pop, the next round number flagged), three figures
   with angled watermark glyphs, and the next milestone's progress bar. Rising runs indigo to green, falling indigo to
   amber. */
.hx.hx-networth {
    --nwp-a: #6366F1;
    --nwp-b: #10B981;
    --nwp-glass-1: rgba(255, 255, 255, .64);
    --nwp-glass-2: rgba(244, 246, 255, .5);
    --nwp-edge: rgba(255, 255, 255, .9);
    --nwp-rail: rgba(79, 70, 229, .1);
    --nwp-tile: rgba(255, 255, 255, .62);
}

[data-bs-theme="dark"] .hx.hx-networth {
    --nwp-a: #A5B4FC;
    --nwp-b: #34D399;
    --nwp-glass-1: rgba(30, 32, 64, .5);
    --nwp-glass-2: rgba(14, 16, 32, .38);
    --nwp-edge: rgba(255, 255, 255, .14);
    --nwp-rail: rgba(255, 255, 255, .08);
    --nwp-tile: rgba(255, 255, 255, .045);
}

.hx .hx-side.rp-nwp.is-falling { --nwp-b: #F59E0B; }

.hx .hx-side.rp-nwp {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
    gap: 14px;
    padding: 18px 18px 14px;
    border-radius: 20px;
    border-color: color-mix(in srgb, var(--nwp-b) 22%, transparent);
    background:
        radial-gradient(260px 160px at 100% 0%, color-mix(in srgb, var(--nwp-b) 16%, transparent), transparent 70%),
        radial-gradient(220px 140px at 0% 100%, color-mix(in srgb, var(--nwp-a) 12%, transparent), transparent 70%),
        linear-gradient(160deg, var(--nwp-glass-1), var(--nwp-glass-2));
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    backdrop-filter: blur(14px) saturate(1.35);
    box-shadow: inset 0 1px 0 var(--nwp-edge), 0 18px 40px -26px color-mix(in srgb, var(--nwp-a) 60%, rgba(15, 23, 42, .6));
    container: rpnwp / inline-size;
    animation: hx-in-pane .7s .3s cubic-bezier(.2, .8, .2, 1) backwards;
}

.rp-nwp-head { display: flex; align-items: center; gap: 9px; min-width: 0; }

.rp-nwp-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--nwp-a), var(--nwp-b));
    color: #fff;
    font-size: 13px;
    box-shadow: 0 6px 16px -8px var(--nwp-b);
}

.rp-nwp-title {
    min-width: 0;
    font: 700 11px/1.2 var(--hx-font);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hx-ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-nwp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 999px;
    font: 700 11.5px/1.2 var(--hx-display);
    font-variant-numeric: tabular-nums;
    color: var(--nwp-b);
    background: color-mix(in srgb, var(--nwp-b) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--nwp-b) 32%, transparent);
    white-space: nowrap;
}

.rp-nwp-badge span { font-family: var(--hx-font); font-weight: 600; opacity: .8; }

.rp-nwp-figure { display: flex; flex-direction: column; gap: 3px; }

.rp-nwp-figure strong {
    font: 600 36px/1.04 var(--hx-display);
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(100deg, var(--hx-ink) 30%, var(--nwp-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rp-nwp-figure span { font-size: 11.5px; color: var(--hx-muted); }

/* The road: the rail, the gradient that fills it, the nodes with their figures, the flag. */
.rp-nwp-road { position: relative; height: 66px; margin: 4px 8px 0; }

.rp-nwp-rail,
.rp-nwp-fill {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 999px;
}

.rp-nwp-rail { background: var(--nwp-rail); }

.rp-nwp-fill {
    background: linear-gradient(90deg, var(--nwp-a), var(--nwp-b));
    box-shadow: 0 0 16px -2px color-mix(in srgb, var(--nwp-b) 60%, transparent);
    animation: rp-pace-grow 1.35s .7s cubic-bezier(.22, .9, .25, 1) backwards;
}

.rp-nwp-stop {
    position: absolute;
    top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.rp-nwp-stop.is-today { align-items: flex-start; transform: translateX(-9px); }
.rp-nwp-stop.is-end { align-items: flex-end; transform: translateX(calc(-100% + 9px)); }

.rp-nwp-node {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--hx-panel-solid, #fff);
    border: 3px solid var(--nwp-a);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--nwp-a) 16%, transparent);
    animation: rp-nwp-pop .45s .8s cubic-bezier(.34, 1.56, .64, 1) backwards;
}

[data-bs-theme="dark"] .rp-nwp-node { background: #14162A; }
.rp-nwp-stop.is-mid .rp-nwp-node { border-color: color-mix(in srgb, var(--nwp-a) 50%, var(--nwp-b)); animation-delay: 1.25s; }
.rp-nwp-stop.is-end .rp-nwp-node { border-color: var(--nwp-b); box-shadow: 0 0 0 4px color-mix(in srgb, var(--nwp-b) 20%, transparent), 0 0 18px var(--nwp-b); animation-delay: 1.7s; }

.rp-nwp-stop b {
    display: block;
    margin-top: 4px;
    font: 600 13.5px/1.2 var(--hx-display);
    font-variant-numeric: tabular-nums;
    color: var(--hx-ink);
    animation: hx-in-up .45s .95s cubic-bezier(.2, .8, .2, 1) backwards;
}

.rp-nwp-stop em {
    display: block;
    font: 700 9.5px/1.2 var(--hx-font);
    font-style: normal;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--hx-muted);
    animation: hx-in-up .45s 1s cubic-bezier(.2, .8, .2, 1) backwards;
}

.rp-nwp-stop.is-mid b, .rp-nwp-stop.is-mid em { animation-delay: 1.35s; }
.rp-nwp-stop.is-end b, .rp-nwp-stop.is-end em { animation-delay: 1.8s; }
.rp-nwp-stop.is-end b { color: var(--nwp-b); }

.rp-nwp-flag {
    position: absolute;
    top: -12px;
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-left: -4px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--hx-caution) 18%, transparent);
    color: var(--hx-caution);
    font-size: 10px;
    animation: rp-pace-drop .55s 2s cubic-bezier(.34, 1.4, .64, 1) backwards;
}

/* Three figures, each with its glyph large, angled and see-through in the corner (the reading island's tiles). */
.rp-nwp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }

.rp-nwp-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 9px 10px 8px;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--nwp-tile), color-mix(in srgb, var(--nwp-a) 9%, var(--nwp-tile)));
    border: 1px solid var(--hx-glass-line);
    overflow: hidden;
    animation: hx-in-up .45s .8s cubic-bezier(.2, .8, .2, 1) backwards;
}

.rp-nwp-tile:nth-child(2) { animation-delay: .88s; }
.rp-nwp-tile:nth-child(3) { animation-delay: .96s; }

.rp-nwp-tile-glyph {
    position: absolute;
    right: -6px;
    bottom: -9px;
    font-size: 34px;
    line-height: 1;
    color: var(--nwp-a);
    opacity: .16;
    transform: rotate(-15deg);
    pointer-events: none;
}

.rp-nwp-tile-caption {
    font: 700 9.5px/1.25 var(--hx-font);
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--hx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-nwp-tile strong {
    font: 600 14.5px/1.2 var(--hx-display);
    font-variant-numeric: tabular-nums;
    color: var(--hx-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-nwp-tile small { font-size: 11px; font-weight: 600; color: var(--hx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The next round number: its flag, the date and how far along you are. */
.rp-nwp-goal {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(110deg, color-mix(in srgb, var(--hx-caution) 12%, transparent), transparent 70%), var(--nwp-tile);
    border: 1px solid color-mix(in srgb, var(--hx-caution) 26%, transparent);
    animation: hx-in-up .5s 1.05s cubic-bezier(.2, .8, .2, 1) backwards;
}

.rp-nwp-goal-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--ci-icon-pill);
    color: var(--hx-caution);
    font-size: 13px;
}

.rp-nwp-goal-text { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--hx-ink-2); }
.rp-nwp-goal-text strong { color: var(--hx-ink); font-weight: 700; }
.rp-nwp-goal-text small { font-size: 11px; color: var(--hx-muted); }

.rp-nwp-goal-bar { position: relative; height: 7px; border-radius: 999px; background: var(--nwp-rail); overflow: hidden; }

.rp-nwp-goal-bar .rp-nwp-goal-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--nwp-a), var(--hx-caution));
    animation: rp-pace-grow 1.2s 1.45s cubic-bezier(.22, .9, .25, 1) backwards;
}

.rp-nwp-foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--hx-muted); }

.rp-nwp-empty { display: flex; align-items: center; gap: 12px; margin: auto 0; font-size: 12.5px; color: var(--hx-muted); }
.rp-nwp-empty-glyph { font-size: 22px; color: var(--nwp-a); opacity: .7; }

@keyframes rp-nwp-pop {
    from { opacity: 0; scale: .3; }
    to { opacity: 1; scale: 1; }
}

@container rpnwp (max-width: 360px) {
    .rp-nwp-figure strong { font-size: 30px; }
    .rp-nwp-badge span { display: none; }
    .rp-nwp-title { white-space: normal; }
    .rp-nwp-tiles { gap: 5px; }
    .rp-nwp-tile { padding: 8px 8px 7px; }
    .rp-nwp-tile strong { font-size: 13px; }
    .rp-nwp-stop b { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .hx .hx-side.rp-nwp, .rp-nwp-fill, .rp-nwp-node, .rp-nwp-stop b, .rp-nwp-stop em, .rp-nwp-flag, .rp-nwp-tile, .rp-nwp-goal,
    .rp-nwp-goal-bar .rp-nwp-goal-fill, .rp-nwh-split .rp-nwh-split-bar { animation: none; }
}
