:root {
  --ink: #17282b;
  --ink-soft: #314548;
  --muted: #68797c;
  --faint: #95a3a5;
  --canvas: #f1f5f4;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --line: #dce5e3;
  --line-strong: #cbd9d6;
  --sidebar: #102a2d;
  --sidebar-soft: #173639;
  --sidebar-line: #2a484a;
  --teal: #0a766a;
  --teal-deep: #0d554e;
  --teal-soft: #e4f3ef;
  --amber: #ad6914;
  --amber-soft: #fbf0dc;
  --red: #ad4338;
  --red-soft: #faeae7;
  --blue: #34688d;
  --blue-soft: #e8f0f6;
  --shadow: 0 12px 36px rgba(21, 53, 52, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
tr:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

i[data-lucide] {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

i[data-lucide] svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 16px 16px;
  overflow: auto;
  background: var(--sidebar);
  color: #f1f8f6;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px 22px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #1b6b5f;
}

.brand-mark i {
  width: 23px;
  height: 23px;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 23px;
  font-weight: 700;
}

.brand-copy small {
  color: #9cb5b2;
  font-size: 11.5px;
}

.project-switch {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 11px;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  background: var(--sidebar-soft);
}

.project-avatar,
.user-avatar {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #d8b568;
  color: #21322d;
  font-weight: 700;
}

.project-avatar {
  width: 35px;
  height: 35px;
  font-size: 15px;
}

.project-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.project-copy small {
  color: #87a4a1;
  font-size: 10.5px;
}

.project-copy strong {
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-switch > i {
  width: 16px;
  height: 16px;
  color: #789491;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #a9bfbc;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #edf7f4;
}

.nav-item.active {
  background: #204347;
  color: #ffffff;
}

.nav-item.active::before {
  position: absolute;
  width: 3px;
  height: 22px;
  margin-left: -10px;
  border-radius: 0 3px 3px 0;
  background: #71c2b1;
  content: "";
}

.nav-item span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  color: #c7d9d6;
  font-family: Consolas, monospace;
  font-size: 10.5px;
  text-align: center;
}

.nav-count.accent {
  background: #d6aa56;
  color: #18302e;
  font-weight: 700;
}

.sidebar-note {
  margin-top: auto;
  padding: 13px 12px;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
}

.sidebar-note-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #dbeae7;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-note-head i {
  width: 16px;
  height: 16px;
  color: #6dc3ae;
}

.sidebar-note p {
  margin: 7px 0 0;
  color: #89a6a2;
  font-size: 11.5px;
  line-height: 1.6;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 12px;
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #95adaa;
  cursor: pointer;
  text-align: left;
}

.sidebar-action:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #edf7f4;
}

.sidebar-action i {
  width: 16px;
  height: 16px;
}

.user-chip {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-top: 1px solid var(--sidebar-line);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: #dae8e4;
  color: #1b4b45;
  font-size: 12px;
}

.user-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.user-copy strong {
  color: #dbe8e5;
  font-size: 12px;
}

.user-copy small {
  color: #809e99;
  font-size: 10.5px;
}

.user-chip > i {
  width: 16px;
  height: 16px;
  color: #789491;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-path {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.topbar-path i {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.topbar-path strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions,
.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.synthetic-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #e6d6b6;
  border-radius: 20px;
  background: #fffaf0;
  color: #8a5b17;
  font-size: 11px;
  white-space: nowrap;
}

.synthetic-badge i {
  width: 14px;
  height: 14px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button i {
  width: 16px;
  height: 16px;
}

.button-primary {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(13, 85, 78, 0.15);
}

.button-primary:hover {
  background: #0a4943;
}

.button-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink-soft);
}

