:root {
  color-scheme: light;
  --bg: #edf4ff;
  --surface: #ffffff;
  --surface-2: #f1f6ff;
  --ink: #050b14;
  --muted: #5a6575;
  --line: #cdd9ea;
  --primary: #0875de;
  --primary-2: #0058c8;
  --red: #d52b2b;
  --green: #079650;
  --amber: #d97706;
  --blue-soft: #e2efff;
  --green-soft: #e6f7ee;
  --red-soft: #fff0f0;
  --amber-soft: #fff1dd;
  --shadow: 0 14px 34px rgba(38, 73, 120, 0.12);
  --shadow-soft: 0 8px 20px rgba(22, 56, 98, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.88), transparent 34%),
    linear-gradient(180deg, #cfe5ff 0, #f8fbff 330px, #eef3f9 100%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1540px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 4px;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 2px;
  font-size: 18px;
}

h3 {
  margin-bottom: 4px;
  font-size: 20px;
}

.subtitle,
.panel-heading p,
.detail-header p,
.mapping-focus p,
.status-panel span,
.summary-card em,
.theme-main small,
.theme-metrics small,
td small {
  color: var(--muted);
}

.status-panel {
  display: grid;
  gap: 6px;
  min-width: 330px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: right;
}

.status-panel span:first-child {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.faq-link {
  justify-self: end;
  width: fit-content;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.faq-link:hover,
.faq-link:focus-visible,
.faq-link.active {
  border-color: rgba(8, 117, 222, 0.2);
  background: rgba(226, 239, 255, 0.72);
  color: var(--primary-2);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card,
.theme-list-panel,
.detail-panel,
.data-section,
.people-section {
  border: 1px solid rgba(176, 194, 220, 0.78);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.page-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid rgba(176, 194, 220, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.page-tab {
  position: relative;
  min-height: 42px;
  min-width: 124px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.page-tab:hover,
.page-tab:focus-visible {
  background: rgba(226, 239, 255, 0.72);
  color: var(--primary-2);
}

.page-tab.active {
  background: linear-gradient(180deg, #ffffff, #dcecff);
  color: var(--primary-2);
  box-shadow:
    inset 0 0 0 1px rgba(8, 117, 222, 0.24),
    0 8px 18px rgba(8, 117, 222, 0.16);
}

.page-tab.active::after {
  position: absolute;
  right: 12px;
  bottom: 7px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

.help-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.help-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7fbff;
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 900;
}

.help-popover {
  position: absolute;
  z-index: 100;
  max-width: min(320px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(8, 117, 222, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(22, 56, 98, 0.18);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.summary-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px 18px;
}

.summary-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.summary-card strong {
  display: block;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.2;
}

.summary-card strong small {
  margin-left: 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.summary-card em {
  font-size: 12px;
  font-style: normal;
}

.summary-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--primary);
}

.summary-icon::before {
  font-size: 22px;
  font-weight: 900;
}

.summary-icon.trend::before {
  content: "US";
}

.summary-icon.fund::before {
  content: "CN";
}

.summary-icon.sync::before {
  content: "CO";
}

.summary-icon.lead::before {
  content: "!";
  color: var(--amber);
}

.summary-icon.warn {
  background: var(--amber-soft);
}

.summary-icon.warn::before {
  content: "!";
  color: var(--amber);
}

.summary-icon.chip::before {
  content: "TOP";
  font-size: 14px;
}

.toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: blur(12px);
}

.segmented {
  order: 1;
  display: inline-flex;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
}

.segment {
  min-height: 40px;
  min-width: 86px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: linear-gradient(180deg, #eaf4ff, #d8eaff);
  color: var(--primary-2);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.signal-guide {
  order: 3;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.signal-guide span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
}

.signal-guide b {
  color: var(--ink);
}

.search-box {
  order: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-left: auto;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 270px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.panel-toggle {
  position: relative;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary-2);
  font-size: 13px;
  font-weight: 850;
}

.panel-toggle:hover,
.panel-toggle:focus-visible {
  border-color: rgba(8, 117, 222, 0.42);
  background: #eaf4ff;
}

.icon-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #415064;
}

.icon-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.icon-toggle::before,
.icon-toggle::after {
  position: absolute;
  left: 50%;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.icon-toggle::before {
  bottom: calc(100% + 9px);
  min-width: max-content;
  padding: 7px 10px;
  border-radius: 6px;
  background: #4b5870;
  color: white;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  content: attr(data-tooltip);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

.icon-toggle::after {
  bottom: calc(100% + 3px);
  width: 10px;
  height: 10px;
  border-radius: 0 0 2px 0;
  background: #4b5870;
  content: "";
  transform: translateX(-50%) translateY(4px) rotate(45deg);
}

.icon-toggle:hover::before,
.icon-toggle:hover::after,
.icon-toggle:focus-visible::before,
.icon-toggle:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.icon-toggle:hover::after,
.icon-toggle:focus-visible::after {
  transform: translateX(-50%) translateY(0) rotate(45deg);
}

.panel-actions .icon-toggle::before,
.detail-panel-actions .icon-toggle::before {
  right: 0;
  left: auto;
  transform: translateY(4px);
}

.panel-actions .icon-toggle::after,
.detail-panel-actions .icon-toggle::after {
  right: 14px;
  left: auto;
  transform: translateY(4px) rotate(45deg);
}

.panel-actions .icon-toggle:hover::before,
.panel-actions .icon-toggle:focus-visible::before,
.detail-panel-actions .icon-toggle:hover::before,
.detail-panel-actions .icon-toggle:focus-visible::before {
  transform: translateY(0);
}

.panel-actions .icon-toggle:hover::after,
.panel-actions .icon-toggle:focus-visible::after,
.detail-panel-actions .icon-toggle:hover::after,
.detail-panel-actions .icon-toggle:focus-visible::after {
  transform: translateY(0) rotate(45deg);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(470px, 500px) 1fr;
  gap: 14px;
  align-items: stretch;
}

.workspace.list-collapsed {
  grid-template-columns: 48px minmax(0, 1fr);
}

.workspace.detail-collapsed {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.workspace.list-collapsed .theme-list,
.workspace.list-collapsed .theme-list-panel .panel-heading > div:first-child,
.workspace.list-collapsed .theme-list-panel #reset-view,
.workspace.detail-collapsed .detail-panel #detail-view,
.workspace.detail-collapsed .data-section {
  display: none;
}

.workspace.list-collapsed .theme-list-panel,
.workspace.detail-collapsed .detail-stack {
  min-width: 0;
}

.workspace.list-collapsed .theme-list-panel {
  align-self: start;
  max-height: none;
  overflow: visible;
}

.workspace.list-collapsed .theme-list-panel .panel-heading,
.workspace.detail-collapsed .detail-panel {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 10px 6px;
}

.workspace.list-collapsed .theme-list-panel .panel-actions {
  gap: 0;
}

.workspace.detail-collapsed .detail-stack {
  display: block;
}

.workspace.detail-collapsed .detail-panel {
  min-height: 56px;
}

.theme-list-panel,
.detail-panel,
.data-section,
.people-section {
  overflow: hidden;
  padding: 0;
}

.detail-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.theme-list-panel {
  position: relative;
  z-index: 3;
  top: auto;
  max-height: calc(100dvh - 104px);
  overflow: auto;
}

.theme-list-panel:has(.icon-toggle:hover),
.theme-list-panel:has(.icon-toggle:focus-visible),
.detail-panel:has(.icon-toggle:hover),
.detail-panel:has(.icon-toggle:focus-visible) {
  z-index: 30;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  padding: 16px 16px 10px;
}

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

.panel-heading p {
  margin-bottom: 0;
  font-size: 13px;
}

.detail-panel {
  position: relative;
  overflow: visible;
}

.detail-panel-actions {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
}

.workspace.detail-collapsed .detail-panel-actions {
  position: static;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary-2);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-list {
  display: grid;
  gap: 0;
}

.theme-list-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 30px minmax(92px, 1fr) 54px 50px 56px 56px 46px;
  gap: 6px;
  align-items: center;
  padding: 9px 10px;
  border-left: 4px solid transparent;
  background: linear-gradient(90deg, #edf5ff, #f7fbff);
  box-shadow: 0 1px 0 var(--line), 0 10px 18px rgba(22, 56, 98, 0.08);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.theme-list-head > span {
  min-width: 0;
  white-space: nowrap;
}

.sort-head {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

.sort-head i {
  color: #7a8ba2;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.sort-head:hover,
.sort-head:focus-visible,
.sort-head.active {
  color: var(--primary-2);
}

.sort-head.active i {
  color: var(--primary-2);
}

.theme-row {
  display: grid;
  grid-template-columns: 30px minmax(92px, 1fr) 54px 50px 56px 56px 46px;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 8px 10px;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.workspace.detail-collapsed .theme-list-head,
.workspace.detail-collapsed .theme-row {
  grid-template-columns: 44px minmax(280px, 1fr) 120px 120px 110px 110px 84px;
  gap: 16px;
  padding-right: 20px;
  padding-left: 20px;
}

.workspace.detail-collapsed .theme-row {
  min-height: 68px;
}

.workspace.detail-collapsed .rank {
  width: 30px;
  height: 30px;
}

.workspace.detail-collapsed .theme-main strong {
  font-size: 18px;
}

.workspace.detail-collapsed .theme-main small {
  font-size: 13px;
}

.workspace.detail-collapsed .theme-primary {
  font-size: 14px;
}

.workspace.detail-collapsed .theme-metrics b {
  font-size: 22px;
}

.workspace.detail-collapsed .mini-bar {
  width: 88px;
}

.workspace.detail-collapsed .theme-return {
  font-size: 18px;
}

.workspace.detail-collapsed .signal-pill {
  min-width: 56px;
}

.theme-row:hover,
.theme-row:focus-visible,
.theme-row.active {
  border-left-color: var(--primary);
  background: linear-gradient(90deg, #dcecff, rgba(255, 255, 255, 0.88));
}

.theme-row:active {
  transform: scale(0.99);
}

.rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 4px 4px 12px 4px;
  background: #edf2f7;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.theme-row:nth-child(2) .rank {
  background: #ffc72c;
  color: white;
}

.theme-row:nth-child(3) .rank {
  background: #9aa8b5;
  color: white;
}

.theme-row:nth-child(4) .rank {
  background: #d59b73;
  color: white;
}

.theme-main,
.theme-metrics,
.theme-primary {
  display: grid;
  gap: 2px;
}

.theme-main {
  min-width: 0;
}

.theme-main strong,
.theme-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-metrics {
  text-align: right;
}

.theme-primary {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.theme-metrics b {
  color: var(--primary-2);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.theme-main strong {
  font-size: 17px;
}

.theme-main small {
  font-size: 12px;
}

.mini-bar {
  display: block;
  width: 42px;
  height: 7px;
  margin-left: auto;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e7fb;
}

.mini-bar::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0058c8, #1396ef);
  content: "";
}

.theme-return {
  text-align: right;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.signal-pill.sync {
  background: var(--red-soft);
  color: var(--red);
}

.signal-pill.lead {
  background: var(--amber-soft);
  color: var(--amber);
}

.signal-pill.diverge {
  background: var(--green-soft);
  color: var(--green);
}

.signal-explain {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, #f7fbff, #ffffff);
  color: var(--muted);
  font-size: 13px;
}

.signal-explain b {
  color: var(--ink);
  font-size: 14px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 84px 0 28px;
  margin-bottom: 12px;
}

.detail-header h2 {
  display: inline;
  margin: 0 14px 0 0;
  font-size: 38px;
  line-height: 1.1;
}

.detail-header p {
  display: inline;
  color: var(--ink);
  font-size: 20px;
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  padding: 0 28px 22px;
}

.detail-main {
  min-width: 0;
}

.detail-side {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 22px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.confidence {
  display: grid;
  place-items: center;
  min-width: 86px;
  height: 70px;
  border-left: 1px solid var(--line);
  background: transparent;
}

.confidence span,
.mapping-score span,
.score-ring span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.confidence strong,
.mapping-score strong,
.score-ring strong {
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.us-card,
.mapping-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.us-card span,
.mapping-focus p {
  color: var(--muted);
}

.score-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 0 50%, transparent 51%),
    conic-gradient(var(--primary) calc(var(--score) * 1%), #d8e7f9 0);
  box-shadow: inset 0 0 0 1px rgba(8, 117, 222, 0.1);
}

.score-ring .help-label {
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-ring .help-dot {
  width: 16px;
  height: 16px;
  font-size: 11px;
}

.score-ring strong {
  color: var(--primary-2);
  font-size: 56px;
}

.score-ring em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.metric-item {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.86);
}

.metric-strip span,
.metric-period {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-period {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--primary-2);
  font-weight: 900;
}

.metric-strip strong,
td {
  font-variant-numeric: tabular-nums;
}

.metric-strip strong {
  font-size: 18px;
}

.up {
  color: var(--red);
  font-weight: 800;
}

.down {
  color: var(--green);
  font-weight: 800;
}

.neutral {
  color: var(--muted);
  font-weight: 800;
}

.score-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.score-bar {
  display: grid;
  grid-template-columns: 54px 1fr 34px;
  gap: 10px;
  align-items: center;
}

.score-bar span,
.score-bar b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

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

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #33a0ff);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tag-row span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-side .mapping-focus {
  display: grid;
  justify-items: start;
  width: 100%;
  margin-bottom: 0;
  padding: 0;
}

.detail-side .mapping-focus h3 {
  margin: 0;
  font-size: 22px;
}

.detail-side .mapping-focus strong {
  font-size: 18px;
}

.detail-side .mapping-focus > span {
  color: var(--muted);
  font-size: 13px;
}

.mapping-score {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mapping-score b {
  color: var(--primary-2);
  font-size: 22px;
}

.reason-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reason-grid span {
  min-height: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(247, 251, 255, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.data-section {
  margin-top: 0;
}

.table-wrap {
  overflow-x: hidden;
  overflow-y: visible;
  border: 0;
  border-radius: 0;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(255, 255, 255, 0.86);
}

th,
td {
  overflow: hidden;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td {
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(90deg, #edf5ff, #f7fbff);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

th:nth-child(1),
td:nth-child(1) {
  width: 132px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 68px;
}

th:nth-child(3),
td:nth-child(3) {
  width: 80px;
}

th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6),
th:nth-child(7),
td:nth-child(7),
th:nth-child(8),
td:nth-child(8) {
  width: 70px;
  text-align: right;
}

th:nth-child(9),
td:nth-child(9) {
  width: 66px;
  text-align: right;
}

th:nth-child(10),
td:nth-child(10) {
  width: 52px;
  text-align: center;
}

tbody tr:nth-child(even) {
  background: rgba(229, 240, 255, 0.46);
}

tbody tr:hover {
  background: #dcecff;
}

td small,
.name-cell {
  display: block;
}

.name-cell {
  font-weight: 800;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 30px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--primary-2);
  font-weight: 900;
}

.table-bar {
  display: inline-grid;
  grid-template-columns: 36px 24px;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.table-bar i {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e7fb;
}

.table-bar i::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0058c8, #1396ef);
  content: "";
}

.table-bar b {
  color: var(--primary-2);
  font-weight: 900;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.people-section {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.faq-section {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.faq-intro {
  display: grid;
  gap: 6px;
  max-width: 880px;
}

.faq-intro h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
}

.faq-intro p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.faq-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 238px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  box-shadow: var(--shadow-soft);
}

.faq-card h3 {
  margin: 0;
  font-size: 20px;
}

.faq-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.faq-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #344155;
  font-size: 13px;
  font-weight: 700;
}

.people-intro {
  display: grid;
  gap: 6px;
}

.people-intro h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
}

.people-intro p:last-child {
  max-width: 820px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.people-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.people-tab {
  display: grid;
  align-items: center;
  min-height: 74px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.people-tab.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff, #dcecff);
  box-shadow:
    inset 0 0 0 1px rgba(8, 117, 222, 0.26),
    0 12px 22px rgba(8, 117, 222, 0.14);
}

.people-tab strong,
.people-tab small {
  display: block;
}

.people-tab strong {
  margin-bottom: 0;
  font-size: 22px;
}

.people-tab small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.person-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.person-photo-card {
  position: relative;
  min-height: 430px;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0)) -160px 0 / 160px 100% no-repeat,
    linear-gradient(135deg, #dcecff, #f7fbff);
}

.person-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease;
}

.person-photo-card.image-loading {
  animation: photo-skeleton 1.1s ease-in-out infinite;
}

.person-photo-card.image-ready {
  animation: none;
}

.person-photo-card.image-ready img {
  opacity: 1;
}

@keyframes photo-skeleton {
  0% {
    background-position:
      -160px 0,
      0 0;
  }

  100% {
    background-position:
      360px 0,
      0 0;
  }
}

.person-photo-card::after {
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0), rgba(5, 11, 20, 0.78));
  content: "";
}

.person-photo-card figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
  display: grid;
  gap: 4px;
  color: white;
  opacity: 0;
  transition: opacity 180ms ease;
}

.person-photo-card.image-ready figcaption {
  opacity: 1;
}

.person-photo-card figcaption span,
.person-photo-card figcaption small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 750;
}

.person-photo-card figcaption strong {
  font-size: 34px;
  line-height: 1.1;
}

.person-photo-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 24%, rgba(8, 117, 222, 0.26), transparent 34%),
    linear-gradient(135deg, #dcecff, #f7fbff);
  color: var(--primary-2);
  text-align: center;
}

.person-photo-fallback span {
  font-size: 34px;
  font-weight: 950;
}

.person-photo-fallback small {
  color: var(--muted);
  font-weight: 800;
}

.person-photo-card.image-failed img,
.person-photo-card.image-failed figcaption {
  display: none;
}

.person-photo-card.image-failed::after {
  display: none;
}

.person-photo-card.image-failed .person-photo-fallback {
  display: grid;
}

.person-hero-main {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 30px;
}

.person-hero-main h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.person-hero-main > p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

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

.person-metrics article {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
}

.person-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.person-metrics strong {
  font-size: 20px;
  line-height: 1.1;
}

.person-metrics article:last-child strong {
  font-size: 16px;
}

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

.evidence-chain article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.evidence-chain b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--primary-2);
  font-weight: 950;
}

.evidence-chain span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.evidence-chain small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.person-view-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.person-view-tab b {
  display: grid;
  place-items: center;
  min-width: 26px;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary-2);
  font-size: 13px;
}

.person-view-tab.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff, #dcecff);
  color: var(--primary-2);
  box-shadow: inset 0 0 0 1px rgba(8, 117, 222, 0.2);
}

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

.disclosure-card,
.policy-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.disclosure-card h3,
.policy-card h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.disclosure-card p,
.policy-card p,
.disclosure-card small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.disclosure-card strong,
.policy-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.source-status,
.policy-card span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 900;
}

.field-list,
.ticker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-list span,
.ticker-list b {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ticker-list b {
  color: var(--primary-2);
}

.person-ledger {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.person-table {
  table-layout: fixed;
}

.person-table col.person-col-company {
  width: 18%;
}

.person-table col.person-col-ticker {
  width: 8%;
}

.person-table col.person-col-date {
  width: 10%;
}

.person-table col.person-col-since {
  width: 11%;
}

.person-table col.person-col-first-day {
  width: 9%;
}

.person-table col.person-col-location {
  width: 8%;
}

.person-table col.person-col-event {
  width: 12%;
}

.person-table col.person-col-type {
  width: 9%;
}

.person-table col.person-col-source {
  width: 9%;
}

.person-table col.person-col-confidence {
  width: 6%;
}

.person-table th,
.person-table td {
  min-width: 0;
  padding: 10px 8px;
  vertical-align: middle;
}

.person-table th:nth-child(1),
.person-table td:nth-child(1),
.person-table th:nth-child(2),
.person-table td:nth-child(2),
.person-table th:nth-child(3),
.person-table td:nth-child(3),
.person-table th:nth-child(6),
.person-table td:nth-child(6),
.person-table th:nth-child(7),
.person-table td:nth-child(7),
.person-table th:nth-child(8),
.person-table td:nth-child(8),
.person-table th:nth-child(9),
.person-table td:nth-child(9) {
  text-align: left;
}

.person-table th:nth-child(4),
.person-table td:nth-child(4),
.person-table th:nth-child(5),
.person-table td:nth-child(5) {
  text-align: right;
}

.person-table th:nth-child(10),
.person-table td:nth-child(10) {
  text-align: center;
}

.person-table th {
  font-size: 12px;
}

.person-table .name-cell {
  display: block;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.event-link,
.source-link {
  display: block;
  overflow: hidden;
  color: var(--primary-2);
  font-weight: 900;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-link:hover,
.event-link:focus-visible,
.source-link:hover,
.source-link:focus-visible {
  text-decoration: underline;
}

.confidence-label {
  display: inline-flex;
  justify-content: center;
  min-width: 40px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
}

.confidence-label.high {
  background: var(--green-soft);
  color: var(--green);
}

.confidence-label.mid {
  background: var(--amber-soft);
  color: var(--amber);
}

.confidence-label.low {
  background: var(--red-soft);
  color: var(--red);
}

.people-disclaimer {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 10px;
  background: rgba(255, 241, 221, 0.64);
  color: #8a4b00;
  font-size: 13px;
  font-weight: 800;
}

@media (min-width: 1181px) {
  .theme-list-panel {
    position: relative;
    top: auto;
    max-height: calc(100dvh - 104px);
    overflow: auto;
  }
}

@media (min-width: 1181px) and (max-width: 1500px) {
  .detail-header {
    padding: 12px 96px 0 18px;
    margin-bottom: 6px;
  }

  .detail-header h2 {
    font-size: 28px;
  }

  .detail-header p {
    font-size: 15px;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 164px;
    gap: 12px;
    padding: 0 18px 12px;
  }

  .detail-side {
    gap: 10px;
    padding-left: 12px;
  }

  .score-ring {
    width: 136px;
    height: 136px;
  }

  .score-ring strong {
    font-size: 34px;
  }

  .score-ring em {
    font-size: 11px;
  }

  .us-card,
  .mapping-focus {
    margin-bottom: 8px;
    padding: 8px 10px;
  }

  .us-card h3 {
    font-size: 18px;
  }

  .confidence {
    height: 58px;
  }

  .metric-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .metric-item {
    gap: 2px;
    padding: 5px 4px;
  }

  .metric-period {
    min-width: 38px;
    min-height: 18px;
    padding: 0 5px;
    font-size: 11px;
  }

  .metric-strip strong {
    font-size: 13px;
  }

  .score-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 10px;
    margin-bottom: 10px;
  }

  .score-bar {
    grid-template-columns: 42px 1fr 28px;
    gap: 8px;
  }

  .score-bar span,
  .score-bar b {
    font-size: 14px;
  }

  .bar-track {
    height: 9px;
  }

  .signal-explain {
    gap: 2px;
    margin-bottom: 8px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .signal-explain b {
    font-size: 13px;
  }

  .tag-row {
    gap: 6px;
    margin-bottom: 8px;
  }

  .tag-row span {
    padding: 4px 7px;
    font-size: 12px;
  }

  .reason-grid {
    gap: 6px;
  }

  .reason-grid span {
    padding: 5px 8px;
    font-size: 12px;
  }

  .detail-side .mapping-focus h3 {
    font-size: 17px;
  }

  .detail-side .mapping-focus strong {
    font-size: 14px;
  }

  .detail-side .mapping-focus > span {
    font-size: 12px;
  }
}

@media (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .theme-list-panel {
    position: static;
    max-height: none;
  }

  .person-hero {
    grid-template-columns: 280px minmax(0, 1fr);
  }

}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 14px;
  }

  .topbar,
  .toolbar,
  .detail-header,
  .us-card,
  .mapping-focus {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 16px;
  }

  h1 {
    font-size: clamp(28px, 7vw, 36px);
  }

  .subtitle {
    margin-bottom: 0;
  }

  .status-panel {
    gap: 2px;
    min-width: 0;
    padding: 0;
    text-align: left;
  }

  .status-panel span:first-child {
    font-size: 17px;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
  }

  .summary-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    min-height: 82px;
    padding: 12px;
  }

  .summary-icon {
    width: 36px;
    height: 36px;
  }

  .summary-card span {
    font-size: 12px;
  }

  .summary-card strong {
    font-size: 25px;
  }

  .summary-card strong small {
    font-size: 14px;
  }

  .summary-card em {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 18px;
  }

  .detail-side {
    grid-template-columns: 168px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 16px;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .confidence {
    place-items: start;
    min-width: 0;
    width: 100%;
    height: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .score-ring {
    width: 168px;
    height: 168px;
  }

  .score-ring strong {
    font-size: 42px;
  }

  .page-tabs {
    width: 100%;
  }

  .page-tab {
    flex: 1;
  }

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

  .faq-section {
    padding: 14px;
  }

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

  .faq-card {
    min-height: 0;
  }

  .people-section {
    padding: 12px;
  }

  .people-tabs {
    grid-template-columns: 1fr;
  }

  .people-tab {
    min-height: 72px;
  }

  .person-hero {
    grid-template-columns: 1fr;
  }

  .person-photo-card,
  .person-photo-card img {
    min-height: 320px;
  }

  .person-hero-main {
    padding: 18px;
  }

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

  .evidence-chain,
  .person-view-tabs,
  .disclosure-grid,
  .policy-grid {
    grid-template-columns: 1fr;
  }

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

  .metric-strip strong {
    font-size: 15px;
  }

  .score-bars,
  .reason-grid {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar {
    position: static;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segment {
    flex: 1;
    min-width: 72px;
  }

  .search-box {
    width: 100%;
    margin-left: 0;
  }

  .signal-guide {
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }

  .theme-list-head {
    display: none;
  }

  .workspace {
    gap: 12px;
  }

  .detail-stack {
    order: -1;
  }

  .theme-list-panel {
    max-height: 440px;
    overflow: auto;
  }

  .panel-heading {
    padding: 12px;
  }

  .theme-row {
    grid-template-columns: 32px minmax(0, 1fr) 62px 52px;
    grid-template-rows: auto auto;
    min-height: 72px;
    padding: 9px 12px;
  }

  .theme-row .signal-pill {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    min-height: 24px;
  }

  .theme-primary {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .theme-return {
    align-self: start;
    font-size: 14px;
  }

  .theme-return:nth-of-type(5) {
    grid-column: 3;
    grid-row: 2;
  }

  .theme-return:nth-of-type(6) {
    grid-column: 4;
    grid-row: 2;
    justify-self: end;
  }

  .theme-metrics {
    grid-column: 3;
    grid-row: 1;
  }

  .theme-main {
    grid-row: 1 / 3;
  }

  .theme-main strong {
    font-size: 16px;
  }

  .mini-bar {
    width: 54px;
  }

  .detail-header {
    padding: 16px 16px 0;
    gap: 10px;
  }

  .detail-header h2 {
    display: block;
    margin: 0 0 4px;
    font-size: 30px;
  }

  .detail-header p {
    display: block;
    font-size: 16px;
  }

  .detail-header > .signal-pill {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .person-metrics {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .detail-side .mapping-focus {
    justify-items: center;
    text-align: center;
  }
}

/* ===== 美股三因子看板 ===== */
.factors-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0 8px;
}
.factors-panel.hidden {
  display: none;
}
.factors-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.factors-headline {
  font-size: 14px;
  color: var(--muted);
}
.factors-updated {
  font-size: 12px;
  color: var(--muted);
}
.factors-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.factors-verdict {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--primary);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: var(--shadow-soft);
}
.factors-verdict.factors-is-bull {
  border-left-color: var(--green);
}
.factors-verdict.factors-is-bear {
  border-left-color: var(--red);
}
.factors-verdict.factors-is-chop {
  border-left-color: var(--amber);
}
.factors-verdict-light {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: var(--surface-2);
  border-radius: 50%;
}
.factors-verdict-body h2 {
  font-size: 26px;
  margin-bottom: 4px;
}
.factors-verdict-body p {
  color: var(--muted);
  font-size: 14px;
}
.factors-verdict-action {
  text-align: right;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.factors-act {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}
.factors-conf {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.factors-bar {
  display: inline-block;
  width: 110px;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.factors-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}
.factors-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.factors-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.factors-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.factors-card-name {
  font-size: 13px;
  color: var(--muted);
}
.factors-card-name b {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  margin-top: 2px;
}
.factors-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.factors-val {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.factors-val small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.factors-delta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  min-height: 18px;
}
.factors-meter {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  position: relative;
  margin-bottom: 6px;
}
.factors-meter i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 3px;
  opacity: 0.45;
}
.factors-needle {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 14px;
  background: var(--ink);
  border-radius: 1px;
  transform: translateX(-50%);
}
.factors-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 10px;
}
.factors-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 10px;
}
.factors-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}
.factors-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.factors-section h3 {
  font-size: 15px;
  margin-bottom: 14px;
}
.factors-tip {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.factors-table-wrap {
  overflow-x: auto;
}
.factors-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.factors-matrix th,
.factors-matrix td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.factors-matrix th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.factors-matrix tr.factors-active {
  background: var(--blue-soft);
}
.factors-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.factors-pill.factors-is-bull {
  background: var(--green-soft);
  color: var(--green);
}
.factors-pill.factors-is-bear {
  background: var(--red-soft);
  color: var(--red);
}
.factors-pill.factors-is-chop {
  background: var(--amber-soft);
  color: var(--amber);
}
.factors-alerts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.factors-alert {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.factors-alert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.factors-alert-top b {
  font-size: 13px;
}
.factors-stat {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 9px;
  white-space: nowrap;
}
.factors-stat.factors-ok {
  background: var(--green-soft);
  color: var(--green);
}
.factors-stat.factors-fire {
  background: var(--red-soft);
  color: var(--red);
}
.factors-alert p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.factors-pace {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.factors-pace-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.factors-freq {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-2);
  margin-bottom: 4px;
}
.factors-what {
  font-size: 13px;
  margin-bottom: 4px;
}
.factors-det {
  font-size: 11px;
  color: var(--muted);
}
.factors-source {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* —— 顶部框架说明区 —— */
.factors-explainer {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.factors-explainer > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
.factors-explainer > summary::-webkit-details-marker { display: none; }
.factors-explainer > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: var(--muted);
  transition: transform 0.15s;
}
.factors-explainer[open] > summary::before { transform: rotate(90deg); }
.factors-explainer-summary {
  font-size: 13px;
  color: var(--ink);
  margin: 10px 0 12px;
  line-height: 1.6;
}
.factors-explainer-framework {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.factors-explainer-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.factors-explainer-item b {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
}
.factors-explainer-item span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.factors-explainer h4 {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin: 4px 0 8px;
}
.factors-explainer-howto {
  list-style: none;
  padding: 0;
  margin: 0;
}
.factors-explainer-howto li {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 4px;
}
.factors-explainer-howto li b {
  color: var(--ink);
  font-weight: 600;
}

/* —— 卡片问号按钮 + 详情块 —— */
.factors-card-q {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.factors-card-q:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
/* —— 指标详情弹窗（? 点击居中弹出，不再向下撑开卡片）—— */
.factors-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.factors-modal-mask.factors-modal-open {
  display: flex;
}
.factors-modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 460px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 22px 24px 24px;
}
.factors-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.factors-modal-close:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.factors-modal-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  padding-right: 36px;
}
.factors-modal-title b {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  margin-top: 2px;
}
.factors-explain-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.factors-explain-row {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
.factors-explain-row b {
  display: inline-block;
  min-width: 64px;
  color: var(--ink);
  font-weight: 600;
}
.factors-explain-row span { color: var(--muted); }
.factors-explain-chart {
  margin-bottom: 10px;
}

/* —— 迷你折线 / 详情大图 —— */
.factors-spark-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}
.factors-spark {
  display: block;
  width: 100%;
  height: 24px;
}
.factors-chart {
  height: 120px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 4px 2px;
  box-sizing: border-box;
}
.factors-spark-dot {
  position: absolute;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(50%, -50%);
  box-shadow: 0 0 0 2px var(--surface);
}
.factors-spark-pending {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 24px;
  background: var(--surface-2);
  border-radius: 6px;
}
.factors-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.factors-history-table th,
.factors-history-table td {
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.factors-history-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
}
.factors-history-table td { color: var(--ink); }

/* —— 矩阵当前态卡片 + 其余图例条 —— */
.factors-state-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: var(--surface-2);
}
.factors-state-card.factors-is-bull { border-color: var(--green); background: color-mix(in srgb, var(--green) 7%, var(--surface-2)); }
.factors-state-card.factors-is-bear { border-color: var(--red); background: color-mix(in srgb, var(--red) 7%, var(--surface-2)); }
.factors-state-card.factors-is-chop { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 7%, var(--surface-2)); }
.factors-state-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.factors-state-pill {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.factors-state-card.factors-is-bull .factors-state-pill { color: var(--green); }
.factors-state-card.factors-is-bear .factors-state-pill { color: var(--red); }
.factors-state-desc {
  font-size: 13px;
  color: var(--muted);
}
.factors-state-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.factors-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.factors-chip b { font-size: 11px; color: var(--muted); font-weight: 700; }
.factors-chip-up { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.factors-chip-down { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: color-mix(in srgb, var(--red) 8%, var(--surface)); }
.factors-chip-flat { color: var(--muted); }
.factors-state-reason {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.factors-state-action {
  font-size: 13px;
  color: var(--ink);
}
.factors-state-action b { font-weight: 700; }

.factors-matrix-others {
  margin-top: 4px;
}
.factors-matrix-others > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
  margin-bottom: 10px;
}
.factors-matrix-others > summary::-webkit-details-marker { display: none; }
.factors-matrix-others > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s;
}
.factors-matrix-others[open] > summary::before { transform: rotate(90deg); }
.factors-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.factors-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.factors-legend-dots {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}
.factors-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}
.factors-dot-up { background: var(--green); }
.factors-dot-down { background: var(--red); }
.factors-dot-flat { background: var(--muted); opacity: 0.5; }
.factors-legend-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}
.factors-legend-desc {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .factors-verdict {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .factors-verdict-light {
    margin: 0 auto;
  }
  .factors-verdict-action {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
    text-align: center;
  }
  .factors-conf {
    justify-content: center;
  }
  .factors-cards {
    grid-template-columns: 1fr;
  }
  .factors-alerts {
    grid-template-columns: 1fr;
  }
  .factors-pace {
    grid-template-columns: 1fr 1fr;
  }
  .factors-explainer-framework {
    grid-template-columns: 1fr;
  }
  .factors-history-table {
    font-size: 10px;
  }
  .factors-explain-row b {
    display: block;
    margin-bottom: 2px;
  }
}

/* ===== AI 趋势研判 Agent ===== */
.agent-panel {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}
.agent-panel .agent-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}
.agent-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.agent-head-main h2 {
  margin: 0;
  font-size: 20px;
  color: var(--ink);
}
.agent-mode {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.agent-mode-live {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green);
}
.agent-mode-mock {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: var(--amber);
}
.agent-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}
.agent-err {
  color: var(--red);
  font-weight: 600;
}

.agent-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 16px;
  margin-bottom: 16px;
}
.agent-block h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.agent-block h3 small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.agent-trace-step {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}
.agent-trace-step:first-child {
  border-top: none;
  padding-top: 0;
}
.agent-trace-no {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.agent-trace-body {
  flex: 1;
  display: grid;
  gap: 6px;
  min-width: 0;
}
.agent-trace-body b {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.agent-thought b { color: var(--primary-2); }
.agent-action b { color: var(--amber); }
.agent-obs b { color: var(--green); }
.agent-trace-body p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
}

.agent-ind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.agent-ind {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.agent-ind span {
  font-size: 11px;
  color: var(--muted);
}
.agent-ind b {
  display: block;
  font-size: 16px;
  color: var(--ink);
  margin: 2px 0;
}
.agent-ind small {
  font-size: 11px;
  color: var(--muted);
}

.agent-sug-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.agent-sug {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-2);
}
.agent-sug.agent-up { border-left: 4px solid var(--green); }
.agent-sug.agent-down { border-left: 4px solid var(--red); }
.agent-sug.agent-flat { border-left: 4px solid var(--muted); }
.agent-sug-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}
.agent-st-open { background: var(--blue-soft); color: var(--primary-2); }
.agent-st-win { background: var(--green-soft); color: var(--green); }
.agent-st-loss { background: var(--red-soft); color: var(--red); }
.agent-st-expired { background: var(--amber-soft); color: var(--amber); }
.agent-st-flat { background: var(--surface-2); color: var(--muted); }
.agent-sug-dir {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.agent-dir-arrow {
  font-size: 22px;
  line-height: 1;
}
.agent-up .agent-dir-arrow { color: var(--green); }
.agent-down .agent-dir-arrow { color: var(--red); }
.agent-sug-dir b {
  font-size: 18px;
  color: var(--ink);
}
.agent-sug-dir small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.agent-sug-quality {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: inline-block;
}
.agent-q-high { background: var(--green-soft); color: var(--green); }
.agent-q-mid { background: var(--amber-soft); color: var(--amber); }
.agent-q-low { background: var(--red-soft); color: var(--red); }
.agent-q-na { background: var(--surface-2); color: var(--muted); }
.agent-sug-prices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.agent-sug-prices > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}
.agent-sug-prices span {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.agent-sug-prices b {
  font-size: 15px;
  color: var(--ink);
}
.agent-up { }
.agent-sug-prices b.agent-up { color: var(--green); }
.agent-sug-prices b.agent-down { color: var(--red); }
.agent-sug-reason {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.agent-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.agent-flag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
}
.agent-sug-progress {
  font-size: 11px;
  color: var(--muted);
}
.agent-progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.agent-progress-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

.agent-wr-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
}
.agent-wr-big {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.agent-wr-big span {
  font-size: 12px;
  color: var(--muted);
}
.agent-wr-big b {
  display: block;
  font-size: 40px;
  line-height: 1.1;
  color: var(--ink);
  margin: 4px 0;
}
.agent-wr-big.agent-up b { color: var(--green); }
.agent-wr-big.agent-down b { color: var(--red); }
.agent-wr-big.agent-wr-pending b {
  font-size: 22px;
  color: var(--muted);
  padding-top: 12px;
}
.agent-wr-big small {
  font-size: 11px;
  color: var(--muted);
}
.agent-wr-side {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.agent-wr-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}
.agent-wr-item span {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.agent-wr-item b {
  font-size: 16px;
  color: var(--ink);
}
.agent-wr-item small {
  font-size: 10px;
  color: var(--muted);
}

.agent-table-wrap {
  overflow-x: auto;
}
.agent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.agent-table th,
.agent-table td {
  padding: 7px 8px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.agent-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}
.agent-table th:first-child,
.agent-table td:first-child {
  text-align: left;
}
.agent-dir-pill,
.agent-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.agent-dir-pill.agent-up { background: var(--green-soft); color: var(--green); }
.agent-dir-pill.agent-down { background: var(--red-soft); color: var(--red); }
.agent-dir-pill.agent-flat { background: var(--surface-2); color: var(--muted); }

.agent-disclaimer {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--amber-soft);
  border-radius: 8px;
  margin: 0 0 8px;
}
.agent-source {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .agent-wr-grid {
    grid-template-columns: 1fr;
  }
  .agent-sug-prices {
    grid-template-columns: repeat(2, 1fr);
  }
  .agent-wr-big b {
    font-size: 32px;
  }
}
@media (max-width: 520px) {
  .agent-ind-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
