:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --line: #d9dfdd;
  --text: #17201d;
  --muted: #63706b;
  --root: #263238;
  --listing: #6b7f2a;
  --type: #b26038;
  --sector: #287d7d;
  --candidate: #b23b4d;
  --signal: #4f6fa8;
  --risk: #8b5d28;
  --evidence: #50805e;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 760;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}

.mode-switch button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 0 12px;
  cursor: pointer;
}

.mode-switch button:last-child {
  border-right: 0;
}

.mode-switch button.active {
  background: #263238;
  color: white;
}

.language-select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  color: var(--text);
  padding: 0 28px 0 9px;
  cursor: pointer;
}

.icon-button,
.filter-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 7px;
  cursor: pointer;
  min-height: 34px;
}

.icon-button {
  padding: 0 12px;
}

.icon-button:hover,
.filter-button:hover {
  border-color: #aab5b1;
  background: #fafbfa;
}

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

.hidden {
  display: none !important;
}

.metric-card {
  min-height: 96px;
  padding: 12px 16px;
  background: var(--surface);
}

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

.metric-card strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  line-height: 1.05;
}

.metric-card em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  color: #596661;
  font-size: 11px;
  line-height: 1.35;
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 292px minmax(680px, 1fr);
}

.explorer-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 292px minmax(680px, 1fr);
}

.explorer-filters {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
}

.explorer-main {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.filter-label {
  display: block;
  margin-top: 10px;
  color: #45504c;
  font-size: 12px;
  font-weight: 680;
}

.filter-label-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1px solid #b7c2be;
  border-radius: 50%;
  background: #f5f7f6;
  color: #52605b;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  cursor: help;
}

.info-tip:focus {
  outline: 2px solid #8bbf9a;
  outline-offset: 2px;
}

.filter-tooltip {
  position: absolute;
  z-index: 20;
  top: 23px;
  left: 0;
  display: none;
  width: min(260px, calc(100vw - 36px));
  border: 1px solid #c9d7d4;
  border-left: 4px solid #287d7d;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 29, 0.16);
  color: #34423d;
  padding: 9px 10px;
  font-weight: 500;
}

.filter-tooltip strong,
.filter-tooltip span {
  display: block;
  font-size: 11px;
  line-height: 1.45;
}

.filter-tooltip strong {
  margin-bottom: 4px;
  color: #17201d;
  font-weight: 760;
}

.filter-tooltip span + span {
  margin-top: 5px;
}

.filter-label-row:hover .filter-tooltip,
.filter-label-row:focus-within .filter-tooltip {
  display: block;
}

.filter-label select,
.range-row input,
#sort-results {
  width: 100%;
  height: 36px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  color: var(--text);
  padding: 0 9px;
}

.filter-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.range-row {
  margin-top: 10px;
}

.range-row span {
  display: block;
  color: #45504c;
  font-size: 12px;
  font-weight: 680;
}

.range-row div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #3f4a46;
  font-size: 13px;
}

.wide-button {
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid #263238;
  border-radius: 7px;
  background: #263238;
  color: white;
  cursor: pointer;
}

.explorer-toolbar,
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.explorer-toolbar h2,
.results-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.explorer-toolbar p,
.results-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.upcoming-picker {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid #c9d7d4;
  border-left: 4px solid #287d7d;
  border-radius: 8px;
  background: #f4f8f7;
  padding: 10px;
}

.upcoming-picker strong {
  display: block;
  font-size: 13px;
}

.upcoming-picker p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.upcoming-candidate-grid {
  display: grid;
  gap: 8px;
}

.upcoming-candidate-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
}

.upcoming-candidate-button:hover {
  border-color: #8bbf9a;
  background: #ffffff;
}

.upcoming-candidate-button strong,
.upcoming-candidate-button em {
  display: block;
}

.upcoming-candidate-button em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.upcoming-candidate-button small {
  flex: 0 0 auto;
  color: #3d6d4b;
  font-size: 11px;
  font-weight: 760;
}

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

.kpi-card {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.kpi-card strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.1;
}

