:root {
  --bg: #f1f2ef;
  --surface: #ffffff;
  --surface-subtle: #f7f8f5;
  --inset: #eceeea;
  --sidebar: #111331;
  --sidebar-soft: #171a42;
  --border: #d8ddd7;
  --border-strong: #b9c1ba;
  --text: #171a18;
  --text-2: #56605a;
  --text-3: #7b847e;
  --accent: #21255e;
  --accent-strong: #171a42;
  --accent-soft: #e4e5ec;
  --red: #a33a32;
  --red-soft: #f5e7e4;
  --amber: #9b681b;
  --amber-soft: #f5eddd;
  --blue: #315c8c;
  --blue-soft: #e5ebf2;
  --purple: #765c87;
  --green: #277153;
  --green-soft: #e0eee7;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --r: 6px;
  --sidebar-w: 232px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; letter-spacing: 0; }
[hidden] { display: none !important; }
.form-section > #custom-vehicle-toggle { margin: 14px 18px 0; max-width: calc(100% - 36px); white-space: normal; text-align: left; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
::selection { background: color-mix(in srgb,var(--accent) 22%,white); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.shell { min-height: 100vh; display: flex; }
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: #f5f6f3;
  border-right: 1px solid #101210;
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 76px; padding: 17px 18px; text-decoration: none; border-bottom: 1px solid #303532; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid #66736b; border-radius: 4px; color: #ffffff; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.brand-name { display: block; font-size: 15px; line-height: 1.2; font-weight: 700; color: #ffffff; }
.brand-sub { display: block; margin-top: 3px; color: #99a19c; font-size: 10px; line-height: 1.2; }
.nav { display: flex; flex: 1; flex-direction: column; gap: 2px; padding: 18px 12px; }
.nav-heading { padding: 0 10px 7px; color: #7e8781; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.nav-heading-account { margin-top: 22px; }
.nav-link { min-height: 38px; display: flex; align-items: center; padding: 8px 10px; border-left: 2px solid transparent; border-radius: 3px; color: #bfc5c1; font-size: 13px; font-weight: 600; text-decoration: none; }
.nav-link:hover { background: var(--sidebar-soft); color: #ffffff; }
.nav-link.active { border-left-color: color-mix(in srgb,var(--accent) 45%,white); background: #222824; color: #ffffff; }
.sidebar-foot { padding: 16px 18px; border-top: 1px solid #303532; }
.sidebar-user { min-width: 0; margin-bottom: 10px; }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: #ffffff; font-size: 12px; }
.sidebar-user span { margin-top: 2px; color: #8e9791; font-size: 10px; }
.text-button { padding: 0; border: 0; background: transparent; color: #bfc5c1; cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: #ffffff; }

.content { width: calc(100% - var(--sidebar-w)); max-width: 1440px; padding: 32px 38px 64px; }
.page-head, .memo-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head-compact { margin-bottom: 20px; }
.page-head h1, .memo-head h1 { font-size: 27px; line-height: 1.2; font-weight: 720; }
.sub { margin-top: 5px; color: var(--text-2); font-size: 13px; }
.eyebrow { margin-bottom: 6px; color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.page-actions { display: flex; align-items: center; gap: 8px; }

.btn { min-height: 37px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 15px; border: 1px solid transparent; border-radius: var(--r); cursor: pointer; text-decoration: none; white-space: nowrap; font-size: 13px; font-weight: 700; }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--surface); border-color: #d9aaa5; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-lg { min-height: 42px; padding-inline: 20px; }
.btn:disabled { opacity: .55; cursor: wait; }

.metric-grid, .kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 20px; overflow: hidden; }
.metric, .kpi { min-width: 0; min-height: 112px; padding: 17px 18px; border-right: 1px solid var(--border); }
.metric:last-child, .kpi:last-child { border-right: 0; }
.metric-emphasis { background: #f3f7f4; }
.metric-label, .kpi-label { color: var(--text-2); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.metric-value, .kpi-value { margin-top: 8px; overflow-wrap: anywhere; color: var(--text); font-family: var(--mono); font-size: 24px; line-height: 1.15; font-weight: 650; }
.metric-value small { color: var(--text-3); font-size: 11px; font-family: var(--sans); font-weight: 600; }
.metric-note, .kpi-note { margin-top: 7px; color: var(--text-3); font-size: 11px; line-height: 1.35; }
.pos { color: var(--green) !important; }
.neg { color: var(--red) !important; }
.muted { color: var(--text-3) !important; }
.mono { font-family: var(--mono); }

.portfolio-grid, .memo-grid, .holding-layout, .two-col, .report-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.holding-layout { grid-template-columns: minmax(0, 1.65fr) minmax(320px, .85fr); }
.detail-grid { margin-top: 18px; }
.span-2 { min-width: 0; }
.work-section, .panel, .form-section { min-width: 0; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.span-2.work-section { grid-row: span 1; }
.section-head, .panel-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.section-head h2 { font-size: 14px; line-height: 1.25; font-weight: 750; }
.section-head p { margin-top: 3px; color: var(--text-3); font-size: 11px; }
.section-link { color: var(--accent); font-size: 11px; font-weight: 700; text-decoration: none; }
.section-link:hover { text-decoration: underline; }
.panel-title { color: var(--text-2); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.panel-meta { color: var(--text-3); font-size: 11px; }
.panel-body { padding: 17px; }
.panel-body.flush { padding: 0; }
.count-badge, .evidence-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-2); background: var(--surface-subtle); font-size: 10px; font-weight: 700; text-transform: uppercase; }

.chart-shell { min-width: 0; background: var(--surface); }
.svg-chart-shell { padding: 12px 14px 8px; overflow: hidden; }
.chart { display: block; width: 100%; height: auto; min-height: 170px; overflow: visible; }
.chart-large { aspect-ratio: 760 / 250; min-height: 220px; }
.chart-grid-line { stroke: #e2e6e1; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis-label { fill: #737d76; font-family: var(--mono); font-size: 9px; }
.chart-reference { fill: none; stroke-width: 1.2; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart-reference.median { stroke: var(--blue); }
.chart-reference.offer { stroke: var(--red); }
.chart-reference-label, .chart-offer-label { fill: var(--blue); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.chart-offer-label { fill: var(--red); }
.sale-point { fill: var(--surface); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sale-point:hover, .sale-point:focus { fill: var(--accent); stroke: var(--surface); outline: none; }
.scenario-line, .valuation-history-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.scenario-downside { stroke: var(--red); fill: var(--red); }
.scenario-base { stroke: var(--accent); fill: var(--accent); }
.scenario-upside { stroke: var(--blue); fill: var(--blue); }
.scenario-cost { stroke: #6f756f; stroke-dasharray: 5 4; }
.scenario-point { stroke: var(--surface); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.valuation-history-line { stroke: var(--accent); }
.valuation-point { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.valuation-range { stroke: var(--blue); stroke-width: 3; stroke-linecap: round; opacity: .55; }
.chart-legend { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-swatch { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.legend-swatch.basis { background: #b7c0ba; }
.legend-swatch.value, .legend-swatch.base { background: var(--accent); }
.legend-swatch.downside { background: var(--red); }
.legend-swatch.upside { background: var(--blue); }
.legend-line { width: 13px; display: inline-block; border-top: 2px dashed #737a74; }

.holding-chart { padding: 10px 16px 15px; }
.holding-bar-row { min-height: 62px; display: grid; grid-template-columns: minmax(145px, 1.1fr) minmax(170px, 2fr) 118px; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid #edf0ec; text-decoration: none; }
.holding-bar-row:last-child { border-bottom: 0; }
.holding-bar-row:hover .holding-bar-name { color: var(--accent); }
.holding-bar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.holding-bars { height: 23px; display: block; position: relative; }
.holding-bars .bar { position: absolute; left: 0; display: block; min-width: 2px; border-radius: 2px; }
.basis-bar { top: 2px; height: 8px; background: #c5ccc7; }
.value-bar { bottom: 2px; height: 8px; background: var(--accent); }
.holding-bar-values { display: grid; gap: 2px; text-align: right; font-family: var(--mono); font-size: 10px; }
.holding-bar-values b { color: var(--text-2); font-weight: 600; }
.holding-bar-values em { color: var(--accent); font-style: normal; }

.allocation-chart, .cost-stack { padding: 18px 16px; }
.allocation-bar { width: 100%; height: 13px; display: flex; overflow: hidden; border-radius: 3px; background: var(--inset); }
.allocation-bar i { display: block; min-width: 2px; height: 100%; }
.allocation-list { margin-top: 16px; }
.allocation-list > div { display: grid; grid-template-columns: minmax(0, 1fr) 50px 92px; gap: 8px; align-items: center; min-height: 31px; border-bottom: 1px solid #edf0ec; font-size: 11px; }
.allocation-list > div:last-child { border-bottom: 0; }
.allocation-list span { min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allocation-list span i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 2px; }
.allocation-list b, .allocation-list em { text-align: right; font-family: var(--mono); font-size: 10px; font-style: normal; }
.allocation-list b { color: var(--text-2); }.allocation-list em { color: var(--text-3); }

.action-list { padding: 4px 16px; }
.action-item { min-height: 56px; display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0ec; }
.action-item:last-child { border-bottom: 0; }
.decision-status { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 6px; border-radius: 50%; background: var(--text-3); }
.decision-status.attention { background: var(--red); }
.decision-status.review { background: var(--amber); }
.decision-status.good { background: var(--green); }
.action-item span { min-width: 0; display: block; }
.action-item b, .action-item em { display: block; }
.action-item b { font-size: 11px; font-weight: 750; }
.action-item em { margin-top: 2px; color: var(--text-2); font-size: 10.5px; line-height: 1.4; font-style: normal; }

.empty-state { min-height: 230px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 28px; color: var(--text-2); background: var(--surface-subtle); }
.empty-state strong { color: var(--text); font-size: 15px; }
.empty-state span { font-size: 12px; }
.empty-state .btn { margin-top: 6px; }
.empty-state.compact { min-height: 96px; padding: 18px 16px; }

.decision-band { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 18px; margin-bottom: 18px; border: 1px solid var(--border); border-left-width: 5px; border-radius: var(--r); background: var(--surface); }
.decision-band > div span, .decision-band > div strong { display: block; }
.decision-band > div span { color: var(--text-3); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.decision-band > div strong { margin-top: 4px; font-size: 18px; }
.decision-band p { max-width: 540px; color: var(--text-2); font-size: 12px; text-align: right; }
.decision-positive { border-left-color: var(--green); }.decision-negative { border-left-color: var(--red); }.decision-neutral { border-left-color: var(--amber); }
.memo-metrics { margin-bottom: 18px; }
.data-line { display: flex; align-items: center; gap: 6px; }
.data-kind { display: inline-flex; align-items: center; padding: 2px 5px; border: 1px solid currentColor; border-radius: 3px; font-family: var(--mono); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.data-kind.observed, .data-kind.reported { color: var(--green); }.data-kind.derived { color: var(--blue); }.data-kind.assumed { color: var(--amber); }.data-kind.model { color: var(--purple); }
.range-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); }
.range-strip div { padding: 12px 16px; border-right: 1px solid var(--border); }
.range-strip div:last-child { border-right: 0; }
.range-strip span, .range-strip b { display: block; }.range-strip span { color: var(--text-3); font-size: 9px; font-weight: 700; }.range-strip b { margin-top: 3px; font-family: var(--mono); font-size: 13px; }
.outcome-chart { padding: 10px 16px 16px; }
.outcome-row { padding: 10px 0; border-bottom: 1px solid #edf0ec; }.outcome-row:last-child { border-bottom: 0; }
.outcome-row > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }.outcome-row b { font-family: var(--mono); }
.outcome-track { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 2px; background: var(--inset); }.outcome-track i { display: block; height: 100%; }.outcome-track i.positive { background: var(--green); }.outcome-track i.negative { background: var(--red); }
.outcome-row small { display: block; margin-top: 6px; color: var(--text-3); font-size: 9px; }

.definition-list { padding: 6px 16px; }
.definition-list div { min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 1fr); gap: 12px; align-items: center; border-bottom: 1px solid #edf0ec; }
.definition-list div:last-child { border-bottom: 0; }
.definition-list dt { color: var(--text-3); font-size: 10px; }.definition-list dd { overflow-wrap: anywhere; text-align: right; color: var(--text); font-size: 11px; font-weight: 650; }
.collection-action, .danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }.collection-action span, .danger-zone span { color: var(--text-2); font-size: 11px; }
.danger-zone { border-color: #e3c8c5; }
.long-copy { padding: 16px; color: var(--text-2); white-space: pre-wrap; font-size: 12px; }

.form-section { padding: 0; }
.deal-form { max-width: 1060px; }
.form-section-head { display: flex; align-items: center; gap: 13px; padding: 14px 17px; border-bottom: 1px solid var(--border); }
.form-section-head > span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--accent); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.form-section-head h2 { font-size: 14px; }.form-section-head p { margin-top: 2px; color: var(--text-3); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fld { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fld.span-2 { grid-column: span 2; }
.fld label { color: var(--text-2); font-size: 10px; font-weight: 700; }
.fld input, .fld select, .fld textarea { width: 100%; min-width: 0; min-height: 39px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text); font-size: 12px; }
.fld input:hover, .fld select:hover, .fld textarea:hover { border-color: #8f9991; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb,var(--accent) 16%,white); }
.fld textarea { min-height: 90px; resize: vertical; }
.hint { color: var(--text-3); font-size: 9.5px; line-height: 1.35; }
.req { color: var(--red); }
.field-key input { border-color: var(--accent); background: #fbfdfb; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-radius: 4px 0 0 4px; }
.input-suffix span { min-width: 54px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 4px 4px 0; background: var(--surface-subtle); color: var(--text-3); font-size: 9px; }
.toggle-row { flex-direction: row; align-items: center; gap: 18px; }
.check { display: inline-flex !important; flex-direction: row; align-items: center; gap: 7px; cursor: pointer; }
.check input { width: 15px; min-height: 15px; accent-color: var(--accent); }
.check span { color: var(--text-2); font-size: 11px; }
.assumption-note { display: flex; align-items: center; gap: 10px; margin: 0 18px 18px; padding: 10px 12px; border-left: 3px solid var(--amber); background: var(--amber-soft); color: #684a1d; font-size: 10px; }
.assumption-note span { color: #7d632f; }
.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 18px 18px; }
.inline-ledger-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1.5fr auto; gap: 10px; align-items: end; padding: 15px 16px; border-top: 1px solid var(--border); background: var(--surface-subtle); }

.table-scroll, .panel-body.flush { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.tbl th, .tbl td { padding: 11px 13px; border-bottom: 1px solid #e8ebe7; text-align: left; vertical-align: middle; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface-subtle); color: var(--text-3); font-size: 9px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #f8faf7; }
.tbl a { color: var(--text); text-decoration: none; }.tbl a:hover { color: var(--accent); text-decoration: underline; }
.tbl .num, .num { text-align: right; white-space: nowrap; font-family: var(--mono); }
.table-sub { display: block; margin-top: 2px; color: var(--text-3); font-family: var(--sans); font-size: 9px; font-weight: 400; }
.tbl-empty { padding: 28px 16px; color: var(--text-3); text-align: center; font-size: 11px; }.tbl-empty a { color: var(--accent); }
.status-text { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface-subtle); color: var(--text-2); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.status-large { min-height: 28px; padding-inline: 10px; }
.pill { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid var(--border); border-radius: 3px; color: var(--text-2); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.pill-listed { color: var(--blue); border-color: #b8c8d8; background: var(--blue-soft); }.pill-sold { color: var(--green); border-color: #bed8c9; background: var(--green-soft); }.pill-aging { color: var(--red); border-color: #dec0bd; background: var(--red-soft); }

.notice-stack { margin-bottom: 15px; }.notice, .form-error { padding: 10px 12px; margin-bottom: 10px; border: 1px solid #ddbbb7; border-radius: 4px; background: var(--red-soft); color: #772d28; font-size: 11px; }.notice.warning { border-color: #ddc897; background: var(--amber-soft); color: #6e4d17; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.language-switcher { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.language-control { position: relative; display: inline-flex; align-items: center; color: var(--text-2); }
.language-control select { appearance: none; width: 136px; max-width: 100%; min-height: 40px; padding: 8px 27px 8px 34px; border: 1px solid var(--border); border-radius: var(--r); background: transparent; color: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.language-control select:hover { background: var(--surface-subtle); border-color: var(--border-strong); }
.language-control select:disabled { opacity: .55; cursor: wait; }
.language-control option { color: var(--text); background: var(--surface); }
.language-globe, .language-chevron { position: absolute; pointer-events: none; }
.language-globe { left: 11px; }.language-chevron { right: 10px; }
.language-switcher .btn { min-height: 40px; white-space: normal; }
.sidebar-controls { padding-top: 10px; border-top: 1px solid var(--sidebar-soft); }
.sidebar-controls .language-switcher { justify-content: flex-start; margin: 0; padding: 0 18px 10px; }
.sidebar-controls .language-control { color: #bfc5c1; }
.sidebar-controls .language-control select { border-color: transparent; }
.sidebar-controls .language-control select:hover { color: #fff; background: var(--sidebar-soft); }
.sidebar-controls .language-control select:focus-visible { outline-color: color-mix(in srgb,var(--accent) 45%,white); }
.sidebar-controls .sidebar-foot { border-top: 0; padding-top: 6px; }
.page-actions { flex-wrap: wrap; }
.page-actions .btn { white-space: normal; text-align: center; }
.nav-link { white-space: normal; }
.market-coverage { margin: 0 18px 16px; padding: 13px 15px; border: 1px solid #ddc897; border-left: 3px solid #b58c43; border-radius: 4px; background: var(--amber-soft); color: var(--text); overflow-wrap: anywhere; }
.market-coverage[hidden] { display: none; }
.market-coverage[data-state="AVAILABLE"] { border-color: #bed8c9; border-left-color: var(--green); background: var(--green-soft); }
.market-coverage strong { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.market-coverage p { margin: 6px 0; font-size: 12px; line-height: 1.5; }
.market-coverage small { display: block; color: var(--text-2); font-size: 10px; line-height: 1.5; }
.market-coverage-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.market-coverage-choices:empty { display: none; }
.disclaimer { max-width: 940px; margin: 22px 0 0; color: var(--text-3); font-size: 9.5px; line-height: 1.5; }

/* Legacy content kept readable while routes are migrated. */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); }.stat-strip .cell { padding: 14px; border-right: 1px solid var(--border); }.stat-strip .cell:last-child { border-right: 0; }.s-val { font-family: var(--mono); font-size: 18px; }.s-lbl { margin-top: 3px; color: var(--text-3); font-size: 9px; }.kv { width: 100%; border-collapse: collapse; font-size: 11px; }.kv td { padding: 8px 0; border-bottom: 1px solid #edf0ec; }.kv td:last-child { text-align: right; font-weight: 650; }.row-list .row { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #edf0ec; }.row-list .tag { color: var(--text-3); font-size: 9px; }.r-body { color: var(--text-2); font-size: 11px; }.r-kicker { display: block; color: var(--text); font-weight: 700; }.r-cost { margin-left: auto; font-family: var(--mono); font-size: 10px; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--bg); }
.auth-side { width: min(100%, 420px); }.auth-card { width: 100%; }.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }.auth-brand .brand-mark { color: var(--text); border-color: var(--border-strong); }.auth-brand .brand-name { color: var(--text); }.auth-card h1 { margin-bottom: 4px; font-size: 22px; }.auth-sub, .auth-alt { color: var(--text-2); font-size: 11px; }.auth-sub { margin-bottom: 18px; }.auth-alt { margin-top: 12px; text-align: center; }.auth-alt a { color: var(--accent); font-weight: 700; }.auth-card form .fld { margin-bottom: 13px; }
.hero { display: none; }

@media (max-width: 1100px) {
  .metric-grid, .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2), .kpi:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2), .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-ledger-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }.inline-ledger-form .btn { justify-self: start; }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { width: 100%; min-height: auto; height: auto; position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .brand { min-height: 62px; border-bottom: 0; }.brand-sub { display: none; }
  .nav { grid-row: 2; grid-column: 1 / -1; min-width: 0; flex-direction: row; align-items: center; justify-content: flex-start; overflow-x: auto; gap: 2px; padding: 0 12px 9px; }
  .sidebar-controls { grid-row: 1; grid-column: 2; display: flex; align-items: center; justify-content: flex-end; padding: 0 12px 0 0; border-top: 0; }
  .sidebar-controls .language-switcher { padding: 0; }
  .sidebar-controls .sidebar-foot { padding: 6px 0 6px 12px; margin-left: 6px; }
  .nav-heading { display: none; }.nav-link { min-height: 35px; padding: 7px 10px; border-left: 0; border-bottom: 2px solid transparent; }.nav-link.active { border-left-color: transparent; border-bottom-color: color-mix(in srgb,var(--accent) 45%,white); }
  .sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 0; border-left: 1px solid #303532; }.sidebar-user { display: none; }
  .content { width: 100%; padding: 26px 24px 54px; }
  .portfolio-grid, .memo-grid, .holding-layout, .two-col, .report-grid { grid-template-columns: 1fr; }
  .chart-large { min-height: 190px; }
}

@media (max-width: 600px) {
  .brand { min-height: 56px; padding: 11px 14px; }.brand-mark { width: 30px; height: 30px; flex-basis: 30px; }.brand-name { font-size: 14px; }
  .nav { justify-content: flex-start; overflow-x: auto; padding: 0 8px 8px; }.nav-link { flex: 1 0 auto; justify-content: center; font-size: 11px; }.sidebar-foot { display: none; }
  .content { padding: 22px 14px 46px; }
  .page-head, .memo-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }.page-head h1, .memo-head h1 { font-size: 23px; }.page-actions { width: 100%; }.page-actions .btn { flex: 1; }
  .metric-grid, .kpi-grid { grid-template-columns: 1fr; }.metric, .kpi { min-height: 96px; border-right: 0; border-bottom: 1px solid var(--border); }.metric:last-child, .kpi:last-child { border-bottom: 0; }.metric:nth-child(2), .kpi:nth-child(2) { border-right: 0; }.metric:nth-child(-n+2), .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }.metric-value, .kpi-value { font-size: 21px; }
  .section-head { align-items: flex-start; flex-direction: column; min-height: 54px; }.chart-legend { justify-content: flex-start; }
  .holding-bar-row { grid-template-columns: 1fr; gap: 6px; }.holding-bar-values { grid-template-columns: 1fr 1fr; text-align: left; }.holding-bars { width: 100%; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; gap: 13px; }.fld.span-2 { grid-column: span 1; }.toggle-row { flex-direction: column; align-items: flex-start; }
  .assumption-note { align-items: flex-start; flex-direction: column; }
  .decision-band { align-items: flex-start; flex-direction: column; gap: 7px; }.decision-band p { text-align: left; }
  .inline-ledger-form { grid-template-columns: 1fr; }.inline-ledger-form .btn { width: 100%; }
  .allocation-list > div { grid-template-columns: minmax(0, 1fr) 44px 80px; }
  .chart { min-height: 145px; }.chart-large { min-height: 170px; }
  .auth-wrap { padding: 18px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* On-request web search for auction results (Deal Desk, Pattern Radar) */
.web-results { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin:0 0 16px; padding:12px 14px; border:1px dashed var(--border); border-radius:8px; background:var(--accent-soft); }
.web-results-copy { flex:1 1 320px; min-width:0; }
.web-results-copy strong { display:block; font-size:13px; }
.web-results-copy p { margin:3px 0 0; color:var(--text-2); font-size:12px; line-height:1.45; }
.web-results-status { flex-basis:100%; margin:0; color:var(--text-2); font-size:12px; }
.data-kind.web { color: var(--blue); }
.radar-detail-chart .web-results { margin:4px 20px 16px; }
