:root {
  --ink: #20242a;
  --muted: #667085;
  --line: #d9e0e6;
  --line-soft: #edf1f4;
  --paper: #ffffff;
  --bg: #f5f7f8;
  --bg-warm: #eef4f3;
  --blush: #527b72;
  --blush-deep: #315f57;
  --rose: #7aa69a;
  --gold: #aa7d36;
  --warn-bg: #fdf2e2;
  --warn-line: #ecd09a;
  --warn-ink: #7a541a;
  --success-bg: #eef7ef;
  --success-line: #bcdbc1;
  --success-ink: #2f6238;
  --error-bg: #fbecec;
  --error-line: #e8b6b6;
  --error-ink: #8a2a2a;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.stage {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.curtain { text-align: left; margin-bottom: 22px; }

.eyebrow {
  margin: 0;
  color: var(--blush-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

h1 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(36px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-top: 6px;
}

.subtitle {
  margin: 12px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

/* ── Tabs ──────────────────────────────────────────── */
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.tab:hover:not(.active) { color: var(--ink); }

.tab.active {
  background: var(--blush-deep);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(168, 96, 110, 0.55);
}

.tab-label { white-space: nowrap; }

.tab-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(168, 96, 110, 0.14);
  color: var(--blush-deep);
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.tab.active .tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ── Card shell ────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow:
    0 1px 0 rgba(42, 31, 40, 0.02),
    0 24px 60px -32px rgba(168, 96, 110, 0.22);
}

h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Forms ─────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.field-label .optional {
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

input[type="url"],
input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus, textarea:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 4px rgba(201, 138, 150, 0.18);
  outline: none;
}

textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
textarea.urls { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 14px; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 20px;
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

button:active:not(:disabled) { transform: translateY(1px); }

.primary {
  background: var(--blush-deep);
  border-color: var(--blush-deep);
  color: #fff;
}
.primary:hover:not(:disabled) { background: #8e4b59; border-color: #8e4b59; }

.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover:not(:disabled) { background: var(--bg-warm); }

.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding-left: 0;
  padding-right: 0;
  min-height: 36px;
}
.ghost:hover:not(:disabled) { color: var(--blush-deep); }

button:disabled { cursor: not-allowed; opacity: 0.55; }

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ── Drafts list ───────────────────────────────────── */
.list { display: grid; gap: 10px; }

.row {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 80ms ease;
}

.row:hover { border-color: var(--rose); background: var(--bg-warm); }
.row:active { transform: translateY(1px); }

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

.row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.row-url {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.review { background: #fdeef0; color: var(--blush-deep); }
.status-pill.approved { background: #eef3fb; color: #355a8c; }
.status-pill.submitted { background: var(--success-bg); color: var(--success-ink); }
.status-pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.status-pill.error { background: var(--error-bg); color: var(--error-ink); }
.status-pill.muted { background: var(--bg-warm); color: var(--muted); }

.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--blush-deep));
  border-radius: inherit;
  transition: width 280ms ease;
}

.row.submitted .bar > span { background: var(--success-ink); }
.row.cancelled .bar > span { background: var(--muted); }

.row-foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

/* ── Review screen ─────────────────────────────────── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  min-height: 0;
}
.back:hover { color: var(--blush-deep); }

.draft-title {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.draft-title .source {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 18px;
}

.field-row { display: grid; gap: 4px; }

.field-row dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.field-row dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.field-row dd.missing { color: var(--muted); font-style: italic; }

.description-block {
  margin: 0 0 18px;
  padding: 16px 18px;
  background: var(--bg-warm);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  line-height: 1.55;
  font-size: 14.5px;
}

.review-block { margin: 0 0 18px; }
.review-block h3 { margin-bottom: 10px; }
.review-block ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.review-block a {
  color: var(--blush-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Notices ───────────────────────────────────────── */
.notice {
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.notice strong { font-weight: 700; }
.notice.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.notice.success { background: var(--success-bg); border: 1px solid var(--success-line); color: var(--success-ink); }
.notice.error { background: var(--error-bg); border: 1px solid var(--error-line); color: var(--error-ink); }
.notice p + p { margin-top: 4px; }
.notice a {
  display: inline-block;
  margin-top: 6px;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Progress (in-process detail) ──────────────────── */
.progress { display: grid; gap: 12px; }

.progress-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-warm);
  border: 1px solid var(--line-soft);
  color: var(--muted);
}

.progress-step .dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--rose);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--blush-deep);
  font-weight: 700;
}

.progress-step.active {
  background: #fff;
  color: var(--ink);
  border-color: var(--rose);
}

.progress-step.active .dot {
  background: var(--blush-deep);
  border-color: var(--blush-deep);
  color: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}

.progress-step.done {
  background: var(--success-bg);
  border-color: var(--success-line);
  color: var(--success-ink);
}
.progress-step.done .dot {
  background: var(--success-ink);
  border-color: var(--success-ink);
  color: #fff;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 96, 110, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(168, 96, 110, 0); }
}

.step-title { font-weight: 600; font-size: 14.5px; }
.step-body { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ── Empty / centered states ───────────────────────── */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  line-height: 1.5;
  font-size: 14.5px;
}

.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; font-weight: 600; }