.kpi-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.kpi-card small {
  display: block;
  margin-top: 7px;
  color: #596661;
  font-size: 11px;
  line-height: 1.35;
}

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

.search-hint {
  margin-top: 10px;
  border: 1px solid #c9d7d4;
  border-left: 4px solid #4f6fa8;
  border-radius: 8px;
  background: #f3f7fb;
  color: #33465f;
  padding: 9px 10px;
  font-size: 12px;
}

.insight-card {
  min-height: 70px;
  border: 1px solid var(--line);
  border-left: 4px solid #287d7d;
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.insight-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.insight-card p {
  margin: 0;
  color: #4f5a56;
  font-size: 12px;
  line-height: 1.45;
}

.regime-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.regime-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.regime-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.regime-head p,
.regime-method {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.regime-method {
  margin-top: 8px;
  border-left: 4px solid #4f6fa8;
  border-radius: 7px;
  background: #f3f7fb;
  color: #33465f;
  padding: 8px 10px;
}

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

.regime-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.regime-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.regime-card-head strong {
  font-size: 13px;
}

.regime-card-head span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.regime-card-main {
  margin-top: 8px;
}

.regime-card-main b {
  display: block;
  font-size: 24px;
  line-height: 1.05;
}

.regime-card-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.regime-card dl {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.regime-card dl div {
  display: grid;
  grid-template-columns: minmax(82px, 0.82fr) minmax(0, 1fr);
  gap: 8px;
  min-height: 18px;
}

.regime-card dt,
.regime-card dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
}

.regime-card dt {
  color: var(--muted);
}

.regime-card dd {
  overflow: hidden;
  color: #2e3935;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.regime-card.regime-hot {
  border-top: 4px solid #287d7d;
}

.regime-card.regime-mixed {
  border-top: 4px solid #8b5d28;
}

.regime-card.regime-cold {
  border-top: 4px solid #b23b4d;
}

.regime-card.regime-watch {
  border-top: 4px solid #7d8890;
}

.regime-section-title {
  margin-top: 13px;
  margin-bottom: 8px;
  color: #33403b;
  font-size: 13px;
  font-weight: 760;
}

.regime-timeline {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.regime-badge {
  min-width: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px 8px;
}

.regime-badge b,
.regime-badge em,
.regime-badge small {
  display: block;
  line-height: 1.2;
}

.regime-badge b {
  font-size: 12px;
}

.regime-badge em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.regime-badge small {
  margin-top: 3px;
  color: #33403b;
  font-size: 11px;
}

.regime-badge.regime-hot,
.regime-pill.regime-hot {
  border-color: #8ac0b8;
  background: #edf7f4;
  color: #145c57;
}

.regime-badge.regime-mixed,
.regime-pill.regime-mixed {
  border-color: #d8c09d;
  background: #fbf6ee;
  color: #76501e;
}

.regime-badge.regime-cold,
.regime-pill.regime-cold {
  border-color: #e2a7b0;
  background: #fbf0f2;
  color: #8d2d3b;
}

.regime-badge.regime-watch,
.regime-pill.regime-watch {
  border-color: #c7d0d4;
  background: #f3f5f6;
  color: #55626a;
}

.regime-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.regime-table {
  max-height: 390px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.regime-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.regime-table th,
.regime-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #e8ecea;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.regime-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f2f5f3;
  color: #43504b;
  font-weight: 760;
}

.regime-table td:last-child {
  white-space: normal;
  min-width: 240px;
}

.advanced-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.advanced-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.advanced-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.advanced-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.advanced-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
}

.advanced-card h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.advanced-card > p {
  min-height: 36px;
  margin: 5px 0 9px;
  color: #4f5a56;
  font-size: 12px;
  line-height: 1.42;
}

.advanced-table {
  max-height: 285px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.advanced-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.advanced-table th,
.advanced-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #e8ecea;
  text-align: left;
  vertical-align: top;
}

.advanced-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f2f5f3;
  color: #43504b;
  font-weight: 760;
}

.advanced-table td:nth-child(n + 3) {
  white-space: nowrap;
}

.advanced-table td:nth-child(2) {
  min-width: 170px;
}

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

.chart-panel,
.results-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.chart-panel {
  padding: 12px;
  min-height: 280px;
}

.chart-panel-wide {
  grid-column: span 2;
}

.chart-title {
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 10px;
}

.bar-chart {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.86fr) minmax(160px, 1.4fr) 72px;
  gap: 8px;
  align-items: center;
  min-height: 25px;
  font-size: 12px;
}

