/* ═══════════════════════════════════════════
   Opus Rationalis — Custom Theme
   JTD-inspired, purpose-built for JSON data
   ═══════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────── */
:root {
  /* Palette: #F9FAF4, #4A6163, #F9A66C, #FFC94B, #F17A7E */
  --bg: #F9FAF4;
  --bg-surface: #F0F1EB;
  --bg-surface-2: #F4F5EF;
  --bg-elevated: #E7E8E2;
  --text-primary: #4A6163;
  --text-secondary: #5E7A7C;
  --text-dim: #8FA3A5;
  --border: #D3DAD4;
  --border-subtle: #E0E5DF;
  --accent: #F9A66C;
  --accent-dim: rgba(249, 166, 108, 0.12);
  --agree: #4A6163;
  --agree-dim: rgba(74, 97, 99, 0.10);
  --disagree: #F17A7E;
  --disagree-dim: rgba(241, 122, 126, 0.10);
  --conditional: #FFC94B;
  --conditional-dim: rgba(255, 201, 75, 0.12);
  --impasse: #F9A66C;
  --impasse-dim: rgba(249, 166, 108, 0.10);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;

  --sidebar-width: 264px;
  --topbar-height: 56px;
  --content-max: 880px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: var(--text-base);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
p { margin: 0 0 16px; }
ul { margin: 0; padding: 0 0 0 20px; }
code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-secondary);
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── Topbar ─────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: rgba(249, 250, 244, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  z-index: 100;
}
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg-elevated); }
.sidebar-toggle svg { width: 20px; height: 20px; }
.topbar-brand {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-brand:hover { color: var(--accent); text-decoration: none; }
.topbar-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
}
.topbar-search input:focus { border-color: var(--accent); }
.topbar-search input::placeholder { color: var(--text-dim); }
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 320px;
  overflow-y: auto;
  z-index: 110;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.search-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  cursor: pointer;
}
.search-result:hover, .search-result--active {
  background: var(--bg-elevated);
  text-decoration: none;
}
.search-result-type {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  min-width: 56px;
  text-transform: uppercase;
}
.topbar-lens { flex-shrink: 0; }
.topbar-lens select {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  cursor: pointer;
}

/* ── Layout ─────────────────────────────── */
.layout {
  margin-top: var(--topbar-height);
  padding-left: var(--sidebar-width);
}

/* ── Sidebar ────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  padding: 16px 0;
  border-right: 1px solid var(--border);
  background: var(--bg);
  z-index: 50;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 45;
}
.sidebar-section {
  padding: 0 12px;
  margin-bottom: 20px;
}
.sidebar-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 8px 4px;
  margin: 0;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
.sidebar-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}
.sidebar-link--active {
  background: var(--accent-dim);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  margin-left: -2px;
}
.sidebar-doctrine { margin: 0; }
.sidebar-doctrine > summary {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 8px 4px;
  cursor: pointer;
  list-style: none;
}
.sidebar-doctrine > summary::before {
  content: '▸ ';
  font-size: 10px;
}
.sidebar-doctrine[open] > summary::before {
  content: '▾ ';
}
.sidebar-claim-list {
  padding: 0 0 0 8px;
}
.sidebar-claim-link {
  font-size: var(--text-xs);
  padding: 4px 8px;
}
.sidebar-claim-link.dimmed { opacity: 0.35; }

/* ── Status Dots ────────────────────────── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--provisional { background: var(--impasse); }
.status-dot--resolved { background: var(--agree); }
.status-dot--unresolved { border: 1.5px solid var(--text-dim); background: transparent; }

/* ── Main Content ───────────────────────── */
.main {
  padding: 32px;
  max-width: calc(var(--content-max) + 64px);
  overflow: hidden;
}

/* ── Footer ─────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  margin-left: var(--sidebar-width);
}
.footer-inner {
  max-width: var(--content-max);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-dim);
}
.footer-inner p { margin: 0; }

/* ═══ Components ════════════════════════════ */

/* ── Profile Outcome Pills ──────────────── */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill--supports_claim { background: var(--agree-dim); color: var(--agree); border-color: var(--agree); }
.pill--rejects_claim { background: var(--disagree-dim); color: var(--disagree); border-color: var(--disagree); }
.pill--conditionally_supports { background: var(--conditional-dim); color: var(--conditional); border-color: var(--conditional); }
.pill--partial_agreement { background: var(--impasse-dim); color: var(--impasse); border-color: var(--impasse); }
.pill--scope { background: var(--accent-dim); color: var(--accent); border-color: var(--border); }
.pill-name { opacity: 0.85; }