.button-secondary:hover {
  border-color: #b8cbc7;
  background: var(--surface-soft);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button-quiet:hover {
  background: #f1f6f4;
  color: var(--ink);
}

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

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.text-button i {
  width: 14px;
  height: 14px;
}

.workspace-body {
  max-width: 1520px;
  margin: 0 auto;
  padding: 30px;
}

.view {
  display: none;
  animation: view-in 180ms ease both;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-heading.compact {
  margin-bottom: 20px;
}

.eyebrow,
.panel-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(25px, 2.3vw, 34px);
  line-height: 1.25;
}

.page-heading p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stage-pill,
.validation-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #cbdeda;
  border-radius: 18px;
  background: #f2faf7;
  color: #376b61;
  font-size: 11.5px;
  white-space: nowrap;
}

.stage-pill b {
  color: var(--teal);
  font-family: Consolas, monospace;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #49a08d;
}

.status-dot.green {
  background: #49a08d;
}

.status-dot.amber {
  background: #d09b3c;
}

.status-dot.gray {
  background: #9ba8a6;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  position: relative;
  min-height: 124px;
  padding: 17px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card.emphasis {
  border-color: #bed8d3;
  background: #f5fbf9;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11.5px;
}

.stat-label i {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.stat-card strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-size: 11px;
}

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

.panel-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}

.panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.panel-kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.panel-meta {
  color: var(--faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.evidence-panel {
  padding-bottom: 16px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 0;
  color: var(--muted);
  font-size: 10.5px;
}

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

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

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

.legend-dot.neutral {
  background: #89999a;
}

.legend-note {
  margin-left: auto;
  color: var(--faint);
}

.forest-chart {
  padding: 4px 18px 0;
}

.forest-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid line {
  stroke: #edf1f0;
  stroke-width: 1;
}

.chart-axis text,
.forest-row text {
  fill: var(--muted);
  font-family: "Microsoft YaHei UI", sans-serif;
  font-size: 10.5px;
}

.forest-row line {
  stroke: #8aa39f;
  stroke-width: 2;
}

.forest-row circle {
  stroke-width: 2;
}

.forest-row circle.positive {
  fill: var(--teal);
  stroke: #ffffff;
}

.forest-row circle.neutral {
  fill: #8c9b9c;
  stroke: #ffffff;
}

.reference-line {
  stroke: #b4bfbd;
  stroke-dasharray: 4 4;
}

.reference-label {
  fill: var(--faint);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.evidence-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.evidence-summary div {
  padding: 12px 14px;
  background: #f8faf9;
}

.evidence-summary strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.evidence-summary span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.task-panel {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.progress-block {
  margin: 20px 20px 12px;
}

.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.progress-copy strong {
  color: var(--teal);
  font-family: Consolas, monospace;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7eeec;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.task-list {
  display: flex;
  flex-direction: column;
}

.task-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 0;
  border-top: 1px solid #edf1f0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.task-list button:hover {
  background: #f8faf9;
}

.task-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
}

.task-icon.teal,
.activity-icon.teal {
  background: var(--teal-soft);
  color: var(--teal);
}

.task-icon.amber,
.activity-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.task-icon.blue,
.activity-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.task-icon i {
  width: 17px;
  height: 17px;
}

.task-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.task-copy strong {
  font-size: 12.5px;
}

.task-copy small {
  color: var(--faint);
  font-size: 10.5px;
}

.task-count {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal);
  font-family: Consolas, monospace;
  font-size: 10.5px;
  text-align: center;
}

.task-count.muted {
  background: #edf1f0;
  color: var(--muted);
}

.task-count.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.review-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 20px 0;
  padding: 11px 12px;
  border: 1px solid #cadeda;
  border-radius: 7px;
  background: #f4faf8;
}

.review-note > i {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--teal);
}

.review-note div {
  display: flex;
  flex-direction: column;
}

.review-note strong {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.review-note span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 16px;
  margin-top: 16px;
}

.gap-panel,
.activity-panel {
  padding-bottom: 9px;
}

.gap-list {
  margin-top: 12px;
}

.gap-list > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 20px;
  border-top: 1px solid #edf1f0;
}

