:root{color-scheme:dark;--bg:#080b09;--surface:#101511;--line:#303932;--line-soft:#222b25;--text:#f1f4f2;--muted:#9ca69f;--green:#00df75;--red:#ff504b;--amber:#e8bd72;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;font-synthesis:none;font-variant-numeric:tabular-nums}
*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body{margin:0;background:radial-gradient(ellipse at 15% 0,#17201970,transparent 60%),var(--bg);color:var(--text);min-width:320px;min-height:100dvh}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.5}a{color:var(--green)}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--green);outline-offset:4px}button{touch-action:manipulation}button,summary{user-select:none}svg{display:block}button svg{width:23px;height:23px}h1,h2,h3,p{margin:0}button{border:0}button:active:not(:disabled){transform:translateY(1px)}.positive{color:var(--green)}.negative{color:var(--red)}.neutral{color:var(--text)}.muted{color:var(--muted)}.skip-link{position:fixed;top:-70px;left:10px;padding:12px;background:var(--surface);z-index:10}.skip-link:focus{top:10px}
.shell{max-width:790px;margin:auto;padding:calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 36px)}.topbar{display:grid;grid-template-columns:90px 1fr 90px;align-items:center;min-height:58px;margin-bottom:16px}.topbar h1{text-align:center;font-size:1.38rem;letter-spacing:.035em;font-weight:650;white-space:nowrap}.topbar .icon-button{justify-self:end}.icon-button{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:transparent;color:var(--muted)}.icon-button:hover{background:#ffffff08;color:var(--text)}.wordmark{font-size:.75rem;letter-spacing:.17em;color:var(--muted);font-weight:750}.back-button{display:flex;align-items:center;gap:2px;min-height:44px;padding:0;background:transparent;color:var(--green);font-size:.875rem;text-decoration:none}.back-button svg{width:19px;height:19px}
.panel{border:1px solid var(--line);border-radius:20px;background:linear-gradient(130deg,#151b1680,#0c100d99);box-shadow:inset 0 1px 0 #ffffff03,0 7px 24px #00000010;overflow:hidden}.metrics{padding:18px 14px 0}.metric-grid{display:grid;grid-template-columns:1fr 1.16fr 1fr;text-align:center}.metric{padding:0 4px 19px}.metric+.metric{border-left:1px solid var(--line)}.metric-label{display:block;font-size:.875rem;font-weight:600;letter-spacing:.01em;margin-bottom:14px}.metric-value{font-size:clamp(1.55rem,6.8vw,2.55rem);letter-spacing:-.04em;font-weight:650;line-height:1;white-space:nowrap}.metric:nth-child(2) .metric-value{font-size:clamp(1.75rem,7.5vw,2.9rem)}.periods{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);padding:12px 0}.period{display:flex;align-items:center;justify-content:center;gap:8px;font-size:.875rem;min-height:24px}.period+.period{border-left:1px solid var(--line-soft)}.period b{font-size:1.12rem;font-weight:600}.period span{font-weight:550}.data-status{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;font-size:.75rem;letter-spacing:.07em;color:var(--muted)}.data-status::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--amber)}.data-status em{font-style:normal;color:var(--amber)}
.instrument-panel{padding:0 12px}.instrument-table{width:100%;border-collapse:collapse;table-layout:fixed}.instrument-table col:first-child{width:28%}.instrument-table col{width:18%}.instrument-table th{height:47px;font-size:.75rem;font-weight:600;white-space:nowrap;text-align:center;color:#cbd2cd}.instrument-table th:first-child{text-align:left;padding-left:9px}.instrument-table th:not(:last-child),.instrument-table td:not(:last-child){border-right:1px solid #232c2580}.instrument-table td{padding:16px 3px;border-top:1px solid var(--line-soft);text-align:center;font-size:.9375rem;font-weight:550;white-space:nowrap}.instrument-table td:first-child{padding:0;text-align:left}.instrument-button{display:block;position:relative;width:100%;background:transparent;min-height:68px;text-align:left;padding:12px 8px 12px 14px}.instrument-button::before{content:"";position:absolute;left:1px;top:17px;bottom:17px;width:3px;background:currentColor;border-radius:2px}.instrument-button:hover{background:#ffffff05}.symbol{display:block;font-size:1rem;font-weight:600;letter-spacing:-.015em}.row-sub{display:flex;align-items:center;gap:6px;margin-top:4px;color:#c8ceca;font-size:.6875rem;font-weight:600;letter-spacing:.025em}.hq-label{color:var(--green);border:1px solid #245435;border-radius:3px;padding:1px 3px;font-size:.625rem;line-height:1}.instrument-table .swap{font-size:.875rem}.graph-panel{margin-top:18px;padding:20px 20px 12px}.graph-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.balance-title{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:1.05rem;font-weight:600}.balance-title .label{font-size:.75rem;letter-spacing:.025em}.balance-title .floating{font-size:1rem}.legend{font-size:.625rem;letter-spacing:.015em;flex-shrink:0;display:grid;gap:5px}.legend span{display:flex;align-items:center;gap:5px;justify-content:flex-end}.legend i{display:inline-block;width:18px;border-top:2px solid var(--text)}.legend .equity{border-top:2px dashed var(--green)}.balance-graph{width:100%;height:auto;margin-top:12px;overflow:visible}.graph-grid{stroke:#253028;stroke-width:1;stroke-dasharray:2 6}.graph-dates{display:flex;justify-content:space-between;font-size:.6875rem;color:var(--muted);margin:8px 0 2px}
.section-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:28px 8px 13px}.section-heading h2{font-size:.8125rem;font-weight:600;letter-spacing:.04em}.section-heading span{font-size:.6875rem;color:var(--muted)}.activity-panel{padding:0 16px 16px}.activity-list{list-style:none;margin:0;padding:0}.activity-item{display:grid;grid-template-columns:5px minmax(0,1fr) auto;gap:11px;align-items:start;padding:15px 0;border-bottom:1px solid var(--line-soft)}.activity-item:last-child{border-bottom:0}.activity-dot{width:5px;height:5px;background:var(--green);border-radius:50%;margin-top:7px}.activity-dot.quiet{background:#85918a}.activity-dot.warning{background:var(--amber)}.activity-copy{font-size:.875rem;line-height:1.5}.activity-copy small{display:block;color:var(--muted);font-size:.75rem;margin-top:3px}.activity-time{font-size:.75rem;color:var(--muted);line-height:1.7;white-space:nowrap}.outline-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;width:100%;border:1px solid #00d66b;background:#06351960;color:var(--green);border-radius:12px;font-size:.8125rem;font-weight:650;letter-spacing:.02em}.outline-button:hover{background:#094f2570}.activity-panel .outline-button{margin-top:12px}.footer-note{text-align:center;color:var(--muted);font-size:.75rem;line-height:1.6;margin-top:22px}.toast{position:fixed;bottom:calc(env(safe-area-inset-bottom) + 22px);left:50%;transform:translateX(-50%);z-index:50;max-width:calc(100% - 32px);width:max-content;background:#26382c;border:1px solid #45644e;border-radius:12px;padding:14px 18px;font-size:.875rem;box-shadow:0 12px 30px #0008}.toast[hidden]{display:none}
@media(min-width:680px){.shell{padding-top:24px}.topbar{margin-bottom:20px}.topbar h1{font-size:1.5rem}.metrics{padding:24px 20px 0}.metric{padding-bottom:24px}.periods{padding:13px 0}.period{gap:15px;font-size:1rem}.instrument-table td{font-size:1rem}.instrument-button{min-height:76px}.symbol{font-size:1.1rem}.row-sub{font-size:.75rem}.graph-panel{padding:22px 24px 15px}.balance-graph{max-height:250px}.activity-item{padding:17px 0}.activity-copy{font-size:1rem}.activity-time{font-size:.875rem}}
@media(max-width:430px){.shell{padding-left:12px;padding-right:12px}.topbar{grid-template-columns:62px 1fr 62px}.topbar h1{font-size:1.18rem}.wordmark{font-size:.625rem}.metrics{padding:16px 8px 0}.metric-label{font-size:.75rem}.period{gap:6px;font-size:.75rem}.period b{font-size:1rem}.instrument-panel{padding:0 7px}.instrument-table col:first-child{width:27%}.instrument-table col{width:18.25%}.instrument-table th{font-size:.625rem}.instrument-table td{font-size:.8125rem;letter-spacing:-.015em}.instrument-table .swap{font-size:.8125rem}.instrument-button{padding-left:11px;padding-right:2px;min-height:64px}.symbol{font-size:.875rem}.row-sub{font-size:.625rem;gap:4px}.instrument-button::before{left:0}.graph-panel{padding:17px 14px 12px}.balance-title{gap:6px;font-size:.9375rem}.balance-title .floating{font-size:.875rem}.balance-title .label{font-size:.625rem}.legend{font-size:.55rem}.activity-panel{padding:0 13px 13px}.activity-item{gap:9px}.activity-copy{font-size:.8125rem}.activity-time{font-size:.6875rem}.section-heading{margin-top:24px}.footer-note{font-size:.6875rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.settings-shell{max-width:790px}.first-heading{margin-top:8px}.category-list{display:grid;gap:12px}.category-card{display:flex;align-items:center;padding:8px 17px 8px 5px;gap:8px}.category-link{display:grid;grid-template-columns:28px minmax(0,1fr) 17px;gap:12px;align-items:center;flex:1;min-width:0;padding:14px 9px;text-decoration:none;color:var(--text);border-radius:12px}.category-link:hover{background:#ffffff03}.category-link strong{display:block;font-size:1rem;line-height:1.4;font-weight:600}.category-link small{display:block;font-size:.875rem;color:var(--muted);line-height:1.45;margin-top:6px}.category-icon{width:28px;height:28px;color:var(--green);display:grid;place-items:center}.category-icon svg{width:25px;height:25px}.percent-icon{font-size:1.4rem;font-weight:650}.category-chevron{color:#8b968e}.category-chevron svg{width:17px;height:17px}.toggle{display:inline-flex;position:relative;align-items:center;width:51px;min-width:51px;height:44px;cursor:pointer}.toggle input{appearance:none;-webkit-appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;border-radius:22px;cursor:pointer}.toggle-track{width:51px;height:30px;border-radius:18px;background:#39423c;pointer-events:none;transition:background .15s}.toggle-track::after{content:"";display:block;height:24px;width:24px;border-radius:50%;background:#f6f8f6;margin:3px;box-shadow:0 1px 3px #0005;transition:transform .15s}.toggle input:checked+.toggle-track{background:#00d96d}.toggle input:checked+.toggle-track::after{transform:translateX(21px)}.toggle input:disabled+.toggle-track{opacity:.4}.settings-group{padding:0 20px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 0;border-bottom:1px solid var(--line-soft);font-size:1rem}.setting-row:last-child{border-bottom:0}.setting-row strong{font-size:1rem;font-weight:550}.setting-row>span{font-size:.875rem;color:var(--muted)}.setting-row small{display:block;margin-top:5px;color:var(--muted);font-size:.8125rem}.step-field{display:flex;align-items:center;gap:6px;color:var(--green)}.step-field input{width:76px;min-height:44px;border:1px solid var(--line);border-radius:9px;background:#141e17;color:var(--green);padding:7px 9px;font-weight:600;text-align:center}.step-field span{font-size:.8125rem}.setting-note{display:block}.setting-note p{font-size:.875rem;line-height:1.55;color:var(--muted);margin-top:7px}.connection-card{padding:22px 20px}.connection-title{display:flex;justify-content:space-between;gap:12px;align-items:center}.connection-title h3{font-size:1.125rem;font-weight:600}.status-badge{font-size:.6875rem;letter-spacing:.035em;padding:5px 7px;background:#61543320;color:var(--amber);border:1px solid #5a4a2b60;border-radius:5px;white-space:nowrap}.connection-card>p{color:var(--muted);font-size:.875rem;line-height:1.55;margin-top:12px}.connection-detail{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.875rem;margin-top:17px}.connection-detail span{color:var(--muted)}.connection-detail strong{font-weight:500}.connection-card .outline-button{margin-top:23px}.connection-card .small-note{font-size:.75rem;text-align:center}.category-detail{padding:22px 20px}.detail-heading{display:flex;align-items:center;gap:12px}.detail-heading h2{flex:1;font-size:1.2rem;line-height:1.35;font-weight:600}.detail-summary{color:var(--muted);font-size:.875rem;line-height:1.6;margin:10px 0 20px}.event-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line-soft)}.event-list li{display:flex;align-items:flex-start;gap:12px;padding:20px 0;border-bottom:1px solid var(--line-soft)}.event-list li>div:first-child{flex:1}.event-list strong{display:block;font-size:1rem;font-weight:550;line-height:1.45}.event-list p{font-size:.875rem;color:var(--muted);line-height:1.6;margin-top:5px}.event-badge{display:block;font-size:.6875rem;padding:5px 9px;background:#0b371e80;color:var(--green);border-radius:15px;letter-spacing:.03em;line-height:1.3;margin-top:2px;white-space:nowrap}.event-badge.quiet{color:var(--muted);background:#2c342e}.weekly-toggle{display:flex;align-items:center;gap:7px}.weekly-toggle>span{font-size:.6875rem;color:var(--muted)}.category-note{color:var(--green);font-size:.8125rem;line-height:1.5;background:#0a331957;border-radius:10px;padding:13px 15px;margin-top:19px}.category-off{padding:20px;margin-top:16px;border-color:#57462e;background:#2e251b40}.category-off h3{font-size:.875rem;letter-spacing:.03em;color:var(--amber)}.category-off p{margin-top:9px;color:var(--muted);font-size:.875rem;line-height:1.5}.category-off[hidden]{display:none}.viewer-shell{max-width:541px}.chart-viewport{width:100%;overflow:auto;min-height:235px;background:#0a0e0c;overscroll-behavior:contain}.chart-capture{display:block;width:100%;max-width:505px;height:auto;margin-inline:auto}.capture-note{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;padding:14px 17px;font-size:.75rem;color:var(--muted);border-top:1px solid var(--line-soft)}.viewer-message{min-height:300px;display:grid;justify-content:center;align-content:center;justify-items:center;gap:18px;color:var(--muted);font-size:.875rem}.loader{height:24px;width:24px;border:2px solid #274332;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.instrument-table tbody tr{cursor:pointer}.instrument-table tbody tr:hover{background:#ffffff03}
@media(max-width:430px){.topbar{grid-template-columns:76px 1fr 76px}.metric-label{font-size:.875rem}.period{font-size:.875rem;gap:5px}.period b{font-size:1rem}.instrument-table th{font-size:.75rem;letter-spacing:-.025em}.instrument-table td,.instrument-table .swap{font-size:.875rem}.symbol{font-size:.9375rem}.row-sub,.hq-label{font-size:.75rem}.hq-label{padding:0 2px}.instrument-button{padding-left:10px}.row-sub{gap:3px;letter-spacing:0}.balance-title .label,.legend,.wordmark{font-size:.75rem}.graph-heading{align-items:flex-start}.balance-title{max-width:78%}.balance-title .label{flex-basis:100%;margin-bottom:3px}.graph-dates,.section-heading span,.activity-time,.footer-note{font-size:.75rem}.activity-copy{font-size:.9375rem}.activity-item{gap:9px}.category-card{padding-right:12px;gap:3px}.category-link{grid-template-columns:25px minmax(0,1fr) 12px;gap:8px;padding:12px 6px}.category-link strong{font-size:1rem}.category-link small{font-size:.8125rem}.category-icon{width:25px;height:25px}.category-chevron svg{width:12px;height:16px}.category-detail{padding:19px 16px}.detail-heading{gap:9px}.detail-heading h2{font-size:1.125rem}.event-list li{gap:9px}.event-badge{font-size:.75rem;padding:5px 7px}.status-badge{font-size:.75rem;letter-spacing:0}.connection-title h3{font-size:1rem}.connection-card,.settings-group{padding-left:16px;padding-right:16px}.weekly-toggle{flex-direction:column;gap:0}.weekly-toggle>span{font-size:.75rem}.setting-row>span{white-space:nowrap}.category-list{gap:10px}.data-status{font-size:.75rem}}
@media(max-width:360px){.instrument-panel{overflow-x:auto}.instrument-table{min-width:340px}.period{flex-wrap:wrap;gap:3px}.metric-value{font-size:1.5rem}.metric:nth-child(2) .metric-value{font-size:1.6rem}.topbar{grid-template-columns:65px 1fr 65px}.topbar h1{font-size:1.05rem}.category-link{grid-template-columns:minmax(0,1fr) 12px}.category-link>.category-icon{display:none}}
@media(min-width:431px) and (max-width:680px){.instrument-table th{font-size:.75rem}.row-sub,.hq-label,.graph-dates,.legend,.balance-title .label,.section-heading span,.status-badge,.event-badge{font-size:.75rem}.activity-copy{font-size:1rem}}

/* Single-line instruments remain centered in the existing tap area. */
.instrument-button{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}

/* Keep the HQ identity prominent and beside its instrument. */
.instrument-name{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.hq-label{display:inline-flex;align-items:center;justify-content:center;font-size:1.1rem;font-weight:750;line-height:1.1;padding:3px 5px;border:1px solid #00df75a0;border-radius:4px;background:#09341d;color:var(--green);letter-spacing:0}
@media(max-width:430px){.instrument-table col:first-child{width:34%}.instrument-table col{width:16.5%}.instrument-name{gap:5px}.hq-label{font-size:1rem;padding:3px 5px}}

/* Larger instrument names; the approved HQ badge size stays unchanged. */
.symbol{font-size:1.25rem;font-weight:650}
@media(max-width:680px){.symbol{font-size:1rem}.instrument-panel{overflow-x:auto}.instrument-table{min-width:21.875rem}.instrument-table col:first-child{width:36%}.instrument-table col{width:16%}.instrument-button{padding-left:10px;padding-right:2px}.instrument-name{gap:5px}}

/* Instrument content must stay inside its own column at every width. */
.instrument-name{max-width:100%;min-width:0}.instrument-name .symbol{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.instrument-name .hq-label{flex-shrink:0}
@media(max-width:430px){.symbol{font-size:clamp(.875rem,3.9vw,1rem)}}

/* Offset content only; KPI cells, dividers and period strip keep their size. */
.metric{--metric-content-offset:clamp(4px,1vw,8px)}
.metric:nth-child(2){--metric-content-offset:calc(-1 * clamp(4px,1vw,8px))}
.metric-label,.metric-value{position:relative;top:var(--metric-content-offset)}

/* Keep the original cell sizing while sharing one baseline across all values. */
.metric-grid{position:relative}
.metric-value-placeholder{visibility:hidden}
.metric-value-row{position:absolute;left:0;right:0;bottom:calc(19px - clamp(4px,1vw,8px));display:grid;grid-template-columns:1fr 1.16fr 1fr;align-items:baseline}
.metric-value-row>.metric-value{position:static;top:auto}
.metric-value-row>.metric-value:nth-child(2){font-size:clamp(2rem,9.2vw,3.5rem)}
@media(min-width:680px){.metric-value-row{bottom:calc(24px - clamp(4px,1vw,8px))}}

/* Balance heading and compact centered legend below the chart. */
.balance-title{max-width:100%}
.balance-title .label{font-size:1em;letter-spacing:0;flex-basis:auto;margin-bottom:0}
.legend{display:flex;justify-content:center;align-items:center;gap:14px;font-size:.6rem;margin-top:10px}
.legend span{justify-content:center;gap:4px}
.legend i{width:14px}

/* Center the larger monitor title between balanced, compact side areas. */
.monitor-topbar{grid-template-columns:44px minmax(0,1fr) 44px;gap:4px}
.monitor-topbar h1{font-size:clamp(1.3rem,5.7vw,2rem);letter-spacing:.025em}
/* Dates and centered legend share the same footer line. */
.graph-footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:6px;margin-top:8px;min-height:24px}
.graph-date{font-size:clamp(.5rem,2.2vw,.6875rem);color:var(--muted);white-space:nowrap}
.graph-date:last-child{text-align:right}
.graph-footer .legend{margin:0;font-size:clamp(.5rem,2vw,.6rem);gap:8px}
.graph-footer .legend i{width:12px}
@media(max-width:360px){.graph-footer{gap:3px}.graph-footer .legend{gap:5px}.graph-footer .legend span{gap:3px}.graph-footer .legend i{width:9px}}
/* Native modal keeps focus inside the drawer and the monitor behind it. */
body.drawer-open{position:fixed;left:0;right:0;overflow:hidden}
.settings-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(100%,560px);max-width:100%;height:100dvh;max-height:100dvh;padding:0;border:0;border-left:1px solid var(--line);background:var(--bg);color:var(--text);overflow-y:auto;overscroll-behavior:contain;box-shadow:-20px 0 70px #0006;touch-action:pan-y pinch-zoom}
.settings-drawer[open]{animation:drawer-in .32s cubic-bezier(.22,1,.36,1) both}
.settings-drawer::backdrop{background:#0007;backdrop-filter:blur(3px);animation:backdrop-in .24s ease both}
.settings-drawer.is-closing{animation:drawer-out .24s cubic-bezier(.4,0,1,1) both;pointer-events:none}
.settings-drawer.is-closing::backdrop{animation:backdrop-out .24s ease both}
.settings-drawer .settings-shell{padding:0 18px calc(env(safe-area-inset-bottom) + 28px)}
.drawer-topbar{position:sticky;top:0;z-index:2;grid-template-columns:80px minmax(0,1fr) 80px;min-height:78px;padding-top:env(safe-area-inset-top);background:var(--bg);border-bottom:1px solid var(--line-soft);margin-bottom:20px}
.drawer-topbar h2{text-align:center;font-size:1.25rem;font-weight:650;letter-spacing:.035em}
.drawer-topbar h2:focus{outline:none}
.settings-drawer .first-heading{margin-top:0}
@keyframes drawer-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
@keyframes drawer-out{from{transform:translateX(0)}to{transform:translateX(100%)}}
@keyframes backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes backdrop-out{from{opacity:1}to{opacity:0}}

/* HQ shares its instrument color; the halo keeps the badge prominent. */
.instrument-name{gap:11px}
.hq-label{color:inherit;border-color:color-mix(in srgb,currentColor 65%,transparent);background:color-mix(in srgb,currentColor 12%,var(--bg));box-shadow:0 0 7px color-mix(in srgb,currentColor 20%,transparent);text-shadow:none}
@media(max-width:680px){.instrument-name{gap:8px}}

/* F13-inspired pulse: a steady endpoint with a breathing halo. */
.equity-halo{transform-origin:0 0;opacity:.26;animation:equity-pulse 1.2s ease-in-out infinite}
.legend .equity{border-top-color:currentColor}
.hq-label{position:relative}
.hq-label::after{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;box-shadow:0 0 10px 1px color-mix(in srgb,currentColor 55%,transparent);opacity:.2;animation:hq-pulse 1.2s ease-in-out infinite}
@keyframes equity-pulse{0%,100%{transform:scale(1);opacity:.26}50%{transform:scale(1.75);opacity:.1}}
@keyframes hq-pulse{0%,100%{opacity:.15}50%{opacity:.8}}

/* Leave native two-finger page zoom available over the chart image. */
.chart-viewport{touch-action:pan-x pan-y pinch-zoom}

/* The timestamp belongs to the displayed capture, never to the refresh action. */
.capture-note{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;text-align:left;font-size:.75rem;line-height:1.5}
.capture-stamp{min-width:0}
.capture-stamp[hidden]{display:none}
.capture-refresh{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:0 0 auto;margin-left:auto;min-height:44px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:#ffffff03;color:var(--muted);font-size:.75rem}
.capture-refresh:hover{color:var(--green);background:#0b2818}
.capture-refresh svg{width:16px;height:16px}
.capture-note time{font:inherit;color:var(--text)}

.viewer-topbar{grid-template-columns:minmax(0,1fr)}
.back-to-monitor{margin-top:12px;text-decoration:none;color:#d5ddd8;border-color:#536159;background:#1a211c}
.back-to-monitor:hover{background:#25312a}
.back-to-monitor svg{width:19px;height:19px}
.login-shell{max-width:480px;padding-top:12vh}.login-card{padding:28px;display:grid;gap:18px}.login-card h2{font-size:1.3rem}.login-card p{color:var(--muted);font-size:.9rem;line-height:1.6}.login-card label{font-size:.85rem}.login-card input{width:100%;min-height:48px;background:#141e17;color:var(--text);border:1px solid var(--line);border-radius:9px;padding:10px 12px}.login-card #login-error{color:var(--red)}.login-card #login-error:empty{display:none}.empty-state{text-align:center!important;color:var(--muted);padding:28px 12px!important;white-space:normal!important;font-size:.875rem!important;font-weight:400!important;cursor:default}.empty-chart{min-height:190px;display:grid;place-items:center;color:var(--muted);font-size:.875rem}.data-status.live::before{background:var(--green)}.viewer-message p{padding:0 20px;text-align:center;line-height:1.6}

/* Live feed age shares one compact line with the broker, without account/server. */
.data-status{gap:6px;letter-spacing:0;line-height:1.3;padding:8px 0;white-space:nowrap;font-size:clamp(.625rem,2.8vw,.75rem)}
.data-status::before{flex:0 0 6px}
.feed-state,.feed-age,.feed-separator{flex:0 0 auto}
.feed-broker{min-width:0;overflow:hidden;text-overflow:ellipsis}
.feed-age{font-variant-numeric:tabular-nums}
.data-status.live .feed-state,.data-status.live .feed-age{color:var(--green)}
@media(max-width:360px){.data-status{gap:4px}}
/* Compact HQ receiver view; source identity and receiver balance stay independent. */
html,body{touch-action:pan-y pinch-zoom}.monitor-topbar{grid-template-columns:minmax(0,1fr)}
.viewer-topbar h1{display:flex;align-items:center;justify-content:center;gap:12px}.viewer-topbar .hq-label{font-size:.9rem}.viewer-broker{text-align:center;color:var(--muted);font-size:.7rem;margin-top:8px;letter-spacing:.04em}.master-chart-label{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:.7rem;letter-spacing:.03em;margin-bottom:8px}.master-chart-label button{color:var(--text);background:none;min-height:36px;padding:0 4px;font-size:.75rem}.receiver-help{font-size:.75rem;color:var(--muted);margin:-2px 2px 14px;line-height:1.5}.receiver-empty{padding:24px 16px;font-size:.85rem;color:var(--muted)}.receiver-card{background:linear-gradient(125deg,#121a14,var(--bg));border:1px solid var(--line);border-radius:17px;margin-bottom:12px;overflow:hidden}.compact-summary{display:block;list-style:none;cursor:pointer;padding:16px;min-height:44px;touch-action:manipulation}.compact-summary::-webkit-details-marker{display:none}.summary-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.receiver-broker{font-size:1rem;font-weight:600;line-height:1.3;overflow-wrap:anywhere;min-width:0}.receiver-status{flex-shrink:0;font-size:.6rem;padding:4px 6px;border:1px solid #415047;border-radius:5px;line-height:1.3;max-width:42%;text-align:center}.receiver-status.positive{background:#00d97c0d;border-color:#00d97c4a}.amber{color:#dab976}.receiver-status.amber{border-color:#685333;background:#b0863720}.receiver-status.stale{color:var(--muted)}.receiver-account{display:block;font-size:.65rem;color:var(--muted);margin-top:5px;letter-spacing:.02em}.summary-values{margin-top:14px;display:grid;grid-template-columns:1fr 1fr 12px;gap:12px}.summary-values small{display:block;font-size:.6rem;color:var(--muted);margin-bottom:4px}.summary-values b{font-size:1.45rem;font-weight:600;letter-spacing:-.4px;font-variant-numeric:tabular-nums}.receiver-chevron{align-self:center;transition:transform .2s}.receiver-card[open]>summary .receiver-chevron{transform:rotate(180deg)}.receiver-card[open]>summary{border-bottom:1px solid var(--line)}.receiver-fresh{font-size:.6rem;display:flex;align-items:center;gap:5px;padding-top:12px;color:var(--muted)}.receiver-fresh i{width:5px;height:5px;display:inline-block;flex-shrink:0;border-radius:50%;background:var(--green)}.receiver-fresh.stale i{background:var(--muted)}.receiver-detail-content{padding:10px 16px}.receiver-detail-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:.75rem;line-height:1.5;padding:4px 0}.receiver-detail-row>span{color:var(--muted)}.receiver-detail-row b{font-weight:400;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;min-width:0;max-width:65%}.receiver-detail-section{padding:12px 0 10px;border-top:1px solid var(--line-soft);margin-top:8px}.receiver-detail-section h4{font-size:.65rem;letter-spacing:.07em;color:#c3cec6;font-weight:500;margin:0 0 10px}.receiver-volume{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding-bottom:7px;gap:5px}.receiver-volume span{font-size:.6rem;color:var(--muted);display:block;margin-bottom:4px}.receiver-volume strong{font-size:1.2rem;font-weight:500;overflow-wrap:anywhere}.receiver-note{font-size:.65rem;color:var(--muted);line-height:1.6;margin-top:5px}#hq-receivers{scroll-margin-top:16px}
@media(max-width:360px){.compact-summary{padding:13px}.receiver-broker{font-size:.9rem}.receiver-status{font-size:.55rem}.summary-values b{font-size:1.25rem}.receiver-help{font-size:.7rem}}

.monitor-shell{padding-top:calc(env(safe-area-inset-top) + 12px)}

.activity-item{position:relative}.activity-link{color:inherit;text-decoration:none}.activity-link::after{content:"";position:absolute;inset:0;border-radius:6px}.activity-link:focus-visible{outline:none}.activity-link:focus-visible::after{outline:2px solid var(--green);outline-offset:2px}.activity-link:active::after{background:#ffffff08}

/* Device comfort and notification read state. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.settings-main{padding-top:calc(env(safe-area-inset-top) + 18px)}
.status-badge.connected{color:var(--green);background:#00d97c0d;border-color:#00d97c4a}
.status-badge.stale{color:var(--amber);background:#61543320;border-color:#5a4a2b60}
.status-badge.offline,.status-badge.not_connected{color:var(--red);background:#ff4d4910;border-color:#ff4d4940}
.unread-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 4px 12px;font-size:.7rem;color:var(--green)}
.unread-summary[hidden]{display:none}.unread-summary button{background:none;font-size:.65rem;min-height:32px;padding:4px;color:var(--muted)}
.activity-item.unread .activity-dot{box-shadow:0 0 8px #00d97c55}

.activity-window{font:inherit;font-size:16px;color:var(--green);background:#111c14;border:1px solid var(--line);border-radius:8px;padding:10px;min-height:44px;max-width:55%}
