/* Shared terminal system. Layout, typography and controls intentionally replace
   the former side-rail workbench; accounting and action contracts are unchanged. */
:root { --accent:#a85a00; --accent-soft:#fff2da; --up:#e60023; --down:#008000; --radius:2px; --radius-sm:2px; --tl-panel:#fff; --tl-head:#f4f4f4; --tl-number:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; }
html[data-theme="dark"] { --bg:#000; --bg-soft:#121212; --card:#090909; --tl-panel:#090909; --tl-head:#0e0e0e; --line:#1b1b1b; --line-strong:#2c2c2c; --ink:#ececea; --ink-2:#b3b3ac; --ink-3:#999991; --accent:#ffad21; --accent-soft:#2c210b; --mint:#00c900; --mint-soft:#102510; --up:#ff202f; --down:#00ff00; --up-soft:#2b1015; --down-soft:#0c250c; --warn:#ffad21; --warn-soft:#241b0c; }
html:not([data-theme="dark"]) .terminal-shell :is(.wb-position-list,.wb-position-table,.wb-trade-records) { --up:#e60023; --down:#008000; }
body { font-size:13px; line-height:1.5; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
button,input,select,textarea { accent-color:var(--accent); caret-color:var(--accent); }
::selection { background:var(--accent); color:var(--bg); }
:where(button,a,input,select,textarea,summary):focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:1px; }
.terminal-shell { min-height:100dvh; padding:0; }
.terminal-shell .wb-main,html[data-layout="desktop"] .terminal-shell .wb-main { margin:0; padding:0 12px 24px; min-width:0; }
.terminal-shell .wb-main> :not(.wb-toolbar) { max-width:none; }
.terminal-shell .wb-sidebar { display:none; }
.tl-header {
  background:var(--bg);
  border-bottom:1px solid var(--line-strong);
  padding:var(--sat) var(--sar) 0 var(--sal);
}
.tl-header-main { display:flex; align-items:center; gap:16px; padding:7px 12px; min-height:52px; }
.tl-brand { display:flex; align-items:center; gap:8px; color:var(--ink); text-decoration:none; white-space:nowrap; flex-shrink:0; }
.tl-brand:hover { text-decoration:none; }
.tl-brand img { display:block; width:26px; height:26px; }
.tl-brand strong { font-size:13px; font-weight:650; }
.tl-brand>span { font:10px var(--tl-number); color:var(--ink-3); letter-spacing:.05em; }
.tl-command { display:flex; align-items:center; flex:1; min-width:80px; border:1px solid var(--line-strong); height:36px; }
.tl-command>.tl-command-prompt { display:grid; place-items:center; align-self:stretch; width:30px; flex:none; padding:0; color:var(--accent); }
.tl-command-prompt svg { display:block; width:14px; height:14px; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.terminal-shell .tl-command input#terminal-command { flex:1; width:0; height:100%; min-height:0; border:0; outline:0; box-shadow:none; padding:0 8px; background:transparent; }
.tl-command input { width:100%; min-width:0; min-height:0; height:34px; padding:0 10px; border:0; border-radius:0; background:transparent; font-size:12px; box-shadow:none; }
.tl-command input:focus { box-shadow:none; }
.tl-command:focus-within { border-color:var(--accent); }
.tl-command button { align-self:stretch; flex-shrink:0; white-space:nowrap; border:0; border-left:1px solid var(--line-strong); padding:0 15px; background:var(--accent); color:var(--bg); font-size:12px; font-weight:700; cursor:pointer; }
.tl-header-actions { display:flex; align-items:center; gap:5px; }
.tl-telemetry { display:flex; flex-direction:row; gap:18px; align-items:center; margin-left:auto; color:var(--ink-3); font-size:10px; white-space:nowrap; }
.tl-telemetry time,.tl-telemetry b { color:var(--ink-2); font:11px var(--tl-number); }
.tl-fps-readout { border:0; padding:4px 0; background:transparent; color:var(--ink-2); font:11px var(--tl-number); cursor:help; }
.tl-fps-readout[data-state="active"] { color:var(--accent); }
.tl-preview { color:var(--accent); white-space:nowrap; font-size:11px; padding:3px 7px; border:1px solid var(--line); }
.tl-icon-btn { position:relative; display:grid; place-items:center; width:34px; height:34px; border:1px solid transparent; background:transparent; color:var(--ink-2); cursor:pointer; }
.tl-icon-btn .ic { width:17px; height:17px; display:block; }
.tl-icon-btn svg { width:100%; height:100%; }
.tl-icon-btn:hover { border-color:var(--line-strong); color:var(--accent); }
.tl-settings-btn { background:var(--bg-soft); border-radius:6px; color:var(--ink); }
.tl-settings-btn:hover { background:var(--accent-soft); border-color:transparent; }
.tl-badge { position:absolute; right:0; top:0; font:9px var(--tl-number); color:var(--accent); }
.tl-header-nav { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 12px 7px; }
.terminal-shell .wb-nav { display:flex; flex-direction:row; gap:4px; flex:1; overflow-x:auto; padding:0; min-width:0; position:relative; }
.terminal-shell .tl-header .wb-nav-button { width:auto; min-height:32px; flex-shrink:0; gap:6px; padding:5px 10px 5px 5px; border:1px solid var(--line); border-radius:0; font-size:12px; font-weight:500; white-space:nowrap; background:var(--tl-head); color:var(--ink-2); }
.terminal-shell .tl-header .wb-nav-button .lb { flex:none; }
.terminal-shell .tl-header .wb-nav-button>.ic { width:13px; height:13px; }
.tl-header .wb-nav-button kbd { display:grid; place-items:center; width:17px; height:17px; font:11px var(--tl-number); color:var(--accent); background:var(--accent-soft); }
.terminal-shell .tl-header .wb-nav-button.active { background:var(--accent); border-color:var(--accent); color:var(--bg); }
.tl-header .wb-nav-button.active kbd { background:var(--bg); color:var(--accent); }
.tl-header .wb-nav-button.active .cnt { color:inherit; }
.terminal-shell .tl-header .wb-nav-button { position:relative; }
.tl-nav-mark { position:absolute; inset:auto 8px 2px; height:2px; border-radius:1px; background:var(--bg); opacity:0; pointer-events:none; }
.tl-header .wb-nav-button.active .tl-nav-mark { opacity:1; }
.terminal-shell .tl-header .wb-nav-button:hover:not(.active) { color:var(--accent); border-color:var(--accent); }
.tl-header-quick .wb-quick-actions { flex-direction:row; padding:0; gap:5px; }
.terminal-shell .wb-icon-act { width:32px; height:32px; border-radius:0; border-color:var(--line-strong); color:var(--accent); }
.terminal-shell .wb-icon-act .ic { width:15px; height:15px; }
.tl-page-heading { position:relative; display:flex; align-items:center; gap:14px; min-height:48px; margin:0; border-bottom:1px solid var(--line); }
.tl-page-heading h1 { font-size:14px; color:var(--accent); margin:0; font-weight:650; }
.tl-page-status { font-size:11px; color:var(--ink-3); }
.tl-dashboard { display:grid; gap:8px; padding-top:8px; }
.tl-metrics,.tl-secondary-metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); border:1px solid var(--line); background:var(--tl-panel); }
.tl-metric { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; min-width:0; min-height:88px; padding:12px 14px; background:transparent; border:0; border-right:1px solid var(--line); text-align:left; color:var(--ink); cursor:pointer; }
.tl-metric:last-child { border-right:0; }
.tl-metric:hover { background:var(--bg-soft); }
.tl-metric>span { font-size:11px; color:var(--ink-3); }
.tl-metric>strong { max-width:100%; font:600 23px/1.2 var(--tl-number); letter-spacing:-.03em; white-space:normal; overflow-wrap:anywhere; font-style:normal; }
.tl-metric>small { font-size:11px; color:var(--ink-2); line-height:1.5; }
.tl-secondary-metrics .tl-metric { min-height:80px; }
.tl-secondary-metrics .tl-metric>strong { font-size:20px; }
.tl-amber { color:var(--accent); }
.tl-trend-toolbar { display:flex; align-items:center; gap:12px; min-height:38px; }
.tl-trend-toolbar h2 { margin:0; font-size:13px; font-weight:600; }
.tl-trend-toolbar>span { color:var(--ink-3); font-size:11px; }
.tl-ranges { display:flex; gap:3px; margin-left:auto; }
.tl-ranges button { min-width:40px; min-height:30px; padding:4px 9px; border:1px solid var(--line); color:var(--ink-2); background:transparent; font-size:11px; cursor:pointer; }
.tl-ranges button.active { color:var(--accent); background:var(--accent-soft); border-color:var(--accent); }
.tl-ranges button:hover { border-color:var(--accent); }
.tl-trend-grid,.tl-lower-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.tl-panel { min-width:0; background:var(--tl-panel); border:1px solid var(--line); }
.tl-panel-head { min-height:32px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 10px; border-bottom:1px solid var(--line); background:var(--tl-head); }
.tl-panel-head :is(h2,h3) { margin:0; font-size:11px; font-weight:600; color:var(--accent); }
.tl-panel-head>span { font:10px var(--tl-number); color:var(--ink-3); }
.tl-trend .tl-panel-head { min-height:38px; }
.tl-range-menu { position:relative; margin-left:auto; color:var(--ink-2); }
.tl-range-menu summary { display:flex; align-items:center; justify-content:center; gap:5px; min-height:26px; padding:3px 6px; cursor:pointer; font:10px var(--tl-number); list-style:none; border-radius:3px; background:var(--bg-soft); }
.tl-range-menu summary::-webkit-details-marker { display:none; }
.tl-range-menu .ic { width:12px; height:12px; }
.tl-range-menu[open] summary,.tl-range-menu summary:hover { color:var(--accent); }
.tl-range-options { position:absolute; top:calc(100% + 5px); right:0; z-index:40; display:grid; width:84px; padding:4px; background:var(--card); border:1px solid var(--line-strong); box-shadow:0 6px 18px #0003; }
.tl-range-options button { min-height:32px; border:0; padding:5px; background:transparent; color:var(--ink-2); font-size:12px; cursor:pointer; }
.tl-range-options button:hover,.tl-range-options button[aria-pressed="true"] { background:var(--accent-soft); color:var(--accent); }
.tl-activity-tabs { display:flex; gap:12px; }
.tl-activity-tabs button { border:0; background:transparent; color:var(--ink-3); font-size:11px; padding:3px 0; cursor:pointer; }
.tl-activity-tabs button[aria-selected="true"] { color:var(--accent); }
.tl-activity-body { flex:1; display:flex; flex-direction:column; min-width:0; }
.tl-plan-preview { flex:1; display:flex; flex-direction:column; padding:3px 10px; }
.tl-plan-preview .tl-schedule-row { flex:1; padding:12px 2px; }
.terminal-shell .tl-lower-grid>.tl-panel { display:flex; flex-direction:column; align-self:stretch; height:auto; margin:0; }
.tl-holding-minis .tl-mini-grid { flex:1; grid-auto-rows:1fr; }
.tl-trend-readout { display:flex; align-items:baseline; gap:12px; padding:12px 14px 0; min-width:0; }
.tl-trend-readout strong { font:600 20px var(--tl-number); letter-spacing:-.03em; }
.tl-trend-readout>span { color:var(--ink-3); font-size:10px; }
.tl-trend-svg { width:100%; display:block; height:auto; aspect-ratio:440/214; touch-action:pan-y; }
.tl-axis { fill:var(--ink-3); font:9px var(--tl-number); }
.tl-data-line { fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
.tl-latest-dot { fill:currentColor; }
.tl-trend-cursor[hidden] { display:none; }
.tl-trend-cursor circle { fill:currentColor; stroke:var(--bg); stroke-width:1.5; }
.tl-cursor-line { stroke:currentColor; stroke-opacity:.3; stroke-width:.7; fill:none; }
.tl-table-wrap { overflow-x:auto; }
.tl-ledger-table { width:100%; border-collapse:collapse; table-layout:fixed; font:12px var(--tl-number); }
.tl-ledger-table th { color:var(--ink-3); font-size:10px; font-weight:400; padding:8px 10px; text-align:left; border-bottom:1px solid var(--line); }
.tl-ledger-table td { padding:8px 10px; border-bottom:1px solid var(--line); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tl-ledger-table th:first-child { width:62px; }
.tl-ledger-table th:nth-child(3) { width:58px; }
.tl-ledger-table th:last-child,.tl-ledger-table td:last-child { text-align:right; width:118px; }
.tl-ledger-table td button { color:var(--ink); background:none; border:0; padding:0; cursor:pointer; font:inherit; text-align:left; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tl-ledger-table td button:hover { color:var(--accent); text-decoration:underline; }
.tl-trade-type { color:var(--ink-2); font-family:var(--font); font-size:11px; }
.tl-panel-link,.tl-text-action { display:flex; justify-content:space-between; gap:12px; color:var(--accent); background:none; border:0; cursor:pointer; font-size:11px; padding:0; }
.tl-panel-link { width:100%; min-height:38px; align-items:center; padding:8px 10px; }
.tl-panel-link:hover,.tl-text-action:hover { text-decoration:underline; }
.tl-allocation .wb-section { padding:0; margin:0; border:0; }
.tl-allocation .wb-section-head { display:none; }
.tl-allocation .seg { display:flex; padding:0 12px; }
.tl-allocation .seg button { min-height:34px; padding:5px; font-size:11px; }
.tl-allocation { display:flex; flex-direction:column; }
.tl-allocation .wb-section { flex:1; display:flex; flex-direction:column; }
.tl-allocation #wb-content-allocation { flex:1; display:flex; flex-direction:column; }
.tl-allocation .wb-allocation { flex:1; display:flex; align-items:center; justify-content:center; padding:12px; }
.tl-allocation .wb-allocation-open { display:flex; flex-direction:column; align-items:center; background:none; border:0; cursor:pointer; width:100%; }
.tl-allocation .wb-allocation .wb-dial { width:232px; height:232px; max-width:100%; }
.tl-allocation .wb-dial-value { font-family:var(--tl-number); }
.tl-allocation .wb-allocation-hint { font-size:11px; color:var(--ink-2); padding:0; }
.tl-allocation .wb-dial-segment { pointer-events:stroke; transition:opacity 160ms ease-out; }
.tl-allocation .wb-dial[data-inspecting] .wb-dial-segment { opacity:.3; }
.tl-allocation .wb-dial[data-inspecting] .wb-dial-segment.is-active { opacity:1; }
.tl-allocation .wb-dial text { pointer-events:none; }
.tl-signal-body { display:flex; width:100%; align-items:center; justify-content:space-between; gap:8px; min-height:40px; }
.tl-metric .tl-signal-body strong { font:600 19px/1.2 var(--tl-number); white-space:nowrap; }
.tl-signal-body strong b { font-weight:600; }.tl-signal-body strong i { font-style:normal; color:var(--ink-3); padding:0 5px; font-size:12px; }
.tl-semi { width:72px; height:42px; flex-shrink:0; overflow:visible; }
.tl-mini-ring { width:40px; height:40px; flex-shrink:0; }
.tl-gauge-track { fill:none; stroke:var(--bg-soft); stroke-width:3; }
.tl-gauge-gain { fill:none; stroke:var(--up); stroke-width:3; stroke-linecap:butt; }.tl-gauge-loss { fill:none; stroke:var(--down); stroke-width:3; stroke-linecap:butt; }
.tl-confirmed-arc { fill:none; stroke:var(--accent); stroke-width:6; }
.tl-value-split .tl-signal-body { min-height:24px; }.tl-value-split .tl-signal-body strong { font-size:16px; }
.tl-split-bar { display:flex; width:100%; height:4px; background:var(--line-strong); }
.tl-split-bar>i { display:block; height:100%; }.tl-split-gain { background:var(--up); }.tl-split-loss { background:var(--down); }
.tl-value-split>small { display:flex; flex-wrap:wrap; gap:3px 10px; font-size:10px; }
.tl-insights { padding:0 12px; }
.tl-insights>button { width:100%; display:grid; grid-template-columns:6px minmax(0,1fr) auto; gap:10px; align-items:start; padding:16px 0; border:0; border-bottom:1px solid var(--line); background:none; color:var(--ink); cursor:pointer; text-align:left; }
.tl-insights>button:last-child { border-bottom:0; }
.tl-insights>button:hover b { color:var(--accent); }
.tl-insights b { font-size:12px; font-weight:500; }
.tl-insights small { display:block; color:var(--ink-3); font-size:11px; margin-top:5px; }
.tl-insights strong { font:11px var(--tl-number); white-space:nowrap; }
.tl-income { padding:4px 14px 10px; }
.tl-income>button { display:grid; grid-template-columns:1fr auto; gap:9px 16px; width:100%; padding:18px 0; border:0; background:none; text-align:left; color:var(--ink-2); cursor:pointer; }
.tl-income>button>span:first-child { font-size:12px; }
.tl-income strong { font:600 16px var(--tl-number); }
.tl-income-track { grid-column:1/-1; height:3px; background:var(--bg-soft); overflow:hidden; }
.tl-income-track i { display:block; width:100%; height:100%; background:currentColor; transform-origin:left; }
.tl-income>button:hover>span:first-child { color:var(--accent); }
.tl-flow-list { padding:2px 12px; }
.tl-flow-row { display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:10px; width:100%; min-height:55px; padding:9px 0; border:0; background:none; color:var(--ink); text-align:left; cursor:pointer; }
.tl-flow-row+.tl-flow-row { border-top:1px solid var(--line); }
.tl-flow-side { display:grid; place-items:center; width:28px; height:28px; background:var(--bg-soft); color:var(--ink-3); border-radius:5px; }
.tl-flow-side.is-buy { color:var(--accent); background:var(--accent-soft); }
.tl-flow-side .ic { width:15px; height:15px; }
.tl-flow-asset { min-width:0; }.tl-flow-asset b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:500; }
.tl-flow-row small { display:block; margin-top:5px; color:var(--ink-3); font:10px var(--tl-number); }
.tl-flow-money { text-align:right; }.tl-flow-money strong { font:600 13px var(--tl-number); white-space:nowrap; }
.tl-flow-row:hover .tl-flow-asset b { color:var(--accent); }
.tl-mini-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding:10px; }
.tl-mini-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px; min-width:0; padding:10px; background:var(--bg-soft); color:var(--ink); border:0; text-align:left; cursor:pointer; }
.tl-mini-name { grid-column:1/-1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--ink-2); }
.tl-mini-card>strong { font:600 16px var(--tl-number); min-width:0; overflow:hidden; text-overflow:ellipsis; }
.tl-mini-card>small { align-self:center; font:10px var(--tl-number); }
.gb-chart { display:block; width:100%; height:30px; min-width:0; }
.gb-spark { display:block; width:100%; height:30px; overflow:visible; }
.gb-chart-empty { display:flex; align-items:center; height:30px; font-size:10px; color:var(--ink-3); }
@media(max-width:720px){ .gb-chart,.gb-spark { height:34px; } }
.tl-mini-chart { grid-column:1/-1; }
.tl-mini-card>strong.up~.tl-mini-chart { color:var(--up); }
.tl-mini-card>strong.down~.tl-mini-chart { color:var(--down); }
.tl-mini-card:hover .tl-mini-name { color:var(--accent); }
.tl-tx-legend { display:flex; gap:12px; font-size:10px; color:var(--ink-3); }
.tl-tx-legend span:before { content:''; display:inline-block; width:5px; height:5px; margin-right:4px; background:var(--ink-3); }
.tl-tx-legend .is-buy:before { background:var(--accent); }.tl-tx-legend .is-sell:before { background:var(--ink-2); }
.tl-tx-chart { padding:8px 14px 0; display:flex; flex-direction:column; justify-content:center; flex:1; }
.tl-recent { display:flex; flex-direction:column; }
.tl-tx-lane { padding:8px 0; }
.tl-tx-scale { display:flex; justify-content:space-between; color:var(--ink-3); font:10px var(--tl-number); margin-bottom:2px; }
.tl-tx-columns { display:flex; gap:10px; align-items:stretch; border-bottom:1px solid var(--line); }
.tl-tx-column { position:relative; flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:7px; padding:18px 0 7px; background:none; border:0; color:var(--ink); cursor:pointer; }
.tl-tx-bar-space { display:flex; align-items:flex-end; justify-content:center; width:100%; height:72px; }
.tl-tx-bar { display:block; width:clamp(12px,60%,38px); background:var(--ink-3); min-height:1px; }
.tl-tx-bar.is-buy { background:var(--accent); }.tl-tx-bar.is-sell { background:var(--ink-2); }
.tl-tx-date { color:var(--ink-3); font:10px var(--tl-number); }
.tl-tx-value { position:absolute; top:0; opacity:0; font:10px var(--tl-number); pointer-events:none; white-space:nowrap; }
.tl-tx-column:hover .tl-tx-value,.tl-tx-column:focus-visible .tl-tx-value { opacity:1; }
.tl-tx-column:hover .tl-tx-bar { opacity:.75; }
.tl-tx-lane:only-child .tl-tx-bar-space { height:144px; }
.tl-dual-legend { display:flex; gap:12px; color:var(--ink-3); font-size:10px; }
.tl-dual-legend span:before { content:''; display:inline-block; width:5px; height:5px; margin-right:4px; background:var(--accent); }
.tl-dual-legend span:last-child:before { background:#9d83ea; }
.tl-activity-stack { display:flex; flex-direction:column; flex:1; padding:6px 12px 10px; }
.tl-activity-part { display:flex; flex-direction:column; flex:1; min-width:0; }
.tl-activity-part h3 { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0; padding:6px 0 0; font-size:11px; font-weight:500; color:var(--ink-2); }
.tl-activity-part h3 small,.tl-plan-unknown { color:var(--ink-3); font-size:10px; font-weight:400; }
.tl-activity-stack .tl-tx-chart { padding:3px 0; }
.tl-activity-stack .tl-tx-lane { padding:4px 0; }
.tl-activity-stack .tl-tx-lane .tl-tx-bar-space { height:52px; }
.tl-activity-future { border-top:1px solid var(--line); margin-top:6px; padding-top:4px; }
.tl-tx-bar.is-plan { background:#9d83ea; }
.tl-status-dot { width:5px; height:5px; margin-top:6px; background:var(--down); }
.tl-status-dot.warn { background:var(--warn); }.tl-status-dot.neutral { background:var(--ink-3); }
.tl-bottom-grid { display:grid; grid-template-columns:1fr; gap:8px; }
.tl-bottom-grid .tl-panel { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:0; }.tl-bottom-grid .tl-panel-head { grid-column:1/-1; background:transparent; }
.tl-bottom-grid .tl-panel>.tl-schedule-row { display:grid; grid-template-columns:minmax(0,1fr) auto; min-height:48px; }
.tl-schedule-row { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:56px; padding:10px 12px; border:0; border-bottom:1px solid var(--line); background:none; color:var(--ink); cursor:pointer; text-align:left; }
.tl-schedule-row:hover { background:var(--bg-soft); }.tl-schedule-row:last-child { border-bottom:0; }
.tl-schedule-row>span { min-width:0; }.tl-schedule-row b { display:block; font-size:12px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:30ch; }
.tl-schedule-row small { display:block; font-size:11px; color:var(--ink-3); margin-top:4px; }
.tl-schedule-row strong { font:12px var(--tl-number); white-space:nowrap; }
.tl-zero-axis { fill:none; stroke:var(--ink-3); stroke-width:.5; stroke-opacity:.3; }
/* All low-frequency pages inherit the same panel, field and table grammar. */
.terminal-shell :is(.card,.wb-section,.review-toolbar,.wb-trade-stats,.wb-trade-filters,.wb-position-toolbar) { border:1px solid var(--line); background:var(--tl-panel); border-radius:0; padding:14px; margin:8px 0; }
.terminal-shell .tl-allocation .wb-section { border:0; padding:0; margin:0; }
.terminal-shell .tl-allocation .wb-section-head { margin:0; }
.terminal-shell :is(.card-head h2,.wb-section h2) { font-size:13px; font-weight:600; color:var(--accent); }
.terminal-shell :is(.btn,.seg button,.wb-collapse,input,select,textarea,.entry-compose textarea,.mt-terminal,.mt-terminal button,.mt-terminal select,.advice-overview,.advice-card,.advice-notifications) { border-radius:1px; }
.terminal-shell .btn,.modal .btn,.wb-detail .btn { min-height:34px; font-size:12px; padding:6px 12px; border-radius:1px; }
.terminal-shell .btn.primary,.modal .btn.primary { background:var(--accent); border-color:var(--accent); color:var(--bg); }
.btn.primary { color:var(--bg); }
.terminal-shell .btn.primary:hover,.modal .btn.primary:hover { background:color-mix(in srgb,var(--accent) 88%,var(--ink)); }
.terminal-shell :is(input,select,textarea) { border-radius:1px; font-size:13px; background:var(--bg); }
.terminal-shell :is(small,.label,.sub,.hint,.hint-line,.tag,.chip,.plan-meta,.stale-hint,.field>label,.kv .k,.metric .foot,.name-cell .cd,table.data th) { font-size:12px; }
.terminal-shell table.data { font-size:13px; }
.terminal-shell table.data th { font-size:11px; padding:8px 10px; background:var(--tl-head); }
.terminal-shell table.data td { padding:10px; }
.terminal-shell .wb-position-table td strong { font:600 14px var(--tl-number); }
.terminal-shell .wb-position-table td small { font-size:11px; }
.terminal-shell .wb-position-table td:first-child { font-size:13px; }
.terminal-shell .table-wrap { margin:0; padding:0; }
.terminal-shell .wb-holding-search { margin:8px 0; }
.terminal-shell .wb-trade-record { padding:12px; border-radius:0; }
.terminal-shell .plan { border:1px solid var(--line); border-radius:0; padding:14px; gap:10px; }
.terminal-shell .plan-name { font-size:14px; }.terminal-shell .plan-stats .s .v { font:15px var(--tl-number); }
.terminal-shell .advice-workspace { max-width:none; }
.terminal-shell .advice-card,.terminal-shell .advice-overview,.terminal-shell .advice-notifications { border-radius:0; border-color:var(--line); background:var(--tl-panel); }
.terminal-shell .advice-intro h2,.terminal-shell .entry-intro h2 { font-size:23px; }
.terminal-shell .advice-card-head h2 { font-size:16px; }
.terminal-shell .advice-callout h3 { font-size:20px; }
.terminal-shell .advice-eyebrow { display:none; }
.terminal-shell .local-entry { max-width:none; gap:10px; }
.terminal-shell .entry-compose.card,.terminal-shell .entry-draft.card { border-radius:0; padding:18px; }
.terminal-shell .assistant-guide { gap:8px; margin-top:12px; }
.terminal-shell .assistant-guide details { border-radius:0; background:var(--tl-panel); }
.terminal-shell .assistant-guide summary { min-height:42px; padding:10px 12px; font-size:13px; background:var(--tl-head); }
.terminal-shell .assistant-guide details[open]>summary { border-bottom:1px solid var(--line); }
.terminal-shell .mt-terminal { border-radius:0; }.terminal-shell .mt-header { min-height:54px; padding:8px 12px; }
.terminal-shell .mt-terminal { --mt-up:var(--up); --mt-down:var(--down); }
.terminal-shell .mt-settings-body { border-radius:1px; }
.terminal-shell .review-page { padding-top:0; }.terminal-shell .review-summary strong { font-family:var(--tl-number); }
.terminal-shell .review-data-row { padding:14px 0; }
.modal,.wb-detail,.sheet,.login-card { border-radius:1px; background:var(--card); border-color:var(--line-strong); }
.modal-head,.wb-detail-header { background:var(--tl-head); border-bottom:1px solid var(--line); padding:16px 20px; }
.modal-head h3,.wb-detail-header h2 { font-size:18px; }
.modal :is(input,select,textarea) { border-radius:1px; background:var(--bg); }
.wb-detail-tabs button[aria-selected="true"] { color:var(--accent); border-bottom-color:var(--accent); }
.login-card { border:1px solid var(--line); box-shadow:none; }
.login-title { color:var(--accent); }
@media(min-width:721px) { .terminal-shell .wb-mobile-nav { display:none; } }
@media(min-width:721px) {
  .terminal-shell .btn.sm { min-height:30px; padding:4px 9px; font-size:11px; }
  .terminal-shell .seg button { min-height:34px; padding:5px 10px; font-size:12px; }
  .terminal-shell .wb-tx-record { padding:9px 12px; }
  .terminal-shell .wb-tx-main { grid-template-columns:90px minmax(0,1fr) 95px 140px 56px; gap:12px; }
  .terminal-shell .wb-tx-main small { font-size:11px; }
  .terminal-shell .wb-tx-name strong { font-size:13px; }
  .terminal-shell .wb-tx-amount strong { font:600 17px var(--tl-number); }
  .terminal-shell .wb-tx-details { display:flex; flex-wrap:wrap; gap:3px 20px; padding-left:102px; margin:5px 0 0; font-size:11px; line-height:1.5; }
  .terminal-shell .wb-tx-note { margin:4px 0 0 102px; font-size:11px; }
  .terminal-shell .wb-trade-toolbar { padding:10px 0; }
  .terminal-shell .wb-trade-toolbar h2 { font-size:15px; }
  .terminal-shell .review-page { gap:8px; }
  .terminal-shell .review-contribution { padding:9px 0; gap:12px; }
  .terminal-shell .review-contribution>div { gap:3px; }
  .terminal-shell .review-contribution strong { font-size:13px; }
  .terminal-shell .review-contribution small { font-size:11px; line-height:1.5; }
  .terminal-shell .review-summary { margin:12px 0 10px; gap:16px; }
  .terminal-shell .review-summary strong { font-size:23px; }
  .terminal-shell .review-summary span,.terminal-shell .review-meta { font-size:12px; }
  .terminal-shell .review-budget { display:grid; grid-template-columns:minmax(260px,.9fr) minmax(0,1.5fr); column-gap:24px; align-items:start; }
  .terminal-shell .review-budget>.card-head { grid-column:1/-1; margin:0 0 8px; }
  .terminal-shell .review-budget-form { grid-column:1; grid-row:2; margin:0; gap:6px; }
  .terminal-shell .review-budget-form label { width:100%; font-size:12px; }
  .terminal-shell .review-budget-form input { width:145px; min-height:34px; padding:5px 8px; }
  .terminal-shell .review-budget>p { grid-column:1; margin:6px 0; font-size:11px; }
  .terminal-shell .review-budget-stats { grid-column:2; grid-row:2 / span 2; margin:0; gap:10px; }
  .terminal-shell .review-budget-stats>div { gap:6px; padding:8px 0; }
  .terminal-shell .review-budget-stats span { font-size:12px; }
  .terminal-shell .review-budget-stats strong { font:600 20px var(--tl-number); }
  .terminal-shell .review-budget-status { grid-column:1/-1; padding:7px 0; font-size:12px; }
  .terminal-shell .review-detail { grid-column:1/-1; }
  .terminal-shell .review-detail summary { min-height:32px; font-size:12px; }
  .terminal-shell .plan { gap:8px; padding:12px; }
  .terminal-shell .plan-stats { gap:8px; }
  .terminal-shell .plan-stats .s { padding:5px 0; }
  .terminal-shell .plan-meta { margin-top:2px; font-size:11px; }
}
@media(min-width:1700px) { .terminal-shell .wb-main { max-width:1920px; margin:0 auto; }.tl-metric>strong { font-size:27px; }.tl-trend-svg { max-height:300px; }.tl-lower-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:1200px) and (min-width:721px) { .tl-brand>span { display:none; }.tl-metrics,.tl-secondary-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }.tl-metric:nth-child(3) { border-right:0; }.tl-metric:nth-child(-n+3) { border-bottom:1px solid var(--line); }.tl-trend-readout { flex-wrap:wrap; gap:2px 8px; }.tl-trend-readout strong { font-size:17px; }.tl-lower-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.tl-account { grid-column:1/-1; }.tl-insights { display:grid; grid-template-columns:1fr 1fr; column-gap:20px; } }
@media(max-width:720px) {
  body { font-size:14px; }
  .terminal-shell .wb-main,html[data-layout="desktop"] .terminal-shell .wb-main { padding:0 10px calc(90px + var(--sab)); }
  .tl-header-main { min-height:54px; flex-wrap:wrap; padding:8px 10px; gap:8px; }
  .tl-brand { gap:6px; }.tl-brand>span { display:none; }.tl-brand strong { font-size:13px; }
  .tl-header-actions { margin-left:auto; gap:2px; }.tl-icon-btn { width:36px; height:38px; }
  .tl-preview { font-size:10px; padding:2px 5px; }.tl-header-actions .tl-icon-btn[data-tab="settings"] { display:none; }
  .tl-page-heading { flex-wrap:wrap; padding:10px 0; row-gap:6px; }
  .tl-telemetry { flex-basis:100%; justify-content:space-between; gap:12px; font-size:10px; }
  .tl-command { order:3; flex-basis:100%; height:40px; }.tl-command input { height:38px; font-size:14px; }
  .tl-header-nav { display:none; }.tl-page-heading { min-height:46px; gap:8px; }.tl-page-status { font-size:10px; }.tl-page-currency { display:none; }
  .tl-metrics,.tl-secondary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tl-metric { padding:12px; min-height:92px; border-bottom:1px solid var(--line); gap:7px; }
  .tl-metric:nth-child(2n) { border-right:0; }.tl-metric:nth-last-child(-n+2) { border-bottom:0; }
  .tl-metric>strong { font-size:22px; }.tl-metric>small,.tl-metric>span { font-size:12px; }
  .tl-secondary-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tl-secondary-metrics>.tl-metric:not(.tl-signal) { display:none; }
  .tl-secondary-metrics .tl-signal { border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
  .tl-secondary-metrics .tl-signal:nth-child(5) { border-right:0; }
  .tl-secondary-metrics .tl-signal:last-child { grid-column:1/-1; border:0; }
  .tl-bottom-grid .tl-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tl-trend-toolbar { flex-wrap:wrap; gap:6px; min-height:52px; }.tl-trend-toolbar>span { display:none; }
  .tl-ranges button { min-height:38px; padding:5px 8px; font-size:12px; min-width:38px; }
  .tl-trend-grid,.tl-lower-grid,.tl-bottom-grid { grid-template-columns:minmax(0,1fr); }
  .tl-panel-head { padding:9px 12px; min-height:38px; }.tl-panel-head :is(h2,h3) { font-size:12px; }.tl-panel-head>span { font-size:11px; }
  .tl-trend-readout strong { font-size:23px; }.tl-trend-readout>span { font-size:11px; }.tl-axis { font-size:11px; }
  .tl-trend-svg { max-height:250px; }.tl-allocation .wb-dial { width:200px; height:200px; }
  .tl-ledger-table { font-size:13px; }.tl-ledger-table td { padding:12px 10px; }.tl-panel-link { min-height:44px; font-size:13px; }
  .tl-insights b { font-size:14px; }.tl-insights small { font-size:12px; }.tl-insights strong { font-size:12px; }
  .terminal-shell .wb-mobile-nav { display:flex; background:var(--bg); border-top:1px solid var(--line-strong); }
  .terminal-shell .wb-mobile-nav .wb-nav-button { flex:1; width:20%; min-height:58px; font-size:12px; }
  .terminal-shell .wb-mobile-nav .wb-nav-button .lb { display:block; font-size:12px; }
  .terminal-shell .wb-mobile-nav .wb-nav-button.active { color:var(--accent); }
  .terminal-shell .btn,.modal .btn,.wb-detail .btn { min-height:44px; font-size:14px; }
  .terminal-shell :is(small,.label,.sub,.hint,.hint-line,.tag,.chip,.plan-meta,.stale-hint,.field>label,.kv .k,.metric .foot,.name-cell .cd) { font-size:13px; }
  .terminal-shell .sheet :is(.wb-icon-act,.sheet-item) { min-height:44px; }.terminal-shell .sheet .wb-quick-actions { flex-direction:row; }
  .terminal-shell .card { padding:12px; }.terminal-shell .advice-callout h3 { font-size:19px; }
}
@media(pointer:coarse) { .tl-icon-btn { min-height:44px; min-width:44px; }.tl-command { min-height:44px; }.tl-ranges button { min-height:44px; }.tl-header .wb-nav-button { min-height:44px; }.tl-header .wb-icon-act { min-height:44px; min-width:44px; } }
@media(pointer:coarse) { .tl-range-menu summary,.tl-activity-tabs button,.tl-range-options button { min-height:44px; }.tl-trend .tl-panel-head { min-height:58px; } }
 :where(html[data-motion="off"]) .tl-allocation .wb-dial-segment { transition:none; }:where(html[data-motion="off"]) .tl-allocation .wb-dial[data-inspecting] .wb-dial-segment.is-active { stroke-width:12; }

/* Modules are separated by surface and spacing, not enclosing outlines.
   Input, action and keyboard-focus boundaries remain functional. */
.terminal-shell :is(.tl-metrics,.tl-secondary-metrics,.tl-metric,.tl-panel,.tl-panel-head,.card,.wb-section,.plan,.review-toolbar,.wb-trade-stats,.wb-trade-filters,.wb-position-toolbar,.advice-card,.advice-overview,.advice-notifications,.mt-terminal,.assistant-guide details) { border:0; box-shadow:none; }
.tl-allocation .wb-dial-track { stroke:transparent; }
/* Allocation: compact rank chart, real total-weight bars, no stretched blocks. */
.terminal-shell .tl-lower-grid>.tl-allocation { align-self:start; }
.wb-map-wrap { width:100%; padding:12px 14px 4px; display:flex; flex-direction:column; gap:6px; }
.wb-weight-strip { display:flex; width:100%; height:14px; padding:0; margin:0 0 10px; border:0; background:var(--bg-soft); border-radius:2px; overflow:hidden; cursor:pointer; }
.wb-weight-strip>span { height:100%; flex-shrink:0; }
.wb-map.wb-rank { position:relative; height:auto; width:100%; display:grid; gap:0; min-height:0; }
.wb-map-tile.wb-rank-row { position:relative; inset:auto; height:auto; width:100%; min-height:48px; padding:8px 0; margin:0; border:0; background:transparent; cursor:pointer; color:var(--ink); text-align:left; }
.wb-rank-label { display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
.wb-rank-label b { min-width:0; font-size:12px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-rank-label strong { font:600 17px var(--tl-number); }
.wb-rank-label small { font-size:10px; color:var(--ink-3); margin-left:2px; }
.wb-rank-track { display:block; height:5px; margin-top:7px; background:var(--bg-soft); overflow:hidden; border-radius:1px; }
.wb-rank-track i { display:block; height:100%; background:var(--tile-tone); }
.wb-rank-more { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:36px; border:0; border-top:1px solid var(--line); background:transparent; padding:6px 0; color:var(--ink-3); font-size:11px; cursor:pointer; }
.wb-rank-more b { font:12px var(--tl-number); }
.wb-map-readout { min-height:30px; display:flex; align-items:center; color:var(--ink-3); font:10px/1.5 var(--tl-number); overflow-wrap:anywhere; }
.wb-map-tile:focus-visible { outline-offset:2px; }
@media(hover:hover) and (pointer:fine) { .wb-rank-row:hover .wb-rank-label b,.wb-rank-more:hover { color:var(--accent); } }
.tl-allocation .seg button { transition:color 120ms ease,background-color 120ms ease; }
 :where(html[data-motion="off"]) .tl-allocation .seg button { transition:none; }
@media(max-width:720px) { .wb-map-wrap { padding:12px; }.wb-rank-label b{font-size:13px}.wb-rank-row{min-height:52px}.wb-weight-strip{height:12px} }

/* Printing a saved dark theme must also work when the browser omits backgrounds. */
@media print {
  html,html[data-theme="dark"] { color-scheme:light; --bg:#fff; --bg-soft:#f5f5f5; --card:#fff; --tl-panel:#fff; --tl-head:#f4f4f4; --ink:#191919; --ink-2:#454545; --ink-3:#595959; --line:#d4d4d4; --line-strong:#aaa; --accent:#8c4b00; --accent-soft:#fff2da; --up:#b4001b; --down:#00692a; --up-soft:#fdeeee; --down-soft:#e9f7f0; --warn:#805000; --warn-soft:#fdf4e6; }
  .tl-header,.tl-page-heading .tl-telemetry,.tl-range-menu,.wb-map-readout { display:none; }
  .terminal-shell,.terminal-shell .wb-main { padding:0!important; min-height:0; }
  body { background:#fff; color:#191919; }
  html .login-err,html[data-theme="dark"] .login-err,html .banner.err,html[data-theme="dark"] .banner.err { color:#982e2e; }
  .tl-panel,.tl-metric { break-inside:avoid; }
}

/* Short compositor-friendly feedback. Never run a permanent repaint loop. */

  :where(html[data-motion="on"]) [data-act="refresh"][aria-busy="true"] .ic { animation:spin .8s linear infinite; }
  :where(html[data-motion="on"]) :is(.terminal-shell,.modal,.wb-detail) :is(.btn,.tl-icon-btn,.wb-nav-button,.tl-ranges button,.tl-metric,.tl-mini-card,.tl-range-options button,.settings-nav button,.center-tabs button,.sheet-item) {
    transition:transform 130ms cubic-bezier(.23,1,.32,1),opacity 130ms ease;
  }
  :where(html[data-motion="on"]) :is(.terminal-shell,.modal,.wb-detail) :is(.btn,.tl-icon-btn,.wb-nav-button,.tl-ranges button,.tl-metric,.tl-mini-card,.tl-range-options button,.settings-nav button,.center-tabs button,.sheet-item):active:not(:disabled) {
    transform:translateY(1px) scale(.985);
  }
  :where(html[data-motion="on"]) .tl-range-options { transform-origin: top right; }
  :where(html[data-motion="on"]) :is(.settings-nav,.center-tabs) button svg { transition:transform 160ms cubic-bezier(.23,1,.32,1); }
  @media(hover:hover) and (pointer:fine) {
    :where(html[data-motion="on"]) :is(.settings-nav,.center-tabs) button:hover svg { transform:translateY(-2px); }
  }
  @media(hover:hover) and (pointer:fine) { :where(html[data-motion="on"]) .terminal-shell .tl-settings-btn:hover .ic { transform:rotate(8deg); } }
  :where(html[data-motion="on"]) .tl-settings-btn .ic { transition:transform 160ms cubic-bezier(.16,1,.3,1); }


  :where(html[data-motion="off"]) .terminal-shell :is(.btn,.tl-icon-btn,.wb-nav-button,.tl-ranges button),:where(html[data-motion="off"]) .tl-settings-btn .ic { transition:none; }
  :where(html[data-motion="off"]) .sheet,:where(html[data-motion="off"]) .sheet-mask,:where(html[data-motion="off"]) .toast { animation:none; }


/* Annualized return belongs to the profit chart, not a separate dashboard card. */
.tl-trend .tl-panel-head h3 { display:flex; align-items:center; gap:12px; min-width:0; }
.tl-annualized { display:inline-flex; align-items:baseline; gap:5px; white-space:nowrap; font:11px var(--tl-number); }
.tl-annualized>span { color:var(--ink-3); font-weight:400; }
.tl-annualized b { font-weight:600; font-size:12px; }
.tl-annualized .up { color:var(--up); }.tl-annualized .down { color:var(--down); }
@media(max-width:430px){.tl-trend .tl-panel-head h3{gap:8px}.tl-annualized{font-size:10px}.tl-annualized b{font-size:11px}}

.tl-home-bills { container-type:inline-size; }
.hb-link { display:inline-flex; align-items:center; gap:8px; min-height:30px; padding:0 8px; color:var(--ink-2); background:transparent; border:0; font:inherit; cursor:pointer; }
.hb-link:hover { color:var(--accent); background:var(--bg-soft); }
.hb-link:focus-visible { outline:1px solid var(--accent); outline-offset:-1px; }
.tl-panel-head .hb-link { margin:-6px -4px -6px 0; }
.tl-panel-head .hb-link::after { content:''; width:5px; height:5px; border-top:1px solid currentColor; border-right:1px solid currentColor; transform:rotate(45deg); }
.hb-body { display:grid; grid-template-columns:minmax(0,1.22fr) minmax(0,1fr); grid-template-areas:"main month" "activity activity"; align-items:start; column-gap:16px; padding:0 12px; line-height:1.35; }
.hb-main,.hb-month,.hb-activity { min-width:0; padding-block:10px; }
.hb-main { grid-area:main; }
.hb-month { grid-area:month; border-inline-start:1px solid var(--line); padding-inline-start:16px; }
.hb-activity { grid-area:activity; border-top:1px solid var(--line); }
.hb-section-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.hb-body h3 { margin:0; font-size:12px; font-weight:600; color:var(--ink); }
.hb-section-head>span,.hb-chart h3 span,.hb-today-split dt,.hb-net>span,.hb-flow-values dt,.hb-recent small,.hb-recent time,.hb-categories small,.hb-note,.hb-status { font-size:11px; color:var(--ink-3); }
.hb-today { align-items:end; }
.hb-today strong { display:block; margin-top:3px; font:650 clamp(22px,3.35cqi,31px)/1.1 var(--tl-number); letter-spacing:-.035em; overflow-wrap:anywhere; }
.hb-today-split { display:grid; gap:4px; margin:0; flex:0 0 auto; }
.hb-today-split>div,.hb-flow-values>div { display:flex; justify-content:space-between; align-items:baseline; gap:6px; }
.hb-today-split dd,.hb-flow-values dd { margin:0; color:var(--ink); font:600 12px var(--tl-number); }
.hb-chart { margin-top:10px; padding:8px 0 0; border-top:1px solid var(--line); }
.hb-chart h3 span { font-weight:400; }
.hb-chart .wallet-chart { display:block; width:100%; max-height:126px; margin-top:4px; }
.hb-chart .wallet-chart text { fill:var(--ink-3); font:12px var(--tl-number); }
.hb-chart .hb-axis { fill:none; stroke:var(--line-strong); vector-effect:non-scaling-stroke; }
.hb-chart [data-wallet-bar] { opacity:.50; }
[data-theme="light"] .hb-chart [data-wallet-bar] { opacity:.75; }
.hb-chart [data-active] [data-wallet-bar] { opacity:1; }
.hb-chart [data-wallet-inline]:focus-visible { outline:1px solid var(--accent); outline-offset:1px; }
.hb-chart output { color:var(--ink-2); font:11px var(--tl-number); }
.hb-net { display:flex; align-items:baseline; gap:8px; margin-top:5px; }
.hb-net strong { font:650 clamp(17px,2.6cqi,22px)/1.15 var(--tl-number); overflow-wrap:anywhere; }
.hb-flow-bar { height:5px; margin-top:8px; border-radius:2px; background:linear-gradient(to right,var(--up) 0 var(--hb-income-share),var(--down) var(--hb-income-share) 100%); }
.hb-flow-values { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 14px; margin:5px 0 0; }
.hb-flow-values>div:first-child dd { color:var(--up); }
.hb-flow-values>div:last-child dd { color:var(--down); }
.hb-breakdown { margin-top:9px; padding-top:8px; border-top:1px solid var(--line); }
.hb-categories,.hb-recent { display:grid; list-style:none; margin:5px 0 0; padding:0; }
.hb-categories { grid-template-columns:minmax(0,1fr) minmax(26px,1fr) auto 5ch; column-gap:6px; }
.hb-categories li { display:grid; grid-column:1/-1; grid-template-columns:minmax(0,1fr) minmax(26px,1fr) 11ch 5ch; grid-template-columns:subgrid; align-items:center; column-gap:6px; min-height:23px; }
.hb-category-name { grid-column:1; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hb-categories strong { grid-column:3; }
.hb-categories small { grid-column:4; text-align:right; }
.hb-categories strong,.hb-recent strong,.hb-recent time { font-family:var(--tl-number); }
.hb-categories strong,.hb-recent strong { font-size:12px; }
.hb-category-track { grid-area:1/2; height:3px; background:var(--line); }
.hb-category-track i { display:block; height:100%; background:var(--accent); transform-origin:left center; }
.hb-other .hb-category-track i { background:var(--ink-3); }
.hb-recent li { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:baseline; gap:7px; padding:4px 0; }
.hb-recent li+li { border-top:1px solid var(--line); }
.hb-recent li>div { display:flex; align-items:baseline; min-width:0; gap:6px; }
.hb-recent b,.hb-recent small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hb-recent b { font-size:12px; font-weight:500; }
.hb-recent small { flex:0 0 auto; max-width:32%; }
.hb-note { margin:0; }
.hb-empty { grid-area:month; padding:11px 0; }
.hb-status { display:flex; align-items:center; gap:8px; margin:0; min-height:70px; padding:12px 14px; }
@container(min-width:690px) {
  .hb-recent { grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:10px; }
  .hb-recent li+li { border-top:0; border-inline-start:1px solid var(--line); padding-inline-start:10px; }
}
@container(max-width:560px) {
  .hb-body { grid-template-columns:minmax(0,1fr); grid-template-areas:"main" "month" "activity"; }
  .hb-month,.hb-activity,.hb-empty { border-inline-start:0; padding-inline-start:0; border-top:1px solid var(--line); }
  .hb-chart .wallet-chart { max-height:110px; }
}
@media(pointer:coarse) { .hb-link { min-height:44px; } .tl-panel-head .hb-link { margin-block:-5px; } }

/* Home summaries share a compact terminal rhythm. */
.home-allocation .wb-map-wrap{padding:10px 12px}.home-allocation .wb-map.wb-rank{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}.home-allocation .wb-map-tile.wb-rank-row{min-height:44px;padding:6px 0}.home-allocation .wb-rank-label strong{font-size:15px}.home-allocation .wb-rank-track{height:3px;margin-top:6px}.home-allocation .wb-rank-more{min-height:30px}.home-allocation .wb-map-readout{margin-top:0;min-height:20px}.home-allocation .wb-weight-strip{height:7px}
.ig-ai form>.field{margin-top:12px}.ig-options{display:flex;gap:20px;flex-wrap:wrap}.ig-check{display:flex;align-items:center;gap:8px;font-size:13px;margin:12px 0}.ig-install{margin-top:16px;color:var(--ink-3);font-size:12px}.ig-install summary{cursor:pointer;min-height:32px}.ig-install pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:var(--bg);font:12px/1.7 var(--tl-number);color:var(--ink)}.ig-grants>div{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line);gap:12px}.ig-grants>div>span{display:flex;flex-direction:column;gap:6px;min-width:0}.ig-grants b{font-size:13px;overflow-wrap:anywhere}.ig-grants small{font-size:11px;color:var(--ink-3)}.ig-approval strong{font:600 20px var(--tl-number);letter-spacing:.08em;color:var(--accent)}.ig-ai input,.ig-ai select{width:100%;min-height:44px;background:var(--bg);border:1px solid var(--line);color:var(--ink);padding:8px}
@media(max-width:720px){.ig-ai input,.ig-ai select{font-size:16px}.home-allocation .wb-map-tile.wb-rank-row{min-height:44px}}

.ig-ai input[type=checkbox],.ig-approval input[type=checkbox]{width:16px;height:16px;min-height:16px;padding:0;flex:0 0 16px;accent-color:var(--accent)}
.ig-options .ig-check{white-space:nowrap}.ig-ai form>.btn-row{margin-top:12px}

.cf-ratio{display:block;min-width:0;padding:16px 0}.cf-heading{display:block;font-size:11px;color:var(--ink-3)}.cf-percent{display:flex;align-items:baseline;gap:7px;margin:9px 0;font:600 24px var(--tl-number)}.cf-percent i{font-style:normal;font-size:14px;color:var(--ink-3)}.cf-track{display:flex;height:6px;width:100%;overflow:hidden;background:var(--bg-soft)}.cf-track i{display:block;height:100%}.cf-values{display:flex;justify-content:space-between;gap:10px;margin-top:9px;font:11px var(--tl-number);flex-wrap:wrap}.cf-empty{font-size:12px;color:var(--ink-3);padding:26px 0}

/* Aligned home rows: markets / allocation / holdings, events / bills. */
.terminal-shell .tl-lower-grid.tl-home-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"markets allocation holdings" "events bills bills";align-items:stretch}
.terminal-shell .tl-home-grid>.tl-global{grid-area:markets}.terminal-shell .tl-home-grid>.tl-allocation{grid-area:allocation;align-self:stretch}.terminal-shell .tl-home-grid>.tl-holding-minis{grid-area:holdings}.terminal-shell .tl-home-grid>.tl-home-events{grid-area:events}.terminal-shell .tl-home-grid>.tl-home-bills{grid-area:bills}
.terminal-shell .tl-home-grid>.tl-panel{height:auto;align-self:stretch;min-width:0;display:flex;flex-direction:column;margin:0}.tl-home-grid .gb-host{display:flex;flex-direction:column}.tl-home-grid .gb-index-grid{flex:1;grid-auto-rows:minmax(72px,1fr)}.tl-home-grid .gb-index{min-height:72px}.tl-home-grid .tl-holding-minis .tl-mini-card{padding:8px;gap:3px;grid-template-rows:auto auto 1fr}.tl-home-grid .home-allocation .wb-map.wb-rank{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;row-gap:0}.tl-home-grid .home-allocation .wb-map-tile.wb-rank-row{min-height:45px;padding:8px 0}.tl-home-events .gb-news-head{min-height:32px;margin:0;padding:7px 10px;background:var(--tl-head)}.tl-home-events .gb-news-list{padding:0 12px 12px}
.terminal-shell .tl-home-grid>.tl-home-bills { align-self:start; }
@media(max-width:1023px) and (min-width:721px){.terminal-shell .tl-lower-grid.tl-home-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"markets holdings" "allocation bills" "events events"}}
@media(max-width:720px){.terminal-shell .tl-lower-grid.tl-home-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"markets" "allocation" "holdings" "events" "bills"}.tl-home-events .gb-news-head{min-height:38px;padding:9px 12px}.tl-home-grid .gb-index{min-height:90px}}

.tl-home-grid .home-allocation .wb-allocation{justify-content:flex-start;align-items:stretch;padding:0}

.hl-history .lf-chart-empty{min-height:120px;display:grid;place-items:center;font-size:11px;color:var(--ink-3)}

.ig-approval [data-ig-code-form]{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;margin:14px 0 8px}.ig-approval [data-ig-code-form] .field{flex:1 1 220px;min-width:0}.ig-approval input[name=agentCode]{width:100%;min-width:0;min-height:44px;background:var(--bg);color:var(--ink);border:1px solid var(--line);padding:8px 10px;font:16px var(--tl-number)}.ig-approval [data-ig-code-form] button{min-height:44px}.ig-approval [data-agent-code-error]:empty{display:none}

.wb-allocation-profile{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:10px 12px 6px;border-top:1px solid var(--line);margin-top:6px}.wb-allocation-profile section{min-width:0}.wb-allocation-profile h4{font-size:11px;font-weight:500;line-height:1.25;color:var(--ink-3);margin:0 0 8px}.wb-profile-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;margin-bottom:6px;font-size:11px;line-height:1.25}.wb-profile-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wb-profile-row>b{font:12px var(--tl-number)}.wb-profile-row small{font-size:10px}.wb-profile-row>i{grid-column:1/-1;height:3px;background:var(--bg-soft);overflow:hidden}.wb-profile-row em{display:block;width:100%;height:100%;transform-origin:left;background:var(--profile-tone)}.wb-profile-status{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;background:transparent;border:0;color:var(--ink-3);font-size:10px;cursor:pointer;text-align:left}.wb-profile-status b{color:var(--ink);font:11px var(--tl-number)}.wb-profile-status:hover{background:var(--bg-soft)}:where(html[data-motion="on"]) .wb-profile-row em{transition:transform 180ms ease-out}

/* Allocation skyline: a shared baseline, exact weights and a compact value ledger. */
.tl-allocation .wb-allocation-columns{padding:14px 12px 0;min-height:0}.wb-allocation-caption{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--ink-3);margin-bottom:24px}.tl-allocation .wb-map.wb-column-chart{display:flex;align-items:stretch;gap:10px;height:190px;min-height:0;grid-template-columns:none;padding:0;border-bottom:1px solid color-mix(in srgb,var(--ink) 8%,transparent)}.tl-allocation .wb-map-tile.wb-column{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:flex-end;padding:0;background:none;border:0;border-radius:0;overflow:visible;color:var(--ink)}.wb-column-track{height:158px;width:100%;display:flex;align-items:flex-end;justify-content:center}.wb-column-fill{height:var(--column-size);width:min(100%,34px);min-height:2px;background:var(--tile-tone);position:relative;transition:filter 160ms ease,transform 160ms ease;transform-origin:bottom}.wb-column-fill b{position:absolute;bottom:calc(100% + 7px);left:50%;transform:translateX(-50%);font-size:12px;white-space:nowrap;color:var(--ink);font-variant-numeric:tabular-nums}.wb-column-fill small{font-size:9px;margin-left:1px;color:var(--ink-3)}.wb-column-name{font-size:10px;line-height:28px;display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wb-column:hover .wb-column-fill,.wb-column:focus-visible .wb-column-fill{filter:brightness(1.2);transform:scaleX(1.12)}.wb-column:focus-visible{outline:1px solid var(--accent);outline-offset:4px}.tl-allocation .wb-map-readout{font-size:11px;min-height:30px;padding:12px 0;color:var(--ink-3);overflow-wrap:anywhere}.wb-column-legend{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;padding-top:2px}.wb-column-legend button{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:33px;padding:5px 0;background:none;border:0;text-align:left;font:inherit;font-size:11px;color:var(--ink)}.wb-column-legend button>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wb-column-legend i{display:inline-block;width:5px;height:5px;margin-right:7px}.wb-column-legend b{font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}.wb-column-legend button:hover b{color:var(--accent)}.tl-allocation .wb-profile-status{margin-top:10px;font-size:10px;min-height:32px}@media(max-width:430px){.tl-allocation .wb-map.wb-column-chart{gap:7px}.wb-column-fill b{font-size:11px}.wb-column-legend{gap:0 12px}}:where(html[data-motion="off"]) .wb-column-fill{transition:none}
.center-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:14px;overflow:auto}.center-tabs button{flex:none;min-height:40px;padding:8px 14px;border:0;border-bottom:2px solid transparent;color:var(--ink-3);background:transparent;font:inherit;cursor:pointer}.center-tabs button[aria-pressed=true]{border-color:var(--accent);color:var(--accent);font-weight:650}.center-tabs button:focus-visible,.bi-art-options label:focus-within{outline:2px solid var(--accent);outline-offset:-2px}.settings-center details>summary,.nt-options>summary{cursor:pointer}.center-status{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;gap:12px;background:var(--bg-soft);color:var(--ink-3);font-size:12px}.center-status strong{color:var(--ink)}.center-rule-group{margin-bottom:16px}.center-rule-group h4{color:var(--accent);font-size:12px;margin:12px 0 6px}.notify-center .center-rule{padding:8px 10px;margin:0;border-bottom:1px solid var(--line);position:relative}.notify-center .center-rule .card-head{margin:0;min-height:32px;padding-right:62px}.notify-center .center-rule h2{font-size:13px}.nt-options>summary{position:absolute;top:15px;right:12px;color:var(--ink-3);font-size:11px}.nt-options[open]{padding:6px 0 8px}.nt-options .hint{margin:4px 0 8px}.nt-options .field{max-width:240px}.nt-options .nt-row{margin:8px 0}
@media(max-width:600px){.center-tabs button{min-height:44px;padding-inline:10px}.center-status{padding:10px}.notify-center .nt-options>summary{min-height:36px;top:9px;padding-block:8px}.notify-center .center-rule .card-head{padding-right:58px}}
body .toast-wrap>.toast.ok{background:var(--card);color:var(--ink);border:1px solid var(--line);border-left-color:var(--accent)}
body .toast-wrap>.toast.err{color:#fff}

/* Settings workspace. Shared notification tabs retain their own layout. */
.settings-center {
  display:grid;
  grid-template-columns:200px minmax(0,1fr);
  gap:24px;
  align-items:start;
  margin-block:20px 24px;
  font-size:14px;
}
.settings-nav { display:grid; gap:4px; min-width:0; }
.settings-nav button {
  display:flex; align-items:center; gap:10px; text-align:left;
  min-width:0; min-height:44px; padding:8px 12px;
  background:transparent; color:var(--ink-2);
  border:0; border-inline-start:1px solid transparent;
  font:inherit; cursor:pointer;
}
.settings-nav button svg { width:16px; height:16px; flex:none; }
.settings-nav button:hover { background:var(--bg-soft); color:var(--ink); }
.settings-nav button[aria-pressed=true] {
  background:var(--accent-soft); color:var(--accent); border-inline-start-color:var(--accent); font-weight:650;
}
.settings-content { min-width:0; display:grid; gap:12px; align-items:start; }
.settings-content > *, .settings-panel { min-width:0; }
.settings-panel, .settings-content .card { background:var(--bg-soft); padding:0 16px; margin:0; }
.settings-panel > h2 {
  margin:0; padding:14px 0; font-size:15px; font-weight:650; color:var(--ink);
  border-bottom:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
}
.settings-row {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,208px);
  align-items:center; gap:12px; padding:14px 0;
}
.settings-row + .settings-row, .settings-maintenance {
  border-top:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
}
.settings-label h3, .settings-label label {
  display:block; margin:0; font-size:14px; font-weight:600; color:var(--ink);
}
.settings-label p { margin:4px 0 0; color:var(--ink-2); font-size:13px; line-height:1.5; }
.settings-choices {
  display:flex; align-items:stretch; justify-self:stretch; padding:2px; gap:2px;
  background:var(--bg); border:1px solid color-mix(in srgb,var(--ink) 17%,transparent);
}
.settings-choices button {
  flex:1 1 auto; min-width:0; min-height:36px; padding:4px 6px; color:var(--ink-2);
  border:0; font:inherit; font-size:13px; background:transparent; cursor:pointer;
}
.settings-choices button:hover { color:var(--ink); background:var(--bg-soft); }
.settings-choices button[aria-pressed=true] { background:var(--accent-soft); color:var(--accent); font-weight:650; }
.settings-row select, .settings-unit-field {
  min-width:0; width:100%; min-height:42px; color:var(--ink); background:var(--bg);
  border:1px solid color-mix(in srgb,var(--ink) 20%,transparent); font:inherit;
}
.settings-row select { padding:8px 10px; }
.settings-unit-field { display:flex; align-items:center; }
.settings-unit-field input {
  width:100%; min-width:0; min-height:40px; border:0; padding:8px 10px;
  background:transparent; color:inherit; font:inherit; font-variant-numeric:tabular-nums;
}
.settings-unit-field span { padding-inline:6px 10px; color:var(--ink-2); }
.settings-unit-field:focus-within { border-color:var(--accent); }
.settings-center :is(button,select,input,summary):focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.settings-row > .btn { justify-self:end; min-height:40px; }
.settings-version { font-variant-numeric:tabular-nums; }
.settings-maintenance summary { padding:14px 0; color:var(--ink-2); }
.settings-content .card { padding-block:16px; overflow-wrap:anywhere; }
.settings-content .card-head h2, .settings-content .ig-approval h2 { font-size:15px; }
.settings-content .card-head h2 .sub { display:block; margin-top:4px; }
.settings-content .hint { max-width:68ch; font-size:13px; line-height:1.55; }
.settings-content .token-reveal { flex-wrap:wrap; overflow-wrap:anywhere; }
.settings-content [data-integrations-host] { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; align-items:start; }
@media (min-width:1240px) {
  .settings-content:is(.settings-content--general,.settings-content--security,.settings-content--data) {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .settings-content [data-integrations-host] { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .settings-content .ig-agents { grid-column:1/-1; }
}
@media (max-width:860px) {
  .settings-center { grid-template-columns:minmax(0,1fr); gap:12px; margin-top:12px; }
  .settings-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .settings-nav button { justify-content:center; gap:6px; padding:6px 4px; border-inline-start:0; border-bottom:1px solid transparent; text-align:center; }
  .settings-nav button[aria-pressed=true] { border-bottom-color:var(--accent); }
}
@media (max-width:520px) {
  .settings-nav button { font-size:12px; }
  .settings-nav button svg { display:none; }
  .settings-panel { padding-inline:12px; }
  .settings-row { grid-template-columns:minmax(0,1fr); gap:8px; }
  .settings-choices button, .settings-row > .btn, .settings-row select, .settings-unit-field { min-height:44px; }
  .settings-row select, .settings-unit-field input { font-size:16px; }
  .settings-row > .btn { justify-self:start; }
}

.market-opening { display:grid; justify-items:center; align-content:center; min-height:clamp(360px,65vh,720px); gap:8px; border:1px solid var(--line); background:var(--card); color:var(--ink-2); }
.market-opening p { margin:0; }

/* The companion sits above the mobile tab bar and behind site dialogs. */
.site-pet {
  --bp-bottom:calc(9px + var(--sab));
  --pet-standing-width:57px;
  --pet-standing-height:84px;
  --pet-rest-width:92px;
  --pet-rest-height:46px;
  position:fixed; z-index:75; inset:auto calc(9px + var(--sar)) var(--bp-bottom) auto;
}
.site-pet[hidden],.site-pet [hidden] { display:none; }
.site-pet[data-pet-position="free"] { inset:0 auto auto 0; transform:translate3d(var(--pet-x),var(--pet-y),0); }
.bp-launch {
  width:var(--pet-standing-width); height:var(--pet-standing-height);
  display:grid; place-items:stretch; padding:0; border:0; border-radius:4px;
  cursor:grab; touch-action:none; user-select:none; background:transparent;
}
.bp-figure { position:relative; display:block; min-height:0; pointer-events:none; transform-origin:center bottom; }
.bp-figure img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; object-position:center bottom; }
.bp-figure .bp-rest-art,.site-pet[data-pet-pose="rest"] .bp-figure img:first-child { display:none; }
.site-pet[data-pet-pose="rest"] .bp-launch {
  width:var(--pet-rest-width); height:var(--pet-rest-height);
}
.site-pet[data-pet-pose="rest"] .bp-figure .bp-rest-art { display:block; }
.site-pet[data-pet-dragging] .bp-launch { cursor:grabbing; }
.bp-panel {
  position:absolute; left:var(--pet-panel-x); bottom:calc(100% + 8px);
  width:min(288px,calc(100vw - var(--sal) - var(--sar) - 32px));
  max-height:var(--pet-room);
  overflow:auto; overscroll-behavior:contain; padding:12px;
  display:grid; gap:9px; border:1px solid var(--line); border-radius:10px;
  background:var(--card); color:var(--ink); box-shadow:0 10px 28px #0005; transform-origin:bottom right;
}
.site-pet[data-pet-panel="down"] .bp-panel {
  top:calc(100% + 8px); bottom:auto; transform-origin:top right;
}
.bp-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; }
.bp-avatar { width:38px; height:49px; transform-origin:50% 90%; }
.bp-avatar img { display:block; width:100%; height:100%; object-fit:contain; }
.bp-head h2 { margin:0 0 3px; font-size:16px; overflow-wrap:anywhere; }
.bp-level { color:var(--accent); font:600 11px var(--tl-number,monospace); }
.bp-panel button { min-height:34px; padding:4px 9px; border:0; border-radius:5px; color:var(--ink); background:var(--bg-soft); font:inherit; cursor:pointer; }
.bp-panel button:hover { color:var(--accent); }
.bp-panel .bp-close { width:34px; padding:0; font-size:19px; background:transparent; color:var(--ink-2); }
.bp-stats { display:grid; grid-template-columns:auto minmax(0,1fr) 34px; align-items:center; gap:6px 9px; font-size:12px; }
.bp-stats label { color:var(--ink-2); }
.bp-stats span { text-align:right; font:11px var(--tl-number,monospace); }
.bp-stats meter { display:block; width:100%; height:6px; accent-color:var(--accent); }
.bp-stats meter::-webkit-meter-bar { background:var(--bg-soft); border:0; border-radius:2px; }
.bp-stats meter::-webkit-meter-optimum-value { background:var(--accent); border-radius:2px; }
.bp-stats meter::-moz-meter-bar { background:var(--accent); border-radius:2px; }
.bp-reply { min-height:1.45em; margin:0; color:var(--ink-2); font-size:12px; }
.bp-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.bp-actions button[data-pet="pat"] { background:var(--accent); color:var(--bg); font-weight:650; }
.bp-voice { display:flex; justify-content:space-between; align-items:center; gap:6px; }
.bp-voice button { color:var(--ink-2); font-size:11px; }
.bp-voice [aria-pressed="true"] { color:var(--accent); }
.bp-bubble {
  position:absolute; left:var(--pet-bubble-x); bottom:calc(100% + 3px);
  width:min(198px,calc(100vw - 24px)); padding:9px 11px; margin:0;
  border:1px solid var(--line-strong); border-radius:9px;
  background:var(--bg-soft); color:var(--ink); box-shadow:0 4px 14px #0005;
  pointer-events:none; font-size:12px; font-weight:500; line-height:1.5;
  transform-origin:var(--pet-bubble-tail,50%) bottom;
}
.bp-bubble::after {
  content:""; position:absolute; left:var(--pet-bubble-tail,50%); bottom:-4px;
  width:6px; height:6px; transform:translateX(-50%) rotate(45deg);
  border:solid var(--line-strong); border-width:0 1px 1px 0; background:var(--bg-soft);
}
.site-pet[data-pet-bubble="down"] .bp-bubble {
  top:calc(100% + 6px); bottom:auto; transform-origin:var(--pet-bubble-tail,50%) top;
}
.site-pet[data-pet-bubble="down"] .bp-bubble::after { bottom:auto; top:-4px; border-width:1px 0 0 1px; }
.bp-rename { display:flex; align-items:stretch; gap:6px; }
.bp-rename input { width:0; flex:1; min-height:34px; padding:4px 7px; font-size:16px; }
.bp-foot { display:flex; justify-content:space-between; border-top:1px solid var(--line); padding-top:3px; }
.bp-foot button { background:transparent; color:var(--ink-2); font-size:11px; }
:where(html[data-motion='on']) :is(.bp-figure,.bp-panel button) { transition:transform 150ms cubic-bezier(.23,1,.32,1); }
:where(html[data-motion='on']) .bp-panel button:active:not(:focus-visible) { transform:scale(.955); }
:where(html[data-motion='on']) .site-pet[data-pet-dragging] .bp-figure { transform:translateY(-5px) rotate(-4deg) scale(1.05); }
@media(hover:hover) and (pointer:fine) {
  :where(html[data-motion='on']) .site-pet:not([data-pet-dragging]) .bp-launch:hover .bp-figure { transform:translateY(-1px); }
}
@media(max-width:720px) {
  html:not([data-layout="desktop"]) .site-pet {
    --bp-bottom:calc(var(--tabbar-h) + var(--sab) + 18px);
    --pet-standing-width:45px; --pet-standing-height:66px; --pet-rest-width:74px; --pet-rest-height:38px;
  }
}
@media(pointer:coarse) { .bp-panel button { min-height:44px; } .bp-panel .bp-close { width:44px; } }

/* Initial loader stays black in both themes. The progress reflects completed boot stages. */
.site-startup { position:fixed; inset:0; z-index:1200; display:grid; place-items:center; background:#000; color:#aaa7a2; }
.startup-content { position:relative; display:grid; justify-items:center; gap:12px; transform:translateY(-4vh); }
.startup-mark { width:58px; height:58px; border-radius:15px; margin-bottom:14px; }
.startup-track { width:min(184px,62vw); height:2px; border-radius:1px; background:#252525; overflow:hidden; }
.startup-fill { display:block; width:100%; height:100%; background:#ffad21; transform:scaleX(var(--startup-progress,0)); transform-origin:left center; }
.startup-value { color:#a7a49e; font:12px var(--tl-number,monospace); font-variant-numeric:tabular-nums; }
.startup-retry { position:absolute; top:calc(100% + 15px); padding:7px 10px; border:0; background:transparent; font:inherit; font-size:12px; cursor:pointer; color:#d2a75c; white-space:nowrap; pointer-events:auto; }
.startup-retry[hidden] { display:none; }
.site-startup[data-ready] { opacity:0; pointer-events:none; }
:where(html[data-motion='on']) .site-startup { transition:opacity 120ms cubic-bezier(.23,1,.32,1); }
:where(html[data-motion='on']) .startup-mark { animation:startup-mark-in 330ms cubic-bezier(.23,1,.32,1) both; }
:where(html[data-motion='on']) .startup-fill { transition:transform 160ms cubic-bezier(.23,1,.32,1); }
:where(html[data-motion='on']) .startup-content::before {
  content:''; position:absolute; top:-6px; left:calc(50% - 35px); width:70px; height:70px;
  border:1px solid #ffad2170; border-radius:20px; pointer-events:none;
  animation:startup-mark-halo 280ms 65ms cubic-bezier(.23,1,.32,1) both;
}
:where(html[data-motion='on']) .startup-content::after {
  content:''; position:absolute; top:27px; left:calc(50% - 54px); width:108px; height:8px;
  border-inline:2px solid #ffad21; pointer-events:none;
  animation:startup-brackets 280ms 95ms cubic-bezier(.23,1,.32,1) both;
}
:where(html[data-motion='on']) .startup-content { transition:transform 140ms cubic-bezier(.23,1,.32,1); }
:where(html[data-motion='on']) .site-startup[data-ready] .startup-content { transform:translateY(calc(-4vh - 5px)) scale(.98); }
@keyframes startup-mark-in {
  from { opacity:0; transform:translateY(6px) rotate(-10deg) scale(.9); }
  66% { opacity:1; transform:translateY(-2px) rotate(2deg) scale(1.035); }
  to { opacity:1; transform:none; }
}
@keyframes startup-brackets {
  from { opacity:0; transform:scaleX(.7); }
  55% { opacity:.7; }
  to { opacity:0; transform:scaleX(1.1); }
}
@keyframes startup-mark-halo {
  0% { opacity:0; transform:scale(.95); }
  45% { opacity:.75; }
  100% { opacity:0; transform:scale(1.13); }
}

/* Motion belongs to the affordance. The prices and chart canvases stay still. */
.tl-split-bar { transform-origin:left center; }
.toast.ok { display:flex; align-items:center; gap:8px; }
.toast.ok::before {
  content:''; flex:none; width:6px; height:10px; border:solid currentColor;
  border-width:0 2px 2px 0; transform:translateY(-2px) rotate(45deg);
}
:where(html[data-motion='on']) .toast.ok::before { animation:ok-confirm 180ms 40ms cubic-bezier(.23,1,.32,1) both; }
@keyframes ok-confirm { from { opacity:0; transform:translateY(-2px) rotate(45deg) scale(.55); } to { opacity:1; transform:translateY(-2px) rotate(45deg); } }
:where(html[data-motion='on']) .tl-brand img { transform-origin:50% 78%; transition:transform 160ms cubic-bezier(.23,1,.32,1); }
:where(html[data-motion='on']) .tl-brand:active img { transform:translateY(1px) rotate(6deg) scale(.94); }
:where(html[data-motion='on']) .tl-header-actions :is([data-act='open-notify'],[data-act='set-theme']) .ic { transition:transform 160ms cubic-bezier(.23,1,.32,1); }
:where(html[data-motion='on']) :is(.tl-metric,.tl-mini-card) { position:relative; }
:where(html[data-motion='on']) :is(.tl-metric,.tl-mini-card)::after {
  content:''; position:absolute; inset:auto 10px 1px; height:1px; background:var(--accent);
  pointer-events:none; opacity:0; transform:scaleX(.25); transform-origin:left;
  transition:opacity 150ms ease,transform 160ms cubic-bezier(.23,1,.32,1);
}
:where(html[data-motion='on']) :is(.hb-link,.tl-command button) {
  transition:transform 130ms cubic-bezier(.23,1,.32,1);
}
:where(html[data-motion='on']) :is(.hb-link,.tl-command button):active:not(:disabled) { transform:scale(.975); }
:where(html[data-motion='on']) .tl-panel-head .hb-link::after {
  transition:transform 150ms cubic-bezier(.23,1,.32,1);
}
:where(html[data-motion='on']) :is(button.wl-metric,.bi-open,.sub-bucket,.wb-icon-act,[data-act="wallet-month"]) {
  transition:transform 135ms cubic-bezier(.23,1,.32,1);
}
:where(html[data-motion='on']) :is(button.wl-metric,.bi-open,.sub-bucket,.wb-icon-act,[data-act="wallet-month"]):active:not(:disabled):not(:focus-visible) {
  transform:translateY(1px) scale(.975);
}
:where(html[data-motion='on']) form button[type="submit"][aria-busy="true"]::before {
  content:''; display:inline-block; flex:none; box-sizing:border-box; width:10px; height:10px;
  border:1px solid currentColor; border-inline-end-color:transparent; border-radius:50%;
  vertical-align:-1px; animation:spin .8s linear infinite;
}
@media(hover:hover) and (pointer:fine) {
  :where(html[data-motion='on']) .tl-brand:hover img { transform:translateY(-2px) rotate(-8deg); }
  :where(html[data-motion='on']) .tl-header-actions [data-act='open-notify']:hover .ic { transform:rotate(-12deg); }
  :where(html[data-motion='on']) .tl-header-actions [data-act='set-theme']:hover .ic { transform:rotate(18deg); }
  :where(html[data-motion='on']) :is(.tl-metric,.tl-mini-card):hover::after { opacity:.8; transform:scaleX(1); }
  :where(html[data-motion='on']) .tl-panel-head .hb-link:hover::after { transform:translateX(2px) rotate(45deg); }
  :where(html[data-motion='on']) .hb-chart [data-wallet-inline]:not(:focus-visible) [data-wallet-bar] { transition:opacity 110ms ease-out; }
  :where(html[data-motion='on']) .wb-position-table tbody td:first-child { position:relative; }
  :where(html[data-motion='on']) .wb-position-table tbody td:first-child::before {
    content:''; position:absolute; inset:5px auto 5px 0; width:2px; background:var(--accent);
    opacity:0; transform:scaleY(.55); pointer-events:none;
    transition:opacity 130ms ease,transform 150ms cubic-bezier(.23,1,.32,1);
  }
  :where(html[data-motion='on']) .wb-position-table tbody tr:hover td:first-child::before { opacity:.8; transform:scaleY(1); }
  :where(html[data-motion='on']) .bi-open .bi-library-art { transition:transform 180ms cubic-bezier(.23,1,.32,1); }
  :where(html[data-motion='on']) .bi-open:hover .bi-library-art { transform:translateY(-2px) scale(1.055); }
}
.fin-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.fin-body{padding:0 16px 16px;display:grid;gap:12px}
.fin-body p{margin:0}
.fin-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(126px,100%),1fr));gap:1px;background:var(--line)}
.fin-metrics>div{display:grid;gap:6px;padding:10px 12px;min-width:0;background:var(--card)}
.fin-metrics span,.fin-list small,.fin-statement-row small{font-size:12px;color:var(--ink-3)}
.fin-metrics strong,.fin-list b,.fin-statement-row>b{font:600 15px var(--tl-number);overflow-wrap:anywhere}
.fin-section{display:grid;gap:10px;margin-top:6px}
.fin-section h3{font-size:14px;margin:0}
.fin-section-head,.fin-list>div,.fin-details>summary,.fin-chart-dates{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.fin-list>div,.fin-statement-row{min-width:0;padding:8px 0;border-bottom:1px solid var(--line)}
.fin-list>div>span,.fin-statement-row>div:first-child{display:grid;min-width:0;gap:3px;overflow-wrap:anywhere}
.fin-list div>span>strong>small{font-weight:400}
.fin-list b,.fin-statement-row>b{flex:0 0 auto;max-width:42%;text-align:right}
.fin-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
.fin-form label,.fin-statement-choice{display:grid;gap:4px;min-width:0}
.fin-form label input,.fin-form select,.fin-statement-choice select{min-width:0;width:100%}
.fin-form .fin-error{grid-column:1/-1}
.fin-error{color:var(--warn);margin:8px 0}
.fin-error:empty{display:none}
.fin-statement-list{margin:8px 0}
.fin-statement-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(160px,1fr);gap:8px 12px;align-items:start}
.fin-statement-row>b{max-width:none}
.fin-statement-choice .fin-check{display:flex;align-items:center;font-size:12px}
.fin-check input[type=checkbox]{width:auto;min-height:0;margin:0 4px 0 0}
.fin-details{border-bottom:1px solid var(--line);padding:8px 0}
.fin-details>summary{cursor:pointer}
.fin-net-chart{display:block;width:100%;height:auto;color:var(--accent);background:var(--card)}
.fin-chart-dates{font:12px var(--tl-number);color:var(--ink-3)}
.fin-placeholder{padding:14px;background:var(--card)}
@media(max-width:520px){
 .fin-body{padding:0 12px 12px}
 .fin-form{grid-template-columns:minmax(0,1fr)}
 .fin-statement-row{grid-template-columns:minmax(0,1fr) auto}
 .fin-statement-choice{grid-column:1/-1}
 .fin-section-head{align-items:start;flex-wrap:wrap}
}