.gap-index {
  color: var(--faint);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.gap-list strong {
  font-size: 12.5px;
}

.gap-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.gap-value {
  padding: 3px 7px;
  border-radius: 4px;
  background: #f1f5f4;
  color: var(--ink-soft);
  font-family: Consolas, monospace;
  font-size: 10.5px;
}

.activity-list {
  margin: 11px 20px 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #edf1f0;
}

.activity-list li:first-child {
  border-top: 0;
}

.activity-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 6px;
}

.activity-icon i {
  width: 14px;
  height: 14px;
}

.activity-list strong {
  display: block;
  font-size: 11.5px;
}

.activity-list p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.activity-list time {
  color: var(--faint);
  font-family: Consolas, monospace;
  font-size: 9.5px;
}

.summary-strip,
.audit-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-strip > div,
.audit-meta > div {
  display: flex;
  min-height: 70px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  background: var(--surface);
}

.summary-strip span,
.audit-meta span {
  color: var(--muted);
  font-size: 10.5px;
}

.summary-strip strong,
.audit-meta strong {
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.teal-text {
  color: var(--teal);
}

.amber-text {
  color: var(--amber);
}

.split-layout {
  display: grid;
  gap: 16px;
}

.dedupe-layout {
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.75fr);
}

.duplicate-list {
  margin-top: 15px;
}

.duplicate-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 110px 70px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-top: 1px solid #edf1f0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.duplicate-row:hover {
  background: #f8faf9;
}

.duplicate-id {
  color: var(--faint);
  font-family: Consolas, monospace;
  font-size: 10.5px;
}

.duplicate-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.duplicate-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-copy small,
.duplicate-confidence small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.duplicate-confidence {
  display: flex;
  flex-direction: column;
}

.duplicate-confidence strong {
  color: var(--teal);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.duplicate-status {
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  text-align: center;
}

.duplicate-status.merged {
  background: var(--teal-soft);
  color: var(--teal);
}

.duplicate-status.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f8f7;
}

.segmented button {
  padding: 5px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10.5px;
  white-space: nowrap;
}

.segmented button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(20, 48, 47, 0.09);
}

.dedupe-detail {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.confidence-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.confidence-badge.high {
  background: var(--teal-soft);
  color: var(--teal);
}

.source-pair {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 16px 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.source-pair > div {
  display: flex;
  flex-direction: column;
  padding: 13px;
  background: #ffffff;
}

.source-pair span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
}

.source-pair strong {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
}

.source-pair small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
}

.source-pair code {
  margin-top: 4px;
  color: var(--faint);
  font-family: Consolas, monospace;
  font-size: 9.5px;
}

.match-fields {
  margin: 15px 20px 0;
}

.match-fields > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f0;
}

.match-fields dt {
  color: var(--muted);
  font-size: 10.5px;
}

.match-fields dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.decision-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: auto 20px 0;
  padding-top: 18px;
}

.screening-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.45fr);
  gap: 16px;
}

.queue-panel {
  display: flex;
  flex-direction: column;
  height: 720px;
  overflow: hidden;
}

.queue-head {
  flex: 0 0 auto;
}

.queue-tabs {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.queue-tabs button {
  position: relative;
  padding: 0 0 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.queue-tabs button span {
  margin-left: 3px;
  color: var(--faint);
  font-family: Consolas, monospace;
  font-size: 9.5px;
}

.queue-tabs button.active {
  color: var(--teal);
  font-weight: 700;
}

.queue-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--teal);
  content: "";
}

.queue-list {
  min-height: 0;
  overflow: auto;
}

.queue-item {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 7px;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid #edf1f0;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
}

.queue-item:hover {
  background: #f8faf9;
}

.queue-item.selected {
  background: #eef8f5;
  box-shadow: inset 3px 0 0 var(--teal);
}

.queue-item.decided {
  opacity: 0.74;
}

