/*
    The Accounts page: the web port of the mobile Accounts dashboard (Controls/Accounts). The net worth hero (ah-), and the
    cards (acx-): "Needs attention", My Accounts, the period summary, the account sheet, the overview and composition.
    Colors are the mobile theme keys (LightTheme.xaml / DarkTheme.xaml, #AARRGGBB converted to rgba), light and dark;
    the shared tokens (--tx-*, --rc-*) come from transaction-popups.css and recurring-area.css. Dark mode follows the
    site's data-bs-theme="dark" on <html>.
*/

:root {
    /* Accounts aqua (DashboardAccountsIcon*), the tone palette (AccountTonePalette) and the list's surfaces. */
    --acx-chip-bg: #CCFBF1;
    --acx-chip-fg: #0D9488;
    --acx-positive: #16A34A;
    --acx-negative: #EF4444;
    --acx-caution: #B45309;
    --acx-critical: #DC2626;
    --acx-muted: #565973;
    --acx-light: #9397AD;
    --acx-positive-soft: #DCFCE7;
    --acx-caution-soft: #FEF3C7;
    --acx-critical-soft: #FEE2E2;
    --acx-neutral-soft: #EEF0F6;
    --acx-search-bg: #F4F5FA;
    --acx-logo-bg: #FFFFFF;
    --acx-row-hover: #F4F6FB;
    --acx-panel-bg: #F4F5FA;
    --acx-accent: hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%);
    --acx-manage-bg: linear-gradient(158deg, #CBF1EE 0%, #E7F8F6 45%, #FFFFFF 100%);
    --acx-manage-border: #BCE6E2;
    --acx-glass: rgba(255, 255, 255, .6);
}

[data-bs-theme="dark"] {
    --acx-chip-bg: #163A3B;
    --acx-chip-fg: #2DD4BF;
    --acx-positive: #22C55E;
    --acx-negative: #EF4444;
    --acx-caution: #FBBF24;
    --acx-critical: #F87171;
    --acx-muted: #A9AEC4;
    --acx-light: #8A8FA8;
    --acx-positive-soft: rgba(34, 197, 94, .15);
    --acx-caution-soft: rgba(251, 191, 36, .18);
    --acx-critical-soft: rgba(248, 113, 113, .18);
    --acx-neutral-soft: rgba(255, 255, 255, .12);
    --acx-search-bg: rgba(255, 255, 255, .08);
    --acx-logo-bg: #F4F5FA;
    --acx-row-hover: rgba(255, 255, 255, .05);
    --acx-panel-bg: rgba(255, 255, 255, .05);
    --acx-accent: hsl(calc(247.94deg + var(--ci-accent-shift, 0deg)) 83.95% 68.24%);
    --acx-manage-bg: linear-gradient(158deg, #12393A 0%, #13252E 45%, #10131C 100%);
    --acx-manage-border: #1D3A40;
    --acx-glass: rgba(23, 74, 75, .5);
}

/* ------------------------------------------------------------------ Tones (AccountTonePalette) */

.acx-text-positive { color: var(--acx-positive) !important; }
.acx-text-negative { color: var(--acx-negative) !important; }
.acx-text-caution { color: var(--acx-caution) !important; }
.acx-text-critical { color: var(--acx-critical) !important; }
.acx-text-neutral { color: var(--acx-muted); }

.acx-bg-positive { background: var(--acx-positive); }
.acx-bg-negative { background: var(--acx-negative); }
.acx-bg-caution { background: var(--acx-caution); }
.acx-bg-critical { background: var(--acx-critical); }
.acx-bg-neutral { background: var(--acx-light); }

.acx-tone-positive { --acx-tone: var(--acx-positive); }
.acx-tone-negative { --acx-tone: var(--acx-negative); }
.acx-tone-caution { --acx-tone: var(--acx-caution); }
.acx-tone-critical { --acx-tone: var(--acx-critical); }
.acx-tone-neutral { --acx-tone: var(--acx-light); }

.acx-soft-positive { --acx-soft: var(--acx-positive-soft); }
.acx-soft-caution { --acx-soft: var(--acx-caution-soft); }
.acx-soft-critical { --acx-soft: var(--acx-critical-soft); }
.acx-soft-neutral { --acx-soft: var(--acx-neutral-soft); }

/* ------------------------------------------------------------------ Page layout */

.acx-page .acx-block { margin-bottom: 1.25rem; }

.acx-signals .ss-section { border-radius: 20px; }

/* The page menu under the Smart Signals: My accounts (the default) and Net worth, on the shared segmented menu (the
   Dashboard cards' and the area section menus' style). As wide as its labels from a tablet up, full width on a phone. */
.acx-tabs { display: flex; align-items: center; margin: 0 0 1.25rem; }
.tx-seg.acx-tabs-seg { min-width: min(100%, 440px); }

@media (max-width: 575.98px) {
    .tx-seg.tx-seg-inline.acx-tabs-seg { display: grid; width: 100%; }
}

.acx-tabpanel { min-width: 0; }
.acx-networth-panel > .acx-overview { margin-bottom: 1.5rem; }
.acx-networth-panel .acx-composition-head { margin-top: 0; }
.acx-networth-panel .acx-composition { margin-bottom: 0; }

/* The net worth hero with the period summary ("This month") on its right; stacked below 1400px. The hero collapses its own
   figures / tiles split by its container width, so it stays readable when the summary takes the right-hand column. */
.acx-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.acx-top-hero { min-width: 0; container-type: inline-size; container-name: acx-top-hero; }
.acx-top-hero > .ah { height: 100%; }

.acx-top-side { min-width: 0; display: flex; flex-direction: column; }
.acx-top-side > * { flex: 1 1 auto; }

@media (min-width: 1400px) {
    .acx-top { grid-template-columns: minmax(0, 1fr) clamp(340px, 30%, 440px); }
}

@container acx-top-hero (max-width: 760px) {
    .ah { grid-template-columns: minmax(0, 1fr); }
    .ah-tiles { border-left: 0; border-top: 1px solid var(--ah-border); }
}

/* My Accounts beside the Summary (stacked below 1200px). */
.acx-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.25rem;
}