.bar-label {
  color: #33403b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: #edf1ef;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  min-width: 2px;
  background: #287d7d;
}

.bar-fill.negative {
  left: auto;
  right: 50%;
  background: #b23b4d;
}

.bar-zero {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(23, 32, 29, 0.35);
}

.bar-value {
  color: #33403b;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.boxplot-chart {
  display: grid;
  gap: 9px;
}

.boxplot-axis,
.boxplot-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.6fr) minmax(150px, 0.9fr);
  gap: 10px;
  align-items: center;
}

.boxplot-axis-scale {
  position: relative;
  min-height: 14px;
  color: var(--muted);
  font-size: 10px;
}

.boxplot-axis-scale em {
  position: absolute;
  top: 0;
  font-style: normal;
  white-space: nowrap;
}

.boxplot-axis-scale em:first-child {
  left: 0;
}

.boxplot-axis-scale em:nth-child(2) {
  transform: translateX(-50%);
}

.boxplot-axis-scale em:last-child {
  right: 0;
}

.boxplot-row {
  min-height: 32px;
  font-size: 12px;
}

.boxplot-label {
  color: #33403b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boxplot-track {
  position: relative;
  height: 24px;
  border-radius: 999px;
  background: #edf1ef;
  overflow: hidden;
}

.boxplot-zero {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(23, 32, 29, 0.32);
}

.boxplot-whisker {
  position: absolute;
  top: 11px;
  height: 2px;
  background: #8b9994;
}

.boxplot-box {
  position: absolute;
  top: 5px;
  height: 14px;
  border: 1px solid #287d7d;
  border-radius: 4px;
  background: rgba(40, 125, 125, 0.22);
}

.boxplot-median {
  position: absolute;
  top: 3px;
  width: 2px;
  height: 18px;
  background: #17201d;
}

.boxplot-mean {
  position: absolute;
  top: 8px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #b23b4d;
  box-shadow: 0 0 0 1px rgba(178, 59, 77, 0.35);
}

.boxplot-value {
  color: #33403b;
  text-align: right;
  font-size: 11px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.results-panel {
  margin-top: 14px;
  padding: 12px;
}

.results-head {
  margin-bottom: 10px;
}

#sort-results {
  width: 180px;
  margin-top: 0;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.large-table {
  max-height: 520px;
}

.left-panel,
.right-panel {
  min-height: 0;
  overflow: auto;
  background: var(--surface);
}

.left-panel {
  border-right: 1px solid var(--line);
  padding: 14px;
}

.right-panel {
  border-left: 1px solid var(--line);
}

.review-panel {
  border-left: 0;
}

.review-panel .inspector {
  border-bottom: 0;
}

.section-title {
  margin: 16px 0 8px;
  color: #45504c;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.section-title:first-child {
  margin-top: 0;
}

.search-box {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  outline: none;
  background: #fbfcfb;
}

.search-box:focus {
  border-color: #7aa6a1;
  box-shadow: 0 0 0 3px rgba(40, 125, 125, 0.12);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.view-note {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #c9d7d4;
  border-left: 4px solid #287d7d;
  border-radius: 8px;
  background: #f4f8f7;
  color: #3f4f4a;
  font-size: 12px;
  line-height: 1.45;
}

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

.candidate-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--text);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.candidate-button:hover {
  border-color: #aab5b1;
  background: #f6f9f7;
}

.candidate-button.active {
  border-color: #50805e;
  border-left: 4px solid #50805e;
  background: #f1f8f3;
}

.candidate-button strong,
.candidate-button em {
  display: block;
}

.candidate-button strong {
  font-size: 13px;
  line-height: 1.25;
}

.candidate-button em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.candidate-button small {
  flex: 0 0 auto;
  color: #3d6d4b;
  font-size: 11px;
  font-weight: 760;
}

.filter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  text-align: left;
}