.queue-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.record-id {
  color: var(--faint);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.suggestion-pill {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 650;
}

.suggestion-pill.include {
  background: var(--teal-soft);
  color: var(--teal);
}

.suggestion-pill.review {
  background: var(--amber-soft);
  color: var(--amber);
}

.suggestion-pill.exclude {
  background: var(--red-soft);
  color: var(--red);
}

.queue-item > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.queue-item > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-size: 9.5px;
}

.pending-text {
  color: var(--amber);
}

.complete-text {
  color: var(--teal);
}

.record-panel {
  display: flex;
  height: 720px;
  flex-direction: column;
  padding: 20px 24px;
  overflow: auto;
}

.record-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-toolbar .icon-button {
  margin-left: auto;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f4f3;
  color: var(--muted);
  font-size: 9.5px;
}

.source-tag i {
  width: 11px;
  height: 11px;
}

.record-panel > h2 {
  max-width: 850px;
  margin: 14px 0 7px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 22px;
  line-height: 1.45;
}

.record-meta {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.suggestion-banner {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #c2ddd7;
  border-radius: 7px;
  background: #f0f9f6;
}

.suggestion-banner.review {
  border-color: #ead8b8;
  background: #fff9ee;
}

.suggestion-banner.exclude {
  border-color: #eccbc6;
  background: #fdf4f2;
}

.suggestion-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: #ffffff;
  color: var(--teal);
}

.suggestion-banner.review .suggestion-icon {
  color: var(--amber);
}

.suggestion-banner.exclude .suggestion-icon {
  color: var(--red);
}

.suggestion-banner small {
  color: var(--muted);
  font-size: 9.5px;
}

.suggestion-banner strong {
  display: block;
  margin-top: 1px;
  font-size: 12px;
}