.acx-main-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.acx-main-list { min-width: 0; }

@media (min-width: 1200px) {
    .acx-main { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

@media (min-width: 1600px) {
    .acx-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

/* A short note under the hero (Manage connections, Reconnect, Refresh on the web). */
.acx-note {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
    padding: .7rem .85rem;
    border-radius: 16px;
    border: 1px solid var(--acx-manage-border);
    background: var(--acx-manage-bg);
    color: var(--rc-text);
    font-size: 13px;
    line-height: 1.45;
    animation: acx-rise .3s cubic-bezier(.2, .8, .2, 1) both;
}

.acx-note-text { flex: 1 1 auto; min-width: 0; }

.acx-note-close {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 9px;
    background: var(--acx-glass);
    color: var(--acx-chip-fg);
    cursor: pointer;
}

/* ------------------------------------------------------------------ Cards and headers (FinanceSectionCardStyle) */

.acx-card {
    position: relative;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--rc-card-border);
    background: var(--rc-card);
    box-shadow: var(--rc-shadow);
    color: var(--rc-text);
    min-width: 0;
    animation: acx-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}

.acx-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.acx-head-wrap { flex-wrap: wrap; }

.acx-head-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.acx-title-row { display: flex; align-items: center; gap: 8px; }

.acx-title {
    margin: 0;
    font-family: var(--tx-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rc-text);
}

.acx-caption {
    margin: 0;
    font-family: var(--tx-font-text);
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--acx-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-headline { font-weight: 600; font-size: 12px; }

.acx-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--acx-chip-bg);
    color: var(--acx-chip-fg);
    font-size: 14px;
}

.acx-chip-sm { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.acx-chip-tone { background: var(--acx-soft); color: var(--acx-tone); }
.acx-chip-critical { background: var(--acx-critical-soft); color: var(--acx-critical); }

.acx-head-spinner { width: 14px; height: 14px; border-width: 2px; color: var(--acx-chip-fg); }

.acx-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--acx-muted);
}

.acx-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--acx-accent);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.acx-link:hover { text-decoration: underline; }

.acx-state {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.acx-panel-caption {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .05em;
    color: var(--acx-muted);
}

@keyframes acx-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ Net worth hero (ah-): the mobile Accounts hero */

/* The hero when its first read failed: a calm card with a retry (a failed reload keeps the figures instead). */
.ah-unavailable {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 22px;
    border-radius: 20px;
    border: 1px solid var(--rc-card-border);
    background: var(--rc-card);
    color: var(--rc-text);
}

.ah-unavailable-chip {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--acx-caution-soft, rgba(217, 119, 6, .12));
    color: var(--acx-caution);
}

.ah-unavailable-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; font-size: 12.5px; color: var(--acx-muted); }
.ah-unavailable-text strong { font-family: var(--tx-font); font-size: 15px; font-weight: 600; color: var(--rc-text); }

.ah {
    --ah-bg: linear-gradient(158deg, #CBF1EE 0%, #E7F8F6 45%, #FFFFFF 100%);
    --ah-border: #BCE6E2;
    --ah-text: #0B0F19;
    --ah-muted: #565973;
    --ah-badge-bg: #CCFBF1;
    --ah-badge-fg: #0D9488;
    --ah-value-pill: rgba(255, 255, 255, .6);
    --ah-pill: rgba(255, 255, 255, .7);
    --ah-tiles-bg: rgba(255, 255, 255, .9);
    --ah-range-bg: rgba(224, 245, 242, .5);
    --ah-range-pos: #C6F6D5;
    --ah-range-neg: #FF9FB1;
    --ah-line-pos: #15803D;
    --ah-line-neg: #DC2645;
    --ah-area-pos: rgba(22, 163, 74, .22);
    --ah-area-neg: rgba(220, 38, 69, .2);
    --ah-positive: #16A34A;
    --ah-negative: #EF4444;
    --ah-accent: hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%);
    --dsh-bone: rgba(13, 148, 136, .11);
    --dsh-wave: rgba(255, 255, 255, .88);
    --dsh-line: #15803D;

    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    border-radius: 20px;
    border: 1px solid var(--ah-border);
    background: var(--ah-bg);
    color: var(--ah-text);
    overflow: hidden;
    animation: acx-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}

