:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --ink: #18211f;
  --muted: #6a7370;
  --line: #d9dfdc;
  --accent: #176b5d;
  --accent-2: #b17312;
  --danger: #b13d37;
  --good: #24784f;
  --shadow: 0 18px 45px rgba(30, 44, 40, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 16px;
}

.source-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 13px;
}

.source-stack {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.module-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--accent);
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.module-link:hover {
  color: white;
  background: var(--accent);
}

.source-stack > span {
  color: var(--muted);
  font-size: 11px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.controls-panel {
  align-self: start;
  display: grid;
  gap: 18px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

.control-block,
.control-row {
  display: grid;
  gap: 8px;
}

.control-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input[type="search"],
input[type="text"],
input[type="range"] {
  width: 100%;
}

select,
input[type="search"],
input[type="text"] {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
}

.control-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 6px;
}

.strategy-save-row {
  grid-template-columns: minmax(0, 1fr) 40px 40px;
}

.compact-button {
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
}

.compact-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.compact-button:disabled {
  color: #aab2ae;
  background: var(--surface-2);
  cursor: default;
}

output {
  color: var(--ink);
  font-weight: 700;
}

.advanced-controls {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.advanced-controls summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.advanced-body {
  display: grid;
  gap: 16px;
  padding-top: 16px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
}

.switch input {
  opacity: 0;
  position: absolute;
}

.switch span {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c8d0cc;
  transition: background 0.18s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease;
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.85fr);
  gap: 18px;
}

.metric-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.research-hub-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.research-hub-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.research-hub-summary::-webkit-details-marker {
  display: none;
}

.research-hub-summary > span,
.research-hub-summary strong,
.research-hub-summary small {
  display: block;
}

.research-hub-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.research-hub-summary b {
  color: var(--accent);
  font-size: 12px;
}

.research-hub-panel[open] .research-hub-summary {
  border-bottom: 1px solid var(--line);
}

.research-hub-content {
  min-width: 0;
}

.research-hub-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafbfa;
}

.research-hub-toolbar select,
.research-hub-toolbar button {
  width: auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
}

.research-hub-toolbar button {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.research-hub-toolbar button:disabled {
  color: var(--muted);
  background: var(--surface-2);
  cursor: wait;
}

.research-refresh-status {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.research-hub-body {
  max-height: 470px;
  overflow: auto;
}

.research-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(250px, 1.5fr) minmax(170px, 1fr) minmax(90px, 0.55fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

button.research-row {
  cursor: pointer;
}

button.research-row:hover,
button.research-row:focus-visible {
  background: #eef6f3;
}

.research-row-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
}

.data-quality-body {
  max-height: 680px;
}

.quality-refresh {
  width: 34px !important;
  flex: 0 0 34px;
  padding: 0 !important;
  color: var(--accent) !important;
  font-size: 18px !important;
}

.quality-refresh.loading {
  animation: quality-refresh-spin 0.9s linear infinite;
}

@keyframes quality-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.data-quality-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.data-quality-overview > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.data-quality-overview > span:last-child {
  border-right: 0;
}

.data-quality-overview small,
.data-quality-overview em,
.quality-coverage-grid small,
.quality-coverage-grid em,
.quality-cache-strip small,
.quality-cache-strip em,
.quality-anchor small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.data-quality-overview strong {
  font-size: 17px;
}

.data-quality-overview > span.good strong {
  color: var(--good);
}

.data-quality-overview > span.caution strong {
  color: var(--accent-2);
}

.data-quality-overview > span.danger strong {
  color: var(--danger);
}

.data-quality-overview > span > i,
.quality-coverage-grid > span > i {
  position: relative;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-2);
}

.data-quality-overview > span > i > u,
.quality-coverage-grid > span > i > u {
  display: block;
  height: 100%;
  background: var(--good);
  text-decoration: none;
}

.data-quality-overview > span.caution > i > u {
  background: var(--accent-2);
}

.data-quality-overview > span.danger > i > u {
  background: var(--danger);
}

.quality-coverage-section {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 14px;
  background: #fafbfa;
}

.quality-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.quality-section-title small {
  color: var(--muted);
  font-size: 10px;
}

.quality-coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
}

.quality-coverage-grid > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 12px;
  min-width: 0;
}

.quality-coverage-grid > span > span {
  display: grid;
  min-width: 0;
}

.quality-coverage-grid > span > b {
  font-size: 12px;
}

.quality-coverage-grid > span > i {
  grid-column: 1;
}

.quality-coverage-grid > span > em {
  grid-column: 2;
  grid-row: 2;
  text-align: right;
}

.quality-coverage-grid > span > i > u.supplementary {
  background: var(--accent-2);
}

.quality-cache-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.quality-cache-strip > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 16px;
  border-right: 1px solid var(--line);
}

.quality-cache-strip > span:last-child {
  border-right: 0;
}

.data-quality-row {
  grid-template-columns: minmax(160px, 0.8fr) minmax(270px, 1.5fr) minmax(180px, 0.85fr) minmax(150px, 0.65fr);
}