.suggestion-banner p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.confidence-score {
  padding: 3px 7px;
  border-radius: 4px;
  background: #ffffff;
  color: var(--teal);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.suggestion-banner.review .confidence-score {
  color: var(--amber);
}

.suggestion-banner.exclude .confidence-score {
  color: var(--red);
}

.record-section {
  margin-top: 19px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.section-label small {
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 400;
}

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

.peco-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 17px;
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfc;
}

.peco-item.match {
  border-color: #cfe2de;
  background: #f7fbfa;
}

.peco-item.uncertain {
  border-color: #ebdec7;
  background: #fffbf3;
}

.peco-item.mismatch {
  border-color: #ecd2ce;
  background: #fdf8f7;
}

.peco-key {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 5px;
  background: #eef2f1;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 12px;
}

.peco-item div {
  min-width: 0;
}

.peco-item strong {
  display: block;
  font-size: 10.5px;
}

.peco-item p {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peco-item > i {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.peco-item.uncertain > i {
  color: var(--amber);
}

.peco-item.mismatch > i {
  color: var(--red);
}

.abstract-box {
  position: relative;
  max-height: 76px;
  overflow: hidden;
  padding: 12px 14px;
  border-left: 2px solid #b7cfca;
  border-radius: 0 6px 6px 0;
  background: #f7f9f9;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
}

.abstract-box.expanded {
  max-height: none;
}

.abstract-box p {
  margin: 0;
}

.abstract-box mark {
  padding: 1px 2px;
  border-radius: 2px;
  background: #dcefe9;
  color: #155d54;
}

.decision-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.decision-exclude,
.decision-review,
.decision-include {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.decision-exclude:hover {
  border-color: #dfbdb7;
  background: #fdf4f2;
  color: var(--red);
}

.decision-review:hover {
  border-color: #e7d2ae;
  background: #fff9ee;
  color: var(--amber);
}

.decision-include {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
  color: #ffffff;
}

.decision-include:hover {
  background: #0a4943;
}

.decision-complete {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid #c8dfd9;
  border-radius: 7px;
  background: #f2faf7;
}

.decision-complete > i {
  width: 22px;
  height: 22px;
  color: var(--teal);
}

.decision-complete div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.decision-complete strong {
  font-size: 11.5px;
}

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

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  color: var(--faint);
  text-align: center;
}

.empty-state.compact {
  min-height: 120px;
}

.empty-state i {
  width: 24px;
  height: 24px;
}

.empty-state strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.empty-state span {
  font-size: 10.5px;
}

.search-box {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.search-box:focus-within {
  border-color: #94bbb3;
  box-shadow: 0 0 0 3px rgba(10, 118, 106, 0.08);
}

.search-box i {
  width: 15px;
  height: 15px;
  color: var(--faint);
}

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

.search-box input::placeholder {
  color: var(--faint);
}

.evidence-summary-strip {
  margin-bottom: 16px;
}

.evidence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
}

.table-panel {
  min-width: 0;
  overflow: hidden;
}

.matrix-toolbar,
.audit-toolbar {
  display: flex;
  min-height: 57px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.matrix-count {
  color: var(--faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.table-scroll {
  min-width: 0;
  overflow: auto;
}

.evidence-table,
.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.evidence-table {
  min-width: 1020px;
}

.audit-table {
  min-width: 940px;
}

.evidence-table th,
.audit-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  background: #f5f8f7;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.evidence-table td,
.audit-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f0;
  vertical-align: middle;
}

.evidence-table tbody tr {
  cursor: pointer;
}

.evidence-table tbody tr:hover,
.evidence-table tbody tr.selected {
  background: #f0f8f6;
}

.evidence-table tbody tr.selected {
  box-shadow: inset 3px 0 0 var(--teal);
}

.evidence-table td:first-child {
  max-width: 190px;
}

.evidence-table td:first-child strong {
  display: block;
  color: var(--ink);
  font-size: 10.5px;
}

.evidence-table td:first-child small {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.evidence-table td:nth-child(6) strong {
  color: var(--ink-soft);
  font-family: Consolas, monospace;
  font-size: 9.5px;
  white-space: nowrap;
}

.evidence-table td:last-child {
  color: var(--faint);
}

.risk-badge {
  display: inline-block;
  min-width: 26px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  text-align: center;
}

.risk-badge.low {
  background: var(--teal-soft);
  color: var(--teal);
}

.risk-badge.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.risk-badge.high {
  background: var(--red-soft);
  color: var(--red);
}

.evidence-detail {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.evidence-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 17px 18px 0;
}

.direction-badge {
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 9.5px;
}

.direction-badge.positive {
  background: var(--teal-soft);
  color: var(--teal);
}

.direction-badge.neutral {
  background: #eef1f1;
  color: var(--muted);
}

.evidence-detail > h2 {
  margin: 12px 18px 0;
  font-size: 16px;
}

.evidence-title {
  margin: 4px 18px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.effect-card {
  margin: 14px 18px 0;
  padding: 13px;
  border: 1px solid #c9ded9;
  border-radius: 7px;
  background: #f2faf7;
}

.effect-card span,
.effect-card small {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}

.effect-card strong {
  display: block;
  margin: 5px 0;
  color: var(--teal-deep);
  font-family: Consolas, monospace;
  font-size: 17px;
}

.evidence-fields {
  margin: 14px 18px 0;
}

.evidence-fields > div {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f0;
}

.evidence-fields dt {
  color: var(--faint);
  font-size: 9.5px;
}

.evidence-fields dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.source-quote {
  margin: 14px 18px 0;
  padding-left: 11px;
  border-left: 2px solid #a9c9c2;
}

.source-quote > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--teal);
  font-size: 9.5px;
  font-weight: 700;
}

.source-quote i {
  width: 13px;
  height: 13px;
}

.source-quote p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.65;
}

.uncertainty-note {
  display: flex;
  gap: 7px;
  margin: 13px 18px 14px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #fff9ee;
  color: var(--amber);
}

.uncertainty-note i {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.uncertainty-note p {
  margin: 0;
  color: #785c32;
  font-size: 9.5px;
  line-height: 1.55;
}

.full-width {
  width: calc(100% - 36px);
  margin: auto 18px 0;
}

.gap-table-panel {
  margin-top: 16px;
  padding-bottom: 16px;
}

.gap-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 17px;
  padding: 0 20px;
}

.gap-matrix-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.distribution-bar {
  display: flex;
  height: 8px;
  gap: 2px;
  overflow: hidden;
  border-radius: 4px;
  background: #eef2f1;
}

.distribution-bar span:nth-child(1) {
  background: var(--teal);
}

.distribution-bar span:nth-child(2) {
  background: #d0a451;
}

.distribution-bar span:nth-child(3) {
  background: #a7b5b3;
}

.gap-matrix p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.gap-matrix p strong {
  color: var(--ink-soft);
}

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

.certainty-scale span {
  padding: 3px 1px;
  border-radius: 3px;
  background: #edf1f0;
  color: var(--faint);
  font-size: 8px;
  text-align: center;
}

.certainty-scale span.active {
  background: var(--teal-soft);
  color: var(--teal);
}

.prisma-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: 16px;
}

.prisma-panel {
  padding-bottom: 16px;
}

.prisma-flow {
  max-width: 790px;
  margin: 17px auto 0;
  padding: 0 24px;
}

.prisma-stage {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 148px;
  align-items: center;
  gap: 14px;
}

.prisma-stage > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.flow-box,
.flow-side {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #f8faf9;
}

.flow-box.primary {
  border-color: #b9d5cf;
  background: #f0f9f6;
}

.flow-box.included {
  border-color: var(--teal);
  background: var(--teal-deep);
  color: #ffffff;
}

.flow-box strong,
.flow-side strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.flow-box small,
.flow-side small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
}

.flow-box.included small {
  color: #b9d8d1;
}

.flow-side.excluded {
  background: #f5f7f7;
}

.flow-side.pending {
  border-color: #ead7b5;
  background: #fff9ed;
}

.flow-side.pending strong {
  color: var(--amber);
}

.flow-arrow {
  display: grid;
  height: 34px;
  margin-left: 88px;
  place-items: center;
  color: #a3b5b2;
}

.flow-arrow i {
  width: 18px;
  height: 18px;
}

.prisma-legend {
  display: flex;
  gap: 18px;
  margin: 14px 24px 0;
  padding-top: 13px;
  border-top: 1px solid #edf1f0;
  color: var(--muted);
  font-size: 9.5px;
}

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

.prisma-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deliverable-panel {
  padding-bottom: 9px;
}

.deliverable-list {
  margin-top: 12px;
}

.deliverable-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-top: 1px solid #edf1f0;
}

.deliverable-list > div > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: #f0f5f4;
  color: var(--teal);
}

