:root {
  --color-canvas: #f1efe8;
  --color-surface: #fffefa;
  --color-surface-muted: #f7f5ee;
  --color-ink: #17222c;
  --color-muted: #66706f;
  --color-line: #d8d6cd;
  --color-navy: #0d2840;
  --color-accent: #0f766e;
  --color-accent-soft: #e3f1ed;
  --color-warn: #a36108;
  --color-error: #a33c32;
  --color-ok: #147253;
  --radius: .375rem;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  color: var(--color-ink);
  background: var(--color-canvas);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; background: var(--color-canvas); line-height: 1.5; }
button, input, select { font: inherit; }
button, input, select { min-height: 2.5rem; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: .1875rem solid #d98a27; outline-offset: .125rem; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.2; }
h1 { margin-bottom: 0; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
h2 { margin-bottom: 0; font-size: 1.4rem; }
h3 { margin-bottom: 0; font-size: 1rem; }
h4 { margin-bottom: 0; font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: -5rem; left: 1rem; padding: .75rem 1rem; background: var(--color-navy); color: white; }
.skip-link:focus { top: 1rem; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 12rem minmax(0, 1fr); }
.side-rail { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: var(--space-6) var(--space-4); background: var(--color-navy); color: #eaf2f3; }
.brand { display: flex; color: white; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: 1.35rem; text-decoration: none; flex-direction: column; }
.brand span { margin-top: .2rem; color: #79beb8; font-family: inherit; font-size: .58rem; font-weight: 700; letter-spacing: .2em; }
.company-context { display: flex; margin: 3rem 0 2rem; flex-direction: column; }
.company-context span, .company-context small, .run-context dt { color: #9db2bf; font-size: .7rem; }
.company-context strong { margin: .25rem 0; font-size: 1.1rem; }
.side-rail nav { display: grid; gap: .25rem; }
.side-rail nav a { border-left: .15rem solid transparent; color: #c5d2d9; padding: .6rem .75rem; font-size: .82rem; text-decoration: none; }
.side-rail nav a:hover, .side-rail nav a.active { border-color: #72c1b7; background: rgb(255 255 255 / 8%); color: white; }
.run-context { display: grid; margin: auto 0 var(--space-6); gap: .85rem; }
.run-context div { min-width: 0; }
.run-context dt, .run-context dd { margin: 0; }
.run-context dd { overflow: hidden; margin-top: .15rem; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.local-only { margin-bottom: 0; color: #9db2bf; font-size: .68rem; }

.workspace-shell { min-width: 0; }
.command-bar { display: flex; min-height: 5.5rem; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--color-line); padding: 1rem clamp(1rem, 3vw, 2.5rem); background: rgb(255 254 250 / 94%); }
.eyebrow, .section-kicker { margin-bottom: .35rem; color: var(--color-accent); font-size: .65rem; font-weight: 800; letter-spacing: .13em; }
main { padding: 0 clamp(1rem, 3vw, 2.5rem) 2.5rem; }
button { border: 1px solid var(--color-accent); border-radius: var(--radius); padding: .5rem 1rem; background: var(--color-accent); color: white; cursor: pointer; font-weight: 700; }
button:hover { filter: brightness(.94); }
button:disabled { cursor: wait; opacity: .6; }
button.secondary { border-color: var(--color-line); background: var(--color-surface); color: var(--color-ink); }
button.compact { min-height: 2.25rem; padding: .35rem .75rem; font-size: .78rem; }

.run-panel { border-bottom: 1px solid var(--color-line); padding: 1.25rem 0; }
.run-panel[hidden] { display: none; }
.run-panel-heading { position: relative; display: flex; align-items: start; justify-content: space-between; gap: 2rem; padding-right: 5rem; }
.run-panel-heading .dialog-close { position: absolute; top: 0; right: 0; flex: 0 0 auto; }
.run-panel-heading p { max-width: 35rem; margin-bottom: 0; color: var(--color-muted); font-size: .76rem; }
.form-grid { display: grid; margin-top: 1rem; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
label { color: #344148; font-size: .72rem; font-weight: 700; }
input, select { width: 100%; margin-top: .3rem; border: 1px solid var(--color-line); border-radius: var(--radius); padding: .45rem .65rem; background: var(--color-surface); color: var(--color-ink); }
label > span { display: block; margin-top: .25rem; color: var(--color-muted); font-size: .64rem; font-weight: 400; }
.company-search-field { position: relative; z-index: 5; }
.company-suggestions { position: absolute; z-index: 20; top: calc(100% - 1rem); right: 0; left: 0; overflow-y: auto; max-height: 18rem; margin: 0; border: 1px solid var(--color-line); border-radius: var(--radius); padding: .25rem; background: var(--color-surface); box-shadow: 0 .6rem 1.4rem rgb(13 40 64 / 14%); list-style: none; }
.company-suggestions[hidden] { display: none; }
.company-suggestions li { display: grid; min-height: 3rem; align-content: center; border-radius: .25rem; padding: .45rem .55rem; cursor: pointer; gap: .1rem; }
.company-suggestions li + li { border-top: 1px solid var(--color-line); }
.company-suggestions li[aria-selected="true"], .company-suggestions li:hover { background: var(--color-accent-soft); }
.company-suggestions strong { color: var(--color-ink); font-size: .76rem; }
.company-suggestions span { overflow-wrap: anywhere; color: var(--color-muted); font-size: .66rem; font-weight: 400; }
.form-footer { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-top: .8rem; }
.external-collection-toggle { display: inline-flex; max-width: 46rem; align-items: flex-start; gap: .55rem; cursor: pointer; }
.external-collection-toggle input { width: 1rem; min-height: 1rem; margin: .15rem 0 0; accent-color: var(--color-accent); }
.external-collection-toggle span { display: grid; margin: 0; gap: .12rem; }
.external-collection-toggle strong { color: var(--color-ink); font-size: .76rem; }
.external-collection-toggle small { color: var(--color-muted); font-size: .7rem; line-height: 1.45; }
.check-row { display: flex; align-items: center; gap: .5rem; }
.check-row input { width: 1rem; min-height: 1rem; margin: 0; accent-color: var(--color-accent); }
.check-row span { margin: 0; }
.form-actions { display: flex; align-items: end; gap: .5rem; margin-left: auto; }
.restore-field { display: flex; align-items: center; }
.restore-field input { width: min(22rem, 32vw); margin: 0; border-radius: var(--radius) 0 0 var(--radius); }
.restore-field button { min-height: 2.5rem; border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; white-space: nowrap; }

.analysis-results { padding-top: 1.4rem; }
.result-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.status-cluster { display: flex; align-items: center; gap: .65rem; color: var(--color-muted); font-size: .75rem; }
.status-pill { display: inline-flex; min-height: 1.55rem; align-items: center; border: 1px solid var(--color-line); border-radius: 99rem; padding: .15rem .55rem; color: var(--color-muted); font-size: .65rem; font-weight: 800; letter-spacing: .05em; }
.status-pill[data-state="SUPPORTED"], .status-pill[data-state="SUCCESS"], .status-pill[data-state="COMPLETED"], .status-pill[data-state="PUBLISHED"], .status-pill[data-state="VALUE"] { border-color: #78ac96; background: #e6f3ed; color: var(--color-ok); }
.status-pill[data-state="PARTIAL"], .status-pill[data-state="RUNNING"], .status-pill[data-state="QUEUED"], .status-pill[data-state="PENDING"], .status-pill[data-state="SUBMITTING"], .status-pill[data-state="AUDIT_STAGED"] { border-color: #d7ae6e; background: #fff4df; color: var(--color-warn); }
.status-pill[data-state="BLOCKED"], .status-pill[data-state="FAILED"], .status-pill[data-state="HTTP_ERROR"], .status-pill[data-state="NETWORK_ERROR"] { border-color: #dda099; background: #fbe9e6; color: var(--color-error); }
.message { margin: .75rem 0 0; border-left: .2rem solid var(--color-accent); padding: .55rem .75rem; background: var(--color-accent-soft); color: #27413f; font-size: .76rem; }
.message[data-kind="success"] { border-color: var(--color-ok); background: #e6f3ed; color: #185d46; }
.message[data-kind="error"] { border-color: var(--color-error); background: #fbe9e6; color: var(--color-error); }
.result-tabs { display: flex; margin-top: 1.2rem; border-bottom: 1px solid var(--color-line); gap: 1.5rem; }
.result-tabs button { min-height: 2.4rem; border: 0; border-bottom: .16rem solid transparent; border-radius: 0; padding: .45rem 0; background: transparent; color: var(--color-muted); font-size: .78rem; }
.result-tabs button[aria-selected="true"] { border-color: var(--color-accent); color: var(--color-ink); }
.tab-panel { padding-top: 1rem; }
.tab-panel[hidden] { display: none; }
.analysis-login-panel { min-height: min(65vh, 620px); display: grid; place-items: center; text-align: center; }
.analysis-login-content { display: grid; justify-items: center; gap: 1rem; }
.analysis-login-content h2 { margin: 0; color: #285d54; }
.analysis-login-content button { border: 1px solid #aecbc4; border-radius: 8px; background: #eaf3ef; color: #20574d; padding: .7rem 1.4rem; cursor: pointer; }
.analysis-history-panel { min-width: 0; overflow: auto; }
.analysis-history { max-width: 1200px; margin: 0 auto; }

.workflow-rail { display: grid; overflow-x: auto; grid-template-columns: repeat(12, minmax(5.1rem, 1fr)); border-bottom: 1px solid var(--color-line); scrollbar-width: thin; }
.workflow-rail:empty::before { content: "完成分析后显示财报流程"; grid-column: 1 / -1; padding: 1rem; color: var(--color-muted); font-size: .75rem; }
.step-tab { position: relative; min-height: 4.4rem; border: 0; border-right: 1px solid var(--color-line); border-radius: 0; padding: .55rem .5rem .45rem; background: transparent; color: var(--color-muted); text-align: left; }
.step-tab::after { position: absolute; right: .5rem; bottom: .45rem; width: .4rem; height: .4rem; border-radius: 50%; background: #a7aca9; content: ""; }
.step-tab[data-state="SUPPORTED"]::after { background: var(--color-ok); }
.step-tab[data-state="PARTIAL"]::after { background: var(--color-warn); }
.step-tab[data-state="BLOCKED"]::after { background: var(--color-error); }
.step-tab[aria-current="step"] { box-shadow: inset 0 -.18rem var(--color-accent); background: var(--color-surface); color: var(--color-ink); }
.step-tab b { display: block; color: var(--color-accent); font-size: .8rem; }
.step-tab span { display: -webkit-box; overflow: hidden; margin-top: .25rem; font-size: .66rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.analysis-grid { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) 19rem; border: 1px solid var(--color-line); border-top: 0; background: var(--color-surface); }
.step-canvas { min-width: 0; border-right: 1px solid var(--color-line); }
.step-heading { display: flex; min-height: 5.2rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-line); padding: 1rem 1.2rem; }
.step-heading > div { display: flex; align-items: center; gap: .9rem; }
.step-heading p { margin-bottom: .15rem; color: var(--color-muted); font-size: .65rem; }
.step-heading h3 { font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: 1.25rem; font-weight: 600; }
.selected-step-number { color: var(--color-accent); font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 2rem; }
.visualization { min-height: 0; overflow-x: auto; border-bottom: 1px solid var(--color-line); padding: 1rem 1.2rem; }
.visual-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.visual-title strong { font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: 1rem; }
.visual-title span { color: var(--color-muted); font-size: .65rem; }
.chart-svg { display: block; width: 100%; height: auto; max-height: 21rem; overflow: hidden; }
.chart-svg text { fill: var(--color-muted); font-size: 12px; }
.chart-grid { stroke: #e4e1d8; stroke-width: 1; }
.chart-axis { stroke: #b8b7af; stroke-width: 1; }
.chart-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-dot { stroke: white; stroke-width: 2; }
.margin-dot { fill: var(--color-warn); stroke: white; stroke-width: 1.2; }
.legend { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; color: var(--color-muted); font-size: .68rem; }
.legend i { display: inline-block; width: .65rem; height: .16rem; margin-right: .25rem; vertical-align: middle; }
.legend .dot-swatch { width: .48rem; height: .48rem; border-radius: 50%; background: var(--color-warn); }
.visual-note { margin: .45rem 0 0; color: var(--color-muted); font-size: .72rem; }
.factor-grid, .matrix-grid { display: grid; min-height: 16rem; align-items: center; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1rem; }
.factor-card { position: relative; border-top: .22rem solid var(--color-accent); padding: 1rem; background: var(--color-surface-muted); text-align: center; }
.factor-card strong { display: block; margin-top: .4rem; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 1.6rem; }
.factor-card:not(:last-child)::after { position: absolute; top: 50%; right: -.7rem; content: "×"; color: var(--color-muted); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .65rem; align-content: start; }
.metric-card { min-height: 6.5rem; border: 1px solid var(--color-line); border-top: .18rem solid var(--color-accent); padding: .85rem; background: var(--color-surface-muted); }
.metric-card span, .metric-card small { display: block; color: var(--color-muted); }
.metric-card strong { display: block; margin: .35rem 0; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 1.35rem; color: var(--color-ink); }
.metric-card small { overflow-wrap: anywhere; font-size: .62rem; }
.evidence-map { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; counter-reset: evidence-row; }
.evidence-map li { display: grid; grid-template-columns: 4.2rem 1fr; gap: .75rem; align-items: start; border-left: .14rem solid var(--color-accent); padding: .65rem .75rem; background: var(--color-surface-muted); }
.evidence-map p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.evidence-source { color: var(--color-accent); font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.matrix-group { align-self: stretch; border: 1px solid var(--color-line); padding: .8rem; }
.matrix-cells { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.matrix-cells span { border-radius: .2rem; padding: .25rem .4rem; background: #eaebe7; font-size: .65rem; }
.matrix-cells span[data-state="SUPPORTED"] { background: #dcefe5; color: var(--color-ok); }
.matrix-cells span[data-state="PARTIAL"] { background: #fff0d4; color: var(--color-warn); }
.matrix-cells span[data-state="BLOCKED"] { background: #f9dfdc; color: var(--color-error); }
.step-analysis { padding: 1rem 1.2rem; }
.subsection-heading, .panel-intro { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.subsection-heading { border-bottom: 1px solid var(--color-line); padding-bottom: .5rem; }
.subsection-heading span { color: var(--color-muted); font-size: .65rem; }
.analysis-list { display: grid; margin: .75rem 0 0; padding: 0; gap: .45rem; list-style: none; }
.analysis-list li { border-left: .14rem solid #a8c6c1; padding-left: .65rem; color: #344148; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .7rem; overflow-wrap: anywhere; }
.audit-column { background: var(--color-surface-muted); }
.audit-column > section { border-bottom: 1px solid var(--color-line); padding: 1rem; }
.audit-title { display: flex; justify-content: space-between; gap: .5rem; }
.audit-title span { color: var(--color-muted); font-size: .62rem; }
.audit-counts { display: grid; margin-top: .8rem; grid-template-columns: 1fr 1fr; border: 1px solid var(--color-line); background: var(--color-surface); }
.audit-counts div { padding: .55rem; text-align: center; }
.audit-counts div + div { border-left: 1px solid var(--color-line); }
.audit-counts strong { display: block; color: var(--color-accent); font-size: 1.2rem; }
.audit-counts span { color: var(--color-muted); font-size: .64rem; }
.audit-list { display: grid; margin-top: .7rem; gap: .5rem; }
.audit-list details { border-top: 1px solid var(--color-line); padding-top: .45rem; }
.audit-list summary, .step-analysis summary { color: var(--color-accent); cursor: pointer; font-size: .68rem; font-weight: 700; }
.audit-list details .audit-item { margin-top: .5rem; }
.audit-list p { margin-bottom: 0; color: #4e5a5c; font-size: .7rem; }
.audit-item { border-left: .14rem solid var(--color-line); padding-left: .55rem; }
.audit-item strong, .audit-item span { display: block; }
.audit-item strong { font-size: .7rem; }
.audit-item span { margin-top: .15rem; color: var(--color-muted); font-size: .63rem; }
.source-policy p { margin: .45rem 0 0; color: var(--color-muted); font-size: .68rem; }

.empty-state { display: grid; min-height: 8rem; place-content: center; padding: 1rem; color: var(--color-muted); text-align: center; }
.empty-state p { max-width: 35rem; margin: .35rem 0 0; font-size: .72rem; }
.panel-intro { border-bottom: 1px solid var(--color-line); padding: .7rem 0 1rem; }
.panel-intro p { margin: .35rem 0 0; color: var(--color-muted); font-size: .74rem; }
.source-badge { border: 1px solid #d1b477; border-radius: 99rem; padding: .25rem .65rem; color: var(--color-warn); font-size: .66rem; }
.observation-grid { display: grid; margin: 1rem 0; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .7rem; }
.observation-card { border: 1px solid var(--color-line); border-radius: .4rem; background: var(--color-surface); padding: .8rem; }
.observation-card header { display: flex; align-items: start; justify-content: space-between; gap: .5rem; }
.observation-card header h3 { margin: 0; font-size: .82rem; line-height: 1.4; }
.observation-card .status-pill { max-width: 10rem; text-align: center; white-space: normal; }
.observation-card dl { display: grid; grid-template-columns: auto 1fr; margin: .7rem 0 0; gap: .25rem .65rem; font-size: .68rem; }
.observation-card dt { color: var(--color-muted); }
.observation-card dd { margin: 0; overflow-wrap: anywhere; }
.external-tools {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(10rem, .45fr) auto;
  align-items: end;
  gap: .75rem;
  margin-top: 1rem;
}
.external-tools label { color: #34413b; font-size: .875rem; }
.external-tools p { margin: 0 0 .55rem; color: var(--color-muted); font-size: .875rem; }
.data-table-wrap { overflow-x: auto; margin-top: .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .7rem; }
th, td { border-bottom: 1px solid var(--color-line); padding: .55rem; text-align: left; vertical-align: top; }
th { color: var(--color-muted); font-size: .62rem; letter-spacing: .04em; }
pre { max-width: 46rem; overflow: auto; margin: 0; font-size: .65rem; white-space: pre-wrap; }
.external-items-table { min-width: 68rem; table-layout: fixed; }
.external-items-table thead { position: sticky; top: 0; z-index: 1; background: var(--color-surface); }
.external-items-table th:nth-child(1) { width: 8rem; }
.external-items-table th:nth-child(2) { width: 7rem; }
.external-items-table th:nth-child(3) { width: 7rem; }
.external-items-table th:nth-child(4) { width: 15rem; }
.external-items-table th:nth-child(6) { width: 9rem; }
.external-items-table td { line-height: 1.55; vertical-align: top; }
.external-source-name,
.external-source-kind { display: block; }
.external-source-name { color: var(--color-ink); font-size: .75rem; }
.external-source-kind { margin-top: .15rem; color: var(--color-muted); font-size: .66rem; }
.external-type-badge { display: inline-block; border: 1px solid #b9d2ce; border-radius: 99rem; padding: .16rem .45rem; background: #f2f8f6; color: var(--color-accent); font-weight: 700; }
.external-item-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.external-item-title { color: var(--color-ink); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
a.external-item-title { text-decoration-color: #8db8b1; text-underline-offset: .16rem; }
.external-item-summary { color: #33443f; overflow-wrap: anywhere; }
.external-source-links { margin-top: .5rem; font-size: .75rem; }
.external-source-links summary { cursor: pointer; color: var(--color-ink); }
.external-source-links ul { max-height: 16rem; overflow: auto; padding-left: 1rem; }
.external-source-links li + li { margin-top: .5rem; }
.external-evidence-state { color: var(--color-muted); }
.evidence-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1rem; }
.evidence-grid > section { border: 1px solid var(--color-line); background: var(--color-surface); padding: 1rem; }
.evidence-list, .export-list { margin: .75rem 0 0; padding-left: 1.2rem; }
.evidence-list li, .export-list li { margin-bottom: .55rem; color: #425052; font-size: .75rem; }
.evidence-index-card {
  display: grid;
  gap: .25rem;
  padding: .65rem .75rem;
  border: 1px solid #d7d3c8;
  border-radius: .5rem;
  background: #fffefa;
}
.evidence-index-date,
.evidence-index-source { color: #68736f; font-size: .72rem; }
.evidence-index-title { color: #0b5f58; font-size: .875rem; }
.evidence-index-summary { margin: 0; color: #344240; font-size: .78rem; line-height: 1.55; }
.export-list a { color: var(--color-accent); }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--color-line); padding: 1rem clamp(1rem, 3vw, 2.5rem); color: var(--color-muted); font-size: .65rem; }

@media (max-width: 64rem) {
  .app-shell { grid-template-columns: 1fr; }
  .side-rail { position: static; display: grid; height: auto; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: .75rem 1rem; }
  .company-context { margin: 0; }
  .side-rail nav, .run-context, .local-only { display: none; }
  .analysis-grid { grid-template-columns: 1fr; }
  .step-canvas { border-right: 0; }
  .audit-column { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--color-line); }
  .audit-column > section { border-right: 1px solid var(--color-line); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 48rem) {
  .command-bar { align-items: start; }
  .form-grid, .evidence-grid { grid-template-columns: 1fr; }
  .form-footer, .run-panel-heading, .result-header { align-items: stretch; flex-direction: column; }
  .run-panel-heading { padding: 3.25rem 0 0; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .restore-field { width: 100%; }
  .restore-field input { width: 100%; min-width: 0; }
  .audit-column { grid-template-columns: 1fr; }
  .audit-column > section { border-right: 0; }
  .visualization { min-height: 17rem; padding: .75rem; }
  .visualization .chart-svg { width: 40rem; min-width: 40rem; }
  .step-heading { padding: .8rem; }
  .result-tabs { overflow-x: auto; }
  .result-tabs button { white-space: nowrap; }
}

@media (max-width: 30rem) {
  .brand span { display: none; }
  .side-rail { grid-template-columns: auto 1fr; }
  .command-bar { gap: .5rem; padding: .75rem; }
  main { padding-inline: .75rem; }
  .command-bar h1 { font-size: 1.35rem; }
  .command-bar button { max-width: 9rem; }
  .step-heading h3 { font-size: 1rem; }
  .workflow-rail { grid-template-columns: repeat(12, 6rem); }
  footer { flex-direction: column; }
}

/* Research notebook workspace — concept-b is the desktop source of truth. */
.research-app {
  /* Keep off-screen accessible content inside the workspace scroll boundary. */
  position: relative;
  --workbench-bottom-safe-space: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #f8f6ef;
}
.research-topbar {
  position: relative;
  z-index: 8;
  display: grid;
  height: 3.75rem;
  min-height: 3.75rem;
  grid-template-columns: 15.5rem minmax(30rem, 1fr) auto;
  gap: .75rem;
  border-bottom: 1px solid #cbc8bd;
  padding: 0 1.75rem;
  background: rgb(255 254 250 / 98%);
}
.product-lockup { display: flex; align-items: center; }
body[data-runtime="account"] .product-lockup {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .15rem;
}
.product-lockup h1 {
  color: #18201f;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: .015em;
}
.top-context,
.top-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.context-select {
  display: flex;
  min-width: 11.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: space-between;
  border-color: #d6d1c5;
  padding: .35rem .8rem;
  background: #fffefa;
  color: #262d2b;
  font-size: .86rem;
  font-weight: 500;
}
.research-topbar .status-cluster {
  min-height: 2.5rem;
  border: 1px solid #ddd8cc;
  border-radius: .25rem;
  padding: .25rem .7rem;
  background: #fffefa;
}
.research-topbar .status-pill {
  border: 0;
  background: transparent;
}
.top-actions {
  justify-content: flex-end;
}
.workbench-tabs {
  display: flex;
  align-items: center;
}
.top-actions button {
  min-height: 2.25rem;
  border: 0;
  border-left: 1px solid #dedbd2;
  border-radius: 0;
  padding: .3rem .75rem;
  background: transparent;
  color: #28302f;
  font-size: .75rem;
  font-weight: 600;
}
.top-actions button[aria-selected="true"] { color: var(--color-accent); }
.research-app > main,
.research-app main {
  height: auto;
  min-height: 0;
  padding: 0;
}
.run-drawer {
  position: fixed;
  z-index: 20;
  top: 3.75rem;
  bottom: auto;
  margin: 0 auto;
  right: 1rem;
  left: 1rem;
  max-height: calc(100vh - 5rem);
  overflow: auto;
  border: 1px solid #c8c4b9;
  padding: 1rem 1.2rem;
  background: #fffefa;
  box-shadow: 0 .75rem 2rem rgb(37 42 40 / 15%);
}
.research-results {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
}
/* The first row is reserved for workflow messages; the report fills the second. */
#tab-steps { grid-row: 2; }
.compact-message {
  position: absolute;
  z-index: 7;
  top: 3.85rem;
  left: 50%;
  max-width: 36rem;
  min-height: 0;
  margin: 0;
  transform: translateX(-50%);
  border: 1px solid #b9d7d0;
  border-radius: 99rem;
  padding: .28rem .8rem;
  background: rgb(240 248 245 / 95%);
  font-size: .65rem;
  box-shadow: 0 .2rem .6rem rgb(31 50 45 / 8%);
}
.research-workbench {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: 18% minmax(0, 1fr) 22%;
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "outline canvas audit";
  padding: 0;
  background: #fffefa;
}
.workflow-outline {
  grid-area: outline;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #cfcbc0;
  background: #fbfaf5;
  padding: .65rem .75rem var(--workbench-bottom-safe-space);
}
.outline-title,
.audit-column-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.outline-title {
  min-height: 2.5rem;
  border-bottom: 1px solid #ccc8bd;
  padding: 0 .15rem;
}
.outline-title h2,
.audit-column-title h2 {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 1rem;
  font-weight: 600;
}
.workflow-outline .workflow-rail {
  display: block;
  overflow: visible;
  border: 0;
}
.phase-label {
  margin: .55rem 0 .15rem;
  border-bottom: 1px solid #d7d3c9;
  padding: .15rem .1rem .35rem;
  color: #2c3431;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: .72rem;
  font-weight: 600;
}
.workflow-outline .step-tab {
  display: grid;
  width: 100%;
  min-height: 2.35rem;
  grid-template-columns: .75rem 1.45rem minmax(0, 1fr);
  align-items: center;
  border: 1px solid transparent;
  border-bottom-color: #e0ddd4;
  padding: .28rem .3rem;
  color: #444d4a;
}
.workflow-outline .step-tab::before {
  width: .5rem;
  height: .5rem;
  border: 1px solid #929994;
  border-radius: 50%;
  content: "";
}
.workflow-outline .step-tab::after {
  display: none;
  content: none;
}
.workflow-outline .step-tab[data-state="SUPPORTED"]::before { border-color: var(--color-ok); background: var(--color-ok); }
.workflow-outline .step-tab[data-state="PARTIAL"]::before { border-color: var(--color-warn); background: var(--color-warn); }
.workflow-outline .step-tab[data-state="BLOCKED"]::before { border-color: var(--color-error); background: var(--color-error); }
.workflow-outline .step-tab[aria-current="step"] {
  border-color: #24756d;
  box-shadow: none;
  background: #f3f8f5;
}
.workflow-outline .step-tab b {
  color: #59615e;
  font-size: .68rem;
  font-weight: 500;
}
.workflow-outline .step-tab span {
  display: block;
  overflow: hidden;
  margin: 0;
  color: #3a423f;
  font-size: .68rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}
.state-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  border-top: 1px solid #cbc8bd;
  margin-top: .55rem;
  padding: .55rem .15rem 0;
  color: #69706d;
  font-size: .58rem;
}
.state-legend span { display: flex; align-items: center; gap: .25rem; }
.state-legend i { width: .45rem; height: .45rem; border-radius: 50%; background: #a9aba8; }
.state-legend i[data-state="SUPPORTED"] { background: var(--color-ok); }
.state-legend i[data-state="PARTIAL"] { background: var(--color-warn); }
.state-legend i[data-state="BLOCKED"] { background: var(--color-error); }
.research-workbench .step-canvas {
  grid-area: canvas;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #8aa7a0 #f1f0e9;
  border-right: 1px solid #cfcbc0;
  padding-bottom: var(--workbench-bottom-safe-space);
  background: #fffefa;
}
.canvas-overflow-affordance {
  display: flex;
  width: max-content;
  max-width: calc(100% - 2rem);
  align-items: center;
  gap: .55rem;
  margin: 0 0 0 auto;
  border: 1px solid #9bbcb4;
  border-radius: 999px;
  padding: .35rem .65rem;
  background: rgb(245 250 247 / 96%);
  color: #155e56;
  font-size: .75rem;
  transition: opacity .16s ease, transform .16s ease;
}
.canvas-overflow-affordance[data-visible="false"] { display: none; }
.canvas-overflow-affordance progress { width: 4.5rem; height: .3rem; accent-color: #0f766e; }
.research-workbench .step-canvas::-webkit-scrollbar,
.audit-scroll::-webkit-scrollbar {
  width: .48rem;
  height: .48rem;
}
.research-workbench .step-canvas::-webkit-scrollbar-track,
.audit-scroll::-webkit-scrollbar-track { background: #f1f0e9; }
.research-workbench .step-canvas::-webkit-scrollbar-thumb,
.audit-scroll::-webkit-scrollbar-thumb {
  border-radius: .3rem;
  background: #8aa7a0;
}
.research-workbench .step-heading {
  min-height: 5rem;
  padding: .65rem .85rem;
}
.research-workbench .step-heading h2 {
  color: #155e56;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 1.25rem;
  font-weight: 600;
}
.research-workbench .step-heading p {
  margin: .35rem 0 0;
  font-size: .66rem;
}
.research-workbench .selected-step-number { font-size: 1.55rem; }
.research-workbench .visualization {
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  padding: .75rem .85rem;
}
.research-workbench .chart-svg { max-height: 18.5rem; }
.research-workbench .step-analysis { padding: .65rem .85rem .85rem; }
.research-workbench .analysis-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem .65rem;
}
.research-workbench .analysis-list li {
  font-family: inherit;
  font-size: .65rem;
}
.research-workbench .audit-column {
  grid-area: audit;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fbfaf5;
}
.audit-column-title {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 3rem;
  border-bottom: 1px solid #cfcbc0;
  padding: .6rem .8rem;
  background: #fbfaf5;
}
.audit-column-title svg { width: 1.05rem; height: 1.05rem; color: #52645e; }
.research-workbench .audit-column > section { padding: .62rem .75rem; }
.audit-scroll { display: grid; min-height: 0; flex: 1 1 auto; align-content: start; gap: .55rem; overflow-y: auto; overflow-x: hidden; padding: .65rem .65rem var(--workbench-bottom-safe-space); scrollbar-gutter: stable; overscroll-behavior: contain; }
.research-workbench .audit-column h3 { font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: .78rem; }
.research-workbench .audit-list { margin-top: .4rem; gap: .35rem; }
.research-workbench .audit-list p,
.research-workbench .audit-item strong { font-size: .75rem; }
.research-workbench .audit-item span { font-size: .6875rem; }
.research-workbench .audit-counts { margin-top: .45rem; }
.open-source {
  position: static;
  flex: 0 0 auto;
  width: calc(100% - 1.5rem);
  min-height: 2.4rem;
  margin: .7rem .75rem;
  background: #0b6d5d;
  font-size: .76rem;
}
.research-workbench .audit-column {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.source-policy { display: none; }

.analysis-judgment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.analysis-judgment-panel {
  min-width: 0;
  border: 1px solid #cbd8d3;
  border-radius: 8px;
  background: #fbfcf8;
}
.analysis-panel-title {
  margin: 0;
  border-bottom: 1px solid #dce4e0;
  padding: .65rem .8rem;
  color: #155e56;
  background: #f3f7f4;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: .9rem;
}
.analysis-evidence-digest { min-width: 0; margin: 0 .8rem; padding: .75rem 0; border-bottom: 1px solid #e2e7e3; }
.analysis-evidence-digest:last-child { border-bottom: 0; }
.analysis-evidence-digest p,
.analysis-ai-section { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: break-word; }
.analysis-evidence-digest p { margin: .35rem 0; line-height: 1.65; }
.analysis-ai-section { padding: .7rem .8rem; border-bottom: 1px solid #e5e8e3; }
.analysis-ai-section:last-child { border-bottom: 0; }
.analysis-ai-section p { margin: .35rem 0 0; line-height: 1.7; }
.analysis-ai-section ul { margin: .35rem 0 0; padding-left: 1.25rem; }
.analysis-section-title { margin: 0; color: #155e56; font-size: .82rem; }
.analysis-ai-brief,
.analysis-panel-empty {
  margin: 0;
  padding: .8rem;
  font-size: .78rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  word-break: normal;
}
.analysis-panel-empty { color: #6c7672; }
.narrative-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.narrative-block { min-width: 0; overflow: visible; border: 1px solid #cbd8d3; border-radius: 8px; background: #fbfcf8; }
.narrative-block-header { border-bottom: 1px solid #dce4e0; padding: .55rem .7rem; background: #f3f7f4; }
.narrative-block-body { overflow: visible; padding: .6rem .7rem; overflow-wrap: break-word; }
.narrative-block h4 { color: #155e56; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; }
.narrative-block blockquote { margin: .5rem 0; border-left: .15rem solid #c8d9d3; padding-left: .55rem; color: #485651; font-size: .72rem; }
.narrative-block blockquote p { margin-bottom: .2rem; }
.narrative-block cite { color: #68716d; font-size: .62rem; font-style: normal; }
.narrative-block p { margin-bottom: .35rem; font-size: .72rem; }
.narrative-interpretation { color: #50615a; }
.narrative-conclusion { color: #174f48; font-weight: 700; }
.narrative-data { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .5rem; margin: .45rem 0; font-size: .67rem; }
.narrative-data dt { color: #68716d; }
.narrative-data dd { margin: 0; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }

.presentation-block { min-width: 0; border: 1px solid #d8d6cd; padding: .45rem; background: #fffefa; }
.presentation-block.presentation-flow,
.presentation-block.presentation-matrix,
.presentation-block.presentation-waterfall { display: block; width: auto; }
.presentation-title { margin-bottom: .55rem; color: #164f48; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: .9rem; }
.presentation-flow { display: flex; flex-wrap: wrap; gap: .45rem; }
.presentation-flow article { display: grid; flex: 1 1 calc(50% - .45rem); min-width: 18rem; grid-template-columns: minmax(0, 1fr) 3.3rem minmax(0, 1fr); align-items: stretch; gap: .3rem; }
.flow-node { display: grid; align-content: center; min-height: 4.2rem; border: 1px solid #c7d8d1; border-left: .2rem solid #14725f; padding: .45rem; background: #fbfcf8; }
.flow-node strong { font-size: .69rem; }
.flow-node span { margin-top: .2rem; color: #65706c; font-size: .6rem; line-height: 1.35; }
.flow-arrow { display: grid; align-content: center; color: #1b7668; font-size: .58rem; text-align: center; }
.flow-arrow::after { display: block; color: #1b7668; content: "→"; font-size: 1.2rem; }
.presentation-series { display: block; width: 100%; min-width: 0; height: auto; }
.presentation-dot_chart .presentation-series { height: auto; }
#step-visualization.presentation-multi .presentation-series_chart,
#step-visualization.presentation-multi .presentation-dot_chart {
  display: inline-block;
  width: calc(33.333% - .35rem);
  vertical-align: top;
}
#step-visualization.presentation-multi .presentation-series {
  min-width: 0;
  height: 7.2rem;
}
.presentation-line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.presentation-dot { stroke: #fffefa; stroke-width: 2; }
.chart-value-label { font-size: 12px; font-weight: 700; }
.presentation-stacked-bars { display: grid; gap: .35rem; }
.presentation-stacked-bars article { display: grid; grid-template-columns: 3.5rem minmax(14rem, 1fr) 4.5rem; align-items: center; gap: .45rem; }
.presentation-stacked-bars strong { font-size: .68rem; text-align: right; }
.presentation-stacked-bars em { color: #155e56; font-size: .68rem; font-style: normal; font-weight: 700; }
.stacked-bar { display: flex; min-height: 1.5rem; overflow: hidden; background: #eef0eb; }
.stacked-bar span { display: grid; min-width: 0; align-content: center; overflow: hidden; padding: 0 .25rem; color: white; font-size: .58rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.stacked-bar span[data-color="0"] { background: #075f52; }
.stacked-bar span[data-color="1"] { background: #278777; }
.stacked-bar span[data-color="2"] { background: #75aa9c; }
.stacked-bar span[data-color="3"] { background: #aabbb4; }
.stacked-bar-legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-bottom: .55rem; }
.stacked-bar-legend span { display: inline-flex; align-items: center; gap: .3rem; color: #4e5f59; font-size: .75rem; }
.stacked-bar-legend i { width: .6rem; height: .6rem; flex: 0 0 auto; border-radius: 2px; }
.segment-overview-note { flex-basis: 100%; color: #6b746f; font-size: .6875rem; font-style: normal; }
.presentation-waterfall {
  /* 1.375rem leaves at least 4px between two .875rem/1.2 line-height tracks. */
  --waterfall-label-safe-gap: 4px;
  --waterfall-label-bar-gap: max(var(--waterfall-label-safe-gap), .375rem);
  --waterfall-label-track-step: 1.375rem;
  --waterfall-min-item-width: 88px;
  position: relative;
  display: flex;
  height: 13rem;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid #9ba5a0;
  padding: 1.1rem .2rem 3.6rem;
}
.presentation-waterfall article { position: relative; display: block; min-width: 3.7rem; flex: 1; text-align: center; }
.presentation-waterfall i { position: absolute; right: 18%; left: 18%; display: block; min-height: 2px; background: #0f766e; }
.presentation-waterfall i[data-kind="DECREASE"] { background: #a33c32; }
.presentation-waterfall i[data-kind="SUBTOTAL"], .presentation-waterfall i[data-kind="TOTAL"] { background: #407b72; }
.presentation-waterfall .waterfall-value-label {
  --waterfall-label-shift-x: -50%;
  position: absolute;
  z-index: 3;
  bottom: var(--waterfall-label-anchor);
  left: 50%;
  max-width: max-content;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
.waterfall-value-label[data-align="start"] { --waterfall-label-shift-x: 0%; left: 18%; }
.waterfall-value-label[data-align="end"] { --waterfall-label-shift-x: -100%; left: 82%; }
.waterfall-value-label[data-placement="above"] {
  transform: translate(var(--waterfall-label-shift-x), calc(0px - var(--waterfall-label-bar-gap) - var(--label-track-offset, 0rem)));
}
.waterfall-value-label[data-placement="below"] {
  transform: translate(var(--waterfall-label-shift-x), calc(100% + var(--waterfall-label-bar-gap) + var(--label-track-offset, 0rem)));
}
.waterfall-value-label[data-placement="inside"] {
  transform: translate(var(--waterfall-label-shift-x), 50%);
  color: #fffefa;
}
.waterfall-value-label[data-track="1"] { --label-track-offset: var(--waterfall-label-track-step); }
.presentation-waterfall span { position: absolute; right: 0; bottom: -1.7rem; left: 0; font-size: .7rem; line-height: 1.3; }
.presentation-waterfall small { position: absolute; right: 0; bottom: -2.8rem; left: 0; color: var(--color-muted); font-size: .6875rem; }
.waterfall-connector { position: absolute; z-index: 2; left: 82%; width: 36%; border-top: 1px dashed #74837d; }
.presentation-kpis { display: grid; grid-template-columns: repeat(var(--kpi-count, 1), minmax(8rem, 1fr)); gap: .5rem; }
.presentation-kpis article { display: grid; min-height: 4rem; align-content: center; border: 1px solid #cfd5d1; border-radius: 8px; padding: .55rem .65rem; background: #fbfaf5; }
.presentation-kpis span, .presentation-kpis small { color: #6b746f; font-size: .75rem; }
.presentation-kpis strong { color: #0d5d52; font-family: inherit; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.presentation-table { width: 100%; border-collapse: collapse; font-size: .64rem; }
.presentation-table th, .presentation-table td { border: 1px solid #d9d5ca; padding: .32rem .4rem; text-align: right; }
.presentation-table th:first-child, .presentation-table td:first-child { text-align: left; }
.presentation-table thead { background: #f2f0e9; }
.presentation-formula { display: flex; align-items: stretch; gap: .35rem; overflow-x: auto; padding-bottom: .2rem; }
.presentation-formula article { display: grid; min-width: 7.5rem; align-content: center; border: 1px solid #d1d4cc; padding: .4rem .55rem; text-align: center; }
.presentation-formula article small { color: var(--color-muted); font-size: .6875rem; }
.presentation-formula span { color: #68716d; font-size: .58rem; }
.presentation-formula strong { color: #174f48; font-size: .78rem; }
.presentation-formula > b { display: grid; align-content: center; color: #315c54; font-size: 1.1rem; }
.presentation-matrix { display: grid; width: 100%; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .45rem; justify-content: stretch; }
.presentation-matrix article { display: grid; gap: .2rem; border: 1px solid #d6d6cf; padding: .45rem; background: #fbfaf5; font-size: .65rem; }
.presentation-evidence-chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .45rem; }
.presentation-evidence-chain article { position: relative; min-height: 6rem; border: 1px solid #d8c9aa; border-top: .2rem solid #d4932e; padding: .4rem; background: #fbfaf5; }
.presentation-evidence-chain article + article::before { position: absolute; top: 45%; left: -.43rem; color: #a9813f; content: "→"; }
.presentation-evidence-chain span, .presentation-evidence-chain small { display: block; color: #717873; font-size: .56rem; }
.presentation-evidence-chain strong { display: block; margin: .25rem 0; color: #33443f; font-size: .68rem; }
.presentation-evidence-chain p, .presentation-evidence-chain blockquote { margin: .25rem 0; color: #5b6661; font-size: .58rem; line-height: 1.45; }
.presentation-evidence-chain blockquote { border-left: .12rem solid #decf9c; padding-left: .35rem; }
.presentation-evidence-chain em { color: #a06a13; font-size: .58rem; font-style: normal; font-weight: 700; }

.numeric-cell,
[data-align="RIGHT"] { text-align: right; font-variant-numeric: tabular-nums; }
[data-align="CENTER"] { text-align: center; }
[data-emphasis="POSITIVE"] { color: var(--color-ok); }
[data-emphasis="NEGATIVE"] { color: var(--color-error); }
[data-emphasis="WARNING"] { color: var(--color-warn); }
.responsibility-lanes { display: grid; gap: .5rem; }
.responsibility-lanes article { display: grid; width: 100%; align-items: stretch; gap: .2rem; }
.responsibility-node { display: grid; min-width: 0; align-content: center; border: 1px solid #bfd3cc; padding: .55rem; background: #fbfcf8; }
.responsibility-node { font-size: .75rem; }
.lane-connector { display: grid; place-items: center; color: var(--color-accent); font-size: 1.15rem; }
.combo-chart td,
.combo-chart th,
.rich-data-table td,
.rich-data-table th { min-width: 4.5rem; font-size: .75rem; }
.rich-data-table [data-cell-type="STATUS"] { min-width: 5.75rem; white-space: nowrap; }
.combo-chart-svg { width: 100%; min-width: 0; height: auto; }
.combo-bar-primary { fill: #1768ac; }
.combo-bar-secondary { fill: #0f766e; }
.combo-difference-line { fill: none; stroke: #d67b08; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.combo-bar-label,
.combo-difference-label { font-size: 12px; font-weight: 700; }
.combo-difference-label { fill: #9a5700 !important; paint-order: stroke; stroke: #fffefa; stroke-width: 3px; stroke-linejoin: round; }
.combo-legend { justify-content: center; margin: .15rem 0 .4rem; }
.combo-legend span { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; }
.combo-legend-swatch { width: .8rem; height: .35rem; border-radius: 2px; }
.combo-axis-left,
.combo-axis-right { stroke: #687873; stroke-width: 1; vector-effect: non-scaling-stroke; }
.combo-axis-label,
.combo-axis-title { fill: #53615d; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 11px; }
.combo-axis-title { font-weight: 700; }
.dupont-tree { position: relative; display: grid; gap: .75rem; }
.dupont-level { position: relative; z-index: 1; display: flex; justify-content: center; gap: .65rem; }
.dupont-level article { min-width: 8rem; border: 1px solid #bfd3cc; padding: .55rem; background: #fffefa; text-align: center; }
.dupont-level strong,
.dupont-level span { display: block; font-size: .75rem; }
.relationship-links { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dupont-edge { fill: none; stroke: #5c9b90; stroke-width: 2; vector-effect: non-scaling-stroke; }
.profit-contribution { display: grid; gap: .4rem; }
.profit-contribution article { display: grid; grid-template-columns: 7.5rem 6rem minmax(12rem, 1fr) 5rem; align-items: center; gap: .55rem; font-size: .75rem; }
.contribution-track { height: .85rem; background: #edf0eb; }
.contribution-track i { display: block; height: 100%; background: var(--color-accent); }
.profit-contribution [data-direction="NEGATIVE"] .contribution-track i { background: var(--color-error); }
.profit-reconciliation-note {
  margin: .35rem 0 0;
  padding: .65rem .75rem;
  border: 1px solid #c8d9d3;
  border-radius: .4rem;
  background: #f3f8f6;
  color: #38564f;
  font-size: .75rem;
  line-height: 1.55;
}
.percentile-tracks { display: grid; gap: .45rem; }
.percentile-tracks article { display: grid; grid-template-columns: 7rem 4rem minmax(16rem, 1fr) 6rem; align-items: center; gap: .65rem; border-bottom: 1px solid #e6e2da; padding: .35rem 0 .55rem; font-size: .75rem; }
.percentile-label { font-size: .8125rem; }
.percentile-direction { color: #68736f; text-align: center; }
.percentile-current { font-weight: 700; text-align: right; }
.percentile-rail { position: relative; height: 2.35rem; margin-top: .85rem; }
.percentile-whisker { position: absolute; top: .8rem; right: 0; left: 0; height: 2px; background: #9da9a5; }
.percentile-whisker::before,
.percentile-whisker::after { position: absolute; top: -.25rem; width: 1px; height: .6rem; background: #9da9a5; content: ""; }
.percentile-whisker::before { left: 0; }
.percentile-whisker::after { right: 0; }
.percentile-iqr { position: absolute; top: .52rem; height: .58rem; border: 1px solid #a9c9d8; background: #dcebf2; }
.percentile-median { position: absolute; z-index: 2; top: .42rem; width: 2px; height: .8rem; background: #244e82; transform: translateX(-50%); }
.percentile-tick { position: absolute; top: .18rem; color: var(--color-muted); font-size: .6875rem; transform: translate(-50%, -100%); }
.percentile-tick[data-edge="start"] { transform: translate(0, -100%); }
.percentile-tick[data-edge="end"] { transform: translate(-100%, -100%); }
.company-marker { position: absolute; z-index: 3; top: .48rem; width: .72rem; height: .72rem; border: 2px solid #fffefa; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); transform: translateX(-50%); }
.peer-universe,
.dimension-conclusions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.peer-universe section,
.dimension-conclusions > article { border: 1px solid var(--color-line); padding: .65rem; }
.peer-universe p,
.dimension-conclusions p { margin: .3rem 0 0; font-size: .75rem; }
.dimension-conclusions > article > section { display: grid; grid-template-columns: 3rem 1fr; gap: .25rem; border-top: 1px solid #e4e0d7; margin-top: .5rem; padding-top: .4rem; }
.dimension-conclusion-values { min-width: 0; overflow-wrap: anywhere; }
.enterprise-portrait { display: grid; gap: .8rem; border: 1px solid #b9d2ca; border-radius: 8px; padding: 1rem; background: #edf7f3; }
.enterprise-portrait > header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.enterprise-kicker { color: #0d6257; font-size: .875rem; font-weight: 750; letter-spacing: .06em; }
.enterprise-quick-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.enterprise-quick-facts section,
.enterprise-overall,
.enterprise-top-unknowns { border: 1px solid #cfddd8; border-radius: 6px; padding: .75rem; background: rgba(255, 254, 250, .82); }
.enterprise-quick-facts strong,
.enterprise-overall strong,
.enterprise-top-unknowns strong { color: #174f48; font-size: .875rem; }
.enterprise-quick-facts p,
.enterprise-overall p { margin: .35rem 0 0; color: #344a44; font-size: .875rem; line-height: 1.6; }
.enterprise-top-unknowns ol { display: grid; gap: .35rem; margin: .45rem 0 0; padding-left: 1.2rem; color: #4d5d58; font-size: .875rem; line-height: 1.55; }
.enterprise-portrait footer { color: #66736f; font-size: .8125rem; }
.enterprise-portrait-copy { margin: 0; color: #183d36; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: 1rem; font-weight: 650; line-height: 1.75; }
.enterprise-confidence { border: 1px solid #85b3a8; border-radius: 999px; padding: .35rem .65rem; color: #0d6257; font-size: .75rem; white-space: nowrap; }
.diagnosis-band { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
.diagnosis-band details { min-width: 0; border: 1px solid #d7d3c8; border-top: 3px solid #70807b; border-radius: 8px; padding: .65rem; background: #fffefa; }
.diagnosis-band details[data-state="IMPROVING"],
.diagnosis-band details[data-state="STABLE"] { border-top-color: #16816f; }
.diagnosis-band details[data-state="MIXED"] { border-top-color: #c18218; }
.diagnosis-band details[data-state="PRESSURED"] { border-top-color: #b74238; }
.diagnosis-band details[data-state="UNRESOLVED"] { border-top-color: #7b8581; background: #f6f6f2; }
.diagnosis-band summary { cursor: pointer; list-style-position: outside; }
.diagnosis-band details > section { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .25rem; border-top: 1px solid #e5e2d9; padding-top: .35rem; }
.diagnosis-band details > section ul { margin: 0; padding-left: .9rem; color: #53615d; font-size: .875rem; line-height: 1.5; }
.diagnosis-band header { display: flex; align-items: center; justify-content: space-between; gap: .35rem; }
.diagnosis-band h5 { margin: 0; color: #233e38; font-size: .8125rem; }
.diagnosis-state { border-radius: 999px; padding: .12rem .35rem; background: #edf0ed; color: #53615d; font-size: .75rem; white-space: nowrap; }
.diagnosis-headline { min-height: 3.5rem; margin: .55rem 0; color: #344a44; font-size: .875rem; line-height: 1.55; overflow-wrap: anywhere; }
.diagnosis-metrics { display: grid; gap: .2rem; border-top: 1px solid #e5e2d9; padding-top: .4rem; color: #0d665b; font-size: .875rem; font-variant-numeric: tabular-nums; }
.diagnosis-links { display: block; margin-top: .4rem; color: #78817e; font-size: .75rem; }
.value-creation-chain { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: value-stage; }
.value-creation-chain li { position: relative; min-width: 0; border: 1px solid #d7d3c8; padding: .65rem .8rem; background: #fffefa; }
.value-creation-chain li:not(:last-child)::after { position: absolute; z-index: 2; top: 50%; right: -.42rem; width: .7rem; height: .7rem; border-top: 1px solid #9aaca6; border-right: 1px solid #9aaca6; background: #fffefa; content: ""; transform: translateY(-50%) rotate(45deg); }
.value-chain-step { display: block; color: #73807c; font-size: .625rem; }
.value-creation-chain strong { display: block; margin-top: .2rem; color: #174f48; font-size: .8125rem; }
.value-creation-chain p { margin: .35rem 0 0; color: #53625d; font-size: .6875rem; line-height: 1.45; overflow-wrap: anywhere; }
.key-judgments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.key-judgments article { min-width: 0; border: 1px solid #d7d3c8; border-radius: 8px; padding: .75rem; background: #fffefa; }
.key-judgments h5 { margin: 0; color: #174f48; font-size: .875rem; }
.key-judgment-conclusion { margin: .35rem 0 .55rem; color: #263f39; font-weight: 650; line-height: 1.55; }
.key-judgments section { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .35rem; border-top: 1px solid #e5e2d9; padding: .4rem 0; }
.judgment-group-label { color: #5d6d68; font-size: .6875rem; }
.key-judgments ul { margin: 0; padding-left: 1rem; color: #4d5d58; font-size: .75rem; line-height: 1.5; }
.judgment-empty { color: #8a918f; }
.empty-evidence-panel { border: 1px dashed #b9b5aa; padding: .75rem; background: #fbfaf5; }
.empty-evidence-panel p { margin: .35rem 0 0; color: var(--color-muted); font-size: .75rem; }

/* Concept-diagram layout contract: one explicit composition per research step. */
#step-visualization[data-layout-key] {
  display: grid;
  min-height: 0;
  gap: 8px;
  align-content: start;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 16px 16px;
}
#step-visualization[data-layout-key] .presentation-series { min-width: 0; }
.presentation-layout-slot { min-width: 0; }
.presentation-layout-slot[data-block-layout="single"] { display: block; }
.presentation-layout-slot[data-block-layout="paired"],
.presentation-layout-slot[data-block-layout="two-column"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}
.presentation-layout-slot[data-block-layout="three-column"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}
.presentation-layout-slot[data-block-layout="stacked"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
#step-visualization[data-adaptive-slot-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
}
#step-visualization[data-adaptive-slot-count="1"] > .presentation-layout-slot {
  grid-area: auto !important;
  grid-column: 1 / -1;
}
.presentation-layout-slot[data-layout-slot="profitability-trends"],
.presentation-layout-slot[data-layout-slot="efficiency-trends"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.presentation-layout-slot[data-layout-slot="profitability-trends"] .presentation-title,
.presentation-layout-slot[data-layout-slot="efficiency-trends"] .presentation-title {
  margin-bottom: 4px;
  font-size: .75rem;
}
.presentation-layout-slot[data-layout-slot="profitability-trends"] svg text,
.presentation-layout-slot[data-layout-slot="efficiency-trends"] svg text { font-size: .75rem !important; }
.presentation-layout-slot[data-layout-slot="profitability-trends"] .presentation-series,
.presentation-layout-slot[data-layout-slot="efficiency-trends"] .presentation-series {
  width: 100%;
  min-width: 0;
  height: 8.25rem;
}
.presentation-narrative-slot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.presentation-narrative-slot .narrative-block { padding: 8px 12px; }
.presentation-narrative-slot .narrative-block blockquote { margin: 4px 0; }

#step-visualization[data-layout-key="STEP_02"][data-adaptive-layout="step-02-wide"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#step-visualization[data-layout-key="STEP_02"] > [data-full-row="true"] { grid-column: 1 / -1; }
#step-visualization[data-layout-key="STEP_02"] > [data-layout-slot="quality-curve"][data-block-layout="paired"],
#step-visualization[data-layout-key="STEP_02"] > [data-layout-slot="quality-curve"][data-block-layout="two-column"] {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
#step-visualization[data-layout-key="STEP_02"] > [data-layout-slot="quality-curve"] > .presentation-block {
  min-width: 0;
  height: 100%;
}
#step-visualization[data-layout-key="STEP_02"] [data-layout-slot="quality-curve"] > .presentation-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
#step-visualization[data-layout-key="STEP_02"] [data-layout-slot="quality-curve"] > .presentation-boundary-only {
  display: block;
  height: auto;
}
.series-boundary-state {
  display: grid;
  gap: .45rem;
  border: 1px solid #ddcfad;
  padding: .75rem;
  background: #fbf7eb;
}
.series-boundary-title { color: #634b1e; font-size: .8125rem; }
.series-boundary-state .chart-index-boundary,
.series-boundary-note { margin: 0; }
.series-boundary-note { color: #68716d; font-size: .75rem; line-height: 1.55; }
#step-visualization[data-layout-key="STEP_02"][data-adaptive-layout="stacked"],
#step-visualization[data-layout-key="STEP_02"][data-adaptive-layout="stacked"] > .presentation-layout-slot,
#step-visualization[data-layout-key="STEP_02"][data-adaptive-layout="stacked"] .presentation-block {
  min-width: 0;
  max-width: 100%;
}
#step-visualization[data-layout-key="STEP_02"][data-adaptive-layout="stacked"] .support-ratio-chain {
  grid-template-columns: minmax(0, 1fr);
}
#step-visualization[data-layout-key="STEP_02"][data-adaptive-layout="stacked"] .support-ratio-arrow {
  transform: rotate(90deg);
}

#step-visualization[data-layout-key="STEP_03"] {
  grid-template-columns: 1fr;
  grid-template-areas: "segment";
}
#step-visualization[data-layout-key="STEP_03"] > [data-layout-slot="segment-analysis"] { grid-area: segment; }
#step-visualization[data-layout-key="STEP_03"] > [data-layout-slot="revenue-mix"] { grid-area: mix; }
#step-visualization[data-layout-key="STEP_03"] > [data-layout-slot="product-margin"] { grid-area: margin; }
#step-visualization[data-layout-key="STEP_03"] > [data-layout-slot="revenue-summary"] { grid-area: summary; }
#step-visualization[data-layout-key="STEP_03"] > [data-layout-slot="growth-decomposition"] { grid-area: detail; }
#step-visualization[data-layout-key="STEP_03"] [data-layout-slot="product-margin"] .presentation-series { min-width: 0; height: 11.5rem; }
#step-visualization[data-layout-key="STEP_03"] [data-layout-slot="revenue-summary"] .presentation-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }

#step-visualization[data-layout-key="STEP_04"],
#step-visualization[data-layout-key="STEP_06"] {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
}
#step-visualization[data-layout-key="STEP_04"] > .presentation-layout-slot > .presentation-block,
#step-visualization[data-layout-key="STEP_06"] > .presentation-layout-slot > .presentation-block,
#step-visualization[data-layout-key="STEP_08"] > .presentation-layout-slot > .presentation-block {
  height: auto;
}
#step-visualization[data-layout-key="STEP_04"] [data-layout-slot="profit-bridge"] .presentation-waterfall,
#step-visualization[data-layout-key="STEP_06"] [data-layout-slot="asset-history"] .presentation-waterfall {
  min-height: 13.5rem;
}
#step-visualization[data-layout-key="STEP_04"] [data-layout-slot="profitability-trends"] .presentation-series,
#step-visualization[data-layout-key="STEP_06"] [data-layout-slot="efficiency-trends"] .presentation-series {
  height: 11.5rem;
}
#step-visualization[data-layout-key="STEP_04"] > [data-layout-slot="profit-bridge"],
#step-visualization[data-layout-key="STEP_06"] > [data-layout-slot="asset-history"] { min-height: 0; }
#step-visualization[data-layout-key="STEP_04"] [data-layout-slot="core-profit-formula"] .presentation-formula article { min-width: 5.15rem; padding: 6px 8px; }
#step-visualization[data-layout-key="STEP_04"] [data-layout-slot="core-profit-formula"] .presentation-formula { overflow: visible; gap: 6px; }

#step-visualization[data-layout-key="STEP_05"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "comparison comparison" "judgment judgment" "drivers drivers";
}
#step-visualization[data-layout-key="STEP_05"] > [data-layout-slot="profit-cashflow-comparison"] { grid-area: comparison; }
#step-visualization[data-layout-key="STEP_05"] > [data-layout-slot="cashflow-judgment"] { grid-area: judgment; }
#step-visualization[data-layout-key="STEP_05"] > [data-layout-slot="cashflow-judgment"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}
#step-visualization[data-layout-key="STEP_05"] > [data-layout-slot="cash-conversion-drivers"] {
  grid-area: drivers;
  display: block;
}

#step-visualization[data-layout-key="STEP_07"] {
  grid-template-columns: 1fr;
  grid-template-areas: "maturity" "trends" "history" "cost";
}
#step-visualization[data-layout-key="STEP_07"] > [data-layout-slot="debt-maturity-matrix"] { grid-area: maturity; }
#step-visualization[data-layout-key="STEP_07"] > [data-layout-slot="debt-coverage-trends"] { grid-area: trends; }
#step-visualization[data-layout-key="STEP_07"] > [data-layout-slot="debt-coverage-trends"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#step-visualization[data-layout-key="STEP_07"] .debt-maturity { overflow-x: auto; }
#step-visualization[data-layout-key="STEP_07"] .debt-maturity-table { width: 100%; min-width: 38rem; }
#step-visualization[data-layout-key="STEP_07"] > [data-layout-slot="capital-cost"] { grid-area: cost; }
#step-visualization[data-layout-key="STEP_07"] > [data-layout-slot="debt-history-table"] { grid-area: history; }
#step-visualization[data-layout-key="STEP_07"] [data-layout-slot="capital-cost"] .presentation-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }

#step-visualization[data-layout-key="STEP_08"] {
  grid-template-columns: 1fr;
  grid-template-areas: "tree" "history";
}
#step-visualization[data-layout-key="STEP_08"]:has(> [data-layout-slot="capital-allocation"]) {
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas: "tree tree" "history allocation";
}
#step-visualization[data-layout-key="STEP_08"] > [data-layout-slot="dupont-tree"] { grid-area: tree; }
#step-visualization[data-layout-key="STEP_08"] > [data-layout-slot="dupont-history"] { grid-area: history; }
#step-visualization[data-layout-key="STEP_08"] > [data-layout-slot="dupont-history"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 8px; }
#step-visualization[data-layout-key="STEP_08"] > [data-layout-slot="capital-allocation"] { grid-area: allocation; }
#step-visualization[data-layout-key="STEP_08"] [data-layout-slot="dupont-history"] .presentation-series { height: 14rem; }

#step-visualization[data-layout-key="STEP_09"] {
  grid-template-columns: 1fr;
  grid-template-areas: "bridge" "matrix" "judgment";
}
#step-visualization[data-layout-key="STEP_09"] > [data-layout-slot="profit-to-core-bridge"] { grid-area: bridge; }
#step-visualization[data-layout-key="STEP_09"] > [data-layout-slot="disruption-factor-matrix"] { grid-area: matrix; }
#step-visualization[data-layout-key="STEP_09"] > [data-layout-slot="nonrecurring-judgment"] { grid-area: judgment; }
#step-visualization[data-layout-key="STEP_09"] [data-layout-slot="profit-to-core-bridge"] .presentation-waterfall { min-height: 10rem; }
#step-visualization[data-layout-key="STEP_09"] [data-layout-slot="nonrecurring-judgment"] .presentation-kpis article { min-height: 4rem; }

#step-visualization[data-layout-key="STEP_10"] {
  min-height: 0;
  grid-template-columns: 1fr;
  grid-template-areas: "percentiles" "details" "history" "valuation";
}
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="peer-percentiles"] { grid-area: percentiles; }
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="peer-sample-details"] { grid-area: details; }
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="peer-history"] { grid-area: history; }
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="peer-universe"] { grid-area: universe; }
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="valuation-range"] { grid-area: valuation; }
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="peer-universe"] { display: none; }
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="peer-history"],
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="valuation-range"] {
  display: grid;
  grid-template-columns: repeat(var(--block-count, 1), minmax(0, 1fr));
  gap: .6rem;
}
#step-visualization[data-layout-key="STEP_10"] [data-layout-slot="peer-history"] .presentation-series { min-width: 0; height: 10.5rem; }
#step-visualization[data-layout-key="STEP_10"] [data-layout-slot="peer-percentiles"] .presentation-matrix article { min-height: 3.75rem; }

#step-visualization[data-layout-key="STEP_11"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
}
#step-visualization[data-layout-key="STEP_11"] > .presentation-layout-slot { grid-area: auto; }
#step-visualization[data-layout-key="STEP_11"] .rich-data-table { min-width: 40rem; table-layout: auto; }
#step-visualization[data-layout-key="STEP_11"] [data-layout-slot="regulatory-history"] th:nth-child(4) { min-width: 17rem; }
#step-visualization[data-layout-key="STEP_11"] [data-layout-slot="regulatory-history"] td:first-child { white-space: nowrap; }
#step-visualization[data-layout-key="STEP_11"] [data-layout-slot="regulatory-history"] td:nth-child(4) { text-align: left; line-height: 1.7; }
#step-visualization[data-layout-key="STEP_11"] > [data-layout-slot="governance-responsibility-chain"] { grid-area: chain; }
#step-visualization[data-layout-key="STEP_11"] > [data-layout-slot="governance-evidence-overview"] { grid-area: overview; }
#step-visualization[data-layout-key="STEP_11"] > [data-layout-slot="governance-matrix"] { grid-area: matrix; }
#step-visualization[data-layout-key="STEP_11"] > [data-layout-slot="responsibility-assessment"] { grid-area: assessment; }
#step-visualization[data-layout-key="STEP_11"] > [data-layout-slot="governance-matrix"],
#step-visualization[data-layout-key="STEP_11"] > [data-layout-slot="responsibility-assessment"] { overflow: visible; }
#step-visualization[data-layout-key="STEP_11"][data-adaptive-slot-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
}
#step-visualization[data-layout-key="STEP_11"][data-adaptive-slot-count="1"] > .presentation-layout-slot {
  grid-area: auto;
}

#step-visualization[data-layout-key="STEP_12"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
}
#step-visualization[data-layout-key="STEP_12"] > .presentation-layout-slot {
  min-width: 0;
  grid-area: auto;
  grid-column: 1 / -1;
}
.secondary-panel {
  height: 100%;
  overflow: auto;
  padding: 1.25rem 2rem;
  background: #f8f6ef;
}

@media (max-width: 70rem) {
  .analysis-judgment-grid { grid-template-columns: minmax(0, 1fr); }
}

.visual-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: .75rem 0 .35rem;
  border-bottom: 1px solid #d9d5ca;
  padding-bottom: .35rem;
}
.visual-section-title strong { color: #155e56; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: .82rem; }
.visual-section-title span { color: #767d79; font-size: .6rem; }
.visualization[data-step="1"] .evidence-map,
.visualization[data-step="4"] .evidence-map,
.visualization[data-step="12"] .evidence-map {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem 2rem;
}
.visualization[data-step="1"] .evidence-map li,
.visualization[data-step="4"] .evidence-map li,
.visualization[data-step="12"] .evidence-map li {
  position: relative;
  min-height: 4.25rem;
  grid-template-columns: 3.8rem 1fr;
  align-items: center;
  border: 1px solid #c9d7d1;
  border-left: .2rem solid #14725f;
  border-radius: .25rem;
  background: #fbfcf8;
}
.visualization[data-step="1"] .evidence-map li:nth-child(odd)::after,
.visualization[data-step="4"] .evidence-map li:nth-child(odd)::after,
.visualization[data-step="12"] .evidence-map li:nth-child(odd)::after {
  position: absolute;
  top: 50%;
  right: -1.55rem;
  width: 1.2rem;
  border-top: 1px dashed #39867b;
  content: "";
}
.visualization[data-step="4"] .evidence-map li { border-color: #d8c9aa; }
.visualization[data-step="12"] .evidence-map li { border-color: #c4d0dc; }
.governance-chain { margin-top: .8rem; font-size: .6rem; }
.governance-chain th,
.governance-chain td { border: 1px solid #c9d2d0; padding: .55rem .6rem; text-align: left; }
.governance-chain thead th { background: #edf3f1; color: #285d55; }
.governance-chain tbody td:last-child { color: #9b5f07; }
.visualization[data-step="5"] .metric-grid,
.visualization[data-step="7"] .metric-grid,
.visualization[data-step="8"] .metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.visualization[data-step="5"] .metric-card { border-top-color: #a94d3f; }
.visualization[data-step="7"] .metric-card { border-top-color: #14725f; }
.visualization[data-step="8"] .metric-card { border-top-color: #173e70; }
.visualization[data-step="11"] .empty-state {
  min-height: 6.5rem;
  border: 1px dashed #c7c2b7;
  background: #fbfaf5;
}
.formula-item::before { margin-right: .35rem; color: #54635f; content: "ƒx"; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.counter-item { border-left-color: var(--color-error); }
.quality-diagnostics {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: .65rem;
  margin-top: .65rem;
}
.quality-diagnostics > section {
  min-width: 0;
  border: 1px solid #d7d3c8;
  border-radius: .2rem;
  background: #fbfaf5;
}
.quality-diagnostics h4 {
  border-bottom: 1px solid #ddd9cf;
  padding: .4rem .5rem;
  color: #285d55;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: .68rem;
}
.quality-diagnostics table { font-size: .58rem; }
.quality-diagnostics th,
.quality-diagnostics td { padding: .28rem .35rem; text-align: center; }
.quality-diagnostics td { background: #eef6f1; }
.quality-diagnostics td.negative { background: #f8e4df; color: var(--color-error); }
.support-ratios { display: grid; grid-template-columns: repeat(3, 1fr); }
.support-ratios div { min-width: 0; padding: .55rem .35rem; text-align: center; }
.support-ratios div + div { border-left: 1px solid #ddd9cf; }
.support-ratios span,
.support-ratios small { display: block; color: #707773; font-size: .52rem; }
.support-ratios strong { display: block; margin: .28rem 0; color: #12665b; font-family: inherit; font-size: 1rem; }
.metric-bridge {
  display: flex;
  min-height: 11.5rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}
.visualization[data-step="5"] .metric-bridge { display: flex; grid-template-columns: none; }
.metric-bridge .metric-card { min-width: 7rem; flex: 1; border-top-color: #166b5f; text-align: center; }
.metric-bridge .metric-card.negative { border-top-color: var(--color-error); }
.bridge-operator { color: #8b918d; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 1.2rem; }
.metric-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.metric-mini-grid .metric-card { min-height: 4.75rem; padding: .55rem .65rem; border-top-color: #a58b63; }
.metric-mini-grid .metric-value { font-size: 1rem; }
.unit-warning { margin: -.25rem 0 .45rem; border-left: .15rem solid #d4932e; padding-left: .45rem; color: #7d5a20; }
.visual-slot-empty { min-height: 4.2rem; margin-top: .45rem; border: 1px dashed #c7c2b7; background: #fbfaf5; }
.asset-dashboard,
.debt-dashboard {
  display: grid;
  min-height: 17rem;
  grid-template-columns: 1.35fr 1fr;
  gap: .75rem;
}
.asset-dashboard > section,
.debt-dashboard > section {
  border: 1px solid #d7d3c8;
  padding: .7rem;
  background: #fbfaf5;
}
.asset-dashboard h4,
.debt-dashboard h4 {
  margin-bottom: .7rem;
  color: #155e56;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: .78rem;
}
.structure-row {
  display: grid;
  grid-template-columns: 6.2rem minmax(4rem, 1fr) 5rem;
  align-items: center;
  gap: .45rem;
  border-bottom: 1px solid #e2ded5;
  padding: .48rem 0;
  font-size: .63rem;
}
.structure-row i { height: .7rem; max-width: 100%; background: #187361; }
.structure-row strong { text-align: right; }
.efficiency-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.efficiency-cards .metric-card,
.debt-dashboard .metric-card { min-height: 5.4rem; }
.debt-dashboard > section { display: grid; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.debt-dashboard h4 { grid-column: 1 / -1; }
.debt-dashboard .debt-amount { border-top-color: #173e70; }
.debt-dashboard .coverage-ratio { border-top-color: #16705e; }
.visualization[data-step="7"] .asset-dashboard,
.visualization[data-step="8"] .debt-dashboard { grid-template-columns: 1.35fr 1fr; }
.asset-dashboard .dashboard-slot,
.debt-dashboard .dashboard-slot { min-height: 5rem; grid-column: 1 / -1; }
.dashboard-slot .empty-state { min-height: 3.2rem; border: 1px dashed #c7c2b7; background: #fffefa; }
.dupont-reconciliation { margin-top: .55rem; }

.segment-tabs {
  display: flex;
  justify-content: flex-end;
  gap: .25rem;
  margin: -.15rem 0 .35rem;
}
.segment-tabs button {
  min-width: 4rem;
  border: 1px solid #d6d1c5;
  border-radius: .2rem;
  padding: .28rem .65rem;
  background: #fbfaf5;
  color: #4c5753;
  font-size: .62rem;
}
.segment-tabs button[aria-pressed="true"] { border-color: #0f6d5e; background: #0f6d5e; color: #fff; }
.segment-tabs button:disabled { border-style: dashed; color: #9a9d99; cursor: not-allowed; }
.segment-panel .chart-svg { max-height: 15.2rem; }
.segment-margin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .4rem;
  margin-top: .5rem;
}
.segment-margin-grid > div,
.cash-ratio-grid > div {
  position: relative;
  border: 1px solid #d9d5ca;
  padding: .42rem .5rem;
  background: #fbfaf5;
}
.segment-margin-grid span,
.segment-margin-grid small,
.cash-ratio-grid span,
.cash-ratio-grid small { display: block; color: #707773; font-size: .52rem; }
.segment-margin-grid strong,
.cash-ratio-grid strong { display: block; margin: .16rem 0; color: #12665b; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: .82rem; }
.segment-margin-grid .margin-dot { position: absolute; top: .5rem; right: .5rem; width: .42rem; height: .42rem; border-radius: 50%; background: #d4932e; }
.segment-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; margin-top: .4rem; }
.segment-summary > div { border: 1px solid #d9d5ca; padding: .38rem .45rem; background: #fbfaf5; }
.segment-summary span { display: block; color: #707773; font-size: .5rem; }
.segment-summary strong { display: block; margin-top: .18rem; color: #12665b; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: .7rem; }
.cash-history { max-height: 15.5rem !important; }
.cash-ratio-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; margin-top: .35rem; }
.roe-card {
  width: 19rem;
  margin: .15rem auto .6rem;
  border: 1px solid #8eaaa3;
  border-radius: .25rem;
  padding: .55rem 1rem;
  background: #fbfaf5;
  text-align: center;
}
.roe-card span,
.roe-card small { display: block; color: #626c68; font-size: .58rem; }
.roe-card strong { display: block; margin: .2rem 0; color: #12665b; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 1.35rem; }
.visualization[data-step="9"] .factor-grid { min-height: 7.5rem; align-items: stretch; }
.visualization[data-step="9"] .factor-card { position: relative; display: grid; place-content: center; text-align: center; }
.visualization[data-step="9"] .factor-card + .factor-card::before { position: absolute; left: -.72rem; top: 50%; color: #6b7470; content: "×"; font-size: 1rem; }
.factor-trends { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-top: .45rem; }
.factor-trends section { border: 1px solid #d9d5ca; background: #fbfaf5; }
.factor-trends h4 { border-bottom: 1px solid #ddd9cf; padding: .35rem .45rem; color: #285d55; font-size: .62rem; }
.factor-series { display: grid; grid-template-columns: repeat(5, 1fr); gap: .15rem; padding: .4rem; }
.factor-series span { border-right: 1px solid #e2ded5; color: #5f6864; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: .5rem; text-align: center; }
.factor-card small { display: block; margin-top: .2rem; color: #6f7773; font-size: .5rem; font-weight: 400; }
.mobile-series-summary { display: none; }
.profitability-trends,
.asset-trends,
.debt-trends,
.dupont-contributions,
.valuation-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: .4rem;
  margin-top: .45rem;
}
.profitability-trends section,
.asset-trends section,
.debt-trends section,
.valuation-history section {
  min-width: 0;
  border: 1px solid #d9d5ca;
  padding: .4rem .45rem;
  background: #fbfaf5;
}
.profitability-trends h5,
.asset-trends h5,
.debt-trends h5,
.valuation-history h5 {
  margin: 0 0 .3rem;
  color: #285d55;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: .58rem;
}
.series-values { display: grid; gap: .16rem; }
.series-values span {
  border-bottom: 1px solid #e4e0d7;
  padding: .12rem 0;
  color: #5f6864;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: .52rem;
}
.series-mini-chart,
.valuation-chart { display: block; width: 100%; height: auto; overflow: visible; }
.series-mini-chart { min-height: 3.5rem; margin-bottom: .15rem; }
.mini-baseline { stroke: #c8c4ba; stroke-width: 1; }
.mini-series-line { fill: none; stroke: #12665b; stroke-width: 2; }
.mini-series-dot { fill: #12665b; }
.series-mini-chart text,
.valuation-chart text { fill: #747b77; font-size: 7px; }
.maturity-buckets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  margin-top: .35rem;
}
.dupont-reconciliation-table { margin-top: .45rem; table-layout: fixed; }
.dupont-reconciliation-table td { border: 1px solid #d9d5ca; background: #fbfaf5; text-align: center; }
.dupont-reconciliation-table span,
.dupont-reconciliation-table strong { display: block; }
.dupont-reconciliation-table span { color: #707773; font-size: .52rem; }
.dupont-reconciliation-table strong { margin-top: .16rem; color: #12665b; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: .72rem; }
.dupont-contributions > div {
  border: 1px solid #d9d5ca;
  padding: .35rem .45rem;
  background: #fbfaf5;
}
.dupont-contributions span,
.dupont-contributions strong { display: block; }
.dupont-contributions span { color: #707773; font-size: .52rem; }
.dupont-contributions strong { margin-top: .12rem; color: #12665b; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: .66rem; }
.peer-context { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; margin: .35rem 0 .5rem; }
.peer-context > div { border: 1px solid #d9d5ca; padding: .35rem .45rem; background: #fbfaf5; }
.peer-context span { display: block; color: #707773; font-size: .5rem; }
.peer-context strong { display: block; margin-top: .12rem; color: #285d55; font-size: .62rem; }
.visualization[data-step="11"] .line-chart { max-height: 13.5rem; }
.visualization[data-step="11"] .empty-state { min-height: 4.25rem; }
.peer-distribution { display: grid; gap: .35rem; margin-top: .35rem; }
.peer-metric-group { border: 1px solid #d9d5ca; padding: .4rem .55rem; background: #fbfaf5; }
.peer-metric-group h5 { margin-bottom: .25rem; color: #285d55; font-size: .58rem; }
.peer-track { position: relative; height: 1.25rem; margin: 0 .35rem; }
.peer-track > i { position: absolute; top: .58rem; right: 0; left: 0; height: 2px; background: #b8c9c4; }
.peer-point {
  position: absolute;
  z-index: 1;
  top: .3rem;
  width: .55rem;
  height: .55rem;
  transform: translateX(-50%);
  border: 2px solid #fffefa;
  border-radius: 50%;
  background: #12665b;
  box-shadow: 0 0 0 1px #12665b;
}
.peer-legend { display: flex; flex-wrap: wrap; gap: .25rem .8rem; }
.peer-legend span { color: #626c68; font-size: .5rem; }
.valuation-history { display: block; padding: .3rem .5rem .15rem; border: 1px solid #d9d5ca; background: #fbfaf5; }
.valuation-chart { max-height: 6.5rem; }
.valuation-legend text { font-weight: 700; }
.meaning-matrix { margin-top: .55rem; font-size: .58rem; }
.meaning-matrix th,
.meaning-matrix td { border: 1px solid #d9d5ca; padding: .32rem .45rem; text-align: left; }
.meaning-matrix thead th { background: #eef4f0; color: #285d55; }
.meaning-matrix tbody th { color: #314d48; }
.visualization[data-step="10"] .bars { max-height: 13.5rem; }
.matrix-evidence-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; margin-top: .45rem; }
.matrix-evidence-columns section { border-top: 1px solid #ddd9cf; padding: .35rem .25rem 0; }
.matrix-evidence-columns section + section { border-left: 1px solid #ddd9cf; }
.matrix-evidence-columns h5 { color: #475d57; font-size: .5rem; }
.matrix-evidence-columns ul { margin: .22rem 0 0; padding-left: .75rem; color: #69716d; font-size: .48rem; line-height: 1.45; }
.matrix-evidence-columns .evidence-ref { color: #1f6258; font-weight: 600; }
.matrix-resolution { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #ddd9cf; margin-top: .45rem; padding-top: .45rem; }
.matrix-resolution span { padding: .15rem .3rem; color: #69716d; font-size: .52rem; text-align: center; }
.matrix-resolution span + span { border-left: 1px solid #ddd9cf; }

/* Third-round readability and interaction contract. */
.audit-card {
  border: 1px solid #d7d3c8;
  border-radius: 8px;
  background: #fffefa;
  color: #283c37;
}
.audit-card-header { display: grid; min-height: 2.65rem; align-items: center; grid-template-columns: 1.15rem 1fr auto; gap: .5rem; border-bottom: 1px solid #e0ddd4; padding: .55rem .75rem; }
.audit-card-header { cursor: pointer; list-style: none; }
.audit-card-header::-webkit-details-marker { display: none; }
.audit-card:not([open]) .audit-card-header { border-bottom: 0; }
.audit-card-icon { width: 1rem; height: 1rem; color: #17685c; }
.audit-card-title { margin: 0; font-family: inherit !important; font-size: .875rem !important; font-weight: 700; line-height: 1.35; }
.audit-card-count { display: inline-grid; min-width: 1.35rem; height: 1.35rem; place-items: center; border: 1px solid currentColor; border-radius: 999px; color: #5d6c67; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.audit-card-body { padding: 0 .75rem; }
.audit-card .audit-item { border: 0; padding: .62rem 0; overflow-wrap: anywhere; }
.audit-card .audit-item + .audit-item { border-top: 1px solid #e4e1d8; }
.audit-card .audit-item strong { color: #293f3a; font-size: .8125rem; line-height: 1.45; }
.audit-card .audit-item span { margin-top: .2rem; color: #5f6d68; font-size: .75rem; line-height: 1.55; }
.audit-card[data-audit-kind="FORMAL_SOURCES"] { border-color: #bad1ca; background: #fbfefd; }
.audit-card[data-audit-kind="FORMAL_SOURCES"] .audit-card-icon { color: #0f766e; }
.audit-card[data-audit-kind="MISSING_ITEMS"] { border-color: #dfc891; background: #fffdf7; }
.audit-card[data-audit-kind="MISSING_ITEMS"] .audit-card-icon { color: #a66c09; }
.audit-card[data-audit-kind="COUNTEREVIDENCE"] { border-color: #ddb4af; background: #fffafa; }
.audit-card[data-audit-kind="COUNTEREVIDENCE"] .audit-card-icon { color: #a33c32; }

.series-chart-stage { width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-gutter: stable; }
.series-chart-stage[data-density="scroll"] { border-right: 1px solid #d7dfda; border-left: 1px solid #d7dfda; padding-bottom: .25rem; }
.series-chart-stage[data-density="scroll"] .presentation-series {
  height: auto !important;
  min-height: 0;
}
.chart-axis-y,
.chart-axis-x { stroke: #7f8d88; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-grid { stroke: #e3e6e2; stroke-width: 1; }
.chart-y-tick,
.chart-year-label { fill: #56645f; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 11px; }
.chart-axis-title { fill: #40534d; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 11px; font-weight: 700; }
.series-selector-table { display: flex; width: 100%; flex-wrap: wrap; gap: .4rem; border-top: 1px solid #e1ded5; padding-top: .55rem; }
.series-selector-table:empty { display: none; }
.series-selector-button { display: inline-flex; min-height: 2rem; align-items: center; gap: .35rem; border: 1px solid #cbcfc9; border-radius: 6px; padding: .3rem .65rem; background: #fffefa; color: #41534e; font: inherit; font-size: .75rem; cursor: pointer; }
.series-value-toggle { display: inline-flex; min-height: 2rem; align-items: center; margin-left: auto; border: 1px solid #9eb5af; border-radius: 6px; padding: .3rem .7rem; background: #fffefa; color: #155e56; font: inherit; font-size: .75rem; cursor: pointer; }
.series-value-toggle[aria-pressed="true"] { border-color: #0f766e; background: #eaf4f1; box-shadow: inset 0 0 0 1px #0f766e; }
.series-value-toggle:disabled { cursor: not-allowed; opacity: .45; }
.series-selector-button i { width: .7rem; height: .18rem; border-radius: 999px; }
.series-selector-button[aria-pressed="true"] { border-color: #0f766e; background: #eaf4f1; color: #0b655a; box-shadow: inset 0 0 0 1px #0f766e; }
.series-selector-button:focus-visible,
.segment-dimension-tab:focus-visible { outline: 2px solid #1768ac; outline-offset: 2px; }

.peer-position-chart { display: grid; gap: .65rem; }
.peer-position-chart article { border: 1px solid #d5ddd8; border-radius: 8px; padding: .75rem .9rem; background: #fbfdfa; }
.peer-position-chart header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.peer-position-label { color: #233d36; font-size: .875rem; }
.peer-position-value { color: #0f766e; font-size: .8125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.peer-position-rail { position: relative; height: 2.6rem; margin: .85rem .75rem .25rem; border-top: .35rem solid #d9e5e0; }
.peer-position-rail::before { position: absolute; top: -.35rem; bottom: 0; left: 50%; border-left: 1px solid #8aa49a; content: ""; }
.peer-position-marker { position: absolute; top: -.72rem; width: .9rem; height: .9rem; transform: translateX(-50%); border: 3px solid #fff; border-radius: 50%; background: #0f766e; box-shadow: 0 0 0 2px #0f766e; }
.peer-position-tick { position: absolute; top: .45rem; transform: translateX(-50%); color: #68766f; font-size: .6875rem; }
.peer-position-tick:first-child { transform: none; }
.peer-position-tick:nth-of-type(5) { transform: translateX(-100%); }
.peer-position-basis { margin: 0; color: #5f6d68; font-size: .75rem; line-height: 1.5; }

.empty-evidence-state { display: inline-flex; margin-bottom: .35rem; border: 1px solid #d7c28e; border-radius: 999px; padding: .18rem .45rem; color: #805b12; font-size: .6875rem; font-weight: 700; }
.empty-evidence-panel[data-data-state="ACQUIRED_UNSTRUCTURED"] .empty-evidence-state { border-color: #9db9b0; color: #17685c; }
.empty-evidence-panel[data-data-state="STRUCTURED_NOT_CHARTABLE"] .empty-evidence-state { border-color: #aeb7ca; color: #435577; }
.evidence-index-located { animation: evidence-located-pulse 1.4s ease-out; outline: 3px solid #0f766e; outline-offset: 3px; }
@keyframes evidence-located-pulse { from { background: #dff5ed; } to { background: inherit; } }

.support-ratio-chain { display: grid; align-items: stretch; grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1fr) 2rem minmax(0, 1fr); gap: .3rem; border: 1px solid #d7d3c8; border-radius: 8px; padding: .65rem; background: #fffefa; }
.support-ratio-card { min-width: 0; border: 1px solid #cbd4d0; border-radius: 8px; background: #fbfcf8; text-align: center; }
.support-ratio-title { margin: 0; border-bottom: 1px solid #dfe5e1; padding: .55rem; color: #174f48; font-family: inherit; font-size: .875rem; }
.support-ratio-formula { min-height: 2.1rem; margin: 0; padding: .4rem .55rem; color: #5b6964; font-size: .75rem; }
.support-ratio-values { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .625rem; font-variant-numeric: tabular-nums; }
.support-ratio-values th,
.support-ratio-values td { overflow: hidden; white-space: nowrap; border-top: 1px solid #e2e2db; border-right: 1px solid #e2e2db; padding: .35rem .08rem; text-overflow: clip; }
.support-ratio-values th:last-child,
.support-ratio-values td:last-child { border-right: 0; }
.support-ratio-current { color: #0b6d5d; font-weight: 800; }
.support-ratio-trend { min-width: 0; width: 100%; }
.support-ratio-trend .series-chart-stage { min-height: 20rem; }
.support-ratio-formulas { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.analysis-judgment-grid.facts-only { grid-template-columns: minmax(0, 1fr); }
.support-ratio-arrow { display: grid; place-items: center; color: #0f766e; font-size: 1.25rem; }

.segment-analysis-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 .5rem; }
.segment-analysis-header .presentation-title { margin: 0; }
.segment-header-actions,
.segment-dimension-tabs { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; margin: 0; }
.segment-dimension-tab { min-width: 4.5rem; border: 1px solid #cfd1ca; border-radius: 6px; padding: .4rem .75rem; background: #fffefa; color: #53605c; font: inherit; font-size: .8125rem; cursor: pointer; }
.segment-dimension-tab[aria-selected="true"] { border-color: #0f766e; background: #0f766e; color: white; }
.segment-analysis-content { display: grid; gap: .6rem; }
.segment-main-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.segment-structure-panel,
.segment-margin-panel,
.segment-share-detail,
.segment-analysis-summary,
.segment-analysis-decomposition { min-width: 0; border: 1px solid #d7d3c8; border-radius: 8px; padding: .65rem; background: #fffefa; }
.segment-panel-title { margin-bottom: .55rem; color: #174f48; font-family: inherit; font-size: .875rem; }
.segment-main-charts .presentation-stacked-bars article { grid-template-columns: 3rem minmax(12rem, 1fr) 3.5rem; }
.segment-main-charts .stacked-bar span { font-size: .75rem; }
.segment-margin-panel .presentation-series { height: 17rem; }
.segment-share-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .45rem; }
.segment-share-header .segment-panel-title { margin: 0; }
.segment-share-header label { display: inline-flex; align-items: center; gap: .4rem; color: #53605c; font-size: .75rem; }
.segment-period-selector { min-height: 2rem; border: 1px solid #cfd1ca; border-radius: 6px; padding: .25rem 1.8rem .25rem .55rem; background: #fffefa; color: #263b35; font: inherit; font-size: .75rem; }
.segment-share-ranking { display: grid; gap: 0; border: 1px solid #dfe2dc; border-radius: 6px; overflow: hidden; }
.segment-share-row { display: grid; grid-template-columns: minmax(9rem, 1.15fr) minmax(12rem, 3fr) 5rem 5.25rem; align-items: center; gap: .55rem; min-height: 2.2rem; border-bottom: 1px solid #e5e5df; padding: .35rem .55rem; }
.segment-share-row:last-child { border-bottom: 0; }
.segment-share-name { min-width: 0; overflow-wrap: anywhere; color: #293b36; font-size: .75rem; }
.segment-share-track { height: .65rem; overflow: hidden; border-radius: 999px; background: #edf0ec; }
.segment-share-track i { display: block; height: 100%; min-width: 1px; border-radius: inherit; }
.segment-share-percent,
.segment-share-value { text-align: right; color: #334b44; font-size: .75rem; font-variant-numeric: tabular-nums; }

.presentation-title { font-size: 1rem; }
.presentation-block,
.presentation-table,
.presentation-formula,
.presentation-matrix,
.rich-data-table,
.debt-maturity-table,
.profit-contribution,
.percentile-tracks,
.dupont-tree,
.combo-chart { font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; font-variant-numeric: tabular-nums; }
.metric-card strong,
.factor-card strong,
.cash-ratio-grid strong,
.segment-summary strong,
.roe-card strong,
.factor-series span,
.series-values span,
.dupont-reconciliation-table strong,
.dupont-contributions strong,
.mobile-series-summary strong { font-family: inherit; font-variant-numeric: tabular-nums; }
.presentation-block,
.empty-evidence-panel,
.presentation-matrix article { border-radius: 8px; }

.presentation-layout-slot[data-layout-slot="profitability-trends"],
.presentation-layout-slot[data-layout-slot="efficiency-trends"] { display: grid; min-width: 0; grid-template-columns: repeat(var(--block-count, 1), minmax(8.125rem, 1fr)); gap: .5rem; overflow: visible; }
.presentation-layout-slot[data-layout-slot="profitability-trends"] .presentation-title,
.presentation-layout-slot[data-layout-slot="efficiency-trends"] .presentation-title { font-size: .875rem; }
.presentation-layout-slot[data-layout-slot="profitability-trends"] .presentation-series,
.presentation-layout-slot[data-layout-slot="efficiency-trends"] .presentation-series { height: 11.75rem; }
.presentation-layout-slot[data-layout-slot="profitability-trends"][data-block-layout="three-column"],
.presentation-layout-slot[data-layout-slot="efficiency-trends"][data-block-layout="three-column"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.presentation-layout-slot[data-layout-slot="profitability-trends"][data-block-layout="two-column"],
.presentation-layout-slot[data-layout-slot="efficiency-trends"][data-block-layout="two-column"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.presentation-layout-slot[data-layout-slot="profitability-trends"][data-block-layout="stacked"],
.presentation-layout-slot[data-layout-slot="efficiency-trends"][data-block-layout="stacked"] {
  grid-template-columns: minmax(0, 1fr);
}
.presentation-layout-slot[data-layout-slot="profitability-trends"] .chart-year-label,
.presentation-layout-slot[data-layout-slot="efficiency-trends"] .chart-year-label,
.presentation-layout-slot[data-layout-slot="dupont-history"] .chart-year-label { font-size: 11px !important; }

table,
.presentation-formula,
.responsibility-lanes,
.scroll-x-region { position: relative; width: 100%; min-width: 0; overflow-x: auto; overflow-y: visible; scrollbar-gutter: stable; overscroll-behavior-inline: contain; }
.scroll-x-region:focus-visible { outline: 2px solid #1768ac; outline-offset: 2px; }
.scroll-x-region > table { width: max(100%, max-content); }
.scroll-x-region th,
.scroll-x-region td { height: auto; vertical-align: bottom; }
.scroll-x-region td[data-align="RIGHT"],
.scroll-x-region .numeric-cell { white-space: nowrap; text-align: right; }
.scroll-x-region > .presentation-formula { width: max-content; min-width: 100%; }
.presentation-waterfall { min-width: max(100%, calc(var(--item-count, 1) * 5.5rem)); }
.dupont-scroll-region { overflow-x: auto; }
.dupont-tree { isolation: isolate; }
.dupont-tree .relationship-links { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dupont-level { display: grid; grid-auto-columns: minmax(7rem, 1fr); grid-auto-flow: column; align-items: stretch; }

@media (max-width: 70rem) {
  .research-app { height: auto; min-height: 100vh; overflow: visible; }
  .research-topbar { height: auto; grid-template-columns: 1fr auto; padding: .65rem 1rem; }
  .top-context { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
  .context-select { min-width: 9rem; }
  .research-app > main, .research-app main { height: auto; }
  .research-results { height: auto; }
  .research-workbench {
    min-height: 100vh;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr) minmax(14rem, 18rem);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "outline canvas audit";
  }
  .research-workbench .audit-column { display: flex; }
  .research-workbench .step-canvas { overflow: visible; }
  .canvas-overflow-affordance { display: none; }
}

@media (max-width: 48rem) {
  .research-topbar { display: flex; align-items: stretch; flex-direction: column; }
  .top-context, .top-actions { overflow-x: auto; }
  .research-workbench { display: block; }
  .research-workbench .step-canvas,
  #step-visualization[data-layout-key] { width: 100%; max-width: 100vw; box-sizing: border-box; }
  .workflow-outline { max-height: none; border-right: 0; border-bottom: 1px solid #cfcbc0; }
  .research-workbench .audit-column { display: block; }
  .research-workbench .analysis-list { grid-template-columns: 1fr; }
  .segment-analysis-header { align-items: stretch; flex-direction: column; }
  .segment-header-actions { justify-content: flex-start; overflow-x: auto; }
  .segment-main-charts { grid-template-columns: 1fr; }
  .mobile-series-summary {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    margin-top: .45rem;
  }
  .mobile-series-summary > div {
    min-width: 0;
    border: 1px solid #d9d5ca;
    padding: .4rem .45rem;
    background: #fbfaf5;
  }
  .mobile-series-summary span,
  .mobile-series-summary strong,
  .mobile-series-summary small { display: block; overflow-wrap: anywhere; }
  .mobile-series-summary span,
  .mobile-series-summary small { color: #6b7470; font-size: .52rem; }
  .mobile-series-summary strong { margin: .14rem 0; color: #12665b; font-family: inherit; font-size: .76rem; }
  .maturity-buckets { grid-template-columns: 1fr; }
  .secondary-panel { padding: 1rem; }
  .enterprise-portrait { grid-template-columns: 1fr; }
  .enterprise-quick-facts { grid-template-columns: 1fr; }
  .enterprise-confidence { width: fit-content; white-space: normal; }
  .diagnosis-band { grid-template-columns: 1fr; }
  .diagnosis-headline { min-height: 0; }
  .value-creation-chain { grid-template-columns: 1fr; gap: .35rem; }
  .value-creation-chain li:not(:last-child)::after { display: none; }
  .key-judgments { grid-template-columns: 1fr; }
}

@media (max-width: 48rem) {
  .peer-position-chart header { align-items: flex-start; flex-direction: column; gap: .25rem; }
}
.account-dynamics-controls { display:grid; gap:.75rem; min-width:0; margin-bottom:1rem; }
.account-dynamics-controls > label { display:grid; gap:.35rem; min-width:0; margin:0; }
.account-dynamics-controls select { width:100%; min-width:0; max-width:100%; }
.account-dynamics-actions { display:flex; flex-wrap:wrap; gap:.5rem; min-width:0; }
.account-dynamics-controls button { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.account-dynamics-controls > [role="status"] { min-width:0; overflow-wrap:anywhere; }
.account-dynamics-controls > [role="status"]:empty,
.account-dynamics-records:empty { display:none; }
.account-dynamics-records { display:grid; gap:.5rem; min-width:0; }
.account-dynamics-records > button { justify-self:start; text-align:left; }
.account-dynamics-records > div { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; min-width:0; overflow-wrap:anywhere; }
.company-dynamics-panel:has(> .account-dynamics-controls) { grid-template-rows:auto auto auto minmax(0,1fr); }
.company-dynamics-panel[data-dynamics-version="v4"]:has(> .account-dynamics-controls) { grid-template-rows:repeat(4,auto); }
.company-dynamics-filters { display:flex; gap:.5rem; flex-wrap:wrap; margin:0 0 .75rem; }
.company-dynamics-filter { border:1px solid #b9c9c3; border-radius:6px; background:#fff; color:#174f46; padding:.55rem 1rem; }
.company-dynamics-filter[aria-selected="true"] { background:#087666; color:#fff; }
.company-dynamics-panel { display:grid; min-height:0; overflow:hidden; grid-template-rows:auto auto minmax(0,1fr); }
.company-dynamics-layout { display:grid; height:100%; min-height:0; overflow:hidden; grid-template-columns:minmax(0,1.85fr) minmax(18rem,1fr); gap:12px; align-items:stretch; }
.company-dynamics-items-pane { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; padding-right:4px; }
.company-dynamics-items { display:grid; gap:10px; }
.company-dynamic-card,.company-dynamics-digest { border:1px solid #d7d3c8; border-radius:8px; background:#fff; padding:14px; min-width:0; }
.company-dynamic-card h3 { font-size:15px; margin:.35rem 0 .55rem; color:#153f39; }
.company-dynamic-meta,.company-dynamic-summary,.company-dynamics-notice { margin:0; line-height:1.55; overflow-wrap:break-word; }
.company-dynamic-meta { color:#66736f; font-size:12px; }
.company-dynamic-relevance { display:inline-block; color:#5b6965; font-size:12px; }
.company-dynamic-ai-summary { margin:.7rem 0 0; padding-top:.65rem; border-top:1px solid #ebe8df; color:#294e47; line-height:1.6; overflow-wrap:break-word; }
.company-dynamic-footer { display:flex; align-items:center; gap:.7rem; margin-top:.7rem; min-width:0; }
.company-dynamic-link { margin-left:auto; border:0; padding:0; background:transparent; color:#087666; font:inherit; font-weight:650; text-decoration:underline; text-underline-offset:.16em; cursor:pointer; }
.company-dynamic-sentiment { flex:0 0 auto; border:1px solid currentColor; border-radius:999px; padding:.14rem .55rem; font-size:12px; font-weight:700; }
.company-dynamic-sentiment[data-sentiment="POSITIVE"] { color:#087666; background:#eff8f5; }
.company-dynamic-sentiment[data-sentiment="NEGATIVE"] { color:#ad332a; background:#fff4f2; }
.company-dynamic-sentiment[data-sentiment="NEUTRAL"] { color:#65706d; background:#f4f5f3; }
.company-community-overview { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.35rem .75rem; align-items:start; border:1px solid #c7d8d2; border-radius:8px; padding:12px 14px; background:#f3f8f6; }
.company-community-overview h3 { grid-column:1; margin:0; }
.company-community-overview p { grid-column:1; margin:0; line-height:1.6; }
.company-community-overview .company-dynamic-sentiment { grid-column:2; grid-row:1 / span 2; }
.company-dynamics-digest { display:grid; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; align-content:start; gap:10px; }
.company-dynamics-digest[hidden] { display:none; }
.company-dynamics-layout:has(> .company-dynamics-digest[hidden]) { grid-template-columns:minmax(0,1fr); grid-template-rows:auto; }
.company-dynamics-digest h2,.company-digest-category h3,.company-digest-section h4 { margin:0; }
.company-digest-category { display:grid; gap:8px; border-top:1px solid #d8d4ca; padding-top:10px; }
.company-digest-section { border:1px solid #e1ded5; border-radius:6px; padding:9px 10px; }
.company-digest-section ul { margin:.45rem 0 0; padding-left:1.2rem; }
.company-digest-section li { margin:.4rem 0; line-height:1.55; }
.company-digest-link { min-height:0; border:0; padding:.2rem 0; background:transparent; color:inherit; font:inherit; font-weight:400; line-height:1.55; text-align:left; }
.company-digest-link:hover,.company-digest-link:focus-visible { color:var(--color-accent); text-decoration:underline; filter:none; }
.company-dynamic-located { outline:3px solid var(--color-accent); outline-offset:3px; }
.company-digest-section.positive h4 { color:#087666; }
.company-digest-section.negative h4 { color:#ad332a; }
.company-digest-section.neutral h4 { color:#65706d; }
.company-dynamics-unclassified { color:#6d706e; font-size:12px; }
.company-dynamics-panel[data-dynamics-version="v4"] { height:100%; min-height:0; overflow-y:auto; grid-template-rows:auto auto auto; align-content:start; }
.company-dynamics-layout[data-dynamics-version="v4"] { height:auto; overflow:visible; grid-template-columns:minmax(0,1fr) minmax(15rem,20rem); grid-template-rows:auto; align-items:start; }
.company-dynamics-layout[data-dynamics-version="v4"]:has(> .company-dynamics-digest[hidden]) { grid-template-columns:minmax(0,1fr); }
.company-dynamics-layout[data-dynamics-version="v4"] > .company-dynamics-items-pane,
.company-dynamics-layout[data-dynamics-version="v4"] > .company-dynamics-digest { height:auto; min-height:0; overflow:visible; padding-right:0; }
.dynamics-v4-filters { display:flex; flex-wrap:wrap; width:100%; align-items:end; gap:.75rem; }
.dynamics-v4-field { flex:1 1 8rem; min-width:0; color:var(--color-ink); font-size:.8125rem; }
.dynamics-v4-field select,.dynamics-v4-field input { min-width:0; min-height:2.75rem; font-size:.9375rem; }
.dynamics-v4-query { flex-basis:12rem; }
.dynamics-v4-filters > button { min-height:2.75rem; }
.dynamics-v4-card { padding:1rem; overflow-wrap:anywhere; }
.dynamics-v4-card h3 { margin:.5rem 0 .75rem; font-size:1rem; line-height:1.5; text-wrap:pretty; }
.dynamics-v4-summary,.dynamics-v4-assessment > p,.dynamics-v4-document p { max-width:70ch; margin:0 0 .75rem; font-size:.9375rem; line-height:1.75; }
.dynamics-v4-meta,.dynamics-v4-status { margin:0; color:#4e6058; font-size:.8125rem; line-height:1.65; overflow-wrap:anywhere; }
.dynamics-v4-error { margin:0; color:var(--color-error); font-size:.9375rem; overflow-wrap:anywhere; }
.dynamics-v4-assessment { margin:.75rem 0; padding-top:.75rem; border-top:1px solid var(--color-line); }
.dynamics-v4-assessment > .dynamics-v4-assessment-heading { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .75rem; margin-bottom:.4rem; font-size:.8125rem; }
.dynamics-v4-direction { display:inline-block; border:1px solid currentColor; border-radius:var(--radius); padding:.0625rem .375rem; font-weight:700; }
.dynamics-v4-direction[data-direction="POSITIVE"] { color:#096351; background:#edf6f0; }
.dynamics-v4-direction[data-direction="NEGATIVE"] { color:#9b342c; background:#fff2ed; }
.dynamics-v4-direction[data-direction="INSUFFICIENT"],.dynamics-v4-direction[data-direction="MIXED"] { color:#77500a; background:#fff5df; }
.dynamics-v4-direction[data-direction="NEUTRAL"] { color:#4e6058; background:#f1f3ee; }
.dynamics-v4-assessment > .dynamics-v4-conditions,.dynamics-v4-attention { color:#5c501d; font-size:.8125rem; }
.dynamics-v4-sources,.dynamics-v4-timeline { margin:.75rem 0; font-size:.875rem; }
.dynamics-v4-sources summary,.dynamics-v4-timeline summary { cursor:pointer; width:fit-content; min-height:2.5rem; padding:.5rem 0; color:var(--color-accent); }
.dynamics-v4-source { display:grid; gap:.25rem; margin:.5rem 0 .75rem; }
.dynamics-v4-source > span:last-child { color:#4e6058; font-size:.8125rem; }
.dynamics-v4-rules { margin:.5rem 0; font-size:.8125rem; color:#4e6058; }
.dynamics-v4-rules summary,.dynamics-v4-versions summary { cursor:pointer; padding:.4rem 0; color:var(--color-accent); }
.dynamics-v4-rules p,.dynamics-v4-versions p { margin:.4rem 0; line-height:1.65; overflow-wrap:anywhere; }
.dynamics-v4-locate { padding:0; border:0; background:transparent; color:var(--color-accent); font:inherit; font-weight:650; text-align:left; cursor:pointer; text-decoration:underline; text-underline-offset:.15em; }
.dynamics-v4-card:focus { outline:2px solid var(--color-accent); outline-offset:2px; }
.dynamics-v4-evidence-source { margin:0 0 .5rem; font-size:.8125rem; font-weight:650; color:#4e6058; overflow-wrap:anywhere; }
.dynamics-v4-card a,.dynamics-v4-dialog a { color:#096351; text-underline-offset:.15em; overflow-wrap:anywhere; }
.dynamics-v4-timeline ol { margin:.5rem 0; padding-left:1.25rem; }
.dynamics-v4-timeline li { padding:0 0 .75rem .25rem; }
.dynamics-v4-timeline p { margin:.25rem 0 0; line-height:1.65; }
.company-dynamics-layout[data-dynamics-version="v4"] .company-dynamics-digest { gap:.75rem; background:var(--color-surface-muted); }
.company-dynamics-layout[data-dynamics-version="v4"] .company-dynamics-digest h2 { font-size:1rem; line-height:1.5; }
.dynamics-v4-judgments { margin:0; padding-left:1.25rem; font-size:.875rem; }
.dynamics-v4-judgments li { padding:.75rem 0; line-height:1.6; overflow-wrap:anywhere; }
.dynamics-v4-judgments li + li { border-top:1px solid var(--color-line); }
.dynamics-v4-judgments p { margin:.35rem 0 0; color:#4e6058; font-size:.8125rem; }
.dynamics-v4-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.75rem; margin:.75rem 0; font-size:.875rem; }
.dynamics-v4-dialog { width:min(48rem,calc(100% - 2rem)); max-height:calc(100dvh - 2rem); padding:1.5rem; border:1px solid var(--color-line); border-radius:.5rem; background:var(--color-surface); color:var(--color-ink); overflow:auto; }
.dynamics-v4-dialog::backdrop { background:rgb(14 34 27 / 55%); }
.dynamics-v4-dialog > button { display:block; margin-left:auto; margin-bottom:.75rem; }
.dynamics-v4-dialog h2 { margin:0 0 1rem; font-size:1.125rem; line-height:1.5; overflow-wrap:anywhere; }
.dynamics-v4-evidence { padding:.75rem 0 1rem; border-bottom:1px solid var(--color-line); }
.dynamics-v4-evidence blockquote { max-width:70ch; margin:0 0 .75rem; white-space:pre-wrap; overflow-wrap:anywhere; font-size:.9375rem; line-height:1.75; }
.dynamics-v4-document { padding-top:1.25rem; }
.dynamics-v4-document h3 { margin-bottom:.75rem; line-height:1.5; }
.dynamics-v4-document-text { max-width:70ch; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:.9375rem; line-height:1.75; }
@media (max-width:70rem) {
  .company-dynamics-panel[data-dynamics-version="v4"] { height:auto; overflow:visible; }
  .company-dynamics-layout[data-dynamics-version="v4"] { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto; }
  .company-dynamics-layout[data-dynamics-version="v4"] > .company-dynamics-digest { grid-row:1; }
}
@media (max-width:30rem) {
  .dynamics-v4-filters { gap:.5rem; }
  .dynamics-v4-field { flex-basis:calc(50% - .5rem); }
  .dynamics-v4-query { flex-basis:100%; }
  .dynamics-v4-card { padding:.75rem; }
  .dynamics-v4-dialog { padding:1rem; }
}
.external-item-located { outline:2px solid #087666; outline-offset:-2px; background:#f1f8f5; }
.metric-governance-section { grid-column:1 / -1; }
.metric-governance { display:grid; grid-template-columns:repeat(auto-fit,minmax(22rem,1fr)); gap:.75rem; }
.metric-governance-run { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:.4rem 1rem; align-items:baseline; border-left:4px solid #087666; padding:.7rem .85rem; background:#f3f8f6; }
.metric-governance-run span { color:#55645f; font-size:.82rem; overflow-wrap:anywhere; }
.metric-governance-card { display:grid; align-content:start; gap:.4rem; border:1px solid #d7d3c8; border-radius:8px; padding:.85rem; background:#fff; }
.metric-governance-card p { margin:0; line-height:1.5; overflow-wrap:anywhere; }
.metric-governance-legacy { grid-column:1 / -1; border:1px solid #c8a25f; border-radius:8px; padding:.85rem; background:#fff8e8; }
.metric-governance-legacy p { margin:.35rem 0 0; overflow-wrap:anywhere; }
@media (max-width:70rem) { .company-dynamics-panel { height:calc(100vh - 3.75rem); } .company-dynamics-layout { grid-template-columns:minmax(0,1fr); grid-template-rows:repeat(2,minmax(0,1fr)); } }
@media (max-width:48rem) {
  .company-dynamics-panel { height:auto; min-height:0; overflow:visible; }
  .company-dynamics-layout { height:auto; overflow:visible; grid-template-rows:auto auto; }
  .company-dynamics-items-pane,
  .company-dynamics-digest { height:min(42vh,24rem); min-height:16rem; overflow-y:auto; }
}

.analysis-ai-brief-link {
  display: block;
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.65;
  text-align: left;
  cursor: pointer;
}

.analysis-ai-brief-link:hover,
.analysis-ai-brief-link:focus-visible {
  border-color: var(--color-line);
  background: var(--color-surface-muted);
  outline: none;
}

.analysis-evidence-located {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.analysis-ai-locate-status {
  margin: .5rem 0 0;
  color: var(--color-muted);
  font-size: .86rem;
}

.peer-comparison-card {
  padding: 1rem;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}

.peer-comparison-card-combined { width: 100%; }

.peer-comparison-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  align-items: end;
  gap: 1.5rem;
}

.peer-comparison-header h5,
.peer-comparison-header p { margin: 0; }
.peer-comparison-header p { margin-top: .35rem; color: var(--color-muted); font-size: .86rem; }

.peer-company-control {
  display: grid;
  gap: .35rem;
  color: var(--color-muted);
  font-size: .82rem;
}

.peer-company-select {
  width: 100%;
  padding: .5rem;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-ink);
}

.peer-comparison-legend { justify-content: center; margin: 1rem 0 .25rem; }
.peer-comparison-chart-stage { width: 100%; overflow-x: auto; }
.peer-comparison-chart { width: 100%; min-width: 44rem; height: 20.625rem; }
.peer-comparison-chart[data-show-values="false"] .peer-comparison-value-label { display: none; }
.peer-comparison-value-label { font-size: 12px; font-weight: 750; }
.peer-comparison-metric { fill: var(--color-ink) !important; font-size: 12px !important; font-weight: 750; }
.peer-chart-controls .peer-value-toggle,
.combo-chart-controls .combo-value-toggle { margin-left: auto; }

/* Comparison charts use one continuous reading column, without empty named areas. */
#step-visualization:is([data-layout-key="STEP_04"], [data-layout-key="STEP_05"], [data-layout-key="STEP_06"], [data-layout-key="STEP_07"], [data-layout-key="STEP_08"]) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
  align-content: start;
}
#step-visualization:is([data-layout-key="STEP_04"], [data-layout-key="STEP_05"], [data-layout-key="STEP_06"], [data-layout-key="STEP_07"], [data-layout-key="STEP_08"]) > .presentation-layout-slot {
  grid-area: auto;
}
#step-visualization .presentation-layout-slot:has(> .presentation-grouped-chart) {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto;
  align-content: start;
}
.presentation-grouped-chart { grid-column: 1 / -1; min-width: 0; }
.grouped-chart-stage { width: 100%; min-width: 0; }
#step-visualization .grouped-series-svg { display: block; width: 100%; min-width: 0; max-width: 100%; height: auto; max-height: none; }
.grouped-chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .4rem 1rem; margin: .3rem 0 .65rem; }
.grouped-chart-legend span { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; }
.grouped-chart-legend i { display: inline-block; width: .75rem; height: .5rem; border-radius: 2px; }
.grouped-period-label { font-size: 12px; font-weight: 700; fill: var(--color-ink); }
.grouped-value-label { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.grouped-zero-axis { stroke: #627870; stroke-width: 1; }
.chart-group-note { margin: .4rem 0 0; color: var(--color-muted); font-size: .8rem; line-height: 1.5; }

@media (max-width: 720px) {
  .peer-comparison-header { grid-template-columns: 1fr; gap: .75rem; }
  .peer-comparison-chart { min-width: 48rem; }
}

/* Accessibility additions retained with the restored workbench baseline. */
.mobile-step-navigation { display: none; }
.field-error { color: #84372f; font-weight: 650; }
[aria-invalid="true"] { border-color: #963f34; box-shadow: 0 0 0 1px #963f34; }
.show-more { display: block; min-width: 10rem; margin: 1rem auto 0; }
.show-more[hidden] { display: none; }
.chart-accessible-data { margin-top: .75rem; }
.chart-accessible-summary { margin: 0 0 .5rem; color: #45554e; font-size: .875rem; line-height: 1.6; }
.chart-data-disclosure { border-top: 1px solid var(--color-line); padding-top: .5rem; }
.chart-data-disclosure > summary { min-height: 2.75rem; color: var(--color-accent); cursor: pointer; font-weight: 700; }
.chart-data-table { margin-top: .5rem; }
.chart-index-boundary {
  border-left: 2px solid #a87b29;
  padding: .5rem .75rem;
  background: #f8f1df;
  color: #5e481f;
  font-size: .875rem;
  line-height: 1.6;
}
.compact-message {
  position: static;
  width: auto;
  max-width: none;
  margin: .55rem 1rem 0;
  transform: none;
  border-radius: .25rem;
  font-size: .875rem;
}
.external-source-kind,
.presentation-evidence-chain :is(span, strong, small, p, blockquote, em),
.peer-metric-group h5,
.matrix-evidence-columns ul,
.quality-diagnostics table,
.support-ratio-values,
.presentation-table,
.governance-chain,
.judgment-empty,
.presentation-waterfall strong { font-size: .875rem; }
.company-digest-link { min-height: 2.75rem; padding: .65rem .25rem; }
.research-app :is(button, input, select):disabled {
  border-color: #a9aea8;
  background: #e5e2d8;
  color: #4f5e57;
  cursor: not-allowed;
  opacity: 1;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible { outline: .1875rem solid #b96513; outline-offset: .1875rem; }

@media (max-width: 48rem) {
  .workbench-tabs { width: 100%; overflow-x: auto; }
  .workbench-tabs button { min-width: max-content; min-height: 2.75rem; }
  .external-tools { grid-template-columns: minmax(0, 1fr); }
  .external-tools p { margin: 0; }
  .mobile-step-navigation { display: grid; gap: .35rem; border-bottom: 1px solid var(--color-line); padding: .75rem; background: var(--color-surface); }
  .mobile-step-navigation label { color: var(--color-ink); font-weight: 700; }
  .mobile-step-navigation span { color: var(--color-muted); font-size: .875rem; }
  .company-dynamics-items-pane,
  .company-dynamics-digest { height: auto; overflow: visible; }
}

.model-selection { border: 1px solid #d8e2ec; border-radius: 12px; margin: 20px 0 0; padding: 16px; min-width: 0; }
.model-selection legend { font-weight: 650; padding: 0 6px; }
.model-selection label { display: grid; gap: 6px; min-width: 0; }
.model-selection input, .model-selection select { width: 100%; min-width: 0; box-sizing: border-box; }
.model-fields { display: grid; gap: 14px; margin-top: 14px; }
.model-fields[hidden] { display: none; }
.model-selection label span, .model-selection-note { color: #536577; font-size: 12px; line-height: 1.6; }
.model-selection-note { margin-bottom: 0; }

/* Model settings: approved catalog-first, two-column design. */
.research-app[data-active-panel="models"] {
  height: auto;
  min-height: 100dvh;
  grid-template-rows: auto 1fr;
  overflow: visible;
  background: var(--color-surface);
}
.research-app[data-active-panel="models"] .research-results { display: block; height: auto; }
.research-app[data-active-panel="models"] .research-topbar {
  height: auto;
  grid-template-columns: minmax(15rem, 1fr) auto;
  gap: 0 1rem;
  padding: 0 2rem;
  border-bottom-color: var(--color-line);
}
.research-app[data-active-panel="models"] .product-lockup { min-height: 4.25rem; }
.research-app[data-active-panel="models"] .top-actions { grid-column: 2; grid-row: 1; }
.research-app[data-active-panel="models"] .workbench-tabs button {
  min-height: 4.25rem;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .75rem;
  font-size: .875rem;
}
.research-app[data-active-panel="models"] .workbench-tabs button[aria-selected="true"] { border-bottom-color: var(--color-accent); }
.research-app[data-active-panel="models"] #toggle-run-form {
  border: 1px solid #a8b7b2;
  border-radius: var(--radius);
  min-height: 2.5rem;
  margin-left: .5rem;
  color: var(--color-accent);
  font-size: .875rem;
}
.research-app[data-active-panel="models"] .top-context {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-inline: -2rem;
  border-top: 1px solid var(--color-line);
  padding: .35rem 2rem;
  gap: 1.5rem;
  background: var(--color-surface-muted);
}
.research-app[data-active-panel="models"] .context-select { min-width: 12rem; min-height: 2rem; padding: 0; background: transparent; }
.research-app[data-active-panel="models"] .status-cluster { min-height: 2rem; margin-left: auto; padding: 0; border: 0; background: transparent; }
.model-settings-panel {
  width: 100%;
  max-width: 1600px;
  height: auto;
  margin-inline: auto;
  padding: 1.75rem 2rem 1.5rem;
  overflow: visible;
  background: var(--color-surface);
  font-size: .9375rem;
}
.model-settings-panel [hidden] { display: none !important; }
.model-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.model-page-heading h2 { font-size: 1.5rem; font-weight: 700; }
.active-model-bar { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; min-width: 0; }
.active-model-bar strong { max-width: 42rem; overflow-wrap: anywhere; color: var(--color-ink); font-size: 1rem; font-weight: 600; }
.active-model-bar span { font-size: .875rem; color: #53615e; }
.model-profiles { display: flex; align-items: center; gap: 1.25rem; min-width: 0; padding: .75rem 1rem; border: 1px solid var(--color-line); border-radius: .375rem; }
.model-profiles h3 { flex-shrink: 0; font-size: 1rem; }
.model-profile-items { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: .6rem; min-width: 0; }
#model-profile-list { display: flex; flex-wrap: wrap; gap: .6rem; min-width: 0; }
.model-profiles #model-add { flex-shrink: 0; }
.model-settings-panel button { min-height: 2.75rem; border-radius: .375rem; padding: .55rem .9rem; font-size: .875rem; font-weight: 600; }
.model-settings-panel button.secondary { border: 1px solid var(--color-line); background: var(--color-surface); color: var(--color-ink); }
.model-settings-panel button.secondary:hover:not(:disabled) { border-color: #8eb6af; background: #f0f6f2; color: #0c655e; }
.model-settings-panel :is(button, input, select):disabled { border-color: #deddd5; background: #efeee8; color: #6b726d; cursor: not-allowed; }
.model-settings-panel .model-builtin { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: .6rem; max-width: 100%; padding-inline: 1rem; text-align: left; }
.model-builtin strong { overflow-wrap: anywhere; font-weight: 600; }
.model-builtin span { padding: .05rem .4rem; border: 1px solid #c0d7d1; border-radius: .25rem; color: #216a62; font-size: .75rem; font-weight: 500; }
.model-settings-panel .model-builtin[aria-pressed="true"], .model-profile-card[data-active="true"] { border-color: #aaccc4; background: #edf5f1; }
.model-builtin[aria-pressed="true"]::after { display: grid; place-items: center; flex-shrink: 0; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--color-accent); color: #fff; content: "✓"; font-size: .7rem; }
.model-profile-card { display: grid; align-content: start; gap: .25rem; max-width: 22rem; padding: .7rem .8rem; border: 1px solid var(--color-line); border-radius: .375rem; overflow-wrap: anywhere; }
.model-profile-card[data-editing="true"] { outline: 1px solid #718b86; outline-offset: 2px; }
.model-profile-card > strong { font-size: .875rem; }
.model-profile-card small, .model-help { font-size: .8125rem; line-height: 1.6; color: #54625d; }
.model-empty { display: none; }
.model-profile-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.model-profile-actions button { min-height: 2rem; padding: .25rem .6rem; font-size: .8125rem; }
.model-draft-label { max-width: 25rem; border-radius: .25rem; padding: .4rem .6rem; background: #f0eee6; color: #5d635b; font-size: .8125rem; overflow-wrap: anywhere; }
.model-settings-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
.model-editor, .model-connection-fields, .model-picker { min-width: 0; }
.model-connection-fields { padding: 1.75rem 1.75rem 1rem 0; border-right: 1px solid var(--color-line); }
.model-picker { padding: 1.5rem 0 1rem 1.5rem; }
.model-section-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; min-height: 2.75rem; }
.model-section-heading h3 { font-size: 1.0625rem; font-weight: 650; }
.model-connection-fields > .model-section-heading { margin-bottom: 1rem; }
.model-editor-name { max-width: 13rem; overflow-wrap: anywhere; font-size: .8125rem; color: #586660; }
.model-editor-status { padding: .1rem .35rem; border-radius: .2rem; background: #f0eee6; color: #5d635b; font-size: .75rem; white-space: nowrap; }
#model-provider-doc { margin-left: auto; color: #176b63; font-size: .8125rem; text-underline-offset: .2em; white-space: nowrap; }
.model-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.25rem; }
.model-editor label:not(.model-fallback-toggle, .model-search-field), .model-field-label { display: grid; align-content: start; gap: .5rem; min-width: 0; color: var(--color-ink); font-size: .875rem; font-weight: 500; }
.model-wide { grid-column: 1 / -1; }
.model-editor :is(input, select) { width: 100%; min-width: 0; min-height: 2.75rem; margin: 0; border: 1px solid var(--color-line); border-radius: .375rem; padding: .6rem .8rem; box-sizing: border-box; background: #fffefa; color: var(--color-ink); font-size: .9375rem; font-weight: 400; }
.model-editor input::placeholder { color: #69716b; opacity: 1; }
.model-editor #model-selected { background: #f5f4ee; font-weight: 500; }
.model-key-row { display: flex; position: relative; min-width: 0; }
.model-key-row input { padding-right: 4rem; }
.model-key-row button.secondary { position: absolute; inset: .25rem .25rem .25rem auto; min-height: 0; border: 0; padding: .25rem .6rem; background: transparent; color: #586660; font-size: .8125rem; }
.model-catalog-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1rem; }
.model-catalog-header .model-section-heading { flex-wrap: nowrap; gap: .65rem; }
#model-result-count { color: #586660; font-size: .8125rem; white-space: nowrap; }
.model-settings-panel #model-fetch { display: inline-flex; align-items: center; gap: .4rem; min-height: 2rem; border: 0; padding: .3rem 0; background: transparent; font-size: .8125rem; white-space: nowrap; }
.model-settings-panel svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.model-search-field { display: flex; align-items: center; position: relative; flex: 1 1 12rem; min-width: 10rem; max-width: 18rem; margin: 0; }
.model-search-field > svg { position: absolute; left: .8rem; pointer-events: none; color: #53625d; }
.model-search-field input { padding-left: 2.5rem; }
.model-catalog-list { height: 22rem; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border: 1px solid var(--color-line); border-radius: .375rem; background: var(--color-surface); }
.model-catalog-option { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; min-height: 3.5rem; border-bottom: 1px solid var(--color-line); padding: .85rem 1rem; color: var(--color-ink); font-size: .9375rem; cursor: pointer; }
.model-catalog-option:last-child { border-bottom: 0; }
.model-catalog-option:hover:not([aria-disabled="true"]) { background: #f2f6f0; }
.model-catalog-option[aria-selected="true"] { background: #eaf3ef; color: #155f59; }
.model-catalog-list:focus-visible .model-catalog-option[data-focused="true"] { outline: 2px solid #0f766e; outline-offset: -2px; }
.model-catalog-option[aria-disabled="true"] { color: #71776f; cursor: not-allowed; background: #f7f6f0; }
.model-option-check { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; color: transparent; }
[aria-selected="true"] > .model-option-check { background: var(--color-accent); color: #fff; font-size: .8rem; }
[aria-selected="true"] > .model-option-check::after { content: "✓"; }
.model-option-name { min-width: 0; overflow-wrap: anywhere; font-weight: 550; }
.model-option-free { border: 1px solid #bed9d2; border-radius: .25rem; padding: .1rem .4rem; color: #256b62; background: #f2f8f4; font-size: .75rem; white-space: nowrap; }
.model-option-reason { grid-column: 2 / -1; color: #71776f; font-size: .75rem; }
.model-catalog-stage { position: relative; }
.model-catalog-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 2rem 1rem; text-align: center; color: #586660; pointer-events: none; }
.model-technical { margin-top: 1rem; border: 1px solid var(--color-line); border-radius: .375rem; padding: 0; }
.model-technical summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.5rem; padding: .5rem .8rem; color: var(--color-ink); font-size: .875rem; cursor: pointer; list-style: none; }
.model-technical summary::-webkit-details-marker { display: none; }
.model-technical summary::after { width: .4rem; height: .4rem; margin-right: .2rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); content: ""; }
.model-technical[open] > summary::after { transform: rotate(225deg); }
.model-technical > :not(summary) { margin: 0; border-top: 1px solid var(--color-line); padding: .8rem; }
.model-help h4 { margin: .25rem 0; }
.model-help p { margin-bottom: .6rem; overflow-wrap: anywhere; }
.model-fallback { margin-top: .25rem; border-top: 1px solid var(--color-line); padding: 1.25rem 0 1.5rem; }
.model-fallback-toggle { display: inline-flex; align-items: center; gap: .75rem; font-size: .875rem; font-weight: 600; cursor: pointer; }
.model-editor .model-fallback-toggle input { position: relative; flex-shrink: 0; width: 2.5rem; height: 1.4rem; min-height: 0; border: 1px solid #7a8a83; border-radius: 99rem; padding: 0; appearance: none; background: #b7c2ba; cursor: pointer; }
.model-fallback-toggle input::after { position: absolute; top: .15rem; left: .15rem; width: .95rem; height: .95rem; border-radius: 50%; background: #fffefa; content: ""; transition: transform 150ms ease-out; }
.model-editor .model-fallback-toggle input:checked { background: var(--color-accent); border-color: var(--color-accent); }
.model-fallback-toggle input:checked::after { transform: translateX(1.1rem); }
.model-fallback-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; gap: 1.5rem; margin-top: 1rem; }
.model-fallback-queue { min-width: 0; }
.model-fallback-list { display: grid; gap: .5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.model-fallback-list:empty { display: none; }
.model-fallback-empty { min-height: 2.75rem; margin: .5rem 0 0; padding: .65rem .9rem; border: 1px solid var(--color-line); border-radius: .375rem; color: #586660; font-size: .875rem; }
.model-fallback-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; min-height: 3rem; padding: .35rem .6rem .35rem .9rem; border: 1px solid var(--color-line); border-radius: .375rem; }
.model-fallback-row > span { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.model-fallback-row button { flex-shrink: 0; min-height: 2rem; padding: .25rem .65rem; font-size: .8125rem; }
.model-fallback-controls { display: flex; align-items: end; gap: .75rem; min-width: 0; }
.model-fallback-controls > label { flex: 1; }
.model-fallback-controls > button { flex-shrink: 0; }
.model-editor-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .75rem; border-top: 1px solid var(--color-line); padding-top: 1.25rem; }
.model-editor-actions button[type="submit"] { min-width: 9.5rem; border: 1px solid var(--color-accent); background: var(--color-accent); color: #fff; }
.model-editor-actions button[type="submit"]:hover { border-color: #0c655e; background: #0c655e; }
.model-editor .model-selection-note { margin: .75rem 0 0; color: #586660; font-size: .8125rem; overflow-wrap: anywhere; }
.model-selection-note[data-error="true"] { color: #a03824; }
@media (max-width: 75rem) {
  .research-app[data-active-panel="models"] .research-topbar { grid-template-columns: 1fr; }
  .research-app[data-active-panel="models"] .top-actions { grid-column: 1; grid-row: 2; justify-content: flex-start; min-width: 0; }
  .research-app[data-active-panel="models"] .top-context { grid-row: 3; }
  .research-app[data-active-panel="models"] .workbench-tabs button { min-height: 2.75rem; }
  .research-app[data-active-panel="models"] .product-lockup { min-height: 3.5rem; }
  .model-catalog-header { align-items: stretch; }
  .model-search-field { max-width: none; flex-basis: 100%; }
  .model-connection-fields { padding-right: 1.25rem; }
  .model-picker { padding-left: 1.25rem; }
  .model-section-heading { gap: .4rem .6rem; }
  .model-fallback-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
@media (max-width: 56rem) {
  .model-settings-layout, .model-fallback-grid { grid-template-columns: minmax(0, 1fr); }
  .model-connection-fields { padding: 1.5rem 0; border: 0; }
  .model-picker { border-top: 1px solid var(--color-line); padding: 1.25rem 0; }
  .model-catalog-header .model-section-heading { flex-wrap: wrap; }
  .model-profiles { flex-wrap: wrap; gap: .75rem; }
  .model-profile-items { flex-basis: 100%; order: 3; }
  .model-profiles #model-add { margin-left: auto; }
}
@media (max-width: 48rem) {
  .research-app[data-active-panel="models"] .research-topbar { display: grid; padding: 0 1rem; }
  .research-app[data-active-panel="models"] .top-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; overflow: visible; }
  .research-app[data-active-panel="models"] .workbench-tabs { min-width: 0; }
  .research-app[data-active-panel="models"] .workbench-tabs button { padding-inline: .65rem; }
  .research-app[data-active-panel="models"] #toggle-run-form { margin: 0; padding-inline: .6rem; font-size: .8125rem; }
  .research-app[data-active-panel="models"] .top-context { margin-inline: -1rem; padding-inline: 1rem; gap: 1rem; }
  .research-app[data-active-panel="models"] .context-select { min-width: max-content; font-size: .8125rem; }
  .research-app[data-active-panel="models"] .status-cluster { flex-shrink: 0; }
  .model-settings-panel { padding: 1.5rem 1rem; }
  .model-page-heading { align-items: flex-start; gap: .65rem; margin-bottom: 1.25rem; }
  .active-model-bar { gap: .35rem .65rem; }
  .active-model-bar strong { font-size: .875rem; }
  .model-profiles { padding: .75rem; }
  .model-settings-panel .model-builtin { padding-inline: .7rem; gap: .5rem; }
  .model-profile-card { max-width: 100%; width: 100%; }
  .model-editor-grid { gap: 1rem; }
  .model-catalog-list { height: 21rem; }
  .model-catalog-option { padding-inline: .7rem; gap: .5rem; }
  .model-editor-actions button[type="submit"] { flex: 1; }
}
@media (max-width: 25rem) {
  .model-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .model-fallback-controls { flex-wrap: wrap; }
  .model-fallback-controls > label { flex-basis: 100%; }
  .model-fallback-controls > button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .analysis-evidence-located,
  .evidence-index-located { animation: none !important; }
}


/* Full-width history workspace and concise evidence records. */
#step-visualization[data-layout-key="STEP_10"] > [data-layout-slot="peer-history"] { grid-template-columns: minmax(0, 1fr); }
.history-chart-workspace { width: 100%; min-width: 0; }
.history-chart-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.history-chart-tabs button { padding: .45rem .75rem; border: 1px solid #d5dce2; border-radius: .4rem; background: transparent; color: #445568; cursor: pointer; }
.history-chart-tabs button[aria-pressed="true"] { background: #e5efff; border-color: #7297cd; color: #173e72; }
.history-chart-workspace [hidden] { display: none !important; }
#step-visualization[data-layout-key="STEP_10"] .history-chart-workspace .presentation-series { height: 22rem; }
.history-bars { display: block; width: 100%; height: auto; min-height: 18rem; }
.peer-position-table { width: 100%; table-layout: fixed; }
.peer-position-table th, .peer-position-table td { text-align: center; padding: .55rem .8rem; white-space: nowrap; }
.audit-item .formal-source-meta { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }
.formal-source-meta a { white-space: nowrap; color: #245da2; }
#step-visualization[data-layout-key="STEP_11"] [data-layout-slot="regulatory-history"] td:first-child,
#step-visualization[data-layout-key="STEP_11"] [data-layout-slot="regulatory-history"] td:last-child { white-space: nowrap; width: 1%; }
#step-visualization[data-layout-key="STEP_11"] [data-layout-slot="regulatory-history"] td:nth-child(4) { width: 100%; line-height: 1.6; }
.history-chart-workspace .chart-accessible-summary { display: none; }

/* Host layout only: the Lingnan explorer renders in its own unmodified document. */
.research-app[data-active-panel="ai-industry-chain"] .top-context,
.research-app[data-active-panel="ai-industry-chain"] #workflow-message { display: none; }
.research-app[data-active-panel="ai-industry-chain"] .research-topbar { grid-template-columns: minmax(10rem, 1fr) auto; }
#tab-ai-industry-chain { grid-row: 1 / -1; padding: 0; min-height: 0; display: flex; flex-direction: column; }
#tab-ai-industry-chain[hidden] { display: none; }
#ai-industry-chain-frame { display: block; width: 100%; flex: 1; min-height: 0; border: 0; background: #f7f6f3; }
.ai-news-toggle { display: flex; align-items: center; gap: .5rem; }
.ai-news-toggle input { width: auto; }
.site-filing {
  color: var(--color-muted);
  font-family: inherit;
  font-size: .65rem;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}
@media (max-width: 70rem) {
  #ai-industry-chain-frame { flex: none; height: calc(100dvh - 12rem); min-height: 32rem; }
}
/* The account entry does not participate in the workbench tab strip. */
#workbench-login{flex-shrink:0;white-space:nowrap}
body.auth-open{overflow:hidden}
@media(max-width:48rem){
  .research-app .research-topbar #workbench-login{position:absolute;top:.65rem;right:.7rem;width:auto;min-width:4rem;padding:.4rem .65rem}
  .research-app .product-lockup{padding-right:5rem}
}

/* Analysis views share one secondary navigation, preserving their original panels. */
.research-app:has(.analysis-navigation:not([hidden])) { grid-template-rows: auto auto minmax(0, 1fr); }
.analysis-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: .55rem 1.75rem;
  border-bottom: 1px solid #dedbd2;
  background: #fffefa;
}
.analysis-navigation[hidden] { display: none; }
.analysis-navigation .workbench-tabs { gap: .3rem; min-width: 0; overflow-x: auto; }
.analysis-navigation [role="tab"] {
  flex-shrink: 0;
  padding: .55rem .9rem;
  border: 0;
  border-radius: .3rem;
  background: transparent;
  color: #505853;
  font-size: .85rem;
}
.analysis-navigation [role="tab"][aria-selected="true"] { background: #e9efea; color: var(--color-accent); }
.analysis-navigation #toggle-run-form { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 48rem) {
  .analysis-navigation { padding: .5rem .75rem; gap: .5rem; }
  .analysis-navigation [role="tab"] { padding: .5rem .65rem; }
}

@media (max-width: 48rem) {
  .research-topbar .status-cluster { flex-shrink: 0; white-space: nowrap; }
}