.center { text-align: center; padding: 6px 0; }

.success-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  margin-bottom: 6px;
  color: var(--success-ink);
}

.success-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--blush-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 15px;
}

/* ── Toast ─────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  box-shadow: 0 12px 40px -12px rgba(42, 31, 40, 0.35);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Mobile / wider ───────────────────────────────── */
@media (min-width: 640px) {
  .stage { padding-top: 48px; }
  .card { padding: 32px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields .field-row.span-2 { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .tab-label { font-size: 13px; }
  .tab { padding: 0 6px; }
}

/* Double Checker V1 */
.split-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.split-head.compact { margin-bottom: 14px; }
.wide { max-width: 720px; }

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

.status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.status-strip span,
.flag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.queue-item {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.mini-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
}

.mini-steps span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 0 6px;
}

.mini-steps span.done {
  background: var(--success-bg);
  color: var(--success-ink);
}

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

.agent-run-grid div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.agent-run-grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agent-run-grid strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.terminal-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.terminal-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.terminal-steps span.active {
  background: var(--error-bg);
  color: var(--error-ink);
}

.processing-log {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafb;
}

.processing-log strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.processing-log ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.queue-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.review-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-pick {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 0;
  padding: 12px;
  border-radius: 8px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.review-pick.active {
  border-color: var(--blush-deep);
  background: var(--bg-warm);
}

.review-pick strong {
  font-size: 13px;
  line-height: 1.35;
}

.review-pick span,
.review-pick em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

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

.queue-heading h2 { font-size: 22px; }

.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  border-color: var(--line);
  color: var(--muted);
  font-size: 12px;
}

.filter-chip.active {
  background: var(--blush-deep);
  border-color: var(--blush-deep);
  color: #fff;
}

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

.pick-top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.review-pick .pick-url,
.review-pick .pick-meta {
  overflow-wrap: anywhere;
}

.pick-flags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pick-flags i {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
}

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

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

.evidence-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.evidence-card:hover {
  border-color: var(--rose);
  background: var(--bg-warm);
}

.evidence-card strong {
  font-size: 12px;
  line-height: 1.3;
}

.evidence-card span,
.evidence-card em {
  color: var(--muted);
  font-size: 11.5px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.link-row a {
  color: var(--blush-deep);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.flag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  line-height: 1.4;
}

th {
  background: #f8fafb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td a {
  color: var(--blush-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #344054;
}

.status-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip.match { background: var(--success-bg); color: var(--success-ink); }
.status-chip.update,
.status-chip.missing { background: var(--warn-bg); color: var(--warn-ink); }
.status-chip.conflicting { background: var(--error-bg); color: var(--error-ink); }
.status-chip.unknown,
.status-chip.needs_check,
.status-chip.unsupported { background: var(--line-soft); color: var(--muted); }

.review-notes {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.notice.subtle {
  background: #f8fafb;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  margin: 0;
}

.notice.boundary {
  background: #eef3fb;
  border: 1px solid #c9d7ec;
  color: #355a8c;
}

.decision-summary {
  display: grid;
  gap: 5px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  background: #fff;
}

.decision-summary strong {
  font-size: 13.5px;
}

.decision-summary p,
.decision-summary em {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
}

.decision-summary em {
  color: var(--muted);
  font-style: normal;
  overflow-wrap: anywhere;
}

.decision-summary.success {
  background: var(--success-bg);
  border-color: var(--success-line);
  color: var(--success-ink);
}

.decision-summary.warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn-ink);
}

.decision-summary.error {
  background: var(--error-bg);
  border-color: var(--error-line);
  color: var(--error-ink);
}

.detail-section {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

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

.summary-grid div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.summary-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-grid dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.packet-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
}

.finding-card {
  align-content: start;
}

.finding-status {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finding-status.good {
  background: var(--success-bg);
  color: var(--success-ink);
}

.finding-status.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.finding-status.bad {
  background: var(--error-bg);
  color: var(--error-ink);
}

.finding-status.muted {
  background: var(--line-soft);
  color: var(--muted);
}

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

.decision-button {
  display: grid;
  gap: 5px;
  height: auto;
  min-height: 86px;
  align-content: start;
  padding: 12px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.decision-button:hover:not(:disabled),
.decision-button.active {
  border-color: var(--blush-deep);
  background: var(--bg-warm);
}

.decision-button strong {
  font-size: 13px;
  line-height: 1.3;
}

.decision-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.empty.small {
  padding: 18px 10px;
  font-size: 13px;
}

@media (max-width: 860px) {
  .tabs { grid-template-columns: 1fr; }
  .split-head,
  .row-head {
    display: grid;
  }
  .grid-two,
  .evidence-grid,
  .agent-run-grid,
  .review-shell {
    grid-template-columns: 1fr;
  }
  .mini-steps {
    grid-template-columns: 1fr;
  }
  .summary-grid,
  .section-grid,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line-soft);
    overflow-wrap: anywhere;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  td:last-child {
    border-bottom: 0;
  }
}