[data-bs-theme="dark"] .ah {
    --ah-bg: linear-gradient(158deg, #12393A 0%, #13252E 45%, #10131C 100%);
    --ah-border: #1D3A40;
    --ah-text: #D9DBE8;
    --ah-muted: #B4B7C9;
    --ah-badge-bg: #163A3B;
    --ah-badge-fg: #2DD4BF;
    --ah-value-pill: rgba(23, 74, 75, .5);
    --ah-pill: rgba(23, 74, 75, .45);
    --ah-tiles-bg: transparent;
    --ah-range-bg: rgba(26, 56, 59, .69);
    --ah-range-pos: #244534;
    --ah-range-neg: #CF7783;
    --ah-line-pos: #4CC38A;
    --ah-line-neg: #E0707F;
    --ah-area-pos: rgba(76, 195, 138, .3);
    --ah-area-neg: rgba(224, 112, 127, .3);
    --ah-positive: #22C55E;
    --ah-negative: #EF4444;
    --ah-accent: hsl(calc(247.94deg + var(--ci-accent-shift, 0deg)) 83.95% 68.24%);
    --dsh-bone: rgba(45, 212, 191, .13);
    --dsh-wave: rgba(190, 255, 245, .12);
    --dsh-line: #4CC38A;
}

.ah-hero {
    position: relative;
    min-height: 318px;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.ah-chart {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.ah-chart-loading {
    position: absolute;
    inset: 30% 0 0 0;
    animation: acx-fade .4s ease both;
}

.ah-chart-wave,
.ah-bone-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 44px;
    width: 100%;
    height: 56%;
}

.ah-chart-loading .ah-chart-wave { inset: 0; height: 100%; }

.ah-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* The line draws itself in left to right on load and on every range change (the svg is keyed on the trend version).
       A wipe rather than a dash offset: Chromium ignores pathLength for dashes once the stroke is non-scaling. */
    animation: ah-draw 1.3s cubic-bezier(.3, .7, .3, 1) both;
}

.ah-area { animation: ah-area-in 1.3s ease-out both; }

@keyframes ah-draw {
    from { clip-path: inset(-8px 100% -8px -8px); }
    to { clip-path: inset(-8px -8px -8px -8px); }
}

@keyframes ah-area-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ah-line {
    fill: none;
    stroke-width: 2.25;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.ah-glow {
    fill: none;
    stroke-width: 7;
    stroke-opacity: .16;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.ah-line-pos, .ah-glow-pos { stroke: var(--ah-line-pos); }
.ah-line-neg, .ah-glow-neg { stroke: var(--ah-line-neg); }

.ah-stop-pos-0 { stop-color: var(--ah-area-pos); }
.ah-stop-pos-1 { stop-color: var(--ah-area-pos); stop-opacity: 0; }
.ah-stop-neg-0 { stop-color: var(--ah-area-neg); stop-opacity: 0; }
.ah-stop-neg-1 { stop-color: var(--ah-area-neg); }

.ah-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    padding: .75rem 1rem;
}

.ah-caption-row { display: flex; align-items: center; gap: .4rem; }

.ah-caption {
    margin: 0;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--ah-text);
}

.ah-value-pill { padding: 3px 8px; border-radius: 10px; background: var(--ah-value-pill); }

.ah-value {
    font-size: 1.5rem;
    font-weight: 500;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--ah-text);
}

.ah-pills { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }

.ah-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 3px 9px;
    border-radius: 12px;
    background: var(--ah-pill);
    font-size: .75rem;
    max-width: 100%;
    white-space: nowrap;
}

.ah-pill b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ah-pill .ah-pos, .ah-pos-text { color: var(--ah-positive); }
.ah-pill .ah-neg, .ah-neg-text { color: var(--ah-negative); }
.ah-pill .tx-glyph { font-size: 11px; }
.ah-pill-caption { color: var(--ah-muted); font-size: .6875rem; }

.ah-refresh {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ah-accent);
    opacity: .6;
    cursor: pointer;
    transition: opacity .15s ease, background-color .15s ease;
}

.ah-refresh:hover:not(:disabled) { opacity: 1; background: var(--ah-pill); }
.ah-refresh:disabled { cursor: progress; }
.ah-refresh:focus-visible { outline: 2px solid var(--ah-accent); outline-offset: 2px; opacity: 1; }
.ah-spin { animation: acx-spin 1s linear infinite; }

.ah-context {
    position: absolute;
    right: 14px;
    bottom: 51px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: min(60%, 340px);
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: right;
    cursor: pointer;
}

.ah-scope { font-size: .625rem; letter-spacing: .02em; color: var(--ah-muted); }

.ah-insight {
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ah-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ah-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    color: var(--ah-badge-fg);
}

/* The range bar with its sliding pill (the mobile hero filter): the pill is green over a positive net worth, pink under zero. */
.ah-range {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: auto 12px 8px;
    border-radius: 12px;
    background: var(--ah-range-bg);
}

.ah-range-pill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 20%;
    border-radius: 9px;
    opacity: .5;
    transform: translateX(calc(100% * var(--ah-range-index, 4)));
    transition: transform .38s cubic-bezier(.34, 1.36, .64, 1), background-color .25s ease;
}

.ah-range-pill.is-positive { background: var(--ah-range-pos); }
.ah-range-pill.is-negative { background: var(--ah-range-neg); }

.ah-range-chip {
    position: relative;
    padding: 5px 0;
    border: 0;
    background: transparent;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--ah-muted);
    cursor: pointer;
}

.ah-range-chip.is-selected { color: var(--ah-text); }
.ah-range-chip:disabled { cursor: default; }
.ah-range-chip:focus-visible { outline: 2px solid var(--ah-accent); outline-offset: -2px; border-radius: 9px; }

.ah-badge {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--ah-badge-bg);
    color: var(--ah-badge-fg);
    font-size: .875rem;
}

.ah-badge-sm { width: 26px; height: 26px; border-radius: 8px; font-size: .75rem; opacity: .72; }

.ah-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    align-content: center;
    padding: 1rem 1.15rem;
    background: var(--ah-tiles-bg);
    border-left: 1px solid var(--ah-border);
}

.ah-tile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ah-tile-text { min-width: 0; }