.deliverable-list > div > span i {
  width: 15px;
  height: 15px;
}

.deliverable-list > div > i {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.deliverable-list strong {
  display: block;
  font-size: 11px;
}

.deliverable-list small {
  color: var(--muted);
  font-size: 9.5px;
}

.formula-panel {
  padding: 18px;
}

.formula-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.formula-row,
.formula-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f0;
  color: var(--muted);
  font-size: 10.5px;
}

.formula-row strong,
.formula-total strong {
  color: var(--ink-soft);
  font-family: Consolas, monospace;
}

.formula-total {
  border-bottom: 0;
  color: var(--ink);
  font-weight: 700;
}

.formula-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--teal);
  font-size: 10px;
}

.formula-note i {
  width: 14px;
  height: 14px;
}

.validation-badge {
  border-color: #bcd8d2;
  background: #f2faf7;
}

.validation-badge i {
  width: 16px;
  height: 16px;
  color: var(--teal);
}

.validation-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.validation-hero > div {
  min-height: 116px;
  padding: 17px 18px;
  background: var(--surface);
}

.validation-hero strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 600;
}

.validation-hero p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.validation-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}

.validation-grid .panel {
  padding-bottom: 18px;
}

.confusion-matrix {
  display: grid;
  grid-template-columns: 84px repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 17px 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.matrix-corner,
.matrix-head,
.matrix-cell {
  display: flex;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #f7f9f8;
  text-align: center;
}

.matrix-head {
  color: var(--muted);
  font-size: 9.5px;
}

.matrix-head.row {
  justify-content: flex-start;
  text-align: left;
}

.matrix-cell {
  flex-direction: column;
  background: #ffffff;
}

.matrix-cell.correct {
  background: #f2faf7;
}

.matrix-cell.wrong {
  background: #fff7ee;
}

.matrix-cell strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 23px;
}