/* ── Claim Cards ────────────────────────── */
.claim-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.claim-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.claim-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  text-decoration: none;
}
.claim-card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.claim-card-header .status-dot { margin-top: 6px; }
.claim-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.claim-card-statement {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.claim-card-metrics {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}

/* ── Metric Bars ────────────────────────── */
.metric-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
}
.metric-label {
  color: var(--text-secondary);
  min-width: 80px;
  font-family: var(--font-mono);
}
.metric-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 120px;
}
.metric-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.metric-fill--stability { background: var(--accent); }
.metric-fill--contestation { background: var(--disagree); }
.metric-fill--consensus { background: var(--agree); }
.metric-value {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  min-width: 32px;
  text-align: right;
}

/* ── Hero Section ───────────────────────── */
.hero {
  text-align: center;
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin: -32px -32px 32px;
  padding-left: 32px;
  padding-right: 32px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-surface) 100%);
}
.hero-title {
  font-size: clamp(1.375rem, 3vw, var(--text-2xl));
  font-weight: 600;
  max-width: 720px;
  margin: 0 auto 16px;
  line-height: 1.3;
}
.hero-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.hero-pills { justify-content: center; margin-bottom: 24px; }
.hero-cta {
  display: inline-flex;
  gap: 12px;
}
.btn {
  display: inline-block;
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg);
}
.btn--primary:hover { background: #E8924F; text-decoration: none; }
.btn--secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover { background: var(--bg-elevated); text-decoration: none; }

/* ── Section Headings ───────────────────── */
.section-title {
  font-size: var(--text-xl);
  margin-bottom: 8px;
}
.section-intro {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 640px;
}

/* ── Pipeline Steps ─────────────────────── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.pipeline-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}
.pipeline-step-number {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: 10px; right: 14px;
}
.pipeline-step h3 {
  font-size: var(--text-sm);
  margin-bottom: 6px;
}
.pipeline-step p {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ── Panel (generic card) ───────────────── */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

/* ── Claim Detail ───────────────────────── */
.outcomes-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.outcomes-bar .pill { font-size: var(--text-sm); padding: 4px 14px; }

.claim-statement {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(147, 197, 253, 0.06);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  margin-bottom: 16px;
}

/* ── Resolution Tree ────────────────────── */
.tree-summary {
  background: var(--bg-surface-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: var(--text-sm);
  margin-bottom: 16px;
}
.tree-metrics-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.tree-metrics-panel .metric-bar { flex: 1; min-width: 200px; }

.tree-children {
  position: relative;
  padding-left: 24px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tree-children::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 16px;
  width: 1px;
  background: var(--border);
}
.tree-node {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--bg-surface-2);
}
.tree-children > .tree-node::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 20px;
  width: 10px;
  height: 1px;
  background: var(--border);
}
.tree-node--agreement { border-left: 4px solid var(--agree); }
.tree-node--disagreement { border-left: 4px solid var(--disagree); }
.tree-node--impasse { border-left: 4px solid var(--impasse); }
.tree-node--unresolved { border-left: 4px solid var(--text-dim); }

.tree-node-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.tree-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tree-dot--agreement { background: var(--agree); }
.tree-dot--disagreement { background: var(--disagree); }
.tree-dot--impasse { background: var(--impasse); }
.tree-dot--unresolved { background: var(--text-dim); }
.tree-badge {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.tree-badge--agreement { background: var(--agree); color: var(--bg); }
.tree-badge--disagreement { background: var(--disagree); color: var(--bg); }
.tree-badge--impasse { background: var(--impasse); color: var(--bg); }
.tree-badge--unresolved { background: var(--text-dim); color: var(--bg); }
.tree-status {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.tree-node-summary {
  font-size: var(--text-sm);
  margin: 6px 0 8px;
  line-height: 1.5;
}
.tree-node .pills { margin-bottom: 8px; }

/* Divergence Point (highlighted) */
.tree-divergence {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--impasse-dim);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-sm);
  margin: 8px 0;
  font-size: var(--text-sm);
}
.tree-divergence-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
  line-height: 1;
}
.tree-divergence strong { color: var(--impasse); }
.tree-divergence-kind {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.tree-divergence p { margin: 4px 0 0; font-size: var(--text-xs); color: var(--text-secondary); }

.tree-depends {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin: 6px 0;
}

/* Evidence sections */
.tree-evidence-section, .tree-counter-section {
  margin: 6px 0;
  font-size: var(--text-xs);
}
.tree-evidence-section > summary, .tree-counter-section > summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}
.tree-evidence-list {
  padding: 4px 0 0 16px;
  font-size: var(--text-xs);
}
.tree-evidence-list li { margin: 4px 0; }
.evidence-quote {
  margin: 4px 0 0 0;
  padding: 6px 10px;
  border-left: 2px solid var(--accent);
  background: rgba(147, 197, 253, 0.04);
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--text-secondary);
}
.counter-quote {
  margin: 4px 0 0 0;
  padding: 6px 10px;
  border-left: 2px solid var(--disagree);
  background: rgba(248, 113, 113, 0.04);
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--text-secondary);
}
.tree-notes {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-top: 6px;
}