.quality-issue,
.quality-anchor {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.quality-issue > span,
.quality-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.quality-issue strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-severity,
.quality-category,
.quality-fields i {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.quality-severity.critical {
  border-color: #d9aaa3;
  color: var(--danger);
  background: #fbefed;
}

.quality-severity.warning {
  border-color: #d8c08a;
  color: #7b5a12;
  background: #fcf8ec;
}

.quality-severity.info {
  border-color: #9cbab0;
  color: var(--accent);
  background: #eef6f3;
}

.research-company,
.task-comparison,
.change-description,
.change-core,
.turning-evidence,
.turning-verification,
.turning-period {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.research-company strong,
.research-company small,
.task-comparison strong,
.task-comparison small,
.change-description strong,
.change-description small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-company small,
.task-comparison small,
.change-description small,
.change-core small,
.turning-evidence small,
.turning-period small {
  color: var(--muted);
  font-size: 11px;
}

.turning-point-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.turning-point-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 16px;
  border-right: 1px solid var(--line);
}

.turning-point-summary > span:last-child {
  border-right: 0;
}

.turning-point-summary small,
.turning-period small {
  color: var(--muted);
  font-size: 10px;
}

.turning-point-summary strong {
  font-size: 17px;
}

.turning-point-summary .confirmed strong,
.turning-stage.good,
.turning-continuity.good,
.industry-breadth-label.good {
  color: var(--good);
}

.turning-point-summary .early strong,
.turning-stage.positive,
.turning-continuity.positive,
.industry-breadth-label.positive {
  color: var(--accent);
}

.turning-point-summary .divergent strong,
.turning-stage.caution,
.turning-continuity.caution,
.industry-breadth-label.caution {
  color: var(--accent-2);
}

.turning-point-summary .pressure strong,
.turning-stage.danger,
.turning-continuity.danger,
.industry-breadth-label.danger {
  color: var(--danger);
}

.resonance-summary .quality_repair strong,
.resonance-label.good {
  color: var(--good);
}

.resonance-summary .expansion_consumption strong,
.resonance-label.caution {
  color: var(--accent-2);
}

.resonance-summary .cash_repair strong,
.resonance-label.positive {
  color: var(--accent);
}

.resonance-summary .pressure_stack strong,
.resonance-label.danger {
  color: var(--danger);
}

.turning-point-row {
  grid-template-columns: minmax(170px, 0.85fr) minmax(250px, 1.35fr) minmax(220px, 1.25fr) minmax(150px, 0.65fr);
}

.industry-breadth-row {
  grid-template-columns: minmax(160px, 0.8fr) minmax(190px, 1fr) minmax(230px, 1.2fr) minmax(120px, 0.55fr);
}

.operating-resonance-row {
  grid-template-columns: minmax(170px, 0.85fr) minmax(250px, 1.35fr) minmax(220px, 1.25fr) minmax(150px, 0.65fr);
}

.industry-breadth-state,
.industry-breadth-metrics,
.industry-breadth-sample {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.industry-breadth-state small,
.industry-breadth-metrics small,
.industry-breadth-sample small {
  color: var(--muted);
  font-size: 10px;
}

.industry-breadth-label {
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.industry-breadth-row.focused {
  background: #eef6f3;
  box-shadow: inset 3px 0 0 var(--accent);
}

.turning-evidence strong,
.turning-evidence small,
.resonance-evidence strong,
.resonance-evidence small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turning-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.turning-stage,
.turning-continuity {
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.resonance-evidence,
.resonance-verification,
.resonance-period {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.resonance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.resonance-label,
.resonance-count {
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.resonance-count {
  border-color: var(--line);
  font-weight: 700;
}

.resonance-verification i {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.resonance-period small {
  color: var(--muted);
  font-size: 10px;
}

.turning-verification {
  gap: 4px;
}

.turning-verification i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.turning-verification i::before {
  content: "核对 ";
  color: var(--accent);
  font-weight: 800;
}

.turning-period strong {
  font-size: 12px;
}

.task-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.task-reasons i {
  border: 1px solid #ead6b8;
  border-radius: 4px;
  padding: 3px 6px;
  color: #835708;
  background: #fff9ed;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.task-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-date.due,
.review-priority.high {
  color: var(--danger);
}

.review-priority {
  font-size: 12px;
  font-weight: 800;
}

.review-priority.medium {
  color: var(--accent-2);
}

.review-priority.routine {
  color: var(--muted);
}

.research-hub-footnote {
  margin: 0;
  padding: 9px 16px;
  color: var(--muted);
  background: #fafbfa;
  font-size: 11px;
}

.compare-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.compare-title {
  align-items: center;
}

.compare-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-actions select,
.compare-actions > button:not(.icon-button) {
  width: auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
}

.compare-actions > button:not(.icon-button) {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.compare-actions > button:disabled {
  color: #aab2ae;
  background: var(--surface-2);
  cursor: default;
}

.compare-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 8px 6px 10px;
  color: var(--accent);
  background: #e8f4f0;
  font-size: 12px;
  font-weight: 700;
}

.compare-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}

.compare-table-wrap {
  overflow-x: auto;
}

.compare-table {
  min-width: 680px;
  table-layout: auto;
}

.compare-table tr {
  cursor: default;
}

.compare-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 124px;
  background: var(--surface);
}

.compare-table thead th {
  min-width: 150px;
  padding-top: 14px;
  color: var(--ink);
}

.compare-table thead small,
.compare-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.compare-table td strong {
  font-size: 14px;
}

.backtest-section {
  border-top: 1px solid var(--line);
}

.backtest-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.backtest-summary > div {
  min-height: 88px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.backtest-summary > div:nth-child(4) {
  border-right: 0;
}

.backtest-summary span,
.backtest-summary p {
  color: var(--muted);
  font-size: 12px;
}

.backtest-summary strong {
  display: block;
  margin-top: 7px;
  font-size: 19px;
}

.backtest-summary p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

#backtestChart {
  height: 240px;
  border-top: 1px solid var(--line);
}

.metric-card {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
}

.metric-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.opportunity-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.opportunity-title {
  align-items: center;
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-controls label {
  white-space: nowrap;
}

.map-controls select {
  width: auto;
  min-height: 34px;
}

.map-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.map-check input {
  accent-color: var(--accent);
}

.opportunity-map-wrap {
  position: relative;
  min-height: 340px;
  background: #fbfcfb;
}

.opportunity-map-canvas {
  height: 340px;
  padding: 0;
  outline: none;
  cursor: crosshair;
}

.opportunity-tooltip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 4px;
  width: 176px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(30, 44, 40, 0.14);
  pointer-events: none;
  font-size: 11px;
}

.opportunity-tooltip strong {
  font-size: 13px;
}

.opportunity-tooltip small,
.opportunity-tooltip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 9px 16px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot,
.legend-ring {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.good {
  background: var(--good);
}

.legend-dot.neutral {
  background: var(--accent-2);
}

.legend-dot.bad {
  background: #8a9691;
}

.legend-ring {
  border: 2px solid var(--danger);
  background: transparent;
}

.legend-focus {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 2px #fff;
}

.strategy-backtest-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.strategy-lab-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.strategy-lab-summary::-webkit-details-marker {
  display: none;
}

.strategy-lab-summary > span,
.strategy-lab-summary strong,
.strategy-lab-summary small {
  display: block;
}

.strategy-lab-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.strategy-lab-summary b {
  color: var(--accent);
  font-size: 12px;
}

.strategy-backtest-panel[open] .strategy-lab-summary {
  border-bottom: 1px solid var(--line);
}

.strategy-backtest-panel[open] .strategy-lab-summary b {
  font-size: 0;
}

.strategy-backtest-panel[open] .strategy-lab-summary b::after {
  content: "收起";
  font-size: 12px;
}

.strategy-lab-content {
  min-width: 0;
}

.strategy-backtest-title {
  align-items: center;
}

.strategy-backtest-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.strategy-backtest-controls label {
  white-space: nowrap;
}

.strategy-backtest-controls select,
.strategy-backtest-controls input,
.strategy-backtest-controls button {
  width: auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: var(--surface);
}

.strategy-backtest-controls input {
  width: 58px;
}

.strategy-fixed-scope {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.strategy-backtest-controls button {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.strategy-backtest-controls .icon-button {
  width: 34px;
  flex: 0 0 34px;
  padding: 0;
  border-color: var(--line);
  color: var(--accent);
  background: var(--surface);
  font-size: 17px;
}

.strategy-backtest-controls .icon-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-2);
}

.strategy-backtest-controls button:disabled {
  border-color: var(--line);
  color: #aab2ae;
  background: var(--surface-2);
  cursor: default;
}

.strategy-backtest-body {
  min-height: 120px;
}

.strategy-candidates {
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--line);
}

.strategy-candidate-note {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.strategy-candidate-table {
  min-width: 980px;
}

.strategy-candidate-table th:nth-child(1),
.strategy-candidate-table td:nth-child(1) {
  width: 66px;
}

.strategy-candidate-table th:nth-child(4),
.strategy-candidate-table td:nth-child(4) {
  width: 60px;
  text-align: right;
}

.strategy-candidate-table td strong,
.strategy-candidate-table td small {
  display: block;
}

.strategy-candidate-table td small {
  margin-top: 2px;
  color: var(--muted);
}

.candidate-status,
.candidate-risk {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
  font-size: 11px;
}

.candidate-status.selected {
  border-color: #8fb5a1;
  color: #1e6542;
  background: #edf6f1;
}

.candidate-status.below_threshold,
.candidate-risk {
  border-color: #d9aaa3;
  color: #91443a;
  background: #fbefed;
}

.candidate-status.industry_cap {
  color: var(--muted);
  background: var(--surface-2);
}

.candidate-clear {
  color: var(--muted);
  font-size: 11px;
}

.strategy-definition {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
}

.strategy-definition strong {
  color: var(--accent);
}

.strategy-definition span {
  color: var(--muted);
}

.strategy-readiness {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(100px, 0.7fr));
  align-items: start;
}

.strategy-readiness > div,
.strategy-metrics > div {
  min-height: 84px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.strategy-readiness > div:last-of-type,
.strategy-metrics > div:last-child {
  border-right: 0;
}

.strategy-readiness strong,
.strategy-readiness span,
.strategy-metrics span,
.strategy-metrics strong {
  display: block;
}

.strategy-readiness strong {
  font-size: 18px;
}

.strategy-readiness span,
.strategy-warnings span {
  color: var(--muted);
  font-size: 12px;
}

.strategy-readiness p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 12px;
}

.strategy-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.strategy-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.strategy-metrics strong {
  margin-top: 7px;
  font-size: 19px;
}

.strategy-chart-wrap {
  border-bottom: 1px solid var(--line);
}

.strategy-chart-wrap canvas {
  height: 230px;
  padding: 12px 16px;
}

.strategy-diagnostics {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
  border-bottom: 1px solid var(--line);
}

.strategy-diagnostics > section {
  min-width: 0;
  padding: 14px 16px;
}

.strategy-diagnostics > section + section {
  border-left: 1px solid var(--line);
}

.strategy-calendar-wrap {
  max-height: 220px;
  border: 1px solid var(--line);
  overflow: auto;
}

.strategy-calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.strategy-calendar-table th,
.strategy-calendar-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.strategy-calendar-table th {
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 600;
}

.strategy-calendar-table th:first-child,
.strategy-calendar-table td:first-child {
  text-align: left;
}

.strategy-calendar-table td:first-child strong,
.strategy-calendar-table td:first-child small {
  display: block;
}

.strategy-calendar-table td:first-child small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.strategy-calendar-table tr:last-child td {
  border-bottom: 0;
}

.strategy-drawdown dl {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.strategy-drawdown dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.strategy-drawdown dt {
  color: var(--muted);
}

.strategy-drawdown dd {
  margin: 0;
  font-weight: 600;
}

.strategy-holdings {
  padding: 14px 16px 8px;
}

.holdings-list {
  display: grid;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.holdings-list details {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.holdings-list summary {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) minmax(280px, auto);
  gap: 10px;
  padding: 10px 0;
  color: var(--ink);
  cursor: pointer;
  list-style-position: inside;
  font-size: 12px;
}

.holdings-list summary span {
  color: var(--muted);
}

.holdings-list summary span:last-child {
  text-align: right;
}

.strategy-contributors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 0 10px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.strategy-contributors span {
  min-width: 0;
}

.strategy-contributors b {
  margin-right: 8px;
  color: var(--ink);
}

.holdings-list p {
  margin: 0;
  padding: 0 0 10px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.strategy-position-wrap {
  width: calc(100% - 18px);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px 18px;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.strategy-position-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12px;
}

.strategy-position-table th,
.strategy-position-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.strategy-position-table th {
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 600;
}

.strategy-position-table th:nth-last-child(-n + 3),
.strategy-position-table td:nth-last-child(-n + 3) {
  text-align: right;
}

.strategy-position-table tr:last-child td {
  border-bottom: 0;
}

.strategy-warnings {
  display: grid;
  gap: 5px;
  padding: 10px 16px 14px;
  background: var(--surface-2);
}

.strategy-factor-research {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.strategy-diagnostics-research {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.diagnostics-heading {
  padding: 0 16px 12px;
}

.diagnostics-section {
  min-width: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.diagnostics-table,
.sensitivity-table {
  min-width: 680px;
}

.sensitivity-cell b,
.sensitivity-cell small {
  display: block;
}

.sensitivity-cell small {
  margin-top: 3px;
}

.sensitivity-cell.strong {
  background: #e2f0e7;
}

.sensitivity-cell.positive {
  background: #f0f6f2;
}

.sensitivity-cell.negative {
  background: #f8e9e7;
}

.style-exposure-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.9fr);
  gap: 14px;
}

.style-factor-list {
  display: grid;
  align-content: start;
  border-top: 1px solid var(--line);
}

.style-factor-row {
  display: grid;
  grid-template-columns: 76px minmax(160px, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.style-factor-row > span {
  text-align: right;
  font-weight: 700;
}

.exposure-track {
  position: relative;
  height: 10px;
  background: linear-gradient(to right, transparent 49.6%, var(--muted) 49.6%, var(--muted) 50.4%, transparent 50.4%);
}

.exposure-track i {
  position: absolute;
  top: 2px;
  height: 6px;
}

.exposure-track i.positive {
  background: var(--good);
}

.exposure-track i.negative {
  background: var(--danger);
}

.industry-exposure-table {
  min-width: 420px;
}

.strategy-factor-research > .subsection-title {
  padding: 0 16px 12px;
}

.factor-summary,
.factor-quintiles {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.factor-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.factor-quintiles {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 0;
}

.factor-summary > div,
.factor-quintiles > div {
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.factor-summary > div:last-child,
.factor-quintiles > div:last-child {
  border-right: 0;
}

.factor-summary span,
.factor-summary strong,
.factor-quintiles span,
.factor-quintiles strong {
  display: block;
}

.factor-summary span,
.factor-quintiles span {
  color: var(--muted);
  font-size: 12px;
}

.factor-summary strong,
.factor-quintiles strong {
  margin-top: 6px;
  font-size: 17px;
}

.factor-detail-section,
.strategy-attribution {
  min-width: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.research-table-wrap {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  overflow: auto;
}

.research-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 12px;
}

.research-table th,
.research-table td {
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.research-table th:first-child,
.research-table td:first-child {
  text-align: left;
}

.research-table th:last-child,
.research-table td:last-child {
  border-right: 0;
}

.research-table tr:last-child td {
  border-bottom: 0;
}

.research-table th {
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 600;
}

.research-table small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.research-table.compact {
  min-width: 520px;
}

.correlation-table {
  min-width: 920px;
}

.factor-year-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.factor-year-grid details {
  min-width: 0;
  border: 1px solid var(--line);
}

.factor-year-grid summary {
  padding: 9px 10px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.factor-year-grid .research-table-wrap {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

.attribution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.attribution-grid .research-table {
  min-width: 420px;
}

.concentration-test {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent-2);
  background: var(--surface-2);
  font-size: 12px;
}

.concentration-test span {
  color: var(--muted);
}

.list-panel {
  min-height: 560px;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 55px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.title-stack {
  display: grid;
  gap: 4px;
}

.title-stack span {
  white-space: normal;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 54px);
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(24, 33, 31, 0.12);
}

.list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#companyTable[data-view="research"] th:nth-child(1),
#companyTable[data-view="research"] td:nth-child(1) {
  width: 12%;
}

#companyTable[data-view="research"] th:nth-child(2),
#companyTable[data-view="research"] td:nth-child(2) {
  width: 20%;
}

#companyTable[data-view="research"] th:nth-child(3),
#companyTable[data-view="research"] td:nth-child(3) {
  width: 27%;
}

#companyTable[data-view="research"] th:nth-child(4),
#companyTable[data-view="research"] td:nth-child(4) {
  width: 12%;
}

#companyTable[data-view="research"] th:nth-child(5),
#companyTable[data-view="research"] td:nth-child(5) {
  width: 12%;
}

#companyTable[data-view="research"] th:nth-child(6),
#companyTable[data-view="research"] td:nth-child(6) {
  width: 17%;
}

#companyTable[data-view="research"] th,
#companyTable[data-view="research"] td {
  padding-right: 10px;
  padding-left: 10px;
}

.research-snapshot,
.data-date {
  display: grid;
  gap: 3px;
}

.research-snapshot strong,
.data-date strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.research-snapshot small,
.data-date small {
  color: var(--muted);
  font-size: 10px;
}

.research-snapshot .review,
.risk-count.triggered {
  color: var(--danger);
}

.research-snapshot .watch,
.research-snapshot .mixed {
  color: var(--accent-2);
}

.research-snapshot .sound,
.risk-count.clear {
  color: var(--good);
}

.research-snapshot .insufficient {
  color: var(--muted);
}

.risk-count,
.confidence-label {
  font-size: 11px;
  font-weight: 700;
}

.confidence-label.high {
  color: var(--good);
}

.confidence-label.medium {
  color: var(--accent-2);
}

.confidence-label.low {
  color: var(--muted);
}

.table-wrap {
  max-height: 620px;
  overflow: auto;
}

thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.active {
  background: #eef6f3;
}

.company-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.company-name strong,
.company-name small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-mark {
  margin-right: 4px;
  color: var(--accent-2);
  font-size: 11px;
}

.research-mark {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--muted);
  vertical-align: 2px;
}

.research-mark.priority {
  background: var(--accent);
}

.research-mark.tracking {
  background: #3f6fa3;
}

.research-mark.cautious {
  background: var(--accent-2);
}

.research-mark.excluded {
  background: var(--danger);
}

.company-name small {
  color: var(--muted);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 26px;
  border-radius: 999px;
  color: white;
  background: var(--accent);
  font-weight: 800;
}

.pager {
  display: grid;
  grid-template-columns: 36px minmax(100px, auto) 36px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.pager button {
  width: 36px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.pager button:disabled {
  color: #aab2ae;
  background: var(--surface-2);
  cursor: default;
}

.detail-stack {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.company-panel {
  padding: 18px;
}

.company-research-panel {
  min-width: 0;
}

.company-tabs {
  display: flex;
  min-height: 46px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.company-tabs button {
  flex: 1 0 auto;
  min-width: 92px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.company-tabs button:last-child {
  border-right: 0;
}

.company-tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

.company-tab-panel {
  min-width: 0;
  padding: 18px;
}

.company-tab-panel.chart-panel,
.company-tab-panel.valuation-panel {
  padding: 0;
}

.health-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-left: 4px solid var(--accent-2);
  background: var(--surface-2);
}

.health-summary.sound {
  border-left-color: var(--good);
}

.health-summary.review,
.health-summary.watch {
  border-left-color: var(--danger);
}

.health-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.health-summary h3 {
  margin: 5px 0;
  font-size: 17px;
}

.health-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.confidence-block {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.confidence-block span,
.confidence-block small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.confidence-block strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.health-data-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.health-data-strip > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.health-data-strip > div:last-child {
  border-right: 0;
}

.health-data-strip span,
.health-data-strip small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.health-data-strip strong {
  display: block;
  margin: 4px 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.health-dimensions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin-top: 14px;
}

.health-dimension {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.health-dimension > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.health-dimension > div span {
  font-size: 13px;
  font-weight: 800;
}

.health-dimension > div strong {
  color: var(--accent-2);
  font-size: 11px;
}

.health-dimension.strong > div strong,
.health-dimension.sound > div strong {
  color: var(--good);
}

.health-dimension.risk > div strong {
  color: var(--danger);
}

.health-dimension p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.current-snapshot,
.hard-risk-section,
.statement-change-section,
.quarterly-review-section {
  margin-top: 18px;
}

.quarterly-review-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.quarterly-review-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.quarterly-review-details > summary::-webkit-details-marker {
  display: none;
}

.quarterly-review-details > summary span,
.quarterly-review-details > summary strong,
.quarterly-review-details > summary small {
  display: block;
}

.quarterly-review-details > summary strong {
  font-size: 13px;
}

.quarterly-review-details > summary small,
.quarterly-review-details > summary b {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.quarterly-review-details > summary b::after {
  content: " +";
  color: var(--accent);
}

.quarterly-review-details[open] > summary b {
  font-size: 0;
}

.quarterly-review-details[open] > summary b::after {
  content: "收起 −";
  font-size: 10px;
}

.quarterly-review-body {
  margin-top: 14px;
}

.quarterly-review-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.quarterly-review-meta > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.quarterly-review-meta > div:last-child {
  border-right: 0;
}

.quarterly-review-meta span,
.quarterly-review-meta strong,
.quarterly-review-meta small {
  display: block;
}

.quarterly-review-meta span,
.quarterly-review-meta small {
  color: var(--muted);
  font-size: 10px;
}

.quarterly-review-meta strong {
  margin: 4px 0 2px;
  font-size: 14px;
}

.quarterly-review-grid {
  margin-top: 12px;
  border: 1px solid var(--line);
}

.quarterly-review-grid article {
  display: grid;
  grid-template-columns: minmax(78px, 0.9fr) repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.quarterly-review-grid article:last-child {
  border-bottom: 0;
}

.quarterly-review-grid article > h4,
.quarterly-review-grid article > div {
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
}

.quarterly-review-grid article > div:last-child {
  border-right: 0;
}

.quarterly-review-grid h4 {
  align-self: center;
  font-size: 11px;
  line-height: 1.35;
}

.quarterly-review-grid span,
.quarterly-review-grid strong,
.quarterly-review-grid small {
  display: block;
  overflow-wrap: anywhere;
}

.quarterly-review-grid span,
.quarterly-review-grid small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.quarterly-review-grid strong {
  margin: 4px 0 2px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.quarterly-review-grid strong.good {
  color: var(--good);
}

.quarterly-review-grid strong.bad {
  color: var(--danger);
}

.quarterly-review-notes {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent-2);
  background: #fff8eb;
}

.quarterly-review-notes.verification {
  border-left-color: var(--accent);
  background: #edf7f4;
}

.quarterly-review-notes h4 {
  margin: 0;
  font-size: 11px;
}

.quarterly-review-notes ul,
.quarterly-review-limitations {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.quarterly-review-limitations {
  margin-top: 8px;
}

.statement-change-section,
.research-history-details,
.report-event-details {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.statement-change-section .subsection-title > div p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.profit-bridge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.profit-bridge > div {
  min-width: 0;
  padding: 11px 12px;
}

.profit-bridge span,
.profit-bridge strong {
  display: block;
}

.profit-bridge span {
  color: var(--muted);
  font-size: 10px;
}

.profit-bridge strong {
  margin-top: 4px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.profit-bridge > i {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.change-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.change-metric-strip > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.change-metric-strip > div:nth-child(3n) {
  border-right: 0;
}

.change-metric-strip > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.change-metric-strip span,
.change-metric-strip strong {
  display: block;
}

.change-metric-strip span {
  color: var(--muted);
  font-size: 10px;
}

.change-metric-strip strong {
  margin-top: 4px;
  font-size: 13px;
}

.change-signal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin-top: 6px;
}

.change-signal-details {
  margin-top: 10px;
}

.change-signal-details > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.change-signal-details > summary span {
  margin-left: 4px;
  color: var(--accent);
}

.change-signal {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.change-signal strong {
  color: var(--accent-2);
}

.change-signal.positive strong {
  color: var(--good);
}

.change-signal.negative strong {
  color: var(--danger);
}

.change-signal span,
.method-note {
  color: var(--muted);
}

.method-note {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.5;
}

.research-history-details {
  margin-top: 18px;
}

.report-event-details {
  margin-top: 18px;
}

.research-history-details > summary,
.report-event-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.research-history-details > summary::-webkit-details-marker,
.report-event-details > summary::-webkit-details-marker {
  display: none;
}

.research-history-details > summary > span strong,
.research-history-details > summary > span small,
.report-event-details > summary > span strong,
.report-event-details > summary > span small {
  display: block;
}

.research-history-details > summary > span strong,
.report-event-details > summary > span strong {
  font-size: 13px;
}

.research-history-details > summary > span small,
.research-history-details > summary > b,
.report-event-details > summary > span small,
.report-event-details > summary > b {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.research-history-details > summary > b::after,
.report-event-details > summary > b::after {
  content: " +";
  color: var(--accent);
}

.research-history-details[open] > summary > b::after,
.report-event-details[open] > summary > b::after {
  content: " −";
}

.research-history-body {
  margin-top: 14px;
}

.report-event-content {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  margin-top: 14px;
}

.verification-calendar {
  min-width: 0;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.report-event-content .subsection-title {
  margin: 0 0 10px;
}

.next-report-window {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.next-report-window.overdue {
  border-left-color: var(--danger);
}

.next-report-window span,
.next-report-window small {
  color: var(--muted);
  font-size: 10px;
}

.next-report-window strong {
  font-size: 14px;
}

.verification-list {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
  padding: 0;
  list-style-position: inside;
}

.verification-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.verification-list li::marker {
  color: var(--accent);
  font-weight: 800;
}

.verification-list .local-check {
  color: var(--muted);
  list-style: none;
}

.verification-list .local-check span {
  display: inline-block;
  margin-right: 6px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
}

.report-timeline {
  min-width: 0;
}

.report-event-list {
  display: grid;
}

.report-event {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.report-event time {
  color: var(--accent-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.report-event.proxy time {
  color: var(--muted);
}

.report-event > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 7px;
  align-items: baseline;
}

.report-event span {
  color: var(--muted);
  font-size: 10px;
}

.report-event strong {
  min-width: 0;
  font-size: 11px;
}

.report-event small {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.history-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
}

.history-controls label,
.history-controls span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.history-controls label {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
}

.history-controls select {
  width: 100%;
  min-width: 0;
  height: 34px;
}

.history-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.history-comparison > section {
  min-width: 0;
  padding: 14px;
}

.history-comparison > section + section {
  border-left: 1px solid var(--line);
}

.history-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.history-caption span {
  color: var(--accent);
  font-size: 11px;
}

.history-subsequent .history-caption span {
  color: var(--accent-2);
}

.history-comparison h4 {
  margin: 8px 0 4px;
  font-size: 14px;
}

.history-comparison > section > p {
  min-height: 34px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.history-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.history-metrics > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.history-metrics span,
.history-metrics strong,
.subsequent-results span,
.subsequent-results strong {
  display: block;
}

.history-metrics span,
.subsequent-results span {
  color: var(--muted);
  font-size: 9px;
}

.history-metrics strong,
.subsequent-results strong {
  margin-top: 3px;
  font-size: 12px;
}

.history-conclusion {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding-left: 9px;
  border-left: 3px solid var(--accent-2);
  font-size: 10px;
}

.history-conclusion.sound {
  border-left-color: var(--good);
}

.history-conclusion.review,
.history-conclusion.watch {
  border-left-color: var(--danger);
}

.history-conclusion span {
  color: var(--muted);
}

.subsequent-results {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.history-limitations {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.history-limitations summary {
  cursor: pointer;
  font-weight: 700;
}

.history-limitations p {
  margin: 6px 0 0;
}

.legacy-score-details {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.working-capital-section,
.dupont-trend-section,
.dupont-trend-details,
.growth-consistency-section,
.growth-consistency-details,
.deducted-profit-section,
.deducted-profit-details,
.capital-efficiency-section,
.capital-efficiency-details,
.working-capital-details {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.working-capital-details > summary,
.dupont-trend-details > summary,
.growth-consistency-details > summary,
.deducted-profit-details > summary,
.capital-efficiency-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.working-capital-details > summary::-webkit-details-marker,
.dupont-trend-details > summary::-webkit-details-marker,
.growth-consistency-details > summary::-webkit-details-marker,
.deducted-profit-details > summary::-webkit-details-marker,
.capital-efficiency-details > summary::-webkit-details-marker {
  display: none;
}

.working-capital-details > summary span,
.working-capital-details > summary strong,
.working-capital-details > summary small,
.dupont-trend-details > summary span,
.dupont-trend-details > summary strong,
.dupont-trend-details > summary small,
.growth-consistency-details > summary span,
.growth-consistency-details > summary strong,
.growth-consistency-details > summary small,
.deducted-profit-details > summary span,
.deducted-profit-details > summary strong,
.deducted-profit-details > summary small,
.capital-efficiency-details > summary span,
.capital-efficiency-details > summary strong,
.capital-efficiency-details > summary small {
  display: block;
}

.working-capital-details > summary strong,
.dupont-trend-details > summary strong,
.growth-consistency-details > summary strong,
.deducted-profit-details > summary strong,
.capital-efficiency-details > summary strong {
  font-size: 13px;
}

.working-capital-details > summary small,
.working-capital-details > summary b,
.dupont-trend-details > summary small,
.dupont-trend-details > summary b,
.growth-consistency-details > summary small,
.growth-consistency-details > summary b,
.deducted-profit-details > summary small,
.deducted-profit-details > summary b,
.capital-efficiency-details > summary small,
.capital-efficiency-details > summary b {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.working-capital-details > summary b,
.dupont-trend-details > summary b,
.growth-consistency-details > summary b,
.deducted-profit-details > summary b,
.capital-efficiency-details > summary b {
  flex: 0 0 auto;
}

.working-capital-details > summary b::after,
.dupont-trend-details > summary b::after,
.growth-consistency-details > summary b::after,
.deducted-profit-details > summary b::after,
.capital-efficiency-details > summary b::after {
  content: " +";
  color: var(--accent);
}

.working-capital-details[open] > summary b,
.dupont-trend-details[open] > summary b,
.growth-consistency-details[open] > summary b,
.deducted-profit-details[open] > summary b,
.capital-efficiency-details[open] > summary b {
  font-size: 0;
}

.working-capital-details[open] > summary b::after,
.dupont-trend-details[open] > summary b::after,
.growth-consistency-details[open] > summary b::after,
.deducted-profit-details[open] > summary b::after,
.capital-efficiency-details[open] > summary b::after {
  content: "收起 −";
  font-size: 10px;
}

.cash-conversion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.growth-consistency-metrics,
.deducted-profit-metrics,
.capital-efficiency-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.growth-consistency-metrics .quality-metric,
.deducted-profit-metrics .quality-metric,
.capital-efficiency-metrics .quality-metric {
  min-height: 76px;
  border-bottom: 0;
}

.growth-consistency-metrics .quality-metric:last-child,
.deducted-profit-metrics .quality-metric:last-child,
.capital-efficiency-metrics .quality-metric:last-child {
  border-right: 0;
}

.growth-consistency-trajectory,
.deducted-profit-trajectory,
.capital-efficiency-trajectory {
  margin-top: 14px;
}

.growth-consistency-trajectory .subsection-title,
.deducted-profit-trajectory .subsection-title,
.capital-efficiency-trajectory .subsection-title {
  margin-bottom: 9px;
}

.growth-consistency-grid,
.deducted-profit-grid,
.capital-efficiency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border: 1px solid var(--line);
}

.growth-consistency-grid article,
.deducted-profit-grid article,
.capital-efficiency-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.growth-consistency-grid article:last-child,
.deducted-profit-grid article:last-child,
.capital-efficiency-grid article:last-child {
  border-right: 0;
}

.growth-consistency-grid article strong,
.deducted-profit-grid article strong,
.capital-efficiency-grid article strong {
  font-size: 13px;
}

.growth-consistency-grid article span,
.deducted-profit-grid article span,
.capital-efficiency-grid article span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.growth-consistency-observations,
.deducted-profit-observations,
.capital-efficiency-observations {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style-position: inside;
}

.growth-consistency-observations li,
.deducted-profit-observations li,
.capital-efficiency-observations li {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.growth-consistency-observations li::marker,
.deducted-profit-observations li::marker,
.capital-efficiency-observations li::marker {
  color: var(--accent);
}

.dupont-change-bridge {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  background: #fffaf1;
}

.dupont-change-bridge article {
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.dupont-change-bridge article:last-child {
  border-right: 0;
}

.dupont-change-bridge span,
.dupont-change-bridge strong {
  display: block;
}

.dupont-change-bridge span {
  min-height: 28px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.dupont-change-bridge strong {
  margin-top: 6px;
  font-size: 14px;
}

.dupont-trend-trajectory {
  margin-top: 14px;
}

.dupont-trend-trajectory .subsection-title {
  margin-bottom: 9px;
}

.dupont-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border: 1px solid var(--line);
}

.dupont-trend-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dupont-trend-grid article:last-child {
  border-right: 0;
}

.dupont-trend-grid article strong {
  font-size: 13px;
}

.dupont-trend-grid article span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.dupont-component-change {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
}

.cash-conversion-grid .quality-metric {
  min-height: 76px;
  border-bottom: 0;
}

.cash-conversion-grid .quality-metric:last-child {
  border-right: 0;
}

.working-capital-trajectory {
  margin-top: 14px;
}

.working-capital-trajectory .subsection-title {
  margin-bottom: 9px;
}

.working-capital-trend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border: 1px solid var(--line);
}

.working-capital-trend article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.working-capital-trend article:last-child {
  border-right: 0;
}

.working-capital-trend article strong {
  font-size: 13px;
}

.working-capital-trend article span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.working-capital-observations {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style-position: inside;
}

.working-capital-observations li {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.working-capital-observations li::marker {
  color: var(--accent);
}

.legacy-score-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.legacy-score-details > p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 11px;
}

.company-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.company-head h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.company-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.company-report-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--accent);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.company-report-link:hover,
.company-report-link:focus-visible {
  border-color: var(--accent);
  background: #eef7f4;
  outline: 0;
}

.company-title-line h2 {
  min-width: 0;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover,
.icon-button.active {
  border-color: #d4aa61;
  color: var(--accent-2);
  background: #fff8eb;
}

.icon-button:disabled {
  color: #aab2ae;
  background: var(--surface-2);
  cursor: default;
}

.company-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.price-stack {
  text-align: right;
}

.price-stack strong {
  display: block;
  font-size: 24px;
}

.price-stack span {
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.tag {
  color: var(--accent);
  background: #e8f4f0;
}

.freshness-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: 6px;
  background: var(--surface-2);
}

.freshness-strip.complete {
  border-left-color: var(--good);
}

.freshness-strip > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.freshness-strip > div:nth-child(4) {
  border-right: 0;
}

.freshness-strip span,
.freshness-strip p {
  color: var(--muted);
  font-size: 11px;
}

.freshness-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.freshness-strip p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mini-metric {
  min-height: 78px;
  border-top: 1px solid var(--line);
  padding: 12px 2px;
}

.mini-metric span {
  color: var(--muted);
  font-size: 12px;
}

.mini-metric strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

.score-section,
.risk-section,
.quality-section,
.dupont-section,
.anomaly-section,
.research-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dupont-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr) auto);
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dupont-chain .quality-metric {
  border-right: 0;
}

.dupont-chain > b {
  color: var(--muted);
  font-size: 16px;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.anomaly-list {
  display: grid;
  gap: 8px;
}

.anomaly-item {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 12px;
  padding: 9px 10px;
  border-left: 3px solid var(--accent-2);
  background: #fff8eb;
  font-size: 12px;
}

.anomaly-item.danger {
  border-left-color: var(--danger);
  background: #fff1f0;
}

.anomaly-item.clear {
  border-left-color: var(--good);
  background: #edf7f1;
}

.anomaly-item span {
  color: var(--muted);
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quality-metric {
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
}

.quality-metric:last-child {
  border-right: 0;
}

.quality-metric span {
  display: block;
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.quality-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
}

.research-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.research-form label {
  display: grid;
  gap: 7px;
}

.research-form select,
.research-form textarea,
.research-form input[type="date"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
}

.research-form input[type="date"] {
  min-height: 40px;
  resize: none;
}

.research-form textarea {
  min-height: 82px;
  line-height: 1.55;
}

.research-form button {
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.review-date-field {
  max-width: 240px;
}

.research-version-alert {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr;
  gap: 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--good);
  background: var(--surface-2);
  font-size: 12px;
}

.research-version-alert span {
  color: var(--muted);
}

.research-version-alert.warning {
  border-left-color: var(--danger);
}

.research-version-alert.warning strong {
  color: var(--danger);
}

.research-version-alert.due {
  border-left-color: var(--accent-2);
}

.research-version-alert.due strong {
  color: var(--accent-2);
}

.subsection-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.subsection-title h3 {
  margin-bottom: 0;
  font-size: 14px;
}

.subsection-title span {
  color: var(--muted);
  font-size: 12px;
}

.score-breakdown {
  display: grid;
  gap: 11px;
}

.score-row {
  display: grid;
  grid-template-columns: 72px minmax(80px, 1fr) 64px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.score-row > span {
  color: var(--muted);
}

.score-row > strong {
  text-align: right;
  font-size: 12px;
}

.score-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.score-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.risk-list {
  display: grid;
  gap: 8px;
}

.risk-item {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 12px;
}

.risk-item:last-child {
  border-bottom: 0;
}

.risk-item span {
  color: var(--muted);
}

.risk-item.danger {
  color: var(--danger);
}

.risk-item.clear {
  color: var(--good);
}

.chart-panel {
  overflow: hidden;
}

.trend-chart-wrap {
  position: relative;
}

.market-chart-wrap {
  position: relative;
  padding: 0 18px 8px;
}

.market-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 280px;
  cursor: crosshair;
  touch-action: pan-y;
}

.market-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.market-history-summary article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.market-history-summary article:last-child {
  border-right: 0;
}

.market-history-summary span,
.market-history-summary small {
  color: var(--muted);
  font-size: 11px;
}

.market-history-summary strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.market-history-summary strong.good {
  color: var(--good);
}

.market-history-summary strong.bad {
  color: var(--danger);
}

.market-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 6px;
  width: 216px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 22px rgba(30, 44, 40, 0.14);
  pointer-events: none;
  font-size: 11px;
}

.market-tooltip[hidden] {
  display: none;
}

.market-tooltip strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.market-tooltip strong small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.market-tooltip span {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 6px;
  align-items: center;
  color: var(--muted);
}

.market-tooltip span i {
  width: 8px;
  height: 8px;
  background: var(--trend-color);
}

.market-tooltip span b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trend-chart-wrap canvas {
  cursor: crosshair;
  touch-action: pan-y;
}

.trend-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 6px;
  width: 218px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 22px rgba(30, 44, 40, 0.14);
  pointer-events: none;
  font-size: 11px;
}

.trend-tooltip[hidden] {
  display: none;
}

.trend-tooltip strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.trend-tooltip strong small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.trend-tooltip span {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 6px;
  align-items: center;
  color: var(--muted);
}

.trend-tooltip span i {
  width: 8px;
  height: 8px;
  background: var(--trend-color);
}

.trend-tooltip span b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.valuation-panel {
  overflow: hidden;
}

.valuation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.valuation-item {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.valuation-item:nth-child(2n) {
  border-right: 0;
}

.valuation-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.valuation-item > span,
.valuation-item small {
  color: var(--muted);
  font-size: 12px;
}

.valuation-item strong {
  font-size: 21px;
}

.valuation-item b {
  font-size: 13px;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

canvas {
  display: block;
  width: 100%;
  height: 260px;
  padding: 12px;
}

.peer-panel {
  padding-bottom: 8px;
}

.industry-profile-section {
  container-type: inline-size;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.industry-profile-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.industry-profile-title h2,
.industry-profile-title span {
  display: block;
}

.industry-profile-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.industry-profile-title > b {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
}

.industry-profile-summary,
.industry-profile-metrics,
.industry-rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.industry-profile-summary article,
.industry-profile-metrics article,
.industry-rate-grid article {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.industry-profile-summary article:nth-child(2n),
.industry-profile-metrics article:nth-child(2n),
.industry-rate-grid article:nth-child(2n) {
  border-right: 0;
}

.industry-profile-summary article:last-child,
.industry-profile-metrics article:last-child,
.industry-rate-grid article:last-child,
.industry-profile-summary article:nth-last-child(2):nth-child(odd),
.industry-profile-metrics article:nth-last-child(2):nth-child(odd),
.industry-rate-grid article:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.industry-profile-summary article:last-child:nth-child(odd),
.industry-profile-metrics article:last-child:nth-child(odd),
.industry-rate-grid article:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: 0;
}

.industry-profile-summary span,
.industry-profile-summary strong,
.industry-profile-summary small,
.industry-profile-metrics span,
.industry-profile-metrics strong,
.industry-profile-metrics small,
.industry-rate-grid span,
.industry-rate-grid strong,
.industry-rate-grid small {
  display: block;
  overflow-wrap: anywhere;
}

.industry-profile-summary span,
.industry-profile-summary small,
.industry-profile-metrics span,
.industry-profile-metrics small,
.industry-rate-grid span,
.industry-rate-grid small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.industry-profile-summary strong,
.industry-profile-metrics strong,
.industry-rate-grid strong {
  margin: 5px 0 3px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.industry-rate-grid article.risk strong {
  color: var(--danger);
}

.industry-profile-subtitle {
  margin: 16px 16px 9px;
}

.industry-stage-list {
  display: grid;
  gap: 8px;
  padding: 0 16px;
}

.industry-stage-list > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}

.industry-stage-list > div > i {
  height: 7px;
  overflow: hidden;
  background: var(--surface-2);
}

.industry-stage-list > div > i > b {
  display: block;
  height: 100%;
  background: #8a9691;
}

.industry-stage-list > div.confirmed > i > b {
  background: var(--good);
}

.industry-stage-list > div.early > i > b {
  background: var(--accent);
}

.industry-stage-list > div.divergent > i > b {
  background: var(--accent-2);
}

.industry-stage-list > div.pressure > i > b {
  background: var(--danger);
}

.industry-stage-list > div > strong {
  text-align: right;
}

.industry-history {
  margin: 18px 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.industry-history summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 10px;
  cursor: pointer;
  color: var(--ink);
}

.industry-history summary span,
.industry-history summary strong,
.industry-history summary small {
  display: block;
}

.industry-history summary small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
}

.industry-history summary > b {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
}

.industry-history-list {
  display: grid;
  gap: 8px;
}

.industry-history-row {
  display: grid;
  grid-template-columns: minmax(92px, 1.2fr) repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.industry-history-row > div {
  min-width: 0;
  padding: 9px 8px;
  border-right: 1px solid var(--line);
}

.industry-history-row > div:last-child {
  border-right: 0;
}

.industry-history-row span,
.industry-history-row strong,
.industry-history-row small {
  display: block;
  overflow-wrap: anywhere;
}

.industry-history-row span,
.industry-history-row small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.industry-history-row strong {
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.industry-history-period {
  background: var(--surface-2);
}

.industry-history-period > strong {
  font-size: 14px;
}

.industry-history > p,
.industry-history > ul {
  line-height: 1.55;
}

.industry-history > p {
  margin: 10px 0 0;
}

.industry-history > ul {
  margin: 7px 0 2px;
  padding-left: 18px;
}

.industry-profile-method {
  margin: 16px 16px 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.industry-profile-method summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.industry-profile-method p,
.industry-profile-method ul {
  line-height: 1.55;
}

.industry-profile-method p {
  margin: 10px 0 0;
}

.industry-profile-method ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.company-peer-section {
  padding-top: 8px;
}

.company-peer-history {
  container-type: inline-size;
  margin: 18px 16px 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.company-peer-history summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 10px;
  cursor: pointer;
  color: var(--ink);
}

.company-peer-history summary span,
.company-peer-history summary strong,
.company-peer-history summary small {
  display: block;
}

.company-peer-history summary small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
}

.company-peer-history summary > b {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
}

.peer-history-list {
  display: grid;
  gap: 8px;
}

.peer-history-row {
  display: grid;
  grid-template-columns: minmax(82px, 1.05fr) repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.peer-history-row > div {
  min-width: 0;
  padding: 9px 8px;
  border-right: 1px solid var(--line);
}

.peer-history-row > div:last-child {
  border-right: 0;
}

.peer-history-row span,
.peer-history-row strong,
.peer-history-row small,
.peer-history-row em {
  display: block;
  overflow-wrap: anywhere;
}

.peer-history-row span,
.peer-history-row small,
.peer-history-row em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.4;
}

.peer-history-row strong {
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.peer-history-row em {
  margin-top: 2px;
}

.peer-history-period {
  background: var(--surface-2);
}

.peer-history-period > strong {
  font-size: 14px;
}

.company-peer-history > p,
.company-peer-history > ul {
  line-height: 1.55;
}

.company-peer-history > p {
  margin: 10px 0 0;
}

.company-peer-history > ul {
  margin: 7px 0 2px;
  padding-left: 18px;
}

@container (max-width: 560px) {
  .industry-history-row,
  .peer-history-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .industry-history-row > div,
  .peer-history-row > div {
    border-bottom: 1px solid var(--line);
  }

  .industry-history-row > div:not(:first-child):nth-child(odd),
  .peer-history-row > div:not(:first-child):nth-child(odd) {
    border-right: 0;
  }

  .industry-history-row > div:last-child,
  .peer-history-row > div:last-child {
    border-bottom: 0;
  }

  .industry-history-period,
  .peer-history-period {
    grid-column: 1 / -1;
    border-right: 0 !important;
  }
}

.peer-title {
  align-items: flex-start;
}

.peer-group-switch {
  grid-template-columns: repeat(3, 64px);
}

.peer-axis-caption {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 2px 124px 0 132px;
  color: var(--muted);
  font-size: 10px;
}

.peer-axis-caption b {
  color: var(--ink);
  font-weight: 600;
}

.peer-axis-caption span:last-child {
  text-align: right;
}

.peer-metrics {
  display: grid;
}

.peer-metric {
  display: grid;
  grid-template-columns: 108px minmax(80px, 1fr) minmax(112px, auto);
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

.peer-metric-label {
  display: grid;
  gap: 4px;
}

.peer-metric-label small {
  color: var(--muted);
  font-size: 10px;
}

.peer-position {
  position: relative;
  height: 24px;
  background: linear-gradient(to bottom, transparent 11px, var(--surface-2) 11px, var(--surface-2) 14px, transparent 14px);
}

.peer-position::before,
.peer-position::after {
  position: absolute;
  top: 9px;
  width: 1px;
  height: 7px;
  content: "";
  background: var(--line);
}

.peer-position::before {
  left: 0;
}

.peer-position::after {
  right: 0;
}

.peer-position .peer-midline {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1px;
  background: var(--muted);
}

.peer-position > b {
  position: absolute;
  top: 6px;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateX(-50%);
}

.peer-position.unavailable {
  opacity: 0.45;
}

.peer-value {
  display: grid;
  min-width: 108px;
  justify-items: end;
  line-height: 1.2;
}

.peer-value small,
.peer-value span {
  margin-top: 3px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}

.peer-value strong {
  white-space: nowrap;
  color: var(--ink);
  font-size: 12px;
}

.peer-value small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.good {
  color: var(--good);
}

.bad {
  color: var(--danger);
}

@media (max-width: 1100px) {
  .workspace,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .controls-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-form button {
    justify-self: start;
  }
}

@media (max-width: 900px) {
  .industry-history-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .peer-history-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .industry-history-row > div {
    border-bottom: 1px solid var(--line);
  }

  .peer-history-row > div {
    border-bottom: 1px solid var(--line);
  }

  .industry-history-row > div:not(:first-child):nth-child(odd) {
    border-right: 0;
  }

  .peer-history-row > div:not(:first-child):nth-child(odd) {
    border-right: 0;
  }

  .industry-history-row > div:last-child {
    border-bottom: 0;
  }

  .peer-history-row > div:last-child {
    border-bottom: 0;
  }

  .industry-history-period {
    grid-column: 1 / -1;
    border-right: 0 !important;
  }

  .peer-history-period {
    grid-column: 1 / -1;
    border-right: 0 !important;
  }
}

@media (max-width: 720px) {
  .research-hub-summary {
    align-items: flex-start;
    gap: 12px;
  }

  .research-hub-summary b {
    flex: 0 0 auto;
  }

  .research-hub-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .research-hub-toolbar label {
    align-self: center;
  }

  .research-hub-toolbar select {
    flex: 1 1 130px;
    min-width: 0;
  }

  .research-hub-toolbar button {
    flex: 0 0 auto;
  }

  .research-refresh-status {
    flex: 1 1 100%;
  }

  .research-row,
  .change-row,
  .turning-point-row,
  .industry-breadth-row,
  .operating-resonance-row,
  .data-quality-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 12px 14px;
  }

  .research-row-head {
    display: none;
  }

  .task-reasons,
  .change-description,
  .turning-evidence,
  .industry-breadth-state,
  .resonance-evidence,
  .quality-issue {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .task-comparison,
  .change-core,
  .turning-verification,
  .industry-breadth-metrics,
  .resonance-verification,
  .quality-fields {
    grid-column: 1;
    grid-row: 3;
  }

  .task-date,
  .review-priority,
  .turning-period,
  .industry-breadth-sample,
  .resonance-period,
  .quality-anchor {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .change-description strong,
  .change-description small,
  .turning-evidence strong,
  .turning-evidence small,
  .resonance-evidence strong,
  .resonance-evidence small,
  .quality-issue strong,
  .task-comparison strong,
  .task-comparison small {
    overflow: visible;
    white-space: normal;
  }

  .turning-point-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-quality-overview,
  .quality-cache-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-quality-overview > span:nth-child(2n),
  .quality-cache-strip > span:nth-child(2n) {
    border-right: 0;
  }

  .data-quality-overview > span:nth-child(-n + 2),
  .quality-cache-strip > span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .quality-coverage-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .turning-point-summary > span:nth-child(2n) {
    border-right: 0;
  }

  .turning-point-summary > span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .profit-bridge {
    grid-template-columns: 1fr;
  }

  .profit-bridge > i {
    display: none;
  }

  .profit-bridge > div + div {
    border-top: 1px solid var(--line);
  }

  .change-metric-strip,
  .change-signal-list,
  .history-comparison {
    grid-template-columns: 1fr;
  }

  .change-metric-strip > div,
  .change-metric-strip > div:nth-child(3n),
  .change-metric-strip > div:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .change-metric-strip > div:last-child {
    border-bottom: 0;
  }

  .change-signal {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .history-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .history-comparison > section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .history-comparison > section > p {
    min-height: 0;
  }

  .research-history-details > summary {
    align-items: flex-start;
  }

  .quarterly-review-details > summary {
    align-items: flex-start;
  }

  .quarterly-review-meta {
    grid-template-columns: 1fr;
  }

  .quarterly-review-meta > div,
  .quarterly-review-meta > div:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quarterly-review-meta > div:last-child {
    border-bottom: 0;
  }

  .quarterly-review-notes {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .report-event-details > summary {
    align-items: flex-start;
  }

  .working-capital-details > summary {
    align-items: flex-start;
  }

  .dupont-trend-details > summary {
    align-items: flex-start;
  }

  .growth-consistency-details > summary {
    align-items: flex-start;
  }

  .deducted-profit-details > summary {
    align-items: flex-start;
  }

  .capital-efficiency-details > summary {
    align-items: flex-start;
  }

  .growth-consistency-metrics,
  .deducted-profit-metrics,
  .capital-efficiency-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .growth-consistency-metrics .quality-metric,
  .growth-consistency-metrics .quality-metric:last-child,
  .deducted-profit-metrics .quality-metric,
  .deducted-profit-metrics .quality-metric:last-child,
  .capital-efficiency-metrics .quality-metric,
  .capital-efficiency-metrics .quality-metric:last-child {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .growth-consistency-metrics .quality-metric:nth-child(2n),
  .deducted-profit-metrics .quality-metric:nth-child(2n),
  .capital-efficiency-metrics .quality-metric:nth-child(2n) {
    border-right: 0;
  }

  .growth-consistency-metrics .quality-metric:nth-last-child(-n + 2),
  .deducted-profit-metrics .quality-metric:nth-last-child(-n + 2),
  .capital-efficiency-metrics .quality-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .growth-consistency-grid,
  .deducted-profit-grid,
  .capital-efficiency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .growth-consistency-grid article,
  .growth-consistency-grid article:last-child,
  .deducted-profit-grid article,
  .deducted-profit-grid article:last-child,
  .capital-efficiency-grid article,
  .capital-efficiency-grid article:last-child {
    border-right: 1px solid var(--line);
  }

  .growth-consistency-grid article:nth-child(2n),
  .deducted-profit-grid article:nth-child(2n),
  .capital-efficiency-grid article:nth-child(2n) {
    border-right: 0;
  }

  .dupont-change-bridge {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dupont-change-bridge article,
  .dupont-change-bridge article:last-child {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .dupont-change-bridge article:nth-child(2n) {
    border-right: 0;
  }

  .dupont-change-bridge article:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .dupont-trend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dupont-trend-grid article,
  .dupont-trend-grid article:last-child {
    border-right: 1px solid var(--line);
  }

  .dupont-trend-grid article:nth-child(2n) {
    border-right: 0;
  }

  .cash-conversion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cash-conversion-grid .quality-metric,
  .cash-conversion-grid .quality-metric:last-child {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .cash-conversion-grid .quality-metric:nth-child(2n) {
    border-right: 0;
  }

  .cash-conversion-grid .quality-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .working-capital-trend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .working-capital-trend article,
  .working-capital-trend article:last-child {
    border-right: 1px solid var(--line);
  }

  .working-capital-trend article:nth-child(2n) {
    border-right: 0;
  }

  .report-event-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .verification-calendar {
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .report-event {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .source-stack {
    justify-items: start;
    width: 100%;
  }

  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .module-link {
    justify-content: center;
    width: 100%;
  }

  .workspace {
    padding: 12px;
  }

  .controls-panel,
  .metric-strip,
  .metric-grid,
  .valuation-grid {
    grid-template-columns: 1fr;
  }

  .valuation-item,
  .valuation-item:nth-child(2n),
  .valuation-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .valuation-item:last-child {
    border-bottom: 0;
  }

  .compare-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .opportunity-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .strategy-backtest-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .strategy-backtest-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .strategy-backtest-controls select,
  .strategy-backtest-controls input,
  .strategy-backtest-controls button {
    flex: 1 1 90px;
  }

  .strategy-backtest-controls #strategyLabMode {
    flex-basis: 170px;
  }

  .strategy-backtest-controls #strategyCandidateCount {
    flex: 0 0 62px;
  }

  .strategy-fixed-scope {
    flex: 1 1 100%;
    white-space: normal;
  }

  .strategy-backtest-controls .icon-button {
    flex: 0 0 42px;
  }

  .strategy-readiness,
  .strategy-metrics,
  .factor-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factor-quintiles {
    grid-template-columns: 1fr;
  }

  .factor-quintiles > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .factor-quintiles > div:last-child {
    border-bottom: 0;
  }

  .strategy-definition {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .strategy-diagnostics {
    grid-template-columns: 1fr;
  }

  .strategy-diagnostics > section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .strategy-readiness > div:nth-child(2n),
  .strategy-metrics > div:nth-child(2n),
  .factor-summary > div:nth-child(2n) {
    border-right: 0;
  }

  .strategy-readiness > div:nth-child(-n + 2),
  .strategy-metrics > div:nth-child(-n + 4),
  .factor-summary > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .holdings-list summary {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .holdings-list summary span:last-child {
    text-align: left;
  }

  .strategy-contributors {
    grid-template-columns: 1fr;
    gap: 5px;
    padding-left: 0;
  }

  .strategy-position-wrap {
    width: 100%;
    margin-left: 0;
  }

  .factor-year-grid,
  .attribution-grid,
  .style-exposure-grid {
    grid-template-columns: 1fr;
  }

  .factor-detail-section,
  .strategy-attribution,
  .diagnostics-section {
    padding: 12px;
  }

  .concentration-test {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .map-controls {
    flex-wrap: wrap;
  }

  .map-controls select {
    min-width: 0;
    flex: 1 1 190px;
  }

  .compare-actions {
    width: 100%;
  }

  .compare-actions select {
    min-width: 0;
  }

  .compare-actions > button:not(.icon-button) {
    flex: 1 1 auto;
  }

  .backtest-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backtest-summary > div:nth-child(2) {
    border-right: 0;
  }

  .backtest-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .quality-grid,
  .freshness-strip,
  .research-form,
  .health-data-strip,
  .health-dimensions,
  .health-summary {
    grid-template-columns: 1fr;
  }

  .list-actions {
    width: 100%;
    justify-content: space-between;
  }

  #companyTable[data-view="research"] {
    min-width: 690px;
  }

  .review-date-field {
    max-width: none;
  }

  .research-version-alert {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .peer-title {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .peer-title .title-stack {
    width: 100%;
  }

  .peer-group-switch {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .peer-axis-caption {
    display: none;
  }

  .peer-metric {
    grid-template-columns: 72px minmax(60px, 1fr) minmax(108px, auto);
    gap: 10px;
    padding: 10px 14px;
  }

  .confidence-block {
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .health-data-strip > div,
  .health-data-strip > div:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .health-data-strip > div:last-child {
    border-bottom: 0;
  }

  .company-tabs button {
    flex: 0 0 auto;
  }

  .company-tab-panel {
    padding: 14px;
  }

  .market-history-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-history-summary article:nth-child(2n) {
    border-right: 0;
  }

  .market-history-summary article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .market-chart-wrap {
    padding: 0 8px 8px;
  }

  .market-chart-wrap canvas {
    height: 250px;
  }

  .freshness-strip > div,
  .freshness-strip > div:nth-child(4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .freshness-strip > div:nth-child(4) {
    border-bottom: 0;
  }

  .dupont-chain {
    grid-template-columns: 1fr auto 1fr;
  }

  .dupont-chain > :nth-child(6),
  .dupont-chain > :nth-child(7) {
    margin-top: 8px;
  }

  .anomaly-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .quality-metric,
  .quality-metric:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quality-metric:last-child {
    border-bottom: 0;
  }

  .quality-metric span {
    min-height: 0;
  }

  .research-form button {
    width: 100%;
  }

  th,
  td {
    padding: 10px;
  }

  .company-head {
    grid-template-columns: 1fr;
  }

  .price-stack {
    text-align: left;
  }

  .risk-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
