@import url("../../design/tokens.css");

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
input, select { min-width: 0; max-width: 100%; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 0; padding: 11px 12px; }
input:not([type="checkbox"]):not([type="range"]), select { width: 100%; }
input[type="checkbox"] { accent-color: var(--ink); width: 17px; height: 17px; flex-shrink: 0; }
input[type="range"] { accent-color: var(--ink); padding: 0; height: 18px; width: 100%; }
label { display: block; color: var(--slate); font-size: 13px; margin: 15px 0 6px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.15; letter-spacing: -.025em; margin-bottom: 12px; }
h2 { font-size: 25px; line-height: 1.2; margin-bottom: 16px; }
h3 { font-size: 21px; margin-bottom: 8px; }
p { margin-bottom: 12px; }
.bar { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav-inner { max-width: var(--max-app); padding: 0 28px; margin: auto; min-height: 78px; display: flex; gap: 48px; align-items: center; }
.brand { font-family: var(--serif); font-size: 29px; font-weight: 400; letter-spacing: -.02em; }
.bar nav { display: flex; align-self: stretch; align-items: center; gap: 27px; }
.bar nav a { font-size: 14px; color: var(--slate); height: 100%; display: flex; align-items: center; border-bottom: 2px solid transparent; padding-top: 2px; }
.bar nav a.is-on { color: var(--ink); border-color: var(--ink); }
.who { margin-left: auto; color: var(--slate); font-size: 12px; white-space: nowrap; }
.wrap { max-width: var(--max-app); padding: 0 28px 36px; margin: auto; }
.narrow { max-width: var(--max-gateway); margin: auto; padding: 64px 28px; }
.login-wrap { max-width: 480px; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--slate); margin: 0 0 12px; }
.lede { color: var(--slate); max-width: 680px; margin-bottom: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 34px 0 30px; }
.row, .spread { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 0; color: var(--paper); background: var(--ink); font-size: 14px; line-height: 1.3; text-align: center; }
.btn:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--fog); }
.btn.small { font-size: 12px; padding: 7px 12px; }
.text-btn { background: none; border: 0; padding: 4px 0; color: var(--slate); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.sim-bar { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--slate); font-size: 11px; }
.sim-label { display: inline-flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: .09em; }
.sim-dot { width: 5px; height: 5px; background: var(--ink); }
.sim-paused .sim-dot { background: var(--stone); }
.sim-controls { margin-left: auto; display: flex; gap: 18px; }
.as-of { color: var(--stone); font-variant-numeric: tabular-nums; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); margin-bottom: 30px; }
.metric { padding: 22px 24px; border-right: 1px solid var(--rule); }
.metric:last-child { border-right: 0; }
.metric > span { display: block; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--slate); margin-bottom: 7px; }
.metric b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(25px, 3vw, 34px); line-height: 1.25; font-variant-numeric: tabular-nums; }
.metric small { display: block; color: var(--slate); font-size: 12px; margin-top: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(245px, 1fr); gap: 32px; margin-bottom: 36px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.panel { border: 1px solid var(--rule); padding: 24px; margin-bottom: 20px; }
.well { background: var(--fog); padding: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-number { font: 11px var(--sans); color: var(--stone); margin-right: 10px; vertical-align: middle; }
.ranges { display: flex; gap: 3px; }
.ranges button { font-size: 11px; padding: 5px 9px; background: var(--paper); border: 1px solid transparent; color: var(--slate); }
.ranges button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.chart { min-width: 0; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; touch-action: pan-y; }
.chart-readout { min-height: 21px; font-size: 12px; color: var(--slate); margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.chart text { font-family: var(--sans); fill: var(--slate); font-size: 11px; }
.chart .gridline { stroke: var(--rule); stroke-width: 1; }
.chart .series { fill: none; stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.chart .chart-fill { fill: var(--fog); }
.chart .cursor { stroke: var(--stone); stroke-dasharray: 3 3; }
.chart .point { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--slate); margin: 4px 0; }
.note, .small:not(.btn) { font-size: 12px; color: var(--slate); }
.note { margin: 12px 0 0; }
.muted { color: var(--slate); }
.caption { color: var(--stone); font-size: 12px; }
.hidden, [hidden] { display: none !important; }
.chart-caption { padding-top: 12px; border-top: 1px solid var(--rule); margin-top: 12px; }
.allocation-row { padding: 12px 0; }
.allocation-row + .allocation-row { border-top: 1px solid var(--rule); }
.allocation-label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.track { height: 4px; background: var(--paper); }
.track span { display: block; height: 100%; background: var(--ink); }
.allocation-row:nth-child(2) .track span { background: var(--slate); }
.allocation-row:nth-child(n+3) .track span { background: var(--stone); }
.breakdown { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding: 11px 0; font-size: 13px; }
.breakdown b { font-weight: 400; font-variant-numeric: tabular-nums; }
.table-wrap { width: 100%; overflow-x: auto; border-top: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--stone); white-space: nowrap; }
td, th { text-align: left; border-bottom: 1px solid var(--rule); padding: 15px 12px; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
td { white-space: nowrap; }
td small { display: block; color: var(--slate); font-size: 11px; margin-top: 3px; }
td a { font-weight: 600; }
.right { text-align: right; }
.badge { display: inline-block; border: 1px solid var(--rule); padding: 3px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); white-space: nowrap; }
.spark { width: 90px; height: 28px; display: block; margin-left: auto; }
.spark path { stroke: var(--ink); stroke-width: 1.3; fill: none; }
.income-bars { display: flex; gap: 20px; align-items: flex-end; height: 190px; margin-top: 18px; border-bottom: 1px solid var(--rule); padding: 0 12px; }
.income-column { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.income-column .amount { font-size: 11px; margin-bottom: 8px; white-space: nowrap; }
.income-column .bar-mark { width: 55%; max-width: 55px; background: var(--ink); min-height: 1px; }
.income-column.projected .bar-mark { background: var(--fog); border: 1px dashed var(--stone); }
.income-column .bar-label { font-size: 11px; color: var(--slate); height: 32px; padding-top: 9px; white-space: nowrap; }
.legend { display: flex; gap: 18px; font-size: 11px; color: var(--slate); margin: 12px 0; }
.legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--ink); margin-right: 6px; }
.legend .projected::before { border: 1px dashed var(--stone); background: var(--fog); }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 13px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.activity .meta { font-size: 11px; color: var(--slate); margin-top: 4px; }
.activity .amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-line { display: inline-block; margin-top: 18px; font-size: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
footer { border-top: 1px solid var(--rule); max-width: var(--max-app); margin: 24px auto 0; padding: 20px 28px 32px; display: flex; gap: 20px; justify-content: space-between; color: var(--stone); font-size: 11px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--rule); overflow-x: auto; margin-bottom: 24px; }
.tabs a, .tabs button { font-size: 13px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; background: var(--paper); color: var(--slate); white-space: nowrap; }
.tabs [aria-selected="true"], .tabs .is-on { border-color: var(--ink); color: var(--ink); }
.trade-panel { background: var(--fog); padding: 24px; }
.trade-panel input { background: var(--paper); }
.trade-panel .btn { width: 100%; margin-top: 16px; }
.segment { display: flex; border: 1px solid var(--ink); }
.segment button { flex: 1; padding: 8px; color: var(--ink); background: var(--paper); border: 0; font-size: 13px; }
.segment button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.message { padding: 14px 16px; border: 1px solid var(--ink); font-size: 13px; margin: 12px 0 20px; background: var(--fog); }
.error { font-size: 13px; color: var(--ink); border-left: 2px solid var(--ink); padding-left: 10px; margin-top: 16px; }
.check-label { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; }
.quote-box { border-top: 1px solid var(--rule); margin-top: 22px; padding-top: 20px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.detail-grid .breakdown { display: block; }
.detail-grid b { display: block; font: 24px var(--serif); margin-top: 8px; }
.market-tape { display: flex; gap: 24px; overflow-x: auto; padding: 14px 0; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.tape-item { white-space: nowrap; font-size: 12px; color: var(--slate); }
.tape-item b { color: var(--ink); font-weight: 400; padding-left: 8px; font-variant-numeric: tabular-nums; }
.search { max-width: 280px; }
.table-section { margin-bottom: 36px; }
dialog { border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); padding: 28px; max-width: min(460px, calc(100vw - 36px)); }
dialog::backdrop { background: rgb(31 31 29 / .25); }
dialog .row { justify-content: flex-end; margin-top: 24px; }
.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; }
.price-changed { animation: price-change 1s ease-out; }
@keyframes price-change { from { background: var(--fog); } to { background: transparent; } }
@media (max-width: 820px) {
  .nav-inner { gap: 28px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 10px; }
  .bar nav { order: 3; width: 100%; gap: 24px; overflow-x: auto; }
  .bar nav a { padding: 8px 0; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 28px; }
  .split { gap: 24px; }
  .metric { padding: 18px; }
}
@media (max-width: 580px) {
  .wrap, .nav-inner { padding-left: 18px; padding-right: 18px; }
  .narrow { padding: 44px 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; padding: 28px 0 24px; gap: 18px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--rule); padding: 16px 18px; }
  .metric:last-child { border-bottom: 0; }
  .metric b { font-size: 30px; }
  .split { grid-template-columns: 1fr; }
  .as-of { display: none; }
  .sim-bar { gap: 8px; }
  .sim-controls { gap: 12px; }
  .sim-label { font-size: 10px; }
  .bar nav { gap: 18px; }
  .bar nav a { font-size: 13px; }
  .chart svg { height: 200px; }
  .well, .panel, .trade-panel { padding: 20px; }
  footer { flex-direction: column; padding: 18px; gap: 4px; }
  .income-bars { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Keep chart inspection quiet while retaining a native keyboard control. */
.chart input[type="range"] { appearance: none; height: 16px; background: transparent; border: 0; }
.chart input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--rule); }
.chart input[type="range"]::-webkit-slider-thumb { appearance: none; height: 10px; width: 10px; margin-top: -4px; background: var(--ink); border: 0; border-radius: 0; }
.chart input[type="range"]::-moz-range-track { height: 2px; background: var(--rule); }
.chart input[type="range"]::-moz-range-thumb { height: 10px; width: 10px; background: var(--ink); border: 0; border-radius: 0; }
.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; padding: 10px; clip: auto; background: var(--paper); z-index: 100; }