.ah-tile-caption {
    font-size: .6875rem;
    text-transform: uppercase;
    color: var(--ah-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-tile-value {
    font-size: 1rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--ah-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-refreshed {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding-top: .35rem;
    font-size: .75rem;
    color: var(--ah-muted);
}

.ah-refreshed .tx-glyph { font-size: 11px; }

/* The hero skeleton: the card in its colors with bones where the figures land. */
.ah-skeleton .ah-content { gap: .45rem; padding: .9rem 1rem; }
.ah-bone-value { width: min(13rem, 70%); height: 34px; border-radius: 10px; }

.ah-bone-range {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: auto 12px 10px;
}

.ah-bone-range .dsh-bone { height: 24px; border-radius: 9px; }

@media (min-width: 1400px) {
    .ah-tiles { gap: 16px 20px; padding: 1.25rem 1.5rem; }
}

@media (max-width: 991.98px) {
    .ah { grid-template-columns: 1fr; }
    .ah-tiles { border-left: 0; border-top: 1px solid var(--ah-border); }
}

@media (max-width: 575.98px) {
    .ah-hero { min-height: 300px; }
    .ah-context { max-width: 70%; }
    .ah-tiles { gap: 12px 10px; padding: .9rem; }
    .ah-tile-value { font-size: .9375rem; }
}

/* ------------------------------------------------------------------ Needs attention */

.acx-attention {
    position: relative;
    margin-bottom: 1.25rem;
    padding: 14px 16px 12px 22px;
    border-radius: 20px;
    border: 1px solid var(--rc-card-border);
    background:
        linear-gradient(135deg, var(--acx-soft) 0%, color-mix(in srgb, var(--acx-soft) 40%, transparent) 38%, transparent 72%),
        var(--rc-card);
    box-shadow: var(--rc-shadow);
    color: var(--rc-text);
    overflow: hidden;
    animation: acx-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}

.acx-attention-rail {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--acx-tone);
}

.acx-attention-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.acx-attention-head .acx-title { font-size: 15px; }
.acx-attention-chevron { flex: 0 0 auto; width: 28px; font-size: 12px; color: var(--acx-muted); text-align: center; }

.acx-attention-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0 1.5rem;
    margin-top: 6px;
}

/* Columns only when there is more than one item: a single item keeps its action at the card's right edge. */
@media (min-width: 992px) {
    .acx-attention-list:has(> .acx-attention-row:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.acx-attention-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    min-width: 0;
    animation: acx-rise .3s cubic-bezier(.2, .8, .2, 1) both;
}

.acx-attention-glyph {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--acx-soft);
    color: var(--acx-tone);
    font-size: 12px;
}

.acx-attention-text { flex: 1 1 auto; min-width: 0; }

.acx-attention-title {
    font-family: var(--tx-font);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rc-text);
}

.acx-attention-detail { font-size: 11.5px; line-height: 1.4; color: var(--acx-muted); }

.acx-attention-action {
    flex: 0 0 auto;
    padding: 5px 11px;
    border: 0;
    border-radius: 9px;
    background: var(--acx-soft);
    color: var(--acx-tone);
    font-family: var(--tx-font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s ease;
}

.acx-attention-action:hover { filter: brightness(.96); }

/* ------------------------------------------------------------------ My Accounts */

.acx-filter-toggle { position: relative; flex: 0 0 auto; }

/* A standalone segment (the filters toggle, SHOW ONLY): its pill shows only while it is on. */
.tx-seg.acx-toggle .tx-seg-pill { opacity: 0; transition: opacity .2s ease, transform .38s cubic-bezier(.34, 1.36, .64, 1); }
.tx-seg.acx-toggle.is-on .tx-seg-pill { opacity: 1; }
.acx-filter-toggle .tx-seg .tx-seg-item { width: 36px; height: 30px; padding: 0; }

.acx-filter-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acx-accent);
    box-shadow: 0 0 0 2px var(--rc-card);
    pointer-events: none;
}

.acx-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin-bottom: 12px;
    padding: 0 6px 0 12px;
    border-radius: 12px;
    background: var(--acx-search-bg);
}

.acx-search-glyph { font-size: 12px; color: var(--acx-muted); }

.acx-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--rc-text);
    font-size: 13.5px;
}

.acx-search-input::placeholder { color: var(--acx-muted); }
.acx-search-input::-webkit-search-cancel-button { display: none; }
.acx-search:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--acx-accent) 35%, transparent); }

.acx-search-clear {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--acx-muted);
    font-size: 14px;
    cursor: pointer;
}

.tx-seg.acx-owner,
.tx-seg.acx-chips { margin-bottom: 12px; }

.acx-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--acx-panel-bg);
    animation: acx-rise .25s cubic-bezier(.2, .8, .2, 1) both;
}

.acx-panel-group { display: flex; flex-direction: column; gap: 6px; }
.acx-panel-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.acx-panel-note { margin: 0; font-size: 11px; line-height: 1.45; color: var(--acx-muted); }
.acx-panel-reset { align-self: flex-end; }

.acx-sections { display: flex; flex-direction: column; gap: 6px; }

.acx-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 2px 2px;
}

.acx-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--acx-muted);
}

.acx-section-sub { font-size: 11px; color: var(--acx-light); white-space: nowrap; }

/* Summary card toolbar: section switch left, display mode right. */
.acx-summary-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 14px;
}

.acx-rows { display: flex; flex-direction: column; }

.acx-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 8px;
    margin: 0 -8px;
    width: calc(100% + 16px);
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease;
}

.acx-row:hover { background: var(--acx-row-hover); }
.acx-row:focus-visible { outline: 2px solid var(--acx-accent); outline-offset: -2px; }
.acx-row.is-excluded .acx-row-amount { color: var(--acx-muted); }

.acx-logo-wrap { position: relative; flex: 0 0 auto; width: 42px; height: 42px; }

.acx-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    border: 1px solid var(--rc-card-border);
    background: var(--acx-logo-bg);
    overflow: hidden;
}

.acx-logo img { width: 28px; height: 28px; object-fit: contain; }

.acx-logo-initials {
    border: 0;
    color: #FFFFFF;
    font-family: var(--tx-font);
    font-size: 13px;
    font-weight: 600;
}

.acx-logo-lg { width: 52px; height: 52px; border-radius: 15px; }
.acx-logo-lg img { width: 34px; height: 34px; }
.acx-logo-lg.acx-logo-initials { font-size: 16px; }

.acx-dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--rc-card);
    background: var(--acx-tone);
}

.acx-row-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }

.acx-row-top,
.acx-row-mid,
.acx-row-bottom {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.acx-row-name {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--tx-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--rc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-row-amount {
    flex: 0 0 auto;
    font-family: var(--tx-font);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--rc-text);
}

.acx-row-identity { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }

.acx-row-identity-text {
    font-size: 11.5px;
    color: var(--acx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-row-caption { flex: 0 0 auto; font-size: 11px; color: var(--acx-muted); }

.acx-badge {
    flex: 0 0 auto;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--acx-neutral-soft);
    color: var(--acx-muted);
    font-size: 9.5px;
    font-weight: 500;
    white-space: nowrap;
}

.acx-row-detail {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-row-detail.acx-text-neutral { color: var(--rc-text); opacity: .85; }
.acx-row-fresh { flex: 0 0 auto; font-size: 11px; }
.acx-row-fresh.acx-text-neutral { color: var(--acx-muted); }

.acx-row-change {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-row-bottom .acx-row-change { flex: 1 1 auto; min-width: 0; }

.acx-hint { margin: 4px 0 2px; font-size: 12px; line-height: 1.45; color: var(--acx-muted); }

.acx-nomatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 0 10px;
    font-size: 13px;
    color: var(--acx-muted);
}

.acx-empty { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 8px; font-size: 12px; color: var(--acx-muted); }
.acx-empty strong { font-family: var(--tx-font); font-size: 13.5px; font-weight: 600; color: var(--rc-text); }

/* Manage connections: the My Accounts page's aqua hero, its hairline, an aqua link chip and the glass chevron. */
.acx-manage {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 8px 0 2px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--acx-manage-border);
    background: var(--acx-manage-bg);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: filter .15s ease;
}

.acx-manage:hover { filter: brightness(.99) saturate(1.05); }
.acx-manage-title { font-family: var(--tx-font); font-size: 14px; font-weight: 600; color: var(--rc-text); }

.acx-manage-chevron {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 13px;
    background: var(--acx-glass);
    color: var(--acx-chip-fg);
    font-size: 11px;
}

/* ------------------------------------------------------------------ Period summary */

.acx-period { container-type: inline-size; }
.acx-period.is-refreshing .acx-period-body { opacity: .55; transition: opacity .2s ease; }
.tx-seg.acx-period-seg { margin-bottom: 12px; }
.acx-period-error { margin: -4px 0 10px; font-size: 12px; font-weight: 600; color: var(--acx-caution); }
.acx-period-body { display: flex; flex-direction: column; gap: 12px; transition: opacity .2s ease; }

.acx-period-tiles {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.acx-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    grid-column: span 2;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--rc-card-border);
    background: var(--tx-hero-tile);
    color: inherit;
    text-align: left;
}

button.acx-tile { cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
button.acx-tile:hover { border-color: color-mix(in srgb, var(--acx-accent) 35%, var(--rc-card-border)); }
button.acx-tile:focus-visible { outline: 2px solid var(--acx-accent); outline-offset: 2px; }
.acx-tile-wide { grid-column: span 3; }

.acx-tile-caption {
    max-width: 100%;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--acx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-tile-value {
    max-width: 100%;
    font-family: var(--tx-font);
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--rc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-tile-value-sm { font-size: 15px; }

.acx-tile-note {
    max-width: 100%;
    font-size: 11.5px;
    color: var(--acx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@container (max-width: 380px) {
    .acx-period-tiles .acx-tile { grid-column: span 3; }
    .acx-period-tiles .acx-tile:last-child { grid-column: span 6; }
}

.acx-changes { display: flex; flex-direction: column; gap: 8px; }
.acx-change-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.acx-change-list li { display: flex; align-items: baseline; gap: 10px; font-size: 13px; line-height: 1.4; color: var(--rc-text); }
.acx-change-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-1px); }
.acx-footnote { margin: 0; font-size: 11px; color: var(--acx-muted); }

/* ------------------------------------------------------------------ Summary and composition (restyled) */

.acx-main-side .accounts-summary-card { animation-delay: .05s; }
.accounts-summary-card .acx-head .tx-seg { margin-left: auto; }
.acx-bone-list { display: flex; flex-direction: column; gap: 14px; }

/* Summary card (acx-sum-): a three-tile strip (period flow, or assets / liabilities / net worth), one composition bar,
   bucket sections with in / out facts and fill rows whose background grows with the category's share, account-type
   count tiles and the refresh footnote. Tokens are the card's (--rc-*, --tx-hero-tile) and the Accounts tones. */

.accounts-summary-card { container-type: inline-size; }

.acx-sum-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}

.acx-sum-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 10px 12px 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--rc-card-border);
    background: var(--tx-hero-tile);
    overflow: hidden;
}

.acx-sum-tile::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: var(--acx-sum-accent, var(--acx-light));
}

.acx-sum-tile-in { --acx-sum-accent: var(--acx-positive); }
.acx-sum-tile-out { --acx-sum-accent: var(--acx-negative); }
.acx-sum-tile-net { --acx-sum-accent: var(--acx-accent); }

.acx-sum-tile-caption {
    max-width: 100%;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--acx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-sum-tile-value {
    max-width: 100%;
    font-family: var(--tx-font);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    color: var(--rc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-sum-tile-note {
    max-width: 100%;
    font-size: 11px;
    color: var(--acx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-sum-split,
.acx-sum-bar {
    display: flex;
    gap: 2px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--acx-neutral-soft);
}

.acx-sum-split { height: 10px; margin: 0 0 8px; }
.acx-sum-bar { height: 8px; margin: 0 0 8px; }
.acx-sum-split span,
.acx-sum-bar span { display: block; min-width: 2px; height: 100%; }

.acx-sum-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    font-size: 11.5px;
    color: var(--acx-muted);
}

.acx-sum-legend span { display: inline-flex; align-items: center; gap: 6px; }

.acx-sum-section + .acx-sum-section,
.acx-sum-tiles + .acx-sum-section,
.acx-sum-legend + .acx-sum-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--rc-card-border);
}

.acx-sum-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
}

.acx-sum-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--acx-muted);
}

