/* Minimal supplemental styles — Tailwind (CDN) handles the rest. */
#drawer.open { transform: translateX(0); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-green { background: #064e3b; color: #6ee7b7; }
.badge-amber { background: #78350f; color: #fcd34d; }
.badge-gray  { background: #1f2937; color: #cbd5e1; }

tr.row { cursor: pointer; border-top: 1px solid #1e293b; }
tr.row:hover { background: #0f172a; }
tr.row-selected {
  background: #0b1b33 !important;
  box-shadow: inset 3px 0 0 0 #38bdf8;
}
tr.row-selected:hover { background: #0e2240 !important; }

pre.prose {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: #0b1220;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #1e293b;
}

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 12px; }
.kv dt { color: #94a3b8; }
.kv dd { color: #e2e8f0; word-break: break-word; }

.chip {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  border-radius: 9999px;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 11px;
}

.tab-panel.hidden { display: none; }

.section-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-top: 16px;
  margin-bottom: 6px;
}

/* Drawer sections — visual separators between top-level blocks */
.drawer-section {
  padding: 14px 0;
  border-top: 1px solid #1e293b;
}
.drawer-section:first-of-type {
  padding-top: 4px;
  border-top: none;
}
.drawer-section:last-of-type {
  border-bottom: none;
}
.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cbd5e1;
  margin: 0 0 8px;
  display: block;
}
details > summary.section-title {
  list-style: none;
  position: relative;
  padding-right: 20px;
}
details > summary.section-title::after {
  content: "▸";
  position: absolute;
  right: 4px;
  top: 0;
  color: #64748b;
  transition: transform 0.15s;
}
details[open] > summary.section-title::after {
  transform: rotate(90deg);
}

/* Sub-heading within a collapsed section — for Lineage / Delivery Trigger
   once grouped under "Source & Delivery" */
.kv-heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 0 0 4px;
}

.tac-card:hover { background: #0f172a; }
.pai-card:hover { background: #0f172a; }

/* Sanitized PAI body (nh3-cleaned upstream HTML). Tailwind preflight strips
   margins/lists, so we re-establish minimum readable defaults inside .pai-body
   only — never apply these globally. */
.pai-body p { margin: 0 0 8px; }
.pai-body p:last-child { margin-bottom: 0; }
.pai-body ul, .pai-body ol { margin: 0 0 8px 20px; }
.pai-body ul { list-style: disc; }
.pai-body ol { list-style: decimal; }
.pai-body li { margin: 2px 0; }
.pai-body strong, .pai-body b { color: #e2e8f0; font-weight: 600; }
.pai-body em, .pai-body i { font-style: italic; }
.pai-body a { color: #38bdf8; text-decoration: underline; }
.pai-body h1, .pai-body h2, .pai-body h3, .pai-body h4 {
  font-weight: 600;
  color: #e2e8f0;
  margin: 12px 0 6px;
}
.pai-body h1 { font-size: 16px; }
.pai-body h2 { font-size: 14px; }
.pai-body h3, .pai-body h4 { font-size: 13px; }
.pai-body blockquote {
  border-left: 3px solid #1e293b;
  padding-left: 10px;
  color: #94a3b8;
  margin: 8px 0;
}
.pai-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: #0b1220;
  padding: 1px 4px;
  border-radius: 3px;
}

.classification-banner {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 50;
  background: #15803d;
  color: #ffffff;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 3px 0;
  top: 0;
}
.classification-banner.bottom { top: auto; bottom: 0; }

body { padding-top: 24px; }

header { top: 18px; }

.diff-table { border-collapse: collapse; }
.diff-table td, .diff-table th { padding: 3px 6px; vertical-align: top; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.diff-field { color: #94a3b8; white-space: nowrap; }
.diff-cell { word-break: break-word; }
.diff-prev { background: #2a1515; color: #fca5a5; }
.diff-curr { background: #102a18; color: #86efac; }
.diff-unchanged { background: #1e293b; color: #94a3b8; }
.diff-delta { color: #38bdf8; white-space: nowrap; }
.diff-field-pinned { color: #e2e8f0; font-weight: 600; }
pre.prose.diff-prev { background: #2a1515; color: #fca5a5; border-color: #7f1d1d; }
pre.prose.diff-curr { background: #102a18; color: #86efac; border-color: #14532d; }
