:root {
  color-scheme: light;
  --white: #fff;
  --ink: #12223a;
  --muted: #607087;
  --faint: #8a96a6;
  --line: #dbe2e8;
  --line-strong: #b9c6d0;
  --surface: #f7fafb;
  --teal: #087f83;
  --teal-dark: #05656a;
  --teal-soft: #e3f4f3;
  --green: #198766;
  --amber: #b76a12;
  --red: #b94843;
  --shadow: 0 18px 55px rgba(22, 48, 72, .12);
  --serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --sans: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--white); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--white); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

/* Sections 5-8 are intentionally paused; keep their navigation and content out of the detail view. */
.detail-tab[data-target="detailValuation"],
.detail-tab[data-target="detailStructure"],
.detail-tab[data-target="detailScenarios"],
.detail-tab[data-target="detailRisks"],
#detailValuation,
#detailStructure,
#detailScenarios,
#detailRisks { display: none !important; }
.skip-link { position: fixed; left: 12px; top: -50px; z-index: 200; padding: 10px 14px; color: white; background: var(--ink); }
.skip-link:focus { top: 12px; }

.app-header { position: sticky; top: 0; z-index: 80; height: 64px; padding: 0 28px; display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr); align-items: center; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 700; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; color: white; background: var(--ink); border-radius: 4px; font-family: Georgia, serif; font-size: 20px; }
.main-nav { display: flex; height: 100%; align-items: stretch; gap: 22px; }
.nav-item { position: relative; border: 0; background: transparent; padding: 0; font-size: 13px; cursor: pointer; white-space: nowrap; }
.nav-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.nav-item:hover, .nav-item.active { color: var(--teal-dark); }
.nav-item.active::after { background: var(--teal); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.global-freshness { font-size: 11px; color: var(--muted); }
.role-switch, .mobile-menu { min-height: 34px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; padding: 0 12px; font-size: 12px; cursor: pointer; }
.role-switch:hover { border-color: var(--teal); color: var(--teal-dark); }
.mobile-menu { display: none; font-size: 18px; }

.page { display: none; }
.page.active { display: block; }
.page-shell { width: min(1400px, calc(100% - 56px)); margin: 0 auto; padding: 42px 0 70px; }
.opportunity-shell { width: min(1400px, calc(100% - 48px)); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.page-heading h1 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.025em; }
.page-heading p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.regime-line { display: flex; align-items: center; gap: 10px; }
.pulse-line { width: 20px; height: 12px; background: url("data:image/svg+xml,%3Csvg viewBox='0 0 28 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 9h5l2-6 4 12 4-9 3 3h8' fill='none' stroke='%23087f83' stroke-width='1.8'/%3E%3C/svg%3E") center/contain no-repeat; }
.secondary-button, .primary-button, .text-button { border-radius: 5px; cursor: pointer; }
.secondary-button { min-height: 38px; padding: 0 15px; border: 1px solid var(--line-strong); background: white; }
.secondary-button:hover { border-color: var(--teal); color: var(--teal-dark); }
.primary-button { min-height: 42px; padding: 0 18px; border: 1px solid var(--teal); color: white; background: var(--teal); font-weight: 700; }
.primary-button:hover { background: var(--teal-dark); }
.text-button { border: 0; padding: 4px 0; color: var(--teal-dark); background: transparent; font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.info-trigger { display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 1px solid #8fa0ae; border-radius: 50%; color: #6e7f8f; background: white; font: 600 10px/1 var(--serif); cursor: pointer; vertical-align: .1em; }
.info-trigger:hover, .info-trigger:focus-visible { color: white; border-color: var(--teal); background: var(--teal); outline: none; }
.heading-info { transform: translateY(-3px); }

.theme-rail { display: flex; align-items: center; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.theme-rail::-webkit-scrollbar { display: none; }
.theme-button { flex: 0 0 auto; position: relative; min-height: 45px; border: 0; padding: 0 16px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.theme-button:first-child { padding-left: 0; }
.theme-button.active { color: var(--teal-dark); font-weight: 700; }
.theme-button.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--teal); }
.theme-button:first-child.active::after { left: 0; }
.filter-panel { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.filter-panel label { min-width: 190px; }
.filter-panel label, .control-panel label, .backtest-controls label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
select, input { width: 100%; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 10px; color: var(--ink); background: white; font-size: 13px; }
select:focus, input:focus { border-color: var(--teal); outline: 2px solid rgba(8,127,131,.12); }
.input-unit { position: relative; display: block; min-width: 112px; color: var(--muted); white-space: nowrap; }
.input-unit input { padding-right: 30px; }
.input-unit > span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; font: 12px/1 var(--sans); color: var(--muted); white-space: nowrap; }

.opportunity-table-wrap, .open-table { overflow-x: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 10px; border-bottom: 1px solid var(--line-strong); color: var(--muted); text-align: left; font-size: 11px; font-weight: 600; white-space: nowrap; }
td { padding: 15px 10px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.opportunity-table tbody tr { transition: background .15s; }
.opportunity-table tbody tr:hover { background: #f8fbfb; }
.opportunity-table tbody tr.selected { background: #f3fbfa; box-shadow: inset 3px 0 var(--teal); }
.symbol-cell { display: flex; align-items: center; gap: 11px; min-width: 142px; }
.symbol-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--ink); font-family: var(--serif); font-size: 15px; font-weight: 700; }
.symbol-cell strong { display: block; font: 700 13px var(--mono); }
.symbol-cell small { display: block; margin-top: 3px; color: var(--muted); }
.structure-cell, .why-list { min-width: 176px; }
.structure-cell strong { display: block; font-size: 12px; }
.structure-cell small { display: block; margin-top: 3px; color: var(--muted); white-space: nowrap; }
.structure-cell strong { white-space: nowrap; }
.why-list { margin: 0; padding-left: 17px; color: var(--ink); line-height: 1.55; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--amber); }
.status-dot.good { background: var(--green); }
.status-dot.bad { background: var(--red); }
.quote-detail { display: block; margin: 4px 0 0 14px; color: var(--muted); white-space: nowrap; }
.model-value { font-family: var(--mono); }
.model-value small { display: block; margin-top: 4px; color: var(--muted); font: 11px var(--sans); }
.freshness { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); white-space: nowrap; }
.freshness::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); }
.freshness.fresh::before { background: var(--green); }
.freshness.stale::before { background: var(--red); }
.row-action { min-height: 34px; min-width: 86px; border: 1px solid var(--teal); border-radius: 4px; color: var(--teal-dark); background: white; font-size: 12px; cursor: pointer; }
.row-action:hover { color: white; background: var(--teal); }
.rec-group-row td { padding: 0; border-bottom-color: var(--line-strong); background: var(--surface); }
.rec-group-row div { display: grid; grid-template-columns: 110px 1fr auto 20px; align-items: center; gap: 14px; min-height: 42px; padding: 0 12px; border-left: 4px solid var(--line-strong); }
.rec-group-row { cursor: pointer; }
.rec-group-row:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.rec-group-row i { color: var(--teal-dark); font: 700 18px/1 var(--mono); text-align: center; }
.rec-group-row strong { font-family: var(--serif); font-size: 15px; }
.rec-group-row span { color: var(--muted); font-size: 10px; }
.rec-group-row b { min-width: 24px; color: var(--muted); font: 700 11px var(--mono); text-align: right; }
.rec-group-row.focus div { border-left-color: var(--green); background: #f1faf6; }
.rec-group-row.watch div { border-left-color: var(--teal); background: #f3fbfb; }
.rec-group-row.caution div { border-left-color: var(--amber); background: #fffaf3; }
.rec-group-row.reject div { border-left-color: var(--red); background: #fff7f6; }
.rec-group-empty td { padding: 16px 14px; color: var(--faint); font-size: 10px; }
.opportunity-row.rec-focus { background: #fbfefc; }
.opportunity-row.rec-reject { opacity: .72; }
.symbol-title { display: flex; align-items: center; gap: 6px; }
.high-probability { display: inline-flex; align-items: center; min-height: 17px; padding: 0 5px; border: 1px solid var(--green); color: var(--green); background: #f4faf7; font-size: 8px; white-space: nowrap; }
.quote-market-cell { min-width: 150px; }
.quote-market-cell strong { display: block; font: 700 12px var(--mono); white-space: nowrap; }
.quote-market-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.quote-age { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; font: 9px var(--mono); white-space: nowrap; }
.quote-age::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--amber); }
.quote-age.fresh { color: var(--green); }
.quote-age.fresh::before { background: var(--green); }
.quote-age.warn { color: var(--amber); }
.quote-age.warn::before { background: var(--amber); }
.quote-age.stale { color: var(--red); }
.quote-age.stale::before { background: var(--red); }
.research-conclusion { min-width: 205px; }
.research-conclusion strong { display: block; font-size: 11px; }
.research-conclusion small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; white-space: nowrap; }
.research-loading { color: var(--muted); font-size: 10px; }
.opportunity-table { width: 100%; min-width: 0; table-layout: fixed; }
.opportunity-table-head { padding: 0; }
.opportunity-header-line, .opportunity-line { display: grid; grid-template-columns: 260px 1.15fr .8fr .8fr .65fr .9fr 1fr 1.1fr 1.5fr .55fr; align-items: center; column-gap: 6px; }
.opportunity-header-line { padding: 11px 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.opportunity-line { min-height: 64px; padding: 10px 12px; color: var(--ink); font: 13px var(--mono); white-space: nowrap; }
.opportunity-row td { padding: 0; }
.opportunity-row { cursor: pointer; }
.opportunity-row:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.opportunity-symbol { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.opportunity-symbol strong { overflow: hidden; text-overflow: ellipsis; }
.opportunity-symbol .symbol-avatar { width: 32px; height: 32px; font-size: 14px; }
.opportunity-theme { color: var(--teal-dark); font-family: var(--sans); font-weight: 700; }
.opportunity-score { color: var(--muted); }
.source-bar { display: flex; justify-content: space-between; gap: 20px; padding: 14px 10px; color: var(--muted); font-size: 10px; }
.empty-state { padding: 42px; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.empty-state.large { margin-top: 40px; border: 1px dashed var(--line-strong); }

.detail-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.detail-sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); padding: 112px 0 24px; border-right: 1px solid var(--line); background: white; }
.detail-sidebar { scrollbar-width: none; }
.detail-sidebar::-webkit-scrollbar { display: none; }
.detail-tab { display: block; width: 100%; min-height: 42px; padding: 0 22px; border: 0; border-left: 3px solid transparent; color: var(--muted); background: white; text-align: left; font-size: 12px; cursor: pointer; }
.detail-tab:hover, .detail-tab.active { color: var(--teal-dark); background: var(--surface); }
.detail-tab.active { border-left-color: var(--teal); }
.detail-main { min-width: 0; padding: 28px 34px 72px; }
.detail-header { padding-bottom: 18px; border-bottom: 1px solid var(--line-strong); }
.identity-row { display: flex; align-items: center; gap: 13px; margin-top: 20px; }
.identity-row h2 { margin: 0; font: 700 26px var(--mono); }
.identity-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.detail-meta { margin-left: auto; color: var(--muted); font-size: 10px; }
.detail-section { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 78px; }
.detail-section h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 19px; }
.detail-section > p { max-width: 900px; margin: 0; color: #3d4d60; line-height: 1.8; }
.overview-chart-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin: 20px 0 24px; }
.overview-chart-card { min-width: 0; padding: 16px; border: 1px solid var(--line); background: #fbfdfd; }
.overview-chart-wide { grid-column: 1 / -1; }
.chart-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chart-card-heading h4 { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 16px; }
.chart-card-heading p, .chart-source { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.chart-source { white-space: nowrap; font-family: var(--mono); }
.chart-controls { display: flex; align-items: center; gap: 8px; }
.chart-controls label { color: var(--muted); font-size: 11px; }
.chart-controls select { min-height: 30px; padding: 0 28px 0 9px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--ink); background: white; font: 11px var(--sans); }
.chart-canvas { width: 100%; min-height: 220px; }
.chart-canvas.compact { min-height: 190px; }
.chart-canvas svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-gridline { stroke: #dbe5e8; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis-label { fill: var(--muted); font: 9px var(--sans); }
.price-reference-line { stroke-opacity: .52; stroke-width: .8; stroke-dasharray: 5 4; shape-rendering: crispEdges; vector-effect: non-scaling-stroke; }
.price-axis-label { font-size: 9px; font-variant-numeric: tabular-nums; paint-order: stroke fill; stroke: #fbfdfd; stroke-width: 2px; stroke-linejoin: round; }
.price-axis-connector, .price-axis-tick, .price-time-tick { fill: none; stroke-width: .8; stroke-opacity: .72; shape-rendering: crispEdges; vector-effect: non-scaling-stroke; }
.price-time-tick { stroke: #91a4ad; }
.price-time-label { font-size: 9px; font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#priceAreaGradient); opacity: .8; }
.chart-dot { fill: var(--teal-dark); stroke: white; stroke-width: 2; }
.chart-bar { fill: #9bcac7; }
.chart-bar.volume { fill: #d9b969; opacity: .8; }
.chart-value-label { fill: var(--ink); font: 10px var(--sans); }
.option-metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 8px; }
.option-metric { padding: 8px 9px; background: #f1f7f6; }
.option-metric span { display: block; color: var(--muted); font-size: 10px; }
.option-metric strong { display: block; margin-top: 3px; color: var(--ink); font: 700 14px var(--mono); }
.chart-empty { fill: var(--muted); font: 12px var(--sans); }
.volatility-heading { align-items: flex-end; margin-bottom: 18px; }
.volatility-heading h3 { margin-bottom: 5px; }
.volatility-heading p { max-width: 780px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.volatility-score-layout { display: grid; grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr); border: 1px solid var(--line); background: #fbfdfd; }
.volatility-score-panel { padding: 20px 22px; border-right: 1px solid var(--line); }
.score-summary { display: flex; align-items: center; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.score-number { flex: 0 0 auto; min-width: 94px; color: var(--teal-dark); }
.score-number strong { font: 700 42px/1 var(--mono); }
.score-number span { margin-left: 3px; color: var(--muted); font: 10px var(--mono); }
.score-summary h4 { margin: 0; font-family: var(--serif); font-size: 18px; }
.score-summary p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.score-components { display: grid; gap: 10px; margin-top: 16px; }
.score-component { display: grid; grid-template-columns: 92px minmax(0, 1fr) 34px; align-items: center; gap: 9px; }
.score-component-label { color: var(--muted); font-size: 10px; }
.score-component-track { height: 5px; overflow: hidden; border-radius: 99px; background: #e5ecee; }
.score-component-fill { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.score-component strong { font: 11px var(--mono); text-align: right; }
.score-component.unavailable .score-component-fill { width: 0 !important; }
.score-component.unavailable strong { color: var(--muted); font-size: 9px; }
.score-coverage { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.score-coverage strong { color: var(--ink); font: 11px var(--mono); }
.volatility-metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.volatility-metric { min-width: 0; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.volatility-metric:nth-child(3n) { border-right: 0; }
.volatility-metric:nth-last-child(-n+3) { border-bottom: 0; }
.volatility-metric span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.volatility-metric strong { display: block; margin-top: 7px; color: var(--ink); font: 700 18px var(--mono); white-space: nowrap; }
.volatility-metric small { display: block; min-height: 15px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.volatility-chart-card { margin-top: 14px; padding: 18px 20px 14px; border: 1px solid var(--line); background: white; }
.volatility-skew-canvas { min-height: 280px; }
.volatility-controls { flex-wrap: wrap; justify-content: flex-end; }
.segmented-control { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 3px; overflow: hidden; }
.segmented-control button { min-height: 28px; padding: 0 10px; border: 0; border-right: 1px solid var(--line-strong); color: var(--muted); background: white; font: 10px var(--sans); cursor: pointer; }
.segmented-control button:last-child { border-right: 0; }
.segmented-control button.active { color: var(--teal-dark); background: var(--teal-soft); font-weight: 700; }
.skew-call-line, .skew-put-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.skew-call-line { stroke: var(--teal); }
.skew-put-line { stroke: #d56b67; }
.skew-call-dot { fill: var(--teal); }
.skew-put-dot { fill: #d56b67; }
.skew-spot-line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-legend { display: flex; justify-content: center; gap: 22px; color: var(--muted); font-size: 10px; }
.chart-legend span::before { content: ''; display: inline-block; width: 16px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--teal); }
.chart-legend .legend-put::before { background: #d56b67; }
.chart-legend .legend-spot::before { background: var(--ink); }
.volatility-flow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.flow-panel { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); background: #fbfdfd; }
.flow-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.flow-panel-heading h4 { margin: 0; font-family: var(--serif); font-size: 16px; }
.flow-panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.flow-panel-heading > strong { color: var(--ink); font: 700 20px var(--mono); white-space: nowrap; }
.put-call-bar { display: flex; height: 8px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #e5ecee; }
.put-call-bar .call { background: var(--teal); }
.put-call-bar .put { background: #d56b67; }
.flow-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 13px; }
.flow-metrics span { display: block; color: var(--muted); font-size: 9px; }
.flow-metrics strong { display: block; margin-top: 4px; color: var(--ink); font: 700 12px var(--mono); }
.volatility-note { margin-top: 14px; padding: 11px 13px; border-left: 2px solid var(--amber); color: var(--muted); background: #fffaf0; font-size: 10px; line-height: 1.7; }
.company-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.company-badges span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--surface); font: 11px var(--sans); }
.company-intro { width: 100%; max-width: none !important; font-size: 15px !important; line-height: 1.9 !important; }
.company-snapshot { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; border: 1px solid var(--line); }
.company-snapshot .metric-item { min-width: 0; }
.company-core-snapshot .metric-item strong { font: 700 16px/1.4 var(--sans); overflow-wrap: anywhere; }
.range-panel { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line); }
.range-panel h4, .fundamental-card h4 { margin: 0; font-family: var(--serif); font-size: 15px; }
.range-panel .section-heading > span { color: var(--muted); font-size: 10px; }
.price-range { position: relative; height: 7px; margin-top: 20px; border-radius: 99px; background: #e9eef1; }
.price-range-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b9dad7, var(--teal)); }
.price-range-marker { position: absolute; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%); border: 2px solid white; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.price-range-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font: 10px var(--mono); }
.fundamental-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.fundamental-card { min-width: 0; padding: 19px 20px; border: 1px solid var(--line); }
.fundamental-card dl { margin: 12px 0 0; }
.fundamental-card dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fundamental-card dl > div:last-child { border-bottom: 0; }
.fundamental-card dt { color: var(--muted); font-size: 11px; }
.fundamental-card dd { margin: 0; font: 12px var(--mono); text-align: right; }
.fundamental-card ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; margin: 14px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.6; }
.company-source { margin-top: 14px; padding: 10px 12px; border-left: 2px solid var(--teal); color: var(--muted); background: var(--surface); font-size: 10px; line-height: 1.7; }
.section-heading, .canvas-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.valuation-strip { padding: 26px 0 8px; }
.strip-track { position: relative; height: 8px; margin: 0 58px; border-radius: 99px; background: linear-gradient(90deg, #edf1f3 0 30%, var(--teal-soft) 30% 72%, #edf1f3 72%); }
.strip-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 2px; height: 24px; background: var(--ink); }
.strip-marker::after { content: attr(data-label); position: absolute; top: 18px; left: 50%; transform: translateX(-50%); color: var(--ink); font: 10px var(--mono); white-space: nowrap; }
.strip-labels { display: flex; justify-content: space-between; margin-top: 20px; color: var(--muted); font-size: 10px; }
.split-section { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr); gap: 48px; }
.payoff-mini { height: 128px; }
.payoff-mini svg { width: 100%; height: 100%; }
.axis { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.teal-line { fill: none; stroke: var(--teal); stroke-width: 2.5; }
.key-value-list { margin: 0; }
.key-value-list div { display: grid; grid-template-columns: minmax(110px, 1fr) 1fr; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.key-value-list dt { color: var(--muted); font-size: 11px; }
.key-value-list dd { margin: 0; font: 12px var(--mono); text-align: right; }
.scenario-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.scenario-item { padding: 20px; border-right: 1px solid var(--line); }
.scenario-item:last-child { border-right: 0; }
.scenario-item strong { display: block; margin-bottom: 7px; font-family: var(--serif); font-size: 16px; }
.scenario-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.metric-band { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.metric-item { padding: 18px; border-right: 1px solid var(--line); }
.metric-item:last-child { border-right: 0; }
.metric-item span { display: block; color: var(--muted); font-size: 10px; }
.metric-item strong { display: block; margin-top: 8px; font: 700 20px var(--mono); }
.risk-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 30px; }
.risk-list li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); font-size: 12px; }
.risk-list li::before { content: "!"; position: absolute; left: 0; top: 8px; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--amber); border-radius: 50%; color: var(--amber); font-size: 10px; }

.section-kicker { display: block; margin-bottom: 7px; color: var(--teal-dark); font: 700 9px var(--mono); letter-spacing: .18em; }
.method-version { color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.decision-section { padding-top: 24px; }
.decision-overall { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-top: 4px; padding: 20px 22px; border: 1px solid var(--line-strong); border-left: 4px solid var(--line-strong); background: var(--surface); }
.decision-overall strong { font-family: var(--serif); font-size: 22px; }
.decision-overall span { color: var(--muted); font-size: 11px; text-align: right; }
.decision-overall.pass { border-left-color: var(--green); background: #f4faf7; }
.decision-overall.conditional { border-left-color: var(--teal); background: #f4fbfb; }
.decision-overall.fail { border-left-color: var(--red); background: #fff7f6; }
.decision-overall.pending, .decision-overall.loading { border-left-color: var(--amber); }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; border: 1px solid var(--line); }
.evidence-card { min-width: 0; padding: 20px; border-right: 1px solid var(--line); border-top: 3px solid var(--line-strong); }
.evidence-card:last-child { border-right: 0; }
.evidence-card.pass { border-top-color: var(--green); }
.evidence-card.conditional { border-top-color: var(--teal); }
.evidence-card.fail { border-top-color: var(--red); }
.evidence-card.pending { border-top-color: var(--amber); }
.evidence-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.evidence-card-head > span:first-child { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.evidence-status { flex: 0 0 auto; padding: 3px 7px; border: 1px solid currentColor; color: var(--muted); font-size: 9px; }
.evidence-card.pass .evidence-status { color: var(--green); }
.evidence-card.conditional .evidence-status { color: var(--teal-dark); }
.evidence-card.fail .evidence-status { color: var(--red); }
.evidence-card.pending .evidence-status { color: var(--amber); }
.evidence-card h4 { min-height: 44px; margin: 14px 0 8px; font-family: var(--serif); font-size: 17px; line-height: 1.35; }
.evidence-card > p { min-height: 48px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.evidence-list { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); list-style: none; }
.evidence-list li { position: relative; padding: 4px 0 4px 15px; color: #34475b; font-size: 10px; line-height: 1.5; }
.evidence-list li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 5px; height: 5px; background: var(--teal); }
.evidence-falsifier { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); color: var(--red); font-size: 9px; line-height: 1.55; }
.methodology-block { margin-top: 14px; border: 1px solid var(--line); }
.methodology-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.methodology-title strong { font-family: var(--serif); }
.methodology-title span { color: var(--muted); font-size: 10px; }
.methodology-rail { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: method-step; }
.method-step { position: relative; min-height: 92px; padding: 16px 12px 13px 36px; border-right: 1px solid var(--line); counter-increment: method-step; }
.method-step:last-child { border-right: 0; }
.method-step::before { content: counter(method-step); position: absolute; left: 12px; top: 16px; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid var(--line-strong); color: var(--muted); font: 9px var(--mono); }
.method-step.pass::before { border-color: var(--green); color: var(--green); }
.method-step.conditional::before { border-color: var(--teal); color: var(--teal-dark); }
.method-step.fail::before { border-color: var(--red); color: var(--red); }
.method-step.pending::before { border-color: var(--amber); color: var(--amber); }
.method-step strong { display: block; font-size: 11px; }
.method-step span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.veto-strip { display: grid; grid-template-columns: 100px 1fr; gap: 12px; margin-top: 12px; padding: 12px 15px; border-left: 3px solid var(--red); background: #fff7f6; font-size: 10px; line-height: 1.55; }
.veto-strip.clear { border-left-color: var(--green); background: #f4faf7; }
.veto-strip strong { color: var(--red); }
.veto-strip.clear strong { color: var(--green); }
.section-note, .backtest-disclosure { color: var(--muted) !important; font-size: 10px; line-height: 1.6 !important; }
.section-note { margin: -4px 0 14px !important; }
.backtest-disclosure { margin-top: 10px !important; }
.backtest-heading { align-items: flex-start; }
.backtest-heading h3 { margin-bottom: 4px; }
.backtest-heading .section-note { margin: 0; }
.backtest-matrix-toolbar { display: grid; grid-template-columns: minmax(230px, auto) minmax(380px, 1fr) auto; align-items: start; gap: 18px; margin: 16px 0 10px; }
.backtest-matrix-toolbar > div > span { display: block; height: 14px; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.backtest-valuation-filter { justify-self: center; text-align: center; }
.backtest-lookback-group { justify-self: end; }
.segmented-control button:disabled { color: var(--faint); background: var(--surface); cursor: not-allowed; opacity: .65; }
.matrix-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 9px; }
.matrix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.matrix-legend i { width: 9px; height: 9px; border-radius: 2px; }
.matrix-legend .safe { background: #d8eee4; border: 1px solid #9dcdb5; }
.matrix-legend .acceptable { background: #fff0c7; border: 1px solid #e6c66a; }
.matrix-legend .risk { background: #f8d8d5; border: 1px solid #df9c96; }
.backtest-matrix-wrap { overflow-x: auto; border: 1px solid var(--line); }
.backtest-result-stack { display: grid; gap: 14px; }
.backtest-result-panel h4 { margin: 0 0 3px; color: var(--ink); font-size: 12px; }
.backtest-result-panel p { margin: 0 0 7px; color: var(--muted); font-size: 9px; }
.backtest-matrix { width: 100%; min-width: 660px; border-collapse: collapse; table-layout: fixed; }
.backtest-matrix th, .backtest-matrix td { height: 42px; padding: 8px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.backtest-matrix th:last-child, .backtest-matrix td:last-child { border-right: 0; }
.backtest-matrix tbody tr:last-child th, .backtest-matrix tbody tr:last-child td { border-bottom: 0; }
.backtest-matrix thead th { color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 600; }
.backtest-matrix thead th small { display: block; margin-top: 3px; color: var(--faint); font: 9px var(--mono); }
.backtest-matrix tbody th { color: var(--ink); background: #fbfcfd; font: 600 11px var(--mono); }
.backtest-matrix td { position: relative; color: var(--ink); font: 700 12px var(--mono); }
.backtest-matrix td.matrix-safe { color: #17643d; background: #d8eee4; }
.backtest-matrix td.matrix-acceptable { color: #7b5b00; background: #fff0c7; }
.backtest-matrix td.matrix-risk { color: #9b332d; background: #f8d8d5; }
.backtest-matrix td.matrix-neutral { color: var(--ink); background: #f7f9fb; }
.backtest-matrix td.matrix-score { color: var(--ink); background: #e7f1f4; }
.backtest-matrix td.matrix-score-safe { color: #17643d; background: #d8eee4; }
.backtest-matrix td.matrix-score-acceptable { color: #7b5b00; background: #fff0c7; }
.backtest-matrix td.matrix-score-risk { color: #9b332d; background: #f8d8d5; }
.backtest-matrix tbody td { white-space: nowrap; font-size: 11px; }
.backtest-matrix td.matrix-empty, .backtest-matrix td.matrix-loading { color: var(--muted); background: white; font-weight: 400; }
.backtest-matrix td.matrix-loading { height: 120px; text-align: center; }
.scenario-item::before { display: block; width: 24px; height: 3px; margin-bottom: 15px; background: var(--teal); content: ""; }
.scenario-item.scenario-ko::before { background: var(--green); }
.scenario-item.scenario-hold::before { background: #3f8fd2; }
.scenario-item.scenario-assigned::before { background: var(--red); }

.materials-shell { max-width: 1280px; }
.license-gate { padding: 7px 10px; border: 1px solid var(--amber); color: var(--amber); font-size: 10px; letter-spacing: .08em; white-space: nowrap; }
.materials-toolbar { display: grid; grid-template-columns: minmax(240px, 360px) auto 1fr; align-items: end; gap: 12px; margin-bottom: 18px; }
.materials-toolbar label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.materials-toolbar > span { align-self: center; justify-self: end; color: var(--muted); font-size: 10px; }
.client-onepager { --client-navy: #0d2746; --client-panel: #132f51; --client-gold: #e6c16f; --client-cyan: #73d4df; --client-text: #eef5ff; --client-muted: #a9b9ce; color: var(--client-text); background: var(--client-navy); border: 1px solid #1d4b72; box-shadow: 0 24px 60px rgba(8, 29, 54, .2); }
.client-loading { display: grid; place-items: center; min-height: 520px; color: var(--client-muted); }
.client-hero { position: relative; padding: 38px 42px 24px; border-bottom: 1px solid rgba(230,193,111,.45); }
.client-hero::after { content: ""; position: absolute; right: 42px; top: 34px; width: 130px; height: 86px; border: 1px solid rgba(115,212,223,.28); }
.client-overline { display: flex; align-items: center; gap: 14px; color: var(--client-gold); font: 10px var(--mono); letter-spacing: .2em; }
.client-overline::before, .client-overline::after { content: ""; width: 48px; height: 1px; background: var(--client-gold); opacity: .7; }
.client-hero h2 { margin: 22px 0 8px; font-family: var(--serif); font-size: clamp(32px, 5vw, 58px); line-height: 1; letter-spacing: .02em; }
.client-hero h2 span { color: var(--client-cyan); font: 700 .54em var(--mono); }
.client-subtitle { margin: 0; color: var(--client-muted); font-size: 14px; letter-spacing: .05em; }
.client-meta { display: flex; gap: 18px; margin-top: 18px; color: var(--client-muted); font: 10px var(--mono); }
.client-verdict { display: inline-block; margin-top: 20px; padding: 7px 10px; border: 1px solid var(--client-gold); color: var(--client-gold); font-size: 10px; }
.client-verdict.pass { border-color: #45d8a6; color: #45d8a6; }
.client-verdict.fail { border-color: #ff736f; color: #ff8a86; }
.client-metrics { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 42px; }
.client-metric { min-width: 0; padding: 24px 18px 22px; border-top: 3px solid var(--client-gold); border-right: 1px solid rgba(169,185,206,.28); text-align: center; }
.client-metric:first-child { border-left: 1px solid rgba(169,185,206,.28); }
.client-metric strong { display: block; color: var(--client-gold); font: 700 clamp(24px, 3vw, 38px) var(--mono); white-space: nowrap; }
.client-metric span { display: block; margin-top: 7px; color: var(--client-muted); font-size: 10px; }
.client-terms { margin: 18px 42px 0; padding: 13px 16px; border: 1px solid rgba(115,212,223,.32); color: var(--client-muted); font-size: 11px; }
.client-terms b { color: var(--client-cyan); }
.client-section { padding: 30px 42px 0; }
.client-section-title { display: flex; align-items: center; gap: 16px; margin: 0 0 16px; color: var(--client-gold); font-family: var(--serif); font-size: 19px; }
.client-section-title::after { content: ""; flex: 1; height: 1px; background: rgba(230,193,111,.34); }
.client-scenarios, .client-evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.client-scenario, .client-evidence-card { min-height: 155px; padding: 18px; border: 1px solid rgba(169,185,206,.3); background: var(--client-panel); }
.client-scenario { border-top: 4px solid var(--client-cyan); }
.client-scenario.ko { border-top-color: #45d8a6; }
.client-scenario.assigned { border-top-color: #ff736f; }
.client-scenario strong, .client-evidence-card strong { display: block; font-family: var(--serif); font-size: 16px; }
.client-scenario.ko strong { color: #56dbad; }
.client-scenario.assigned strong { color: #ff8a86; }
.client-scenario p, .client-evidence-card p { margin: 10px 0 0; color: var(--client-muted); font-size: 11px; line-height: 1.65; }
.client-evidence-card { border-left: 4px solid var(--client-gold); }
.client-evidence-card.pass { border-left-color: #45d8a6; }
.client-evidence-card.conditional { border-left-color: var(--client-cyan); }
.client-evidence-card.fail { border-left-color: #ff736f; }
.client-evidence-card span { display: inline-block; margin-bottom: 10px; color: var(--client-cyan); font: 9px var(--mono); letter-spacing: .08em; }
.client-deploy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.client-panel { padding: 20px; border: 1px solid rgba(169,185,206,.3); background: rgba(19,47,81,.72); }
.client-panel h4 { margin: 0; color: var(--client-gold); font-family: var(--serif); font-size: 16px; }
.client-panel ul { margin: 12px 0 0; padding-left: 18px; color: var(--client-muted); font-size: 11px; line-height: 1.8; }
.client-footer { margin-top: 30px; padding: 18px 42px 28px; border-top: 1px solid rgba(169,185,206,.2); color: #7f94ad; font-size: 8px; line-height: 1.65; }
.client-footer strong { color: #ff9e9a; }

.tool-shell { max-width: 1400px; }
.tool-grid, .valuation-model-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); border-top: 1px solid var(--line-strong); }
.control-panel { padding: 24px 26px 30px 0; border-right: 1px solid var(--line); }
.control-panel h2, .analysis-canvas h2, .chart-panel h2 { margin: 0 0 18px; font-family: var(--serif); font-size: 19px; }
.control-panel label { margin-bottom: 16px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.analysis-canvas { min-width: 0; padding: 24px 0 30px 30px; }
.canvas-heading p, .chart-panel > p { margin: -10px 0 18px; color: var(--muted); font-size: 10px; }
.state-label { padding: 5px 9px; border: 1px solid #86bdbb; border-radius: 4px; color: var(--teal-dark); background: var(--teal-soft); font-size: 10px; }
.state-label.warn { color: var(--amber); border-color: #dbb88c; background: #fff9f0; }
.notice { display: flex; gap: 12px; align-items: center; margin-top: 22px; padding: 14px 16px; border-left: 3px solid var(--teal); background: var(--surface); font-size: 12px; }
.notice span { color: var(--muted); }
.notice.warning { border-left-color: var(--amber); }
.backtest-controls { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr auto; gap: 14px; align-items: end; padding: 20px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; margin-top: 22px; }
.chart-panel { min-width: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.distribution-bars { display: grid; gap: 8px; }
.distribution-row { display: grid; grid-template-columns: 80px 1fr 45px; gap: 10px; align-items: center; font-size: 10px; }
.distribution-track { height: 14px; background: #eef2f4; }
.distribution-fill { height: 100%; background: var(--teal); }
.valuation-model-grid { grid-template-columns: 340px minmax(0, 1fr); }
.empty-chart { display: grid; place-items: center; min-height: 260px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.empty-chart small { display: block; margin-top: -90px; max-width: 480px; line-height: 1.6; }
.option-snapshot { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 180px; border: 1px solid var(--line); }
.option-snapshot div { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.option-snapshot div:nth-child(3n) { border-right: 0; }
.option-snapshot div:nth-last-child(-n+3) { border-bottom: 0; }
.option-snapshot span { display: block; color: var(--muted); font-size: 11px; }
.option-snapshot strong { display: block; margin-top: 9px; font: 700 14px var(--mono); }
.model-output { margin-top: 20px; padding: 18px; border: 1px solid var(--line); }
.model-output strong { color: var(--teal-dark); }
.model-output p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.model-output.ready { border-left: 3px solid var(--teal); }
.model-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.model-result-grid div { padding: 12px; border: 1px solid var(--line); border-right: 0; }
.model-result-grid div:last-child { border-right: 1px solid var(--line); }
.model-result-grid span { display: block; color: var(--muted); font-size: 10px; }
.model-result-grid b { display: block; margin-top: 6px; font: 700 15px var(--mono); }
.methodology { margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.methodology summary { padding: 16px 0; color: var(--teal-dark); cursor: pointer; font-size: 12px; }
.methodology > div { padding-bottom: 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.role-overlay, .info-dialog { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(12, 27, 44, .34); backdrop-filter: blur(5px); }
.role-dialog { width: min(720px, 100%); padding: 30px 34px 36px; background: white; box-shadow: var(--shadow); }
.dialog-brand { font-family: var(--serif); font-weight: 700; }
.role-dialog h2 { margin: 54px 0 8px; text-align: center; font-family: var(--serif); font-size: 28px; }
.role-dialog > p { margin: 0; color: var(--muted); text-align: center; font-size: 12px; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 520px; margin: 34px auto 0; }
.role-option { min-height: 220px; padding: 28px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; cursor: pointer; }
.role-option:hover, .role-option:focus-visible { border-color: var(--teal); outline: 2px solid rgba(8,127,131,.12); }
.role-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 20px; border: 2px solid var(--teal); border-radius: 50%; color: var(--teal); font-size: 30px; }
.role-icon.team { border-color: var(--ink); color: var(--ink); }
.role-option strong { display: block; font-family: var(--serif); font-size: 21px; }
.role-option small { display: block; margin-top: 12px; color: var(--muted); line-height: 1.7; }
.info-card { position: relative; width: min(520px, 100%); padding: 30px; background: white; box-shadow: var(--shadow); }
.dialog-close { position: absolute; right: 18px; top: 14px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.knowledge-label { color: var(--teal-dark); font-size: 10px; letter-spacing: .12em; }
.info-card h2 { margin: 8px 0 13px; font-family: var(--serif); }
.info-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

@media (max-width: 1120px) {
  .app-header { grid-template-columns: auto 1fr auto; }
  .main-nav { position: fixed; top: 64px; left: 0; right: 0; display: none; height: auto; padding: 10px 20px 18px; border-bottom: 1px solid var(--line); background: white; flex-wrap: wrap; }
  .main-nav.open { display: flex; }
  .nav-item { min-height: 36px; }
  .mobile-menu { display: inline-block; }
  .global-freshness { display: none; }
  .opportunity-table th:nth-child(2), .opportunity-table td:nth-child(2) { display: none; }
  .rec-group-row td, .rec-group-empty td { display: table-cell !important; }
}

@media (max-width: 820px) {
  .overview-chart-grid { grid-template-columns: 1fr; }
  .overview-chart-wide { grid-column: auto; }
  .option-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-card-heading { align-items: flex-start; flex-direction: column; }
  .chart-controls { width: 100%; flex-wrap: wrap; }
  .app-header { height: 58px; padding: 0 16px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 28px; height: 28px; }
  .role-switch { display: none; }
  .main-nav { top: 58px; }
  .page-shell, .opportunity-shell { width: calc(100% - 30px); padding-top: 28px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 32px; }
  .opportunity-table thead { display: none; }
  .opportunity-table, .opportunity-table tbody, .opportunity-table tr, .opportunity-table td { display: block; width: 100%; }
  .opportunity-table tr { position: relative; padding: 14px 92px 14px 0; border-bottom: 1px solid var(--line); }
  .opportunity-table td { display: block !important; padding: 3px 0; border: 0; }
  .opportunity-table td:nth-child(2), .opportunity-table td:nth-child(5) { display: none !important; }
  .opportunity-table td:last-child { position: absolute; right: 0; top: 18px; width: auto !important; transform: none; }
  .rec-group-row, .rec-group-empty { padding: 0 !important; }
  .rec-group-row td, .rec-group-empty td { display: block !important; position: static !important; width: 100% !important; padding: 0; }
  .rec-group-empty td { padding: 14px; }
  .rec-group-row div { grid-template-columns: 96px 1fr auto 18px; }
  .structure-cell { min-width: 0; }
  .quote-market-cell, .research-conclusion { min-width: 0; }
  .source-bar { display: grid; }
  .detail-layout { display: block; }
  .detail-sidebar { position: sticky; top: 58px; z-index: 30; display: flex; height: auto; padding: 0; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-tab { width: auto; flex: 0 0 auto; min-height: 42px; padding: 0 14px; border-left: 0; border-bottom: 2px solid transparent; }
  .detail-tab.active { border-bottom-color: var(--teal); }
  .detail-main { padding: 22px 16px 60px; }
  .identity-row { flex-wrap: wrap; }
  .detail-meta { width: 100%; margin: 6px 0 0; }
  .split-section, .scenario-grid, .risk-list { grid-template-columns: 1fr; }
  .scenario-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .scenario-item:last-child { border-bottom: 0; }
  .evidence-grid, .client-scenarios, .client-evidence { grid-template-columns: 1fr; }
  .evidence-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-card:last-child { border-bottom: 0; }
  .methodology-rail { grid-template-columns: repeat(3, 1fr); }
  .method-step:nth-child(3n) { border-right: 0; }
  .method-step:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .materials-toolbar { grid-template-columns: 1fr auto; }
  .materials-toolbar > span { grid-column: 1 / -1; justify-self: start; }
  .client-hero, .client-section { padding-left: 22px; padding-right: 22px; }
  .client-hero::after { display: none; }
  .client-metrics { grid-template-columns: repeat(2, 1fr); padding: 0 22px; }
  .client-metric:nth-child(3) { border-left: 1px solid rgba(169,185,206,.28); }
  .client-terms { margin-left: 22px; margin-right: 22px; }
  .client-deploy-grid { grid-template-columns: 1fr; }
  .client-footer { padding-left: 22px; padding-right: 22px; }
  .metric-band { grid-template-columns: repeat(2, 1fr); }
  .backtest-matrix-toolbar { grid-template-columns: 1fr; align-items: start; }
  .backtest-valuation-filter, .backtest-lookback-group { width: 100%; justify-self: stretch; text-align: left; }
  .backtest-valuation-filter .segmented-control, .backtest-lookback-group .segmented-control { width: max-content; max-width: 100%; overflow-x: auto; }
  .matrix-legend { gap: 7px 12px; }
  .company-snapshot, .fundamental-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-item:nth-child(2) { border-right: 0; }
  .metric-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .tool-grid, .valuation-model-grid { grid-template-columns: 1fr; }
  .control-panel { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .analysis-canvas { padding-left: 0; }
  .backtest-controls { grid-template-columns: 1fr 1fr; }
  .backtest-controls .primary-button { grid-column: 1 / -1; }
  .chart-grid { grid-template-columns: 1fr; }
  .role-options { grid-template-columns: 1fr; }
  .role-option { min-height: 170px; }
}

@media (max-width: 430px) {
  .brand .info-trigger { display: none; }
  .page-heading { gap: 12px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading p { font-size: 12px; }
  .theme-button { padding: 0 12px; }
  .symbol-cell { min-width: 0; }
  .opportunity-table tr { padding-right: 82px; }
  .row-action { min-width: 76px; }
  .field-pair, .backtest-controls { grid-template-columns: 1fr; }
  .metric-band, .model-result-grid { grid-template-columns: 1fr; }
  .company-snapshot, .fundamental-grid { grid-template-columns: 1fr; }
  .option-snapshot { grid-template-columns: 1fr 1fr; }
  .option-snapshot div, .option-snapshot div:nth-child(3n), .option-snapshot div:nth-last-child(-n+3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .option-snapshot div:nth-child(2n) { border-right: 0; }
  .option-snapshot div:nth-last-child(-n+2) { border-bottom: 0; }
  .metric-item, .metric-item:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-item:last-child { border-bottom: 0; }
  .model-result-grid div { border-right: 1px solid var(--line); border-bottom: 0; }
  .model-result-grid div:last-child { border-bottom: 1px solid var(--line); }
  .role-dialog { padding: 24px 18px; }
  .role-dialog h2 { margin-top: 32px; }
  .decision-overall { align-items: flex-start; flex-direction: column; }
  .decision-overall span { text-align: left; }
  .methodology-title { align-items: flex-start; flex-direction: column; }
  .methodology-rail { grid-template-columns: 1fr 1fr; }
  .method-step, .method-step:nth-child(3n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .method-step:nth-child(2n) { border-right: 0; }
  .method-step:nth-last-child(-n+2) { border-bottom: 0; }
  .veto-strip { grid-template-columns: 1fr; }
  .materials-toolbar { grid-template-columns: 1fr; }
  .materials-toolbar > span { grid-column: auto; }
  .client-metrics { grid-template-columns: 1fr; }
  .client-metric, .client-metric:nth-child(3) { border-left: 1px solid rgba(169,185,206,.28); }
  .client-overline::after { display: none; }
}

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

@media (max-width: 980px) {
  .volatility-score-layout { grid-template-columns: 1fr; }
  .volatility-score-panel { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .volatility-heading, .chart-card-heading { align-items: flex-start; flex-direction: column; }
  .volatility-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .volatility-metric, .volatility-metric:nth-child(3n), .volatility-metric:nth-last-child(-n+3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .volatility-metric:nth-child(2n) { border-right: 0; }
  .volatility-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .volatility-flow-grid { grid-template-columns: 1fr; }
  .volatility-controls { justify-content: flex-start; }
  .flow-metrics { grid-template-columns: repeat(2, 1fr); }
  .volatility-skew-canvas { min-height: 220px; overflow-x: auto; }
  .volatility-skew-canvas svg { min-width: 680px; }
}

@media (max-width: 820px) {
  .opportunity-table-wrap { overflow-x: hidden; }
  .opportunity-table { display: table; min-width: 0; }
  .opportunity-table thead { display: table-header-group; }
  .opportunity-table tbody { display: table-row-group; }
  .opportunity-table tr { display: table-row; padding: 0; }
  .opportunity-table td, .opportunity-table th { display: table-cell !important; width: auto !important; }
  .opportunity-header-line, .opportunity-line { grid-template-columns: minmax(145px, 1.4fr) 74px 55px 55px 48px 62px 76px 82px 118px 42px; column-gap: 4px; }
  .opportunity-header-line { padding-left: 8px; padding-right: 8px; font-size: 10px; }
  .opportunity-line { padding-left: 8px; padding-right: 8px; font-size: 10px; }
}