.matrix-cell span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.metric-bars {
  margin: 19px 20px 0;
}

.metric-bar-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.metric-bar-row > span {
  color: var(--muted);
  font-size: 9.5px;
}

.metric-bar-row > strong {
  color: var(--ink-soft);
  font-family: Consolas, monospace;
  font-size: 9.5px;
  text-align: right;
}

.metric-track {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #eaf0ee;
}

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

.method-steps {
  margin: 14px 20px 0;
}

.method-steps > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #edf1f0;
}

.method-steps > div:first-child {
  border-top: 0;
}

.method-steps > div > span {
  color: var(--faint);
  font-family: Consolas, monospace;
  font-size: 9.5px;
}

.method-steps strong {
  font-size: 11px;
}

.method-steps p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.boundary-panel {
  margin-top: 16px;
  padding-bottom: 19px;
}

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

.boundary-columns > div {
  padding-top: 12px;
  border-top: 2px solid var(--line-strong);
}

.boundary-columns > div:nth-child(1) {
  border-color: #8fc1b6;
}

.boundary-columns > div:nth-child(2) {
  border-color: #dfb978;
}

.boundary-columns > div:nth-child(3) {
  border-color: #89a6ba;
}

.boundary-columns strong {
  font-size: 11px;
}

.boundary-columns p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.audit-meta {
  margin-bottom: 16px;
}

.audit-meta strong {
  font-family: "Microsoft YaHei UI", sans-serif;
  font-size: 13px;
  font-weight: 650;
}

.audit-panel {
  overflow: hidden;
}

.audit-toolbar .search-box {
  flex: 1;
  max-width: 360px;
}

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

.audit-table td {
  color: var(--muted);
}

.audit-table td strong {
  color: var(--ink-soft);
}

.audit-table time,
.audit-table code {
  font-family: Consolas, monospace;
  font-size: 9.5px;
}

.audit-table code {
  color: var(--faint);
}

.audit-action {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  white-space: nowrap;
}

.audit-action.decision {
  background: var(--teal-soft);
  color: var(--teal);
}

.audit-action.system {
  background: var(--blue-soft);
  color: var(--blue);
}