/* Profile Outcomes at tree top */
.tree-profile-outcomes {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.profile-outcome-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-surface-2);
}
.outcome-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 4px;
}
.outcome-header strong { font-size: var(--text-sm); }
.outcome-rationale {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin: 0;
}

/* ── Debate Transcript ──────────────────── */
.debate-meta {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
}
.debate-round {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.debate-round > summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
}
.debate-moves { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.debate-move {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-surface-2);
}
.debate-move--proponent { border-left: 3px solid var(--accent); }
.debate-move--opponent { border-left: 3px solid var(--disagree); }
.debate-move--red_team { border-left: 3px solid var(--impasse); }
.debate-move--referee { border-left: 3px solid var(--impasse); }
.debate-move-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.debate-role-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.debate-role--proponent { background: var(--accent-dim); color: var(--accent); }
.debate-role--opponent { background: var(--disagree-dim); color: var(--disagree); }
.debate-role--red_team { background: var(--impasse-dim); color: var(--impasse); }
.debate-role--referee { background: var(--impasse-dim); color: var(--impasse); }
.debate-profile {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
.debate-intent {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-style: italic;
}
.debate-model {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-left: auto;
}
.debate-move-content {
  font-size: var(--text-sm);
  white-space: pre-wrap;
  line-height: 1.6;
}
.debate-citations {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.debate-citations ul { margin-top: 4px; }
.debate-citations li { margin: 3px 0; }

/* ── Passages ───────────────────────────── */
.passage-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-surface-2);
  margin-bottom: 10px;
}
.passage-ref {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 6px;
}
.passage-ref .lang {
  font-weight: 400;
  color: var(--text-dim);
  font-size: var(--text-xs);
}
.passage-original {
  margin: 0 0 8px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  white-space: pre-wrap;
  overflow-x: auto;
}
.passage-translation {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin: 4px 0;
}
.passage-translation .t-label {
  font-family: var(--font-mono);
  color: var(--text-dim);
  min-width: 80px;
  display: inline-block;
}

/* ── Profile Detail ─────────────────────── */
.profile-header {
  margin-bottom: 24px;
}
.profile-header h1 { font-size: var(--text-2xl); margin-bottom: 4px; }
.profile-header .tradition-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.axes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.axis-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.axis-card h3 {
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: capitalize;
}
.axis-position {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 6px;
}
.axis-notes {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}

/* ── Transparency ───────────────────────── */
.transparency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.transparency-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.transparency-card h3 {
  font-size: var(--text-sm);
  margin-bottom: 10px;
}
.model-list {
  list-style: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.model-list li {
  padding: 3px 0;
  color: var(--text-secondary);
}
.stat-number {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
}

/* ── Activity Feed ──────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}
.activity-item--noop { opacity: 0.5; }
.activity-date {
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.activity-note { color: var(--text-secondary); }
.activity-model {
  font-family: var(--font-mono);
  color: var(--accent);
  opacity: 0.6;
  font-size: var(--text-xs);
}
.activity-type {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Collapsible Sections ───────────────── */
details.section-details {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
details.section-details > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
details.section-details > summary:hover { color: var(--text-primary); }
details.section-details > .details-content { padding: 0 16px 16px; }

/* ── Version History Table ──────────────── */
.version-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
}
.version-table th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.version-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.version-table td:first-child { font-family: var(--font-mono); color: var(--text-dim); }

/* ── Placeholder / Empty States ─────────── */
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-dim);
}
.empty-state-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty-state p {
  font-size: var(--text-sm);
  margin: 0;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
}
@media (max-width: 768px) {
  .sidebar-toggle { display: flex; }
  .topbar-search { display: none; }
  .topbar-lens { display: none; }
  .layout { padding-left: 0; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 90;
    width: 280px;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-overlay { display: block; z-index: 80; }
  .main { padding: 16px; }
  .footer { margin-left: 0; padding: 16px; }
  .hero { margin: -16px -16px 16px; padding: 32px 16px; }
  .claim-cards { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .transparency-grid { grid-template-columns: 1fr; }
  .axes-grid { grid-template-columns: 1fr; }
}