.acx-sum-section-total {
    font-family: var(--tx-font);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--rc-text);
    white-space: nowrap;
}

.acx-sum-bucket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
}

.acx-sum-bucket-text { min-width: 0; }

.acx-sum-bucket-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-family: var(--tx-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rc-text);
}

.acx-sum-bucket-change { margin-top: 1px; font-size: 11.5px; font-weight: 600; }

.acx-sum-bucket-value {
    flex: 0 0 auto;
    font-family: var(--tx-font);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    color: var(--rc-text);
}

.acx-sum-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 0 8px;
    font-size: 11.5px;
    color: var(--acx-muted);
}

.acx-sum-fact { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.acx-sum-fact strong { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--rc-text); }
.acx-sum-fact a { color: var(--acx-accent); font-weight: 600; text-decoration: none; }
.acx-sum-fact a:hover { text-decoration: underline; }
.acx-sum-fact-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acx-light); }
.acx-sum-fact-in .acx-sum-fact-dot { background: var(--acx-positive); }
.acx-sum-fact-out .acx-sum-fact-dot { background: var(--acx-negative); }

.acx-sum-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.acx-sum-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: calc(100% + 16px);
    margin: 0 -8px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 12.5px;
    overflow: hidden;
}

.acx-sum-row::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--acx-sum-fill, 0%);
    border-radius: 10px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--acx-sum-color, var(--acx-light)) 7%, transparent) 0%, color-mix(in srgb, var(--acx-sum-color, var(--acx-light)) 20%, transparent) 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - min(var(--ci-blend, 32px), 50%)), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - min(var(--ci-blend, 32px), 50%)), transparent 100%);
    pointer-events: none;
}

/* A full-width row highlight meets nothing: no fade (blend-bars.css rule for single fills). */
.acx-sum-row[style*="--acx-sum-fill: 100%"]::before {
    -webkit-mask-image: none;
    mask-image: none;
}

.acx-sum-row > * { position: relative; }
.acx-sum-row.is-zero { opacity: .55; }

.acx-sum-row-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--rc-text);
}

.acx-sum-row-value {
    flex: 0 0 auto;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--rc-text);
}

.acx-sum-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acx-sum-color, var(--acx-light));
}

.acx-sum-empty { margin: 0; font-size: 12px; color: var(--acx-muted); }

.acx-sum-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--acx-accent);
    cursor: pointer;
}

.acx-sum-more i { font-size: 16px; }
.acx-sum-more:hover { text-decoration: underline; }
.acx-sum-more:focus-visible { outline: 2px solid var(--acx-accent); outline-offset: 2px; border-radius: 6px; }

.acx-sum-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.acx-sum-count {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--rc-card-border);
    background: var(--tx-hero-tile);
}

.acx-sum-count i { flex: 0 0 auto; font-size: 15px; color: var(--acx-sum-color, var(--acx-chip-fg)); }
.acx-sum-count.is-zero { opacity: .55; }

.acx-sum-count-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11.5px;
    color: var(--acx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-sum-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--acx-muted);
}

@container (max-width: 420px) {
    .acx-sum-tiles,
    .acx-sum-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .acx-sum-tiles .acx-sum-tile:last-child { grid-column: span 2; }
}

.acx-composition-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: .5rem 0 .85rem;
}

.acx-section-heading { margin: 0; font-family: var(--tx-font); font-size: 1.15rem; font-weight: 700; color: var(--rc-text); }