.audit-action.export {
  background: var(--amber-soft);
  color: var(--amber);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 360px;
  padding: 10px 14px;
  border: 1px solid #24474a;
  border-radius: 7px;
  background: #173538;
  color: #f4fbf9;
  box-shadow: 0 12px 28px rgba(16, 42, 45, 0.2);
  font-size: 11.5px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1220px) {
  .topbar {
    padding: 0 20px;
  }

  .workspace-body {
    padding: 24px 20px;
  }

  .synthetic-badge {
    display: none;
  }

  .dashboard-grid,
  .lower-grid,
  .prisma-layout,
  .validation-grid {
    grid-template-columns: 1fr;
  }

  .task-panel {
    min-height: auto;
  }

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

  .evidence-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
    align-items: start;
  }

  .evidence-detail-head,
  .evidence-detail > h2,
  .evidence-title,
  .effect-card,
  .evidence-fields,
  .source-quote,
  .uncertainty-note,
  .evidence-detail .full-width {
    grid-column: 1;
  }

  .evidence-detail .source-quote {
    grid-column: 1;
  }

  .evidence-detail .uncertainty-note {
    grid-column: 1;
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    height: auto;
    padding: 10px 14px;
    overflow: visible;
  }

  .brand {
    padding: 0 0 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small,
  .project-switch,
  .sidebar-note,
  .sidebar-footer {
    display: none;
  }

  .main-nav {
    flex-direction: row;
    gap: 3px;
    padding-bottom: 2px;
    overflow-x: auto;
  }

  .nav-item {
    grid-template-columns: 17px auto;
    width: max-content;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .nav-item.active::before {
    display: none;
  }

  .nav-count {
    display: none;
  }

  .topbar {
    position: relative;
    min-height: 54px;
    padding: 0 16px;
  }

  .topbar-path span,
  .topbar-path > i {
    display: none;
  }

  .topbar-actions .button-quiet span {
    display: none;
  }

  .workspace-body {
    padding: 20px 15px 32px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .heading-actions {
    width: 100%;
    flex-wrap: wrap;
  }

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

  .screening-layout,
  .dedupe-layout {
    grid-template-columns: 1fr;
  }

  .queue-panel,
  .record-panel {
    height: auto;
  }

  .queue-list {
    max-height: 360px;
  }

  .record-panel {
    min-height: 650px;
  }

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

@media (max-width: 680px) {
  .page-heading h1 {
    font-size: 24px;
  }

  .stat-grid,
  .summary-strip,
  .audit-meta,
  .validation-hero {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    min-height: 108px;
    padding: 14px;
  }

  .stat-card strong {
    font-size: 27px;
  }

  .dashboard-grid,
  .lower-grid {
    gap: 12px;
  }

  .panel-head {
    padding: 15px 15px 0;
  }

  .chart-legend {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 13px 15px 0;
  }

  .legend-note {
    margin-left: 0;
  }

  .forest-chart {
    min-width: 650px;
  }

  .evidence-panel {
    overflow-x: auto;
  }

  .evidence-summary {
    margin: 0 15px;
  }

  .evidence-summary div {
    padding: 10px;
  }

  .task-list button {
    padding: 11px 15px;
  }

  .review-note,
  .gap-list > div,
  .activity-list,
  .source-pair,
  .match-fields,
  .prisma-flow,
  .gap-matrix,
  .boundary-columns,
  .confusion-matrix,
  .metric-bars,
  .method-steps {
    margin-right: 15px;
    margin-left: 15px;
  }

  .source-pair {
    margin-top: 14px;
  }

  .dedupe-layout .panel {
    min-width: 0;
  }

  .duplicate-row {
    grid-template-columns: 50px minmax(0, 1fr) 64px;
    padding: 13px 15px;
  }

  .duplicate-confidence {
    display: none;
  }

  .matrix-toolbar,
  .audit-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    overflow-x: auto;
  }

  .search-box {
    width: 100%;
  }

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

  .record-panel {
    min-height: 700px;
    padding: 17px 15px;
  }

  .record-panel > h2 {
    font-size: 19px;
  }

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

  .suggestion-banner {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .confidence-score {
    grid-column: 2;
    justify-self: start;
  }

  .decision-bar {
    position: sticky;
    bottom: 0;
    padding: 12px 0 0;
    background: #ffffff;
  }

  .prisma-stage {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .prisma-stage > span {
    margin-top: 7px;
  }

  .flow-side {
    min-height: 56px;
  }

  .flow-arrow {
    height: 24px;
    margin-left: 0;
  }

  .prisma-legend {
    flex-wrap: wrap;
  }

  .boundary-columns {
    gap: 13px;
  }

  .evidence-detail {
    display: flex;
  }

  .gap-matrix {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .topbar-actions #exportBundleTop span {
    display: none;
  }

  .topbar-actions #importButton span {
    display: none;
  }
}