.filter-button.off {
  color: #87918d;
  background: #f4f6f5;
}

.filter-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.filter-count {
  color: var(--muted);
  font-size: 12px;
}

.reading-list {
  margin: 0;
  padding-left: 20px;
  color: #4f5a56;
  font-size: 13px;
  line-height: 1.7;
}

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

.inspector-kicker {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 760;
}

.inspector h2 {
  margin: 6px 0 8px;
  font-size: 21px;
  line-height: 1.18;
}

.inspector p {
  margin: 0 0 12px;
  color: #3f4a46;
  font-size: 13px;
  line-height: 1.55;
}

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

.detail-metric {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  min-width: 0;
}

.detail-metric.is-highlighted {
  border-color: #8bbf9a;
  border-left: 4px solid #50805e;
  background: #f1f8f3;
}

.detail-metric.is-highlighted span {
  color: #3d6d4b;
}

.detail-metric.is-highlighted strong {
  color: #234f34;
}

.detail-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-metric strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: #45504c;
  font-size: 11px;
  background: #f9faf9;
}

.peer-section {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 2px;
}

.peer-head strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.peer-head p {
  margin: 4px 0 8px;
  color: #4f5a56;
  font-size: 12px;
  line-height: 1.45;
}

.peer-summary {
  margin-bottom: 8px;
  border: 1px solid #c9d7d4;
  border-left: 4px solid #4f6fa8;
  border-radius: 7px;
  background: #f3f7fb;
  color: #33465f;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.4;
}

.peer-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.peer-stat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  padding: 8px;
}

.peer-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.peer-stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.2;
}

.peer-preview {
  margin-top: 12px;
}

.peer-demand-note {
  margin-top: 8px;
  border: 1px solid #e3d6b8;
  border-left: 4px solid #8b5d28;
  border-radius: 7px;
  background: #fbf6ee;
  color: #6f4b1f;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.4;
}

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

.peer-preview-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 9px 10px;
}

.peer-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.peer-preview-head strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
}

.peer-return {
  flex: 0 0 auto;
  border: 1px solid #c9d7d4;
  border-radius: 999px;
  background: #f4f8f7;
  color: #2d6159;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

.peer-return.strong {
  border-color: #8bbf9a;
  background: #f1f8f3;
  color: #2f6b3f;
}

.peer-return.negative {
  border-color: #e2a7b0;
  background: #fbf0f2;
  color: #8d2d3b;
}

.peer-preview-meta,
.peer-demand-line,
.peer-preview-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.peer-demand-line {
  color: #374b65;
  font-weight: 680;
}

.peer-action-row {
  margin-top: 12px;
}

.peer-explorer-button {
  margin-top: 0;
}

.table-view {
  overflow: auto;
  max-height: 45vh;
  border: 1px solid var(--line);
  border-radius: 7px;
}

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

.data-table th,
.data-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef2f0;
  font-size: 11px;
  color: #45504c;
}

.empty-state {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 260px minmax(560px, 1fr);
  }

  .explorer-workspace {
    grid-template-columns: 260px minmax(560px, 1fr);
  }

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

  .explorer-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .insight-band {
    grid-template-columns: 1fr;
  }

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

  .advanced-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .left-panel,
  .right-panel {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .right-panel {
    border-top: 1px solid var(--line);
  }

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

  .explorer-workspace {
    grid-template-columns: 1fr;
  }

  .explorer-filters {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .regime-grid {
    grid-template-columns: 1fr;
  }

  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .chart-panel-wide {
    grid-column: span 1;
  }

  .boxplot-axis,
  .boxplot-row {
    grid-template-columns: minmax(110px, 0.8fr) minmax(160px, 1.4fr) minmax(110px, 0.8fr);
  }

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

  .upcoming-picker {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