.acx-composition {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
    .acx-composition { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.acx-breakdown-card { height: 100%; }

/* ------------------------------------------------------------------ Net worth overview (Overview / History) */

.acx-overview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.acx-overview-copy { min-width: 0; flex: 1 1 320px; }

/* The menus top right: Overview / History, and under it the view or the chart type. */
.acx-overview-menus {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .6rem;
    flex: 0 1 auto;
    max-width: 100%;
    margin-left: auto;
}

.tx-seg.acx-sub-seg { width: min(520px, 100%); }
.tx-seg.acx-view-seg { min-width: 220px; }
.acx-history-loading { position: relative; height: 320px; }
.acx-history-loading .acx-bone-wave { position: absolute; inset: 20% 0 0; width: 100%; height: 80%; }

@media (max-width: 991.98px) {
    .acx-overview-menus { align-items: stretch; width: 100%; margin-left: 0; }
    .tx-seg.acx-view-seg { align-self: flex-start; }
    .tx-seg.acx-sub-seg { width: 100%; }
}

/* ------------------------------------------------------------------ Skeletons (the Dashboard sweep, aqua) */

.acx-skeleton { --dsh-bone: rgba(13, 148, 136, .1); --dsh-wave: rgba(255, 255, 255, .85); --dsh-line: #0D9488; }
[data-bs-theme="dark"] .acx-skeleton { --dsh-bone: rgba(45, 212, 191, .12); --dsh-wave: rgba(190, 255, 245, .1); --dsh-line: #2DD4BF; }
.acx-bone-search { display: block; height: 40px; margin-bottom: 12px; border-radius: 12px; }
.acx-bone-chips { display: flex; gap: 8px; margin-bottom: 14px; }
.acx-bone-chips .dsh-bone { height: 36px; border-radius: 12px; }
.acx-bone-group { margin: 8px 0 4px; }
.acx-bone-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.acx-bone-logo { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; }
.acx-bone-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; }
.acx-bone-seg { display: block; height: 38px; margin-bottom: 12px; border-radius: 13px; }
.acx-bone-change { margin-top: 10px; }
.acx-bone-wave { display: block; width: 100%; height: 160px; margin-top: 12px; }

/* ------------------------------------------------------------------ The account sheet (the mobile AccountDetailSheetView) */

/* Wider than the signal sheets, as tall as the viewport allows, scrolling inside; the type's hero palette behind it. */
section.dbs-sheet.acx-sheet {
    --acx-sheet-bg: linear-gradient(158deg, #CBF1EE 0%, #E7F8F6 45%, #FFFFFF 100%);
    --acx-sheet-border: #BCE6E2;
    --acx-sheet-line: #15803D;
    --acx-sheet-area: rgba(22, 163, 74, .22);
    --acx-sheet-tile: rgba(255, 255, 255, .6);
    --acx-sheet-glyph: #0D9488;
    --dsh-line: var(--acx-sheet-line);
    width: min(780px, calc(100vw - 1.5rem));
    max-height: min(92vh, calc(100dvh - 1rem));
    padding: .65rem 1.5rem 1.75rem;
    border-color: var(--acx-sheet-border);
    background: var(--acx-sheet-bg);
    background-attachment: local;
    scrollbar-width: thin;
}

section.dbs-sheet.acx-sheet--liabilities {
    --acx-sheet-bg: linear-gradient(158deg, #F6D3DA 0%, #FBE9EC 45%, #FFFFFF 100%);
    --acx-sheet-border: #F0C8D0;
    --acx-sheet-line: #DC2626;
    --acx-sheet-area: rgba(220, 38, 38, .2);
    --acx-sheet-tile: rgba(255, 255, 255, .45);
    --acx-sheet-glyph: #EF4444;
}

section.dbs-sheet.acx-sheet--investments {
    --acx-sheet-bg: linear-gradient(158deg, #D4F5E0 0%, #EBFAF1 45%, #FFFFFF 100%);
    --acx-sheet-border: #C2EACF;
    --acx-sheet-line: #16A34A;
    --acx-sheet-area: rgba(22, 163, 74, .22);
    --acx-sheet-tile: rgba(255, 255, 255, .7);
    --acx-sheet-glyph: #16A34A;
}

section.dbs-sheet.acx-sheet--manual {
    --acx-sheet-bg: linear-gradient(158deg, #EAEBEF 0%, #F4F5F7 45%, #FFFFFF 100%);
    --acx-sheet-border: #D9DBE0;
    --acx-sheet-line: #374151;
    --acx-sheet-area: rgba(55, 65, 81, .18);
    --acx-sheet-tile: rgba(243, 244, 246, .8);
    --acx-sheet-glyph: #374151;
}

[data-bs-theme="dark"] section.dbs-sheet.acx-sheet {
    --acx-sheet-bg: linear-gradient(158deg, #12393A 0%, #13252E 45%, #10131C 100%);
    --acx-sheet-border: #1D3A40;
    --acx-sheet-line: #4CC38A;
    --acx-sheet-area: rgba(76, 195, 138, .3);
    --acx-sheet-tile: rgba(23, 74, 75, .5);
    --acx-sheet-glyph: #2DD4BF;
    background: var(--acx-sheet-bg);
    border-color: var(--acx-sheet-border);
}

[data-bs-theme="dark"] section.dbs-sheet.acx-sheet--liabilities {
    --acx-sheet-bg: linear-gradient(158deg, #321A2C 0%, hsl(calc(271.76deg + var(--ci-accent-shift, 0deg)) 25.37% 13.14%) 45%, #10131C 100%);
    --acx-sheet-border: #3D2433;
    --acx-sheet-line: #F87171;
    --acx-sheet-area: rgba(248, 113, 113, .28);
    --acx-sheet-tile: rgba(77, 27, 37, .5);
    --acx-sheet-glyph: #F87171;
}

[data-bs-theme="dark"] section.dbs-sheet.acx-sheet--investments {
    --acx-sheet-bg: linear-gradient(158deg, #173522 0%, #142722 45%, #10131C 100%);
    --acx-sheet-border: #1F3A2B;
    --acx-sheet-line: #34D399;
    --acx-sheet-area: rgba(52, 211, 153, .28);
    --acx-sheet-tile: rgba(27, 77, 53, .5);
    --acx-sheet-glyph: #34D399;
}

[data-bs-theme="dark"] section.dbs-sheet.acx-sheet--manual {
    --acx-sheet-bg: linear-gradient(158deg, #25282F 0%, #191C23 45%, #111318 100%);
    --acx-sheet-border: #34373F;
    --acx-sheet-line: #D1D5DB;
    --acx-sheet-area: rgba(209, 213, 219, .22);
    --acx-sheet-tile: rgba(42, 45, 53, .7);
    --acx-sheet-glyph: #E5E7EB;
}

.acx-sheet-body { display: flex; flex-direction: column; gap: 18px; color: var(--rc-text); }

.acx-sheet-head { display: flex; align-items: center; gap: 14px; }
.acx-sheet-titles { flex: 1 1 auto; min-width: 0; }

.acx-sheet-title {
    margin: 0;
    font-family: var(--tx-font);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--rc-text);
    overflow-wrap: anywhere;
}

.acx-sheet-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--acx-muted); }

.acx-sheet-close {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    background: var(--acx-sheet-tile);
    color: var(--rc-text);
    cursor: pointer;
}

.acx-sheet-balance { display: flex; flex-direction: column; gap: 4px; }

.acx-sheet-amount {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--tx-font);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--rc-text);
}

.acx-sheet-amount small { font-size: .95rem; font-weight: 500; color: var(--acx-muted); }
.acx-sheet-fresh { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--acx-muted); }
.acx-dot-inline { width: 9px; height: 9px; border-radius: 50%; }
.acx-sheet-change { font-size: 14px; font-weight: 500; }

.acx-sheet-reconnect {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: var(--acx-sheet-tile);
    border: 1px solid var(--acx-sheet-border);
}

.acx-sheet-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.acx-sheet-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--acx-sheet-tile);
    border: 1px solid var(--acx-sheet-border);
}

.acx-sheet-section { display: flex; flex-direction: column; gap: 10px; }

.acx-sheet-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.acx-sheet-kicker {
    margin: 0;
    font-family: var(--tx-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--rc-text);
}

.acx-sheet-chart { position: relative; height: 200px; }

.acx-sheet-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: opacity .2s ease;
    animation: acx-fade .4s ease both;
}

.acx-sheet-svg.is-loading { opacity: .45; }
.acx-sheet-stop-0 { stop-color: var(--acx-sheet-area); }
.acx-sheet-stop-1 { stop-color: var(--acx-sheet-area); stop-opacity: 0; }

.acx-sheet-line {
    fill: none;
    stroke: var(--acx-sheet-line);
    stroke-width: 2.25;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.acx-sheet-glow {
    fill: none;
    stroke: var(--acx-sheet-line);
    stroke-width: 7;
    stroke-opacity: .16;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.acx-sheet-wave { position: absolute; inset: 10% 0 0; width: 100%; height: 90%; }

.acx-sheet-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    color: var(--acx-sheet-glyph);
}

.acx-sheet-empty { margin: 0; padding: 1rem 0; font-size: 13px; color: var(--acx-muted); text-align: left; }
.acx-sheet-chart > .acx-sheet-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.acx-sheet-range-labels { display: flex; justify-content: space-between; margin-top: -4px; font-size: 13px; color: var(--acx-muted); }

.acx-facts { display: flex; flex-direction: column; margin: 0; }

.acx-fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--acx-sheet-border) 70%, transparent);
}

