:root {
  --ink: #17201c;
  --muted: #66746f;
  --line: #d9dfd7;
  --paper: #f7f8f2;
  --panel: #ffffff;
  --field: #eef2ea;
  --green: #0f8b68;
  --blue: #2f65b8;
  --gold: #af7b21;
  --red: #b84d3f;
  --charcoal: #24322d;
  --shadow: 0 18px 50px rgba(36, 50, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 139, 104, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 101, 184, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: var(--green);
  color: var(--green);
}

input,
select {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.25;
}

h2 {
  font-size: 28px;
  line-height: 1.15;
}

#db-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.search-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.search-row button,
.table-toolbar button,
.primary-button,
.secondary-button {
  border-radius: 6px;
  min-height: 40px;
}

.primary-button {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  padding: 0 16px;
}

.secondary-button {
  padding: 0 14px;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-button {
  text-align: left;
  border-radius: 6px;
  padding: 12px;
  background: transparent;
}

.nav-link {
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: rgba(15, 139, 104, 0.08);
  color: var(--ink);
  text-decoration: none;
}

.nav-link:hover {
  border-color: var(--green);
  color: var(--green);
}

.nav-button.is-active {
  background: var(--charcoal);
  color: #fff;
  border-color: var(--charcoal);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

#health-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
}

#health-dot.ok {
  background: var(--green);
}

.main {
  padding: 28px;
  min-width: 0;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.inline-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

.kpi .label {
  color: var(--muted);
  font-size: 12px;
}

.kpi .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
}

.kpi .value.smaller {
  font-size: 20px;
}

.kpi .note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.lifecycle-summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.lifecycle-summary-card span,
.lifecycle-summary-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.lifecycle-summary-card strong {
  display: block;
  margin: 6px 0;
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lifecycle-model-grid {
  margin-bottom: 14px;
}

.lifecycle-steps,
.lifecycle-states {
  display: grid;
  gap: 10px;
}

.lifecycle-step,
.lifecycle-state {
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  padding: 10px;
  background: #f8faf5;
  display: grid;
  gap: 5px;
}

.lifecycle-step b {
  color: var(--green);
  font-size: 12px;
}

.lifecycle-step strong,
.lifecycle-state strong {
  line-height: 1.35;
}

.lifecycle-step span,
.lifecycle-state span,
.lifecycle-step p,
.lifecycle-state p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.lifecycle-state div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lifecycle-state em {
  border-radius: 999px;
  background: #e7f4ee;
  color: var(--green);
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
}

.lifecycle-customer-panel {
  margin-top: 0;
}

.lifecycle-customer-cards {
  display: grid;
  gap: 12px;
}

.lifecycle-customer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

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

.lifecycle-card-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lifecycle-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.lifecycle-card-head strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.lifecycle-card-head b {
  border-radius: 999px;
  background: #fff5df;
  color: var(--gold);
  padding: 5px 10px;
  white-space: nowrap;
}

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

.lifecycle-card-metrics span {
  background: var(--field);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  text-align: center;
}

.lifecycle-profile {
  line-height: 1.55;
}

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

.lifecycle-task-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8faf5;
  min-width: 0;
}

.lifecycle-task-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.lifecycle-task-grid p {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.lifecycle-task-grid p span {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list code {
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  padding: 3px 7px;
  font-size: 11px;
}

.message-variant {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 8px;
}

.message-variant:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.h5-screen-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

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

.h5-actions button {
  border-radius: 6px;
  padding: 8px 10px;
  cursor: default;
}

.h5-actions button:first-child {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

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

.ab-footer span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.lifecycle-batch-panel {
  margin-top: 14px;
}

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

.lifecycle-batch20-summary article {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.lifecycle-batch20-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.lifecycle-batch20-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.lifecycle-batch20-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 560px;
}

.ai-insight-panel {
  margin-top: 14px;
}

.ai-insight-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ai-insight-title-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: -4px;
}

.ai-insight-blocker {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 10px;
  margin: 12px 0;
}

.ai-insight-blocker article,
.ai-insight-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf5;
  padding: 10px;
  min-width: 0;
}

.ai-insight-blocker article:first-child {
  border-left: 5px solid var(--gold);
}

.ai-insight-blocker span,
.ai-insight-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ai-insight-blocker strong,
.ai-insight-summary strong {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}

.ai-insight-blocker p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}

.ai-insight-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ai-insight-summary strong {
  font-size: 20px;
}

.ai-insight-workbench {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ai-insight-customer-list {
  display: grid;
  gap: 8px;
  max-height: 760px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 8px;
}

.ai-insight-customer-button {
  text-align: left;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.ai-insight-customer-button.is-active {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
  background: #f5fbf7;
}

.ai-insight-customer-button span {
  color: var(--muted);
  font-size: 12px;
}

.ai-insight-customer-button strong {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ai-insight-customer-button small {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ai-insight-customer-button b {
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
}

.ai-insight-detail {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.ai-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf5;
  padding: 14px;
}

.ai-detail-head span {
  color: var(--muted);
  font-size: 12px;
}

.ai-detail-head h3 {
  margin: 4px 0;
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.ai-detail-head p {
  color: var(--ink);
  line-height: 1.55;
}

.ai-detail-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 170px;
}

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

.ai-detail-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 10px;
}

.ai-detail-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ai-detail-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.ai-warning-strip {
  border: 1px solid #f1d39c;
  border-radius: 8px;
  background: #fff8e8;
  color: #6d4d14;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.ai-warning-strip span {
  font-size: 12px;
  line-height: 1.5;
}

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

.ai-audit-contract article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf5;
  padding: 10px;
  min-width: 0;
}

.ai-audit-contract span,
.ai-workflow-title span,
.ai-workflow-meta span,
.ai-workflow-section small,
.ai-workflow-boundary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ai-audit-contract strong {
  display: block;
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.35;
}

.ai-audit-contract p,
.ai-workflow-policy,
.ai-workflow-calibration {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ai-conclusion-grid {
  display: grid;
  gap: 8px;
}

.ai-conclusion-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ai-conclusion-card summary {
  list-style: none;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  padding: 12px;
}

.ai-conclusion-card summary::-webkit-details-marker {
  display: none;
}

.ai-conclusion-card summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ai-conclusion-card summary strong {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-conclusion-card summary b {
  border-radius: 999px;
  background: #e7f4ee;
  color: var(--green);
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}

.ai-conclusion-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8faf5;
}

.ai-conclusion-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.ai-conclusion-body h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.ai-conclusion-body ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.ai-workflow-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.ai-workflow-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.ai-workflow-title h4,
.ai-workflow-section h5 {
  margin: 0;
}

.ai-workflow-title h4 {
  font-size: 14px;
}

.ai-workflow-section h5 {
  font-size: 13px;
}

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

.ai-workflow-meta article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  min-width: 0;
}

.ai-workflow-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-workflow-section {
  display: grid;
  gap: 8px;
}

.ai-input-field-list,
.ai-workflow-boundary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-input-field-list span,
.ai-workflow-boundary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 8px;
  overflow-wrap: anywhere;
}

.ai-audit-row-grid {
  display: grid;
  gap: 7px;
}

.ai-audit-row-grid.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-audit-row-grid article {
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ai-audit-row-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ai-audit-row-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-audit-row-grid b {
  color: var(--ink);
  margin-right: 6px;
}

.ai-audit-empty {
  color: var(--muted);
  font-size: 12px;
}

.ai-json-block {
  display: grid;
  gap: 8px;
}

.ai-json-block pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f4;
  color: var(--ink);
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

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

.ai-score-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 9px;
}

.ai-score-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.ai-score-cell strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.lifecycle-ops-panel {
  margin-top: 14px;
}

.lifecycle-ops-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.lifecycle-ops-summary article {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.lifecycle-ops-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.lifecycle-ops-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

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

.lifecycle-ops-grid h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.advisor-review-list,
.feedback-unit-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
}

.advisor-review-item,
.feedback-unit-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf5;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.review-item-head {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.review-item-head strong,
.feedback-unit-item strong {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.advisor-review-item p,
.feedback-unit-item p {
  margin: 0;
  line-height: 1.45;
  font-size: 13px;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manual-send-gate {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.manual-send-gate strong,
.manual-send-gate span {
  overflow-wrap: anywhere;
}

.manual-send-button {
  width: fit-content;
  border-radius: 6px;
  border: 1px solid #86b89a;
  background: #eaf6ee;
  color: #1f6b3d;
  padding: 6px 9px;
  font-size: 12px;
  cursor: pointer;
}

.outcome-actions,
.todo-actions,
.admin-source-sync-actions,
.admin-source-sync-execution-actions,
.product-copy-review-actions,
.h5-publish-review-actions,
.h5-publish-execution-actions,
.h5-engagement-actions,
.h5-formal-outcome-actions,
.h5-post-formal-followup-actions,
.h5-no-conversion-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-actions button,
.outcome-actions button,
.todo-actions button,
.admin-source-sync-actions button,
.admin-source-sync-execution-actions button,
.product-copy-review-actions button,
.h5-publish-review-actions button,
.h5-publish-execution-actions button,
.h5-engagement-actions button,
.h5-formal-outcome-actions button,
.h5-post-formal-followup-actions button,
.h5-no-conversion-review-actions button {
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}

.review-action-status,
.outcome-action-status,
.manual-send-status,
.admin-todo-status,
.admin-source-sync-status,
.admin-source-sync-execution-status,
.product-copy-review-status,
.h5-publish-review-status,
.h5-publish-execution-status,
.h5-engagement-status,
.h5-formal-outcome-status,
.h5-post-formal-followup-status,
.h5-no-conversion-review-status {
  min-height: 18px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.45;
}

.feedback-unit-item span {
  color: var(--muted);
  font-size: 12px;
}

.advisor-event-log,
.outcome-event-log,
.manual-send-event-log,
.post-send-followup-log,
.next-round-action-log,
.admin-todo-log {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.advisor-event-log h4,
.outcome-event-log h4,
.manual-send-event-log h4,
.post-send-followup-log h4,
.next-round-action-log h4,
.admin-todo-log h4 {
  margin: 0;
  font-size: 14px;
}

.advisor-event-log article,
.outcome-event-log article,
.manual-send-event-log article,
.post-send-followup-log article,
.next-round-action-log article,
.admin-todo-log article {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 5px;
}

.advisor-event-log article span,
.outcome-event-log article span,
.manual-send-event-log article span,
.post-send-followup-log article span,
.next-round-action-log article span,
.admin-todo-log article span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.outcome-event-log article {
  border-left-color: var(--blue);
}

.manual-send-event-log article {
  border-left-color: #1f6b3d;
}

.post-send-followup-log article {
  border-left-color: #b7791f;
}

.next-round-action-log article {
  border-left-color: #7c3aed;
}

.admin-todo-log article {
  border-left-color: #0f766e;
}

.admin-todo-event-log,
.admin-source-sync-log,
.admin-source-sync-event-log,
.admin-source-sync-execution-log,
.mvp-result-scorecard-log,
.real-business-backfill-log,
.product-classification-seed-log,
.product-classification-review-log,
.product-classification-review-event-log,
.product-classification-execution-log,
.product-classification-import-log,
.product-classification-import-readiness-log,
.product-classification-recompute-log,
.product-classification-impact-log,
.traceability-log,
.customer-detail-log,
.h5-publish-gate-log,
.h5-publish-review-event-log,
.h5-publish-execution-event-log,
.h5-engagement-event-log,
.h5-feedback-learning-bridge-log,
.h5-formal-outcome-event-log,
.h5-post-formal-followup-log,
.h5-post-formal-followup-event-log,
.h5-no-conversion-review-log,
.h5-no-conversion-review-event-log,
.product-copy-review-log,
.product-copy-review-event-log,
.gate-recalculation-log {
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.admin-todo-event-log h4,
.admin-source-sync-log h4,
.admin-source-sync-event-log h4,
.admin-source-sync-execution-log h4,
.mvp-result-scorecard-log h4,
.real-business-backfill-log h4,
.product-classification-seed-log h4,
.product-classification-review-log h4,
.product-classification-review-event-log h4,
.product-classification-execution-log h4,
.product-classification-import-log h4,
.product-classification-import-readiness-log h4,
.product-classification-recompute-log h4,
.product-classification-impact-log h4,
.traceability-log h4,
.customer-detail-log h4,
.h5-publish-gate-log h4,
.h5-publish-review-event-log h4,
.h5-publish-execution-event-log h4,
.h5-engagement-event-log h4,
.h5-feedback-learning-bridge-log h4,
.h5-formal-outcome-event-log h4,
.h5-post-formal-followup-log h4,
.h5-post-formal-followup-event-log h5,
.h5-no-conversion-review-log h4,
.h5-no-conversion-review-event-log h5,
.product-copy-review-log h4,
.product-copy-review-event-log h4,
.gate-recalculation-log h4 {
  margin: 0;
  font-size: 13px;
}

.admin-todo-event-log article {
  border-left-color: #155e75;
}

.admin-source-sync-log article {
  border-left-color: #334155;
}

.admin-source-sync-event-log article {
  border-left-color: #2563eb;
}

.admin-source-sync-execution-log article {
  border-left-color: #0f766e;
}

.mvp-result-scorecard-log article {
  border-left-color: #b45309;
}

.real-business-backfill-log article {
  border-left-color: #7c2d12;
}

.product-classification-seed-log article {
  border-left-color: #0f766e;
}

.product-classification-review-log article {
  border-left-color: #0369a1;
}

.product-classification-review-event-log article {
  border-left-color: #4338ca;
}

.product-classification-execution-log article {
  border-left-color: #7c3aed;
}

.product-classification-import-log article {
  border-left-color: #0d9488;
}

.product-classification-import-readiness-log article {
  border-left-color: #a16207;
}

.product-classification-recompute-log article {
  border-left-color: #be185d;
}

.product-classification-impact-log article {
  border-left-color: #b45309;
}

.traceability-log article {
  border-left-color: #4f46e5;
}

.customer-detail-log article {
  border-left-color: #be185d;
}

.h5-publish-gate-log article {
  border-left-color: #2563eb;
}

.h5-publish-review-event-log article {
  border-left-color: #1d4ed8;
}

.h5-publish-execution-event-log article {
  border-left-color: #0369a1;
}

.h5-engagement-event-log article {
  border-left-color: #0f766e;
}

.h5-feedback-learning-bridge-log article {
  border-left-color: #15803d;
}

.h5-formal-outcome-event-log article {
  border-left-color: #047857;
}

.h5-post-formal-followup-log article {
  border-left-color: #0e7490;
}

.h5-post-formal-followup-event-log article {
  border-left-color: #0891b2;
}

.h5-no-conversion-review-log article {
  border-left-color: #7c3aed;
}

.h5-no-conversion-review-event-log article {
  border-left-color: #6d28d9;
}

.product-copy-review-log article {
  border-left-color: #b45309;
}

.product-copy-review-event-log article {
  border-left-color: #92400e;
}

.gate-recalculation-log article {
  border-left-color: #64748b;
}

.traceability-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.traceability-summary span,
.customer-detail-summary span,
.h5-publish-gate-summary span,
.h5-publish-review-summary span,
.h5-publish-execution-summary span,
.h5-engagement-summary span,
.h5-feedback-learning-bridge-summary span,
.h5-formal-outcome-summary span,
.h5-post-formal-followup-summary span,
.h5-post-formal-followup-event-summary span,
.h5-feedback-angle-list span,
.h5-no-conversion-review-summary span,
.h5-no-conversion-reason-list span,
.h5-no-conversion-review-event-summary span,
.admin-source-sync-event-summary span,
.admin-source-sync-execution-summary span,
.mvp-result-scorecard-summary span,
.real-business-backfill-summary span,
.real-business-sql-summary span,
.product-classification-seed-summary span,
.product-classification-review-summary span,
.product-classification-execution-summary span,
.product-classification-import-summary span,
.product-classification-import-actions span,
.product-classification-import-readiness-summary span,
.product-classification-recompute-summary span,
.product-classification-recompute-gates span,
.product-classification-impact-summary span,
.product-classification-impact-sql-summary span,
.product-classification-sql-summary span,
.product-copy-review-summary span,
.gate-recalculation-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f7ff;
  color: #4338ca;
  font-size: 12px;
  padding: 5px 9px;
}

.customer-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.h5-publish-gate-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.h5-publish-review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.h5-publish-execution-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.h5-engagement-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.h5-feedback-learning-bridge-summary,
.h5-formal-outcome-summary,
.h5-post-formal-followup-summary,
.h5-post-formal-followup-event-summary,
.h5-feedback-angle-list,
.h5-no-conversion-review-summary,
.h5-no-conversion-reason-list,
.h5-no-conversion-review-event-summary,
.admin-source-sync-event-summary,
.admin-source-sync-execution-summary,
.mvp-result-scorecard-summary,
.real-business-backfill-summary,
.real-business-sql-summary,
.product-classification-seed-summary,
.product-classification-review-summary,
.product-classification-execution-summary,
.product-classification-import-summary,
.product-classification-import-actions,
.product-classification-import-readiness-summary,
.product-classification-recompute-summary,
.product-classification-recompute-gates,
.product-classification-impact-summary,
.product-classification-impact-sql-summary,
.product-classification-sql-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-copy-review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gate-recalculation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-detail-summary span {
  background: #fff7fb;
  color: #9d174d;
}

.h5-publish-gate-summary span {
  background: #eff6ff;
  color: #1d4ed8;
}

.h5-publish-review-summary span {
  background: #eef6ff;
  color: #1e40af;
}

.h5-publish-execution-summary span {
  background: #f0f9ff;
  color: #075985;
}

.h5-engagement-summary span {
  background: #f0fdfa;
  color: #0f766e;
}

.h5-feedback-learning-bridge-summary span,
.h5-formal-outcome-summary span,
.h5-post-formal-followup-summary span,
.h5-post-formal-followup-event-summary span,
.h5-feedback-angle-list span,
.h5-no-conversion-review-summary span,
.h5-no-conversion-reason-list span,
.h5-no-conversion-review-event-summary span,
.admin-source-sync-event-summary span,
.admin-source-sync-execution-summary span {
  background: #f0fdf4;
  color: #166534;
}

.mvp-result-scorecard-summary span {
  background: #fffbeb;
  color: #92400e;
}

.real-business-backfill-summary span,
.real-business-sql-summary span {
  background: #fff7ed;
  color: #7c2d12;
}

.product-classification-seed-summary span,
.product-classification-sql-summary span {
  background: #f0fdfa;
  color: #0f766e;
}

.product-copy-review-summary span {
  background: #fff7ed;
  color: #9a3412;
}

.gate-recalculation-summary span {
  background: #f8fafc;
  color: #334155;
}

.customer-detail-log article p,
.customer-detail-log article small,
.h5-publish-gate-log article p,
.h5-publish-gate-log article small,
.h5-publish-review-event-log article p,
.h5-publish-review-event-log article small,
.h5-publish-execution-event-log article p,
.h5-publish-execution-event-log article small,
.h5-engagement-event-log article p,
.h5-engagement-event-log article small,
.h5-feedback-learning-bridge-log article p,
.h5-feedback-learning-bridge-log article small,
.h5-formal-outcome-event-log article p,
.h5-formal-outcome-event-log article small,
.h5-post-formal-followup-log article p,
.h5-post-formal-followup-log article small,
.h5-no-conversion-review-log article p,
.h5-no-conversion-review-log article small,
.h5-no-conversion-review-event-log article p,
.h5-no-conversion-review-event-log article small,
.admin-source-sync-event-log article p,
.admin-source-sync-event-log article small,
.admin-source-sync-execution-log article p,
.admin-source-sync-execution-log article small,
.product-copy-review-log article p,
.product-copy-review-log article small,
.gate-recalculation-log article p,
.gate-recalculation-log article small {
  margin: 0;
  line-height: 1.45;
}

.customer-detail-log article small,
.h5-publish-gate-log article small,
.h5-publish-review-event-log article small,
.h5-publish-execution-event-log article small,
.h5-engagement-event-log article small,
.h5-feedback-learning-bridge-log article small,
.h5-formal-outcome-event-log article small,
.h5-post-formal-followup-log article small,
.product-copy-review-log article small,
.gate-recalculation-log article small {
  color: var(--muted);
  font-size: 12px;
}

.post-send-followup-log small,
.next-round-action-log small,
.admin-todo-log small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.todo-column-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.todo-column-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf9;
  color: #0f766e;
  font-size: 12px;
  padding: 5px 9px;
}

.rule-candidate-section {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.rule-candidate-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.rule-candidate-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.rule-candidate-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 7px;
}

.rule-candidate-head {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.rule-candidate-head strong {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.rule-candidate-item span,
.rule-candidate-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.rule-candidate-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.rule-candidate-metrics b {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 6px;
  text-align: center;
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-title {
  font-weight: 800;
  margin-bottom: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 260px) 1fr 82px;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
}

.bar-label {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.bar-track {
  height: 12px;
  background: var(--field);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

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

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

.section-pill {
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 8px;
  padding: 10px;
  min-height: 78px;
}

.section-pill strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

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

.browser-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
}

.entity-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  box-shadow: var(--shadow);
}

.entity-button {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 4px;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 7px;
}

.entity-button.is-active {
  background: #e6f3ed;
  border-color: var(--green);
}

.entity-button code,
.selected-entity-head code,
.dictionary-row code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.entity-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.selected-entity-head {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.selected-entity-head strong {
  font-size: 18px;
}

.selected-entity-head p {
  color: var(--muted);
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 42px 42px;
  gap: 8px;
  margin-bottom: 12px;
}

.data-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 270px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  max-width: 360px;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  background: #edf3ed;
  z-index: 1;
}

tbody tr:hover {
  background: #f2f6f1;
}

.customer-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 14px;
}

.scene-user-panel {
  padding: 12px;
}

.scene-user-list-summary {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--field);
}

.scene-user-list-summary span {
  color: var(--muted);
  font-size: 12px;
}

.customer-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 245px);
  overflow: auto;
}

.customer-button {
  border-radius: 6px;
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.customer-button.is-active {
  border-color: var(--blue);
  background: #eef4ff;
}

.scene-user-button code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.scene-user-button span {
  color: var(--muted);
  font-size: 12px;
}

.scene-user-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.scene-user-metrics b {
  background: var(--field);
  border-radius: 5px;
  padding: 5px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-detail {
  max-height: calc(100vh - 160px);
  overflow: auto;
}

.scene-user-detail {
  padding: 14px;
}

.user-file-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.user-file-head h3 {
  margin: 0 0 4px;
  font-size: 24px;
}

.user-file-head code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

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

.user-file-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-item {
  background: var(--field);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.user-file-notice {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.user-file-notice span {
  color: var(--muted);
  line-height: 1.5;
}

.user-requirement-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
  background: var(--panel);
}

.user-requirement-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #edf3ed;
  border-bottom: 1px solid var(--line);
}

.user-requirement-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.section-insight {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f7faf3;
  border-bottom: 1px solid var(--line);
}

.section-insight strong {
  font-size: 13px;
  color: var(--green);
}

.section-insight ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.section-insight li {
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.user-requirement-rows {
  display: grid;
}

.user-requirement-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #edf0e9;
  border-left: 5px solid var(--blue);
}

.user-requirement-row:last-child {
  border-bottom: 0;
}

.user-requirement-row.is-complete {
  border-left-color: var(--green);
}

.user-requirement-row.is-pending {
  border-left-color: var(--gold);
}

.user-requirement-row.is-summary {
  border-left-color: #5e7f5b;
}

.user-requirement-row.is-no-record {
  border-left-color: #7b6f63;
}

.user-requirement-row.is-indexed {
  border-left-color: var(--blue);
}

.user-requirement-row.is-missing {
  border-left-color: var(--red);
}

.user-requirement-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-requirement-title strong {
  line-height: 1.4;
}

.user-requirement-facts {
  display: grid;
  grid-template-columns: 120px minmax(140px, 1fr) 90px minmax(160px, 1fr);
  gap: 8px;
}

.user-requirement-facts span {
  background: var(--field);
  border-radius: 6px;
  padding: 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.value-snippet {
  margin: 0;
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: #f2f7ee;
  color: var(--ink);
  padding: 8px 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.value-snippet span,
.value-text span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.requirement-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.requirement-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 210px;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0e9;
  font-size: 13px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: #e9f3ef;
  color: var(--green);
}

.status-chip.is-complete {
  background: #e7f4ee;
  color: var(--green);
}

.status-chip.is-pending {
  background: #fff5df;
  color: var(--gold);
}

.status-chip.is-summary {
  background: #edf3e5;
  color: #5e7f5b;
}

.status-chip.is-no-record {
  background: #f1ece6;
  color: #7b6f63;
}

.status-chip.is-indexed {
  background: #eef4ff;
  color: var(--blue);
}

.status-chip.is-missing {
  background: #fdecea;
  color: var(--red);
}

.requirement-audit-summary {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.audit-rule {
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  background: var(--panel);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.audit-rule.is-warn {
  border-left-color: var(--gold);
}

.audit-rule span,
.audit-rule p {
  color: var(--muted);
}

.audit-rule-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  gap: 8px;
}

.audit-rule-grid span {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.requirement-kpis {
  margin-bottom: 0;
}

.requirement-charts {
  margin-bottom: 14px;
}

.compact-bars .bar-row {
  grid-template-columns: 120px 1fr 80px;
}

.requirement-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  margin-bottom: 14px;
}

.requirement-audit-list {
  display: grid;
  gap: 14px;
}

.requirement-audit-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.requirement-section-head {
  padding: 14px;
  background: #edf3ed;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.requirement-section-head strong {
  font-size: 17px;
}

.requirement-section-head span,
.requirement-section-head p {
  color: var(--muted);
  font-size: 12px;
}

.requirement-audit-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.requirement-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
  display: grid;
  gap: 9px;
}

.requirement-card.is-complete {
  border-left-color: var(--green);
}

.requirement-card.is-pending {
  border-left-color: var(--gold);
}

.requirement-card.is-summary {
  border-left-color: #5e7f5b;
}

.requirement-card.is-no-record {
  border-left-color: #7b6f63;
}

.requirement-card.is-indexed {
  border-left-color: var(--blue);
}

.requirement-card.is-missing {
  border-left-color: var(--red);
}

.requirement-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.requirement-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

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

.requirement-meta-grid div {
  background: var(--field);
  border-radius: 6px;
  padding: 8px;
  min-width: 0;
}

.requirement-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.requirement-meta-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.matched-text,
.value-text,
.explanation,
.source-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.value-text {
  color: var(--green);
}

.truth-detail-button {
  appearance: none;
  border: 0;
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: #f2f7ee;
  color: var(--green);
  padding: 8px 10px;
  display: grid;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.truth-detail-button:hover {
  background: #e6f1df;
}

.truth-detail-button span {
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.truth-detail-button strong {
  font-size: 12px;
  color: var(--ink);
}

.explanation {
  color: var(--ink);
}

.dictionary-table {
  display: grid;
  gap: 8px;
}

.dictionary-row {
  display: grid;
  grid-template-columns: 260px 230px minmax(0, 1fr) 270px 82px;
  gap: 12px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.dictionary-row.header {
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 2;
}

.floating-results {
  position: fixed;
  right: 28px;
  top: 28px;
  width: min(720px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(23, 32, 28, 0.25);
  padding: 14px;
  z-index: 10;
}

.truth-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(20, 28, 24, 0.42);
  display: grid;
  place-items: center;
  padding: 28px;
}

.truth-detail-modal[hidden] {
  display: none;
}

.truth-detail-dialog {
  width: min(980px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(23, 32, 28, 0.25);
}

.truth-detail-title {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.truth-detail-title button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  cursor: pointer;
}

#truth-detail-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.truth-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.truth-detail-head div {
  display: grid;
  gap: 4px;
}

.truth-detail-head span:not(.status-chip) {
  color: var(--muted);
  font-size: 12px;
}

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

.truth-detail-grid div {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  min-width: 0;
}

.truth-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.truth-detail-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.truth-detail-section {
  display: grid;
  gap: 8px;
}

.truth-detail-section h4 {
  margin: 0;
  font-size: 14px;
}

.truth-detail-section pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f8faf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.deliverable-draft-archive {
  display: grid;
  gap: 14px;
}

.deliverable-draft-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.deliverable-draft-head article,
.deliverable-draft-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
  padding: 14px;
  min-width: 0;
}

.deliverable-draft-head span,
.deliverable-card-title span,
.draft-h5-screen-grid b,
.draft-script-list b {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.deliverable-draft-head strong {
  display: block;
  margin: 5px 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.deliverable-draft-head p,
.deliverable-draft-card p,
.deliverable-draft-card li,
.draft-h5-screen-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.deliverable-draft-card.is-wide {
  grid-column: 1 / -1;
}

.deliverable-card-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.deliverable-card-title h3 {
  margin: 0;
  font-size: 14px;
}

.deliverable-draft-card ul {
  margin: 0;
  padding-left: 18px;
}

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

.draft-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

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

.draft-analysis-grid b {
  display: block;
  color: var(--green);
  font-size: 12px;
  margin-bottom: 5px;
}

.draft-audit-list {
  display: grid;
  gap: 6px;
}

.draft-audit-list span {
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 8px;
  overflow-wrap: anywhere;
}

.draft-h5-screen-grid article,
.draft-script-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.draft-h5-screen-grid strong {
  display: block;
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.25;
}

.draft-h5-screen-grid em {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.deliverable-draft-card h4 {
  margin: 10px 0 6px;
  font-size: 13px;
}

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

.draft-script-list b {
  margin-bottom: 6px;
  color: var(--green);
}

.deliverable-file-links {
  display: grid;
  gap: 8px;
}

.deliverable-file-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.floating-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.result-group {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.empty {
  color: var(--muted);
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (max-width: 1100px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .kpi-grid,
  .analysis-grid,
  .browser-layout,
  .customer-layout,
  .requirement-audit-items,
  .requirement-toolbar,
  .lifecycle-summary,
  .lifecycle-task-grid,
  .lifecycle-ops-grid,
  .ai-insight-blocker,
  .ai-insight-workbench,
  .ai-audit-contract,
  .ai-workflow-meta,
  .ai-audit-row-grid.is-compact,
  .deliverable-draft-head,
  .deliverable-draft-grid,
  .draft-analysis-grid,
  .draft-h5-screen-grid {
    grid-template-columns: 1fr;
  }

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

  .audit-rule-grid,
  .requirement-meta-grid,
  .user-file-grid,
  .user-requirement-facts,
  .lifecycle-card-metrics,
  .lifecycle-batch20-summary,
  .lifecycle-ops-summary,
  .truth-detail-grid,
  .ai-insight-summary,
  .ai-detail-metrics,
  .ai-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-conclusion-card summary,
  .ai-detail-head,
  .ai-insight-title-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ai-detail-badges {
    justify-content: flex-start;
  }

  .dictionary-row {
    grid-template-columns: 1fr;
  }
}
