:root {
  --canvas: #f5f5f2;
  --paper: #ffffff;
  --ink: #28263a;
  --muted: #777783;
  --faint: #a1a0aa;
  --line: #e7e7e8;
  --accent: #514384;
  --accent-soft: #f0edf7;
  --green: #23725c;
  --green-soft: #eaf4ef;
  --red: #a34148;
  --red-soft: #fcf0f0;
  --amber: #936324;
  --amber-soft: #fbf3e4;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
.login-shell { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: max(35px, env(safe-area-inset-top)) 22px max(35px, env(safe-area-inset-bottom)); background: radial-gradient(ellipse at top left, #e9e3f1, transparent 60%), #f4f3f6; }
.login-card { width: 100%; max-width: 430px; background: #fff; border: 1px solid #e4deeb; border-radius: 17px; box-shadow: 0 15px 65px #3524480b; padding: 37px; }
.login-icon { border-radius: 14px; display: block; margin-bottom: 29px; }
.login-card h1 { font-size: 32px; letter-spacing: -1px; line-height: 1.25; }
.login-description { font-size: 12px; line-height: 1.7; color: #96849f; margin: 15px 0 25px; }
.login-card form { display: grid; }
.login-card label { font-size: 10px; color: #8b759c; margin: 15px 0 8px; }
.login-card input { width: 100%; min-height: 45px; border: 1px solid #ded4e7; border-radius: 7px; padding: 11px 13px; font-size: 16px; color: var(--ink); background: #fff; }
.password-field { display: flex; align-items: stretch; gap: 8px; }
.password-field input { flex: 1; min-width: 0; }
.password-visibility { flex-shrink: 0; min-width: 88px; min-height: 45px; border: 1px solid #ded4e7; border-radius: 7px; padding: 8px 10px; background: #f8f6fa; color: var(--ink); font-size: 12px; }
.password-visibility:focus-visible { outline: 2px solid #675089; outline-offset: 2px; }
.password-hint { color: #865d16; font-size: 11px; line-height: 1.6; margin: 10px 0 0; }
.login-submit { margin-top: 22px; border: 1px solid #332743; background: #332743; color: #fff; border-radius: 7px; padding: 12px; font-size: 12px; font-weight: 550; min-height: 44px; }
.login-message { color: #987ca8; font-size: 11px; line-height: 1.7; min-height: 20px; margin: 17px 0 0; }
.login-message.is-error { color: var(--red); }
.install-help { border-top: 1px solid #eee7f3; margin-top: 21px; padding-top: 17px; font-size: 10px; color: #9b83ac; line-height: 1.7; }
.install-help summary { cursor: pointer; }
.install-help p { margin: 11px 0 0; }
.pwa-install { position: fixed; z-index: 20; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); border: 1px solid #49375c; border-radius: 24px; background: #49375c; color: #fff; padding: 12px 18px; font-size: 11px; box-shadow: 0 4px 18px #30213e20; }
button, select, input { font: inherit; }
button, select, a, summary { -webkit-tap-highlight-color: transparent; }
button, select { color: var(--ink); }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #a99ada; outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .65; }
svg { display: block; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; min-width: 0; width: 100%; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { min-width: 0; padding: 37px 24px 26px; background: #29263e; color: #fff; min-height: 100vh; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin: 0 4px 61px; }
.brand-symbol { font-size: 42px; line-height: .9; font-weight: 650; letter-spacing: -7px; padding-right: 7px; }
.brand-symbol span { color: #b8dca9; }
.brand strong { display: block; font-size: 26px; font-weight: 580; line-height: 1.1; letter-spacing: -.8px; }
.brand small { display: block; font-size: 7.5px; letter-spacing: 1.1px; margin-top: 7px; color: #c3bed2; }
.sidebar-label { color: #9e96b4; font-size: 9px; font-weight: 650; letter-spacing: 1.5px; padding-left: 14px; margin-bottom: 15px; }
.sidebar-navigation { min-width: 0; max-width: 100%; display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 550; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 12px; color: #d5cde2; text-decoration: none; }
.nav-item:first-child, .nav-item:hover { background: #413b56; border-color: #514961; color: #fff; }
.nav-item svg { width: 17px; stroke: #d9d3e7; stroke-width: 1.4; }
.nav-count { margin-left: auto; font-size: 10px; color: #e7e0f3; background: #58506c; border-radius: 5px; padding: 1px 6px 2px; }
.sidebar-note { margin: auto 12px; padding-top: 30px; padding-bottom: 30px; }
.sidebar-note .eyebrow { font-size: 8px; color: #bab0d2; letter-spacing: 1.3px; }
.sidebar-note p { font-size: 21px; font-weight: 350; line-height: 1.45; letter-spacing: -.5px; margin: 17px 0 22px; }
.mini-rule { width: 26px; height: 2px; background: #a7c89e; margin-bottom: 22px; }
.sidebar-note > span:last-child { color: #b2a9c4; font-size: 11px; line-height: 1.8; }
.sidebar-bottom { border-top: 1px solid #443d57; padding: 24px 0 0; display: flex; gap: 9px; align-items: center; }
.readonly-icon svg { width: 20px; stroke: #b4acbf; stroke-width: 1.3; }
.sidebar-bottom strong { display: block; font-size: 10px; font-weight: 550; color: #d5cfdf; }
.sidebar-bottom small { display: block; font-size: 8.5px; color: #a49aaf; margin-top: 4px; }
.voice-status { display: flex; align-items: flex-start; gap: 9px; border: 1px solid #49405a; background: #352e46; border-radius: 7px; padding: 11px; margin-bottom: 18px; }
.voice-status > svg { width: 17px; min-width: 17px; stroke: #b5a4c7; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.voice-status strong { display: block; color: #d0c4dd; font-size: 9px; font-weight: 550; }
.voice-status span { display: inline-flex; align-items: center; gap: 5px; color: #b8a8c7; font-size: 8px; margin-top: 6px; }
.voice-status span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.voice-status.is-active span { color: #aed1a4; }
.voice-status p { color: #a89ab6; font-size: 7.5px; line-height: 1.7; margin: 7px 0 0; }
main { min-width: 0; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 44px; border-bottom: 1px solid var(--line); background: #fafaf8; }
.topbar-account { display: flex; align-items: center; gap: 16px; }
.profile-name { font-size: 10px; color: #8a739d; }
.logout-button { border: 1px solid #ded4e7; background: #fff; border-radius: 5px; color: #8a739d; padding: 7px 10px; font-size: 9px; }
.breadcrumb { font-size: 11px; color: #81808c; }
.breadcrumb span { margin: 0 12px; color: #b8b5c1; }
.timezone { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #81808c; }
.timezone-dot { height: 5px; width: 5px; background: #8c829f; border-radius: 50%; }
.content { max-width: 1500px; margin: 0 auto; padding: 39px 44px 25px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.eyebrow { margin: 0 0 11px; font-size: 9px; line-height: 1.4; font-weight: 700; letter-spacing: 1.5px; color: #8d829f; }
h1 { font-size: clamp(26px, 2.55vw, 36px); line-height: 1.2; font-weight: 550; letter-spacing: -1.2px; margin: 0; }
.heading-description { color: var(--muted); font-size: 12px; margin: 12px 0 0; line-height: 1.6; }
.refresh-button { flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 9px; background: #2f2a45; color: #fff; border: 1px solid #2f2a45; border-radius: 7px; padding: 11px 16px; font-size: 11px; min-width: 115px; transition: background .15s; }
.refresh-button:hover { background: #49405f; }
.refresh-button svg { width: 15px; stroke: #e1dbea; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button[aria-busy="true"] svg { animation: spin 1s linear infinite; }
.status-strip { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 17px; background: #eeeef0; border: 1px solid #e6e5e9; border-radius: 8px; margin-bottom: 29px; }
.status-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.status-main > span:last-child { color: #7a7685; font-size: 10px; line-height: 1.5; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; line-height: 1.4; font-weight: 600; border-radius: 5px; padding: 5px 7px; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-badge.neutral { color: #7c738b; background: #e4e1e9; }
.status-badge.good { color: var(--green); background: var(--green-soft); }
.status-badge.stale { color: var(--amber); background: var(--amber-soft); }
.status-badge.error { color: var(--red); background: var(--red-soft); }
.last-reading { display: flex; align-items: center; gap: 9px; flex-shrink: 0; font-size: 9px; }
.last-reading span { color: #8b8694; }
.last-reading strong { font-weight: 500; color: #635d70; }
.notice { font-size: 11px; line-height: 1.7; padding: 13px 16px; border-radius: 7px; margin: -13px 0 26px; }
.error-notice { color: #934c48; background: #fbedeb; border: 1px solid #efd6d1; }
.info-notice { color: #70617e; background: #efedf4; border: 1px solid #e0dae9; }
.warning-notice { color: #8a6536; background: #faf2e4; border: 1px solid #ecdfc6; }
.notice p { margin: 0; }
.notice p + p { margin-top: 4px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
.section-heading p { color: var(--muted); font-size: 10px; margin: 6px 0 0; }
.section-caption { color: #8c8797; font-size: 9px; background: #eeedef; padding: 6px 9px; border-radius: 5px; }
.currency-overview { display: grid; gap: 14px; }
.currency-block { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 2px #28263a02; }
.currency-header { display: flex; gap: 10px; align-items: center; padding: 16px 20px 0; }
.currency-tag { color: var(--accent); background: var(--accent-soft); font-weight: 650; font-size: 10px; padding: 4px 7px; border-radius: 4px; }
.currency-description { color: var(--muted); font-size: 9px; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 21px 0; gap: 24px 0; }
.overview-metric { padding: 0 20px; min-width: 0; }
.overview-metric + .overview-metric { border-left: 1px solid #efedf2; }
.overview-metric:nth-child(4n + 1) { border-left: 0; }
.metric-label { display: block; font-size: 10px; color: #888391; line-height: 1.5; }
.metric-value { display: block; margin-top: 10px; font-size: clamp(19px, 1.7vw, 26px); line-height: 1.2; font-weight: 550; letter-spacing: -.65px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-footnote { display: block; font-size: 8px; line-height: 1.5; color: #9993a0; margin-top: 9px; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.missing { color: #b9b4c0; }
.overview-empty .metric-value { color: #b9b4c0; }
.overview-empty .currency-tag { background: #f0eef3; color: #89828f; }
.accounts-section { margin-top: 29px; }
.accounts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.accounts-grid.single-account, .financial-bridges.single-account, .trade-outcomes.single-account { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.account-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; }
.account-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 23px; }
.account-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-icon { display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; border-radius: 8px; background: #efedf6; color: #65568d; font-size: 11px; font-weight: 650; flex-shrink: 0; }
.account-name h3 { font-size: 12px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.account-currency { display: block; color: #a19ba8; font-size: 8px; margin-top: 4px; }
.account-strategy { color: #8d829a; font-size: 9px; line-height: 1.5; margin: -12px 0 17px; overflow-wrap: anywhere; }
.account-card .status-badge { font-size: 8px; padding: 4px 6px; }
.account-equity { margin-bottom: 17px; }
.account-equity .metric-label { font-size: 9px; }
.account-equity .metric-value { font-size: 27px; }
.account-balance { color: #9a95a1; font-size: 9px; margin: 8px 0 0; }
.account-balance strong { font-weight: 500; color: #746c80; margin-left: 3px; }
.account-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; border-top: 1px solid #eeeaf2; padding-top: 16px; }
.account-metrics .metric-label { font-size: 8px; }
.account-metrics .metric-value { font-size: 15px; letter-spacing: -.3px; margin-top: 7px; }
.account-bottom { border-top: 1px solid #eeeaf2; padding-top: 13px; margin-top: 18px; display: flex; align-items: center; gap: 6px; font-size: 8px; line-height: 1.5; color: #9b94a3; }
.account-bottom svg { height: 11px; width: 11px; stroke: #a29aa9; stroke-width: 1.4; flex-shrink: 0; }
.account-note { font-size: 9px; line-height: 1.6; color: #83788c; margin: 10px 0 0; }
.ownership-block { grid-column: 1 / -1; background: #f5f2f8; border: 1px solid #e9e1ef; border-radius: 7px; padding: 13px; margin-top: 15px; }
.ownership-heading { font-size: 9px; font-weight: 600; color: #7b638e; margin: 0 0 11px; }
.ownership-shares { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ownership-shares > div { padding: 5px 0; }
.ownership-shares span { display: block; color: #a18eaf; font-size: 8px; }
.ownership-shares strong { display: block; font-weight: 550; font-size: 17px; color: #7b638e; margin-top: 5px; }
.ownership-block > p:last-child { color: #a18eaf; font-size: 8px; line-height: 1.65; margin: 10px 0 0; }
.ownership-table { border-collapse: collapse; width: 100%; margin-top: 13px; font-size: 7px; }
.ownership-table th, .ownership-table td { padding: 6px 3px; text-align: right; border-top: 1px solid #e9e1ef; font-variant-numeric: tabular-nums; }
.ownership-table th:first-child { text-align: left; }
.ownership-table th { font-weight: 500; color: #a18eaf; }
.ownership-table td { color: #7f6993; }
.ownership-more { margin-top: 11px; }
.ownership-more summary { cursor: pointer; color: #967aa8; font-size: 8px; line-height: 1.6; }
.ownership-more .ownership-table { margin-top: 9px; }
.analysis-section { margin-top: 32px; }
.analysis-section > .section-heading .eyebrow { font-size: 8px; margin-bottom: 6px; }
.analysis-section h3 { margin: 0; font-size: 13px; font-weight: 600; }
.analysis-toolbar { display: flex; gap: 8px; }
.analysis-notice { padding: 13px 16px; background: #eeeaf4; color: #7b6d8c; border: 1px solid #e1daeb; border-radius: 7px; font-size: 10px; line-height: 1.7; margin-bottom: 16px; }
.analysis-notice:empty { display: none; }
.analysis-notice.is-stale { background: var(--amber-soft); border-color: #ecdfc6; color: var(--amber); }
.financial-bridges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.financial-bridge { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 19px; }
.bridge-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 17px; }
.bridge-rows { margin: 0; }
.bridge-rows > div { display: flex; justify-content: space-between; gap: 13px; font-size: 9px; padding: 7px 0; line-height: 1.5; }
.bridge-rows dt { color: #8b8197; }
.bridge-rows dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; font-weight: 550; white-space: nowrap; }
.bridge-rows .bridge-total { border-top: 1px solid #ebe6f0; border-bottom: 1px solid #ebe6f0; margin: 7px 0; padding: 11px 0; }
.bridge-rows .bridge-total dt { color: #51435f; font-weight: 600; }
.bridge-rows .bridge-total dd { font-size: 15px; letter-spacing: -.3px; }
.bridge-note { font-size: 8px; color: #9c8fa8; line-height: 1.7; margin: 13px 0 0; }
.bridge-note.warning { color: var(--amber); }
.analysis-chart-card, .ledger-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; margin-top: 16px; }
.analysis-description { color: #94899e; font-size: 9px; line-height: 1.7; margin: 7px 0 0; }
.period-charts { margin-top: 20px; }
.period-chart + .period-chart { padding-top: 20px; border-top: 1px solid #ece7f2; margin-top: 21px; }
.period-chart-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.period-chart-heading p { margin: 0; font-size: 8px; color: #a393b0; }
.period-chart-scroll { overflow-x: auto; padding-bottom: 4px; }
.period-chart-svg { width: 100%; min-height: 180px; }
.analysis-empty { padding: 28px 15px; text-align: center; font-size: 11px; line-height: 1.7; color: #a397af; }
.analysis-chart-note { font-size: 8px; color: #a295ad; line-height: 1.6; margin: 8px 0 0; }
.trade-outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 16px; }
.outcome-card { background: #f0eef3; border: 1px solid #e5dfee; border-radius: 8px; padding: 17px 19px; }
.outcome-heading { font-size: 10px; font-weight: 600; color: #7d6e8e; margin: 0 0 14px; }
.outcome-counts { display: flex; gap: 20px; margin-bottom: 12px; }
.outcome-counts strong { display: block; font-size: 20px; letter-spacing: -.5px; font-weight: 550; }
.outcome-counts span { display: block; font-size: 8px; color: #a294ad; margin-top: 3px; }
.outcome-legend { font-size: 8px; line-height: 1.6; color: #9a8ca6; margin: 0; }
.outcome-statistics { margin: 15px 0 0; padding-top: 10px; border-top: 1px solid #e0d5e9; display: grid; gap: 7px; }
.outcome-statistics > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 8px; line-height: 1.6; }
.outcome-statistics dt { color: #9a87a8; }
.outcome-statistics dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; color: #796388; font-weight: 550; }
.outcome-statistics dd.positive { color: var(--green); }
.outcome-statistics dd.negative { color: var(--red); }
.outcome-statistics .statistic-basis { display: block; color: #a895b6; font-size: 7px; font-weight: 400; }
section[id], #ledger-section { scroll-margin-top: 20px; }
.ledger-scroll { overflow-x: auto; margin-top: 20px; }
.ledger-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ledger-filters input { border: 1px solid #e5e1e9; background: #fff; color: #776583; border-radius: 5px; padding: 8px 10px; font-size: 9px; min-width: 215px; }
.ledger-filters input::placeholder { color: #ae9bbb; }
.ledger-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 9px; }
.ledger-table th { color: #9b8aa9; font-weight: 500; padding: 10px 10px 12px; border-bottom: 1px solid #e8e1ed; white-space: nowrap; }
.ledger-table td { padding: 12px 10px; border-bottom: 1px solid #f0ebf4; color: #82718f; vertical-align: top; }
.ledger-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-table td.positive { color: var(--green); }
.ledger-table td.negative { color: var(--red); }
.ledger-date { white-space: nowrap; font-size: 8px; }
.event-type { display: inline-block; padding: 4px 6px; border-radius: 4px; background: #f1edf6; color: #8c769e; white-space: nowrap; font-size: 8px; }
.event-outcome { display: block; margin-top: 4px; font-size: 7px; }
.event-details { min-width: 70px; font-size: 8px; }
.event-details summary { color: #857097; cursor: pointer; padding: 2px 0; }
.event-details dl { min-width: 175px; margin: 10px 0 0; background: #f8f6fa; padding: 10px; border-radius: 5px; font-size: 8px; }
.event-details dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.event-details dt { color: #a18daf; }
.event-details dd { margin: 0; text-align: right; max-width: 130px; overflow-wrap: anywhere; }
.ledger-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-top: 16px; color: #a08dac; font-size: 8px; }
.ledger-footer button { border: 1px solid #dfd5e7; background: #f7f3fa; border-radius: 5px; padding: 7px 10px; color: #927da2; font-size: 9px; }
.history-card { margin-top: 27px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 23px 23px 0; }
.history-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.history-header .eyebrow { font-size: 8px; margin-bottom: 6px; }
.history-header h2 { font-size: 17px; }
.chart-controls { display: flex; gap: 8px; }
select { background: #fff; border: 1px solid #e5e1e9; border-radius: 5px; font-size: 10px; padding: 8px 26px 8px 10px; max-width: 200px; }
.chart-subheader { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 17px; }
.chart-subheader p { color: #8a8293; font-size: 9px; line-height: 1.5; margin: 0; }
.range-switch { display: flex; background: #f5f4f7; border-radius: 5px; padding: 3px; flex-shrink: 0; }
.range-switch button { padding: 5px 9px; border: 0; border-radius: 3px; background: transparent; font-size: 9px; color: #948a9f; }
.range-switch button[aria-pressed="true"] { background: #fff; color: #66527e; box-shadow: 0 1px 3px #29263e12; }
.chart-area { min-height: 222px; margin-top: 12px; display: flex; align-items: center; position: relative; }
.chart-empty { min-height: 220px; position: relative; display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; }
.chart-grid { position: absolute; inset: 12px 0 20px; display: flex; flex-direction: column; justify-content: space-between; }
.chart-grid span { width: 100%; border-top: 1px dashed #edebef; }
.chart-empty-message { position: relative; text-align: center; background: #ffffffed; padding: 20px 25px; max-width: 420px; }
.chart-empty-icon { display: flex; align-items: center; justify-content: center; width: 37px; height: 37px; margin: 0 auto 11px; border-radius: 10px; background: #f4f1f8; }
.chart-empty-icon svg { width: 21px; stroke: #9d90b2; stroke-width: 1.2; }
.chart-empty-message strong { display: block; font-size: 12px; font-weight: 550; }
.chart-empty-message p { color: #a199a8; font-size: 10px; margin: 7px 0 0; line-height: 1.6; }
.history-svg { width: 100%; height: auto; overflow: visible; }
.history-svg text { font-family: "Segoe UI", sans-serif; }
.chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 8px; color: #9a91a3; border-top: 1px solid #f0edf3; padding: 13px 0; }
.chart-footer > span:first-child { display: flex; align-items: center; gap: 6px; }
.chart-event-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0 0 14px; color: #a18caf; font-size: 8px; }
.chart-event-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.chart-event-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.chart-event-legend .marker-diamond { border-radius: 0; transform: rotate(45deg); }
.chart-legend { height: 5px; width: 5px; background: #7d65a7; border-radius: 50%; display: inline-block; }
.connection-guide { display: flex; gap: 15px; align-items: center; padding: 20px; margin-top: 23px; background: #eeedf2; border: 1px solid #e4e0e9; border-radius: 8px; }
.connection-icon { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; background: #e3deec; border-radius: 9px; flex-shrink: 0; }
.connection-icon svg { width: 22px; stroke: #87739b; stroke-width: 1.4; stroke-linecap: round; }
.connection-guide h2 { font-size: 12px; font-weight: 600; }
.connection-guide p { max-width: 650px; font-size: 10px; line-height: 1.7; color: #8b8097; margin: 6px 0 0; }
.connection-tag { margin-left: auto; color: #8c7d9a; font-size: 8px; padding: 6px 8px; border: 1px solid #d9d1e3; border-radius: 4px; white-space: nowrap; }
.metric-guide { margin-top: 21px; font-size: 10px; border-bottom: 1px solid var(--line); }
.metric-guide summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; color: #7f758b; padding: 0 0 14px; }
.metric-guide summary::-webkit-details-marker { display: none; }
.metric-guide summary > span { font-size: 15px; }
.metric-guide[open] summary > span { transform: rotate(45deg); }
.metric-definitions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 24px; padding-bottom: 15px; }
.metric-definitions p { color: #8a8294; font-size: 10px; line-height: 1.7; margin: 0 0 10px; }
.metric-definitions strong { display: block; color: #65576f; font-weight: 600; margin-bottom: 4px; }
.page-footer { color: #a29aa9; font-size: 8px; line-height: 1.7; display: flex; justify-content: space-between; gap: 25px; padding-top: 10px; }
.page-footer p { max-width: 57%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 1600px) {
  .content { padding-top: 48px; }
  .overview-metrics { padding: 27px 0; }
  .account-card { padding: 24px; }
  .account-top { margin-bottom: 26px; }
  .chart-area { min-height: 270px; }
}
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 194px minmax(0, 1fr); }
  .sidebar { padding-left: 17px; padding-right: 17px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 24px; }
  .brand small { font-size: 6.5px; }
  .content { padding: 31px 27px 20px; }
  .topbar { padding: 0 27px; }
  .status-strip { align-items: flex-start; }
  .status-main { align-items: flex-start; flex-direction: column; gap: 7px; }
  .last-reading { flex-direction: column; align-items: flex-end; gap: 5px; }
  .overview-metric { padding: 0 14px; }
  .metric-label { font-size: 9px; }
  .metric-value { font-size: 20px; }
  .account-card { padding: 16px; }
  .account-top { align-items: flex-start; }
  .account-name { gap: 7px; }
  .account-icon { width: 25px; height: 27px; }
  .account-card .status-badge { font-size: 7px; }
  .connection-tag { display: none; }
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { height: auto; min-height: auto; position: relative; padding: 18px 27px; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .sidebar { padding-top: max(18px, env(safe-area-inset-top)); }
  .brand { margin: 0; }
  .brand-symbol { font-size: 34px; }
  .brand strong { font-size: 24px; }
  .brand small { font-size: 6px; margin-top: 5px; }
  .sidebar-label, .sidebar-note, .sidebar-bottom { display: none; }
  .nav-item { padding: 9px 12px; font-size: 11px; gap: 8px; }
  .sidebar-navigation { display: flex; width: 100%; margin-top: 15px; gap: 4px; overflow-x: auto; }
  .sidebar-navigation .nav-item { flex: 0 0 auto; }
  .sidebar-navigation .nav-item svg { display: none; }
  .voice-status { width: 100%; margin: 12px 0 0; padding: 9px 11px; }
  .voice-status > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
  .voice-status span { margin-top: 0; }
  .voice-status p { margin: 3px 0 0; width: 100%; }
  .nav-item svg { width: 14px; }
  .nav-count { margin-left: 7px; }
  .topbar { min-height: 52px; }
  .overview-metric { padding: 0 18px; }
  .metric-value { font-size: 23px; }
}
@media (max-width: 740px) {
  .content { padding: 26px 20px 18px; }
  .sidebar, .topbar { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 28px; letter-spacing: -.8px; }
  .page-heading { gap: 15px; align-items: flex-start; }
  .heading-description { font-size: 11px; }
  .refresh-button { font-size: 10px; min-width: 0; padding: 9px 11px; margin-top: 24px; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 19px 0; gap: 20px 0; }
  .overview-metric:nth-child(odd) { border-left: 0; }
  .metric-value { font-size: 24px; }
  .accounts-grid { grid-template-columns: 1fr; gap: 12px; }
  .account-card { display: grid; grid-template-columns: 1fr 1fr; padding: 20px; column-gap: 25px; }
  .account-top { grid-column: 1 / -1; align-items: center; margin-bottom: 20px; }
  .account-name { gap: 10px; }
  .account-name h3 { font-size: 14px; }
  .account-icon { width: 30px; height: 30px; }
  .account-card .status-badge { font-size: 8px; }
  .account-equity { margin-bottom: 0; align-self: center; }
  .account-metrics { border-top: 0; padding: 0 0 0 20px; border-left: 1px solid #eeeaf2; }
  .account-bottom, .account-note, .account-strategy { grid-column: 1 / -1; }
  .account-bottom { margin-top: 19px; }
  .financial-bridges, .trade-outcomes { grid-template-columns: 1fr; }
  .financial-bridge { padding: 19px; }
  .bridge-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .bridge-rows .bridge-total { grid-column: 1 / -1; }
  .bridge-rows > div { flex-direction: column; gap: 3px; }
  .bridge-rows dd { text-align: left; }
  .bridge-rows .bridge-total { flex-direction: row; align-items: center; }
  .outcome-card { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 15px; }
  .outcome-heading { margin-bottom: 5px; }
  .outcome-counts { grid-column: 2; grid-row: 1 / 3; justify-content: flex-end; gap: 18px; margin: 0; }
  .outcome-legend { grid-column: 1; }
  .outcome-statistics { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
  .analysis-chart-card, .ledger-card { padding: 20px 17px; }
  .ledger-filters { width: 100%; }
  .ledger-filters input { flex: 1; min-width: 180px; }
  .analysis-section > .section-heading { align-items: flex-start; }
  .analysis-toolbar select { max-width: 135px; font-size: 9px; }
  .history-card { padding: 20px 18px 0; }
  .history-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .chart-controls { width: 100%; }
  .chart-controls select { width: 50%; max-width: none; }
  .chart-subheader { align-items: flex-start; }
  .chart-subheader p { max-width: 51%; }
  .chart-area, .chart-empty { min-height: 210px; }
  .history-svg { min-height: 190px; }
  .metric-definitions { grid-template-columns: 1fr 1fr; }
  .page-footer { flex-direction: column; gap: 0; }
  .page-footer p { max-width: 100%; margin: 5px 0; }
}
@media (max-width: 480px) {
  .content { padding: 24px 15px 15px; }
  .content { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .login-card { padding: 28px 24px; }
  .login-card h1 { font-size: 30px; }
  .topbar-account { gap: 8px; }
  .topbar-account .timezone { display: none; }
  .profile-name { font-size: 9px; }
  .sidebar, .topbar { padding-left: 17px; padding-right: 17px; }
  .topbar { min-height: 45px; }
  .breadcrumb { font-size: 9px; }
  .timezone { font-size: 8px; }
  .nav-item { font-size: 10px; }
  .nav-count { display: none; }
  .page-heading { flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
  .page-heading > div { width: 100%; }
  h1 { font-size: 29px; }
  .refresh-button { margin-top: 0; padding: 9px 13px; }
  .status-strip { padding: 12px; gap: 10px; margin-bottom: 25px; }
  .status-main > span:last-child { font-size: 9px; }
  .last-reading { max-width: 110px; line-height: 1.5; font-size: 8px; text-align: right; }
  h2 { font-size: 15px; }
  .section-heading p { font-size: 9px; }
  .section-caption { font-size: 8px; white-space: nowrap; padding: 5px 6px; }
  .currency-header { padding-left: 15px; padding-right: 15px; }
  .currency-description { font-size: 8px; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-metric { padding-left: 15px; padding-right: 15px; }
  .overview-metric:nth-child(odd) { border-left: 0; }
  .overview-metric:nth-child(4) { border-left: 1px solid #efedf2; }
  .metric-value { font-size: 25px; }
  .account-card { column-gap: 12px; padding: 17px; }
  .account-metrics { padding-left: 13px; gap: 14px 8px; }
  .account-equity .metric-value { font-size: 25px; }
  .account-metrics .metric-value { font-size: 13px; }
  .account-metrics .metric-label { font-size: 7.5px; }
  .chart-subheader { flex-direction: column; gap: 12px; }
  .chart-subheader p { max-width: 100%; }
  .range-switch { align-self: flex-end; }
  .chart-controls select { font-size: 9px; padding-left: 8px; }
  .chart-area, .chart-empty { min-height: 190px; }
  .chart-empty-message { padding: 15px 13px; }
  .chart-empty-message p { font-size: 9px; }
  .chart-footer { font-size: 7px; }
  .connection-guide { align-items: flex-start; gap: 11px; padding: 16px; }
  .connection-guide h2 { font-size: 11px; }
  .connection-guide p { font-size: 9px; }
  .metric-definitions { grid-template-columns: 1fr; }
  .analysis-section > .section-heading { flex-direction: column; gap: 12px; }
  .analysis-toolbar select { max-width: none; }
  .bridge-rows { gap: 0 15px; }
  .outcome-card { grid-template-columns: 1fr; }
  .outcome-counts { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .outcome-legend { margin-top: 4px; }
  .outcome-statistics { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Sole's default home: three readable numbers, with the full dashboard on demand. */
.sole-profile .app-shell { display: block; }
.sole-profile .sidebar { display: none; }
.sole-profile .content { max-width: 1040px; margin: 0 auto; padding: 42px 32px; }
.sole-profile .page-heading { margin-bottom: 25px; }
.sole-profile .heading-description { font-size: 15px; line-height: 1.6; color: #706779; }
.sole-profile .page-heading .eyebrow { display: none; }
.sole-profile .refresh-button { font-size: 13px; min-height: 44px; }
.sole-simple .status-strip, .sole-simple .page-footer { display: none; }
.simple-intro { margin-bottom: 24px; }
.simple-share { display: inline-block; background: #e8e1f3; color: #624784; border-radius: 99px; padding: 9px 14px; font-size: 13px; font-weight: 600; }
.simple-intro > p { font-size: 15px; color: #685c75; line-height: 1.5; margin: 13px 0 0; }
.simple-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.simple-period { --period-accent: #137552; --period-bg: #d3f4e4; --period-border: #a3ddc2; padding: 24px; border: 1px solid var(--period-border); border-top: 5px solid var(--period-accent); border-radius: 18px; background: var(--period-bg); box-shadow: 0 7px 24px #32233e08; min-width: 0; }
.simple-period:nth-child(2) { --period-accent: #6c3dc1; --period-bg: #e9dfff; --period-border: #cdb7f4; }
.simple-period:nth-child(3) { --period-accent: #a9510d; --period-bg: #ffe5c9; --period-border: #f2c292; }
.simple-period-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.simple-period-heading h2 { font-size: 17px; line-height: 1.4; color: var(--period-accent); }
.simple-period-heading > span { font-size: 12px; color: #85768f; }
.simple-period-date { margin: 7px 0 24px; color: #746a7d; font-size: 13px; }
.simple-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; font-size: clamp(28px, 3.5vw, 42px); letter-spacing: -1.6px; line-height: 1.2; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: #342a42; }
.simple-amount.positive { color: var(--period-accent); }
.simple-amount.negative { color: #b33548; }
.simple-amount small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: #766b80; }
.simple-period-caption { margin: 10px 0 0; color: #746a7d; font-size: 12px; line-height: 1.4; }
.simple-update { padding: 14px 0 0; color: #706577; font-size: 12px; line-height: 1.6; }
.simple-update.is-stale { color: #8b511a; background: #fff1d9; border-radius: 9px; padding: 12px 14px; }
.simple-note { max-width: 680px; font-size: 14px; line-height: 1.7; color: #62566e; margin-top: 20px; }
.simple-explanation { color: #706478; font-size: 13px; line-height: 1.7; margin-top: 16px; max-width: 720px; }
.simple-explanation summary { cursor: pointer; padding: 7px 0; color: #60467c; }
.simple-details-button { margin: 24px 0; padding: 14px 20px; border: 1px solid #d9cce6; background: #fff; color: #5f457b; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 48px; }
.simple-details-button:focus-visible, .simple-explanation summary:focus-visible { outline: 3px solid #9374b8; outline-offset: 4px; }
@media (max-width: 740px) {
  .sole-profile .content { padding: 27px 20px max(26px, env(safe-area-inset-bottom)); }
  .sole-profile h1 { font-size: 30px; line-height: 1.25; }
  .simple-periods { grid-template-columns: 1fr; gap: 12px; }
  .simple-period { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
  .simple-period-heading { grid-column: 1; grid-row: 1; }
  .simple-period-heading > span { display: none; }
  .simple-period-heading h2 { font-size: 15px; }
  .simple-period-date { margin: 6px 0 0; grid-column: 1; grid-row: 2; font-size: 12px; }
  .simple-amount { grid-column: 2; grid-row: 1 / 3; justify-content: flex-end; font-size: 34px; letter-spacing: -1px; max-width: 200px; }
  .simple-period-caption { grid-column: 1 / -1; margin-top: 13px; padding-top: 11px; border-top: 1px solid #8470981c; }
  .simple-intro { margin-bottom: 20px; }
  .simple-details-button { width: 100%; }
}
@media (max-width: 360px) {
  .sole-profile .content { padding-left: 14px; padding-right: 14px; }
  .simple-period { grid-template-columns: 1fr; }
  .simple-amount { grid-column: 1; grid-row: 3; justify-content: flex-start; margin-top: 16px; max-width: none; }
}