.acx-fact:last-child { border-bottom: 0; }
.acx-fact dt { font-size: 13.5px; font-weight: 400; color: var(--acx-muted); }
.acx-fact dd { margin: 0; font-size: 13.5px; font-weight: 500; text-align: right; color: var(--rc-text); overflow-wrap: anywhere; }
.acx-fact dd.acx-fact-muted { color: var(--acx-muted); }
.acx-fact dd.acx-fact-caution { color: var(--acx-caution); }
.acx-fact dd.acx-fact-critical { color: var(--acx-critical); }
.acx-fact dd.acx-fact-positive { color: var(--acx-positive); }
.acx-fact dd.acx-fact-negative { color: var(--acx-negative); }

/* Equal tiles across the sheet, as on mobile (two per row on phones, an odd last tile spans the row). */
.acx-sheet-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }

.acx-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--acx-sheet-border);
    background: var(--acx-sheet-tile);
    color: var(--rc-text);
    font-family: var(--tx-font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}

.acx-action .tx-glyph { color: var(--acx-sheet-glyph); font-size: 15px; }
.acx-action:hover { filter: brightness(1.03); transform: translateY(-1px); }

.acx-sheet-rename {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--acx-sheet-border);
    background: var(--acx-sheet-tile);
}

.acx-sheet-rename-title { margin: 0; font-family: var(--tx-font); font-size: 15px; font-weight: 600; }

.acx-sheet-input {
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--rc-card-border);
    background: var(--rc-card);
    color: var(--rc-text);
    font-size: 14px;
    outline: none;
}

.acx-sheet-input:focus { border-color: var(--acx-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acx-accent) 22%, transparent); }
.acx-sheet-error { margin: 0; font-size: 12px; font-weight: 600; color: var(--acx-critical); }
.acx-sheet-rename-actions { display: flex; justify-content: flex-end; gap: 8px; }

.acx-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    font-family: var(--tx-font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.acx-btn:disabled { opacity: .6; cursor: default; }
.acx-btn-primary { background: var(--tx-primary); color: #FFFFFF; }
.acx-btn-ghost { background: transparent; color: var(--rc-text); }

.acx-sheet-notice {
    align-self: center;
    margin: 0;
    padding: .45rem .9rem;
    border-radius: 12px;
    background: var(--acx-sheet-tile);
    font-size: 13px;
    font-weight: 600;
    color: var(--acx-positive);
}

.acx-sheet-tx { display: flex; flex-direction: column; }

.acx-tx {
    display: flex;
    align-items: center;
    gap: 12px;
    width: calc(100% + 16px);
    margin: 0 -8px;
    padding: 9px 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.acx-tx:hover { background: var(--acx-sheet-tile); }
.acx-tx.is-active { background: var(--acx-sheet-tile); box-shadow: inset 3px 0 0 var(--acx-sheet-glyph); }

.acx-tx-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    overflow: hidden;
}

.acx-tx-avatar img { width: 100%; height: 100%; object-fit: cover; }

.acx-tx-initial {
    background: linear-gradient(135deg, hsl(calc(247.38deg + var(--ci-accent-shift, 0deg)) 87.14% 72.55%), hsl(calc(247.83deg + var(--ci-accent-shift, 0deg)) 76.3% 58.63%));
    color: #FFFFFF;
    font-family: var(--tx-font);
    font-size: 14px;
    font-weight: 600;
}

.acx-tx-text { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }

.acx-tx-name {
    font-family: var(--tx-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--rc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acx-tx-meta { display: flex; gap: 10px; font-size: 12px; color: var(--acx-muted); white-space: nowrap; overflow: hidden; }
.acx-tx-amount { flex: 0 0 auto; font-family: var(--tx-font); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--rc-text); }

@media (max-width: 575.98px) {
    section.dbs-sheet.acx-sheet { width: 100%; padding: .6rem 1rem 1.25rem; }
    .acx-sheet-amount { font-size: 1.8rem; }
    .acx-sheet-actions { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .acx-action:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ Motion */

@keyframes acx-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes acx-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .acx-card,
    .ah,
    .acx-note,
    .acx-attention,
    .acx-attention-row,
    .acx-panel,
    .ah-svg,
    .ah-area,
    .acx-sheet-svg,
    .ah-chart-loading {
        animation: none;
    }

    .ah-range-pill,
    .tx-seg.acx-toggle .tx-seg-pill {
        transition: none;
    }

    .ah-spin {
        animation-duration: 2.4s;
    }
}
