:root {
  --bg: #fafafa;
  --bg-2: #ffffff;
  --bg-3: #f4f4f5;
  --border: #e4e4e7;
  --border-2: #d4d4d8;
  --text-1: #09090b;
  --text-2: #52525b;
  --text-3: #71717a;
  --accent: #18181b;
  --accent-text: #fafafa;
  --focus: #2563eb;
  --green: #15803d;  --green-bg: #f0fdf4;
  --blue: #1d4ed8;   --blue-bg: #eff6ff;
  --amber: #b45309;  --amber-bg: #fffbeb;
  --red: #b91c1c;    --red-bg: #fef2f2;
  --purple: #6d28d9; --purple-bg: #f5f3ff;
  --slate: #475569;  --slate-bg: #f1f5f9;
  --rel-part_of: #6d28d9;
  --rel-uses: #2563eb;
  --rel-depends_on: #dc2626;
  --rel-shares_capability_with: #0d9488;
  --rel-supersedes: #52525b;
  --rel-enables: #16a34a;
  --rel-could_fund: #d97706;
  --rel-related_to: #a1a1aa;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --bg-2: #111113; --bg-3: #1c1c1f;
    --border: #27272a; --border-2: #3f3f46;
    --text-1: #fafafa; --text-2: #a1a1aa; --text-3: #8b8b94;
    --accent: #fafafa; --accent-text: #09090b; --focus: #60a5fa;
    --green: #4ade80;  --green-bg: #052e16;
    --blue: #93c5fd;   --blue-bg: #172554;
    --amber: #fbbf24;  --amber-bg: #3a2604;
    --red: #f87171;    --red-bg: #3b0d0d;
    --purple: #c4b5fd; --purple-bg: #2e1065;
    --slate: #cbd5e1;  --slate-bg: #1e293b;
    --rel-part_of: #a78bfa; --rel-uses: #60a5fa; --rel-depends_on: #f87171;
    --rel-shares_capability_with: #2dd4bf; --rel-supersedes: #a1a1aa; --rel-enables: #4ade80;
    --rel-could_fund: #fbbf24; --rel-related_to: #71717a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text-1); font: 14px/1.5 var(--font); }
a { color: inherit; }
code { font-family: var(--mono); font-size: 12px; background: var(--bg-3); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--text-2); }
.fine { color: var(--text-3); font-size: 12px; }
.noscript { padding: 24px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--bg-2); padding: 6px 10px; border-radius: var(--radius); z-index: 50; }
.skip-link:focus { left: 8px; }

/* ─── Buttons & chips ─── */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-2); color: var(--text-1); font: 500 13px var(--font); cursor: pointer; text-decoration: none; transition: background 150ms ease, border-color 150ms ease; white-space: nowrap; }
.btn:hover { background: var(--bg-3); border-color: var(--border-2); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover { opacity: 0.9; }
.btn.ghost { width: 100%; justify-content: center; }
.btn.small { height: 28px; font-size: 12px; margin-top: 8px; }
.btn:disabled { opacity: 0.6; cursor: default; }
kbd { font: 11px var(--mono); color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }

.chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.chip.link { text-decoration: none; }
.chip.link:hover { border-color: var(--border-2); color: var(--text-1); }
.chip.danger { background: var(--red-bg); color: var(--red); border-color: transparent; }
.chip.maturity-active { background: var(--green-bg); color: var(--green); border-color: transparent; }
.chip.maturity-frozen, .chip.maturity-paused { background: var(--slate-bg); color: var(--slate); border-color: transparent; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.badge { display: inline-block; font: 600 10.5px var(--font); letter-spacing: 0.04em; padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
.truth-verified { background: var(--green-bg); color: var(--green); }
.truth-decided  { background: var(--blue-bg); color: var(--blue); }
.truth-proposed { background: var(--amber-bg); color: var(--amber); }
.truth-unknown  { background: var(--slate-bg); color: var(--slate); }
.unknown { font: 600 10.5px var(--font); letter-spacing: 0.04em; color: var(--text-3); }

/* ─── Shell ─── */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; height: 52px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.wordmark { font-weight: 700; letter-spacing: 0.18em; text-decoration: none; font-size: 14px; }
.wordmark.large { font-size: 28px; letter-spacing: 0.3em; }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; color: var(--text-2); padding: 6px 10px; border-radius: var(--radius); font-weight: 500; transition: background 150ms ease; }
.nav a:hover { background: var(--bg-3); color: var(--text-1); }
.nav a.active { background: var(--bg-3); color: var(--text-1); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn { color: var(--text-2); min-width: 120px; justify-content: space-between; }
.source-badge { font: 600 11px var(--font); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; }
.source-badge.live { background: var(--green-bg); color: var(--green); }
.source-badge.preview { background: var(--amber-bg); color: var(--amber); }
.banner { background: var(--amber-bg); color: var(--amber); padding: 8px 20px; font-size: 13px; border-bottom: 1px solid var(--border); }

.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; right: 0; top: 38px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; min-width: 180px; z-index: 20; }
.menu-body button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; color: var(--text-1); font: 13px var(--font); border-radius: 6px; cursor: pointer; }
.menu-body button:hover { background: var(--bg-3); }

.content { max-width: 1200px; margin: 0 auto; padding: 24px 20px 64px; outline: none; }
.view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.section-hint { color: var(--text-3); font-size: 12px; margin: -4px 0 10px; }
.empty { color: var(--text-3); margin: 0; }
.warn { color: var(--red); background: var(--red-bg); padding: 8px 10px; border-radius: var(--radius); margin: 10px 0 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* ─── Overview ─── */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-2); font-weight: 500; }
.stat-hint { color: var(--text-3); font-size: 12px; }
.priority-list { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.priority-title { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.priority-proof { margin-top: 2px; }
.priority-why { color: var(--text-3); font-size: 12px; }
.project-link { font-weight: 500; text-decoration: none; }
.project-link:hover { text-decoration: underline; }

/* ─── Registry ─── */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.search-input, select, .signin-form input { height: 34px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); color: var(--text-1); font: 14px var(--font); padding: 0 10px; }
.search-input { flex: 1 1 280px; }
.filter { display: grid; gap: 2px; font-size: 12px; color: var(--text-2); }
.toggle { display: flex; align-items: center; gap: 6px; height: 34px; color: var(--text-2); }
.table-wrap { overflow-x: auto; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.registry-table { width: 100%; border-collapse: collapse; }
.registry-table th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg-3); white-space: nowrap; }
.registry-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.registry-table tbody tr { cursor: pointer; transition: background 150ms ease; }
.registry-table tbody tr:hover, .registry-table tbody tr:focus-visible { background: var(--bg-3); }
.registry-table tr:last-child td { border-bottom: 0; }
.registry-table .num { width: 36px; text-align: center; font-variant-numeric: tabular-nums; }
.registry-table .proof { min-width: 240px; color: var(--text-2); }
.aliases { color: var(--text-3); font-size: 12px; }
.matched { color: var(--blue); font-size: 11px; }

/* ─── Project ─── */
.crumbs { color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.crumbs a { text-decoration: none; }
.project-head { align-items: flex-start; }
.head-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fields { margin: 0; display: grid; gap: 10px; }
.field dt { color: var(--text-3); font-size: 12px; }
.field dd { margin: 0; }
.fields.compact { gap: 8px; margin-top: 8px; }
.relations { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rel-btn { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid transparent; background: none; border-radius: 6px; color: var(--text-1); font: 13px var(--font); cursor: pointer; text-align: left; }
.rel-btn:hover { background: var(--bg-3); }
.relations li.selected .rel-btn { border-color: var(--border-2); background: var(--bg-3); }
.rel-type { font-size: 12px; min-width: 150px; font-weight: 500; }
.rel-type.rel-part_of { color: var(--rel-part_of); } .rel-type.rel-uses { color: var(--rel-uses); }
.rel-type.rel-depends_on { color: var(--rel-depends_on); } .rel-type.rel-shares_capability_with { color: var(--rel-shares_capability_with); }
.rel-type.rel-supersedes { color: var(--rel-supersedes); } .rel-type.rel-enables { color: var(--rel-enables); }
.rel-type.rel-could_fund { color: var(--rel-could_fund); } .rel-type.rel-related_to { color: var(--rel-related_to); }
.edge-explain:empty { display: none; }
.explain-card { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.explain-title a { font-weight: 500; }
.source-refs li { display: flex; gap: 6px; align-items: baseline; }
.graph-mini { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }

/* ─── Graph ─── */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: 12px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.swatch { width: 14px; height: 3px; border-radius: 2px; background: currentColor; }
.legend-item.rel-part_of { color: var(--rel-part_of); } .legend-item.rel-uses { color: var(--rel-uses); }
.legend-item.rel-depends_on { color: var(--rel-depends_on); } .legend-item.rel-shares_capability_with { color: var(--rel-shares_capability_with); }
.legend-item.rel-supersedes { color: var(--rel-supersedes); } .legend-item.rel-enables { color: var(--rel-enables); }
.legend-item.rel-could_fund { color: var(--rel-could_fund); } .legend-item.rel-related_to { color: var(--rel-related_to); }
.graph-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-bottom: 16px; }
.graph-canvas { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 420px; }
.graph-side { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); align-self: start; }
.graph-svg { display: block; width: 100%; height: auto; max-height: 72vh; font-family: var(--font); }
.edge { cursor: pointer; color: var(--rel-related_to); }
.edge.rel-part_of { color: var(--rel-part_of); } .edge.rel-uses { color: var(--rel-uses); }
.edge.rel-depends_on { color: var(--rel-depends_on); } .edge.rel-shares_capability_with { color: var(--rel-shares_capability_with); }
.edge.rel-supersedes { color: var(--rel-supersedes); } .edge.rel-enables { color: var(--rel-enables); }
.edge.rel-could_fund { color: var(--rel-could_fund); }
.edge-line { stroke: currentColor; stroke-width: 1.6; }
.edge.truth-proposed .edge-line, .edge.truth-unknown .edge-line { stroke-dasharray: 5 4; }
.edge.blocking .edge-line { stroke-width: 3; stroke-dasharray: none; }
.edge-hit { stroke: transparent; stroke-width: 14; }
.edge:hover .edge-line, .edge:focus-visible .edge-line, .edge.selected .edge-line { stroke-width: 3; }
.edge:focus-visible { outline: none; }
.edge-label { fill: currentColor; font-size: 10px; opacity: 0; transition: opacity 150ms ease; pointer-events: none; }
.edge:hover .edge-label, .edge:focus-visible .edge-label, .edge.selected .edge-label { opacity: 1; }
.arrowhead { fill: var(--text-3); }
.node { cursor: pointer; }
.node circle { fill: var(--bg-2); stroke: var(--border-2); stroke-width: 1.5; transition: stroke 150ms ease; }
.node.truth-decided circle { stroke: var(--blue); }
.node.truth-verified circle { stroke: var(--green); stroke-width: 2.5; }
.node.maturity-frozen circle, .node.maturity-paused circle { fill: var(--bg-3); }
.node.focus circle { fill: var(--accent); stroke: var(--accent); }
.node.focus .node-initials { fill: var(--accent-text); }
.node:hover circle, .node:focus-visible circle { stroke: var(--focus); stroke-width: 2.5; }
.node:focus-visible { outline: none; }
.node-initials { font-size: 11px; font-weight: 600; fill: var(--text-2); pointer-events: none; }
.node-label { font-size: 12px; fill: var(--text-1); pointer-events: none; paint-order: stroke; stroke: var(--bg-2); stroke-width: 4px; stroke-linejoin: round; }

/* ─── Decisions ─── */
.decision-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.decision-head h2 { margin: 0; }
.decision p { margin: 8px 0; }
.decision-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--text-2); }
.decision.highlight { border-color: var(--focus); }

/* ─── Palette ─── */
.palette-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; z-index: 40; }
.palette { width: min(600px, 100%); background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2); overflow: hidden; }
.palette-input { width: 100%; height: 48px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text-1); font: 16px var(--font); padding: 0 16px; outline: none; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.palette-list li.active { background: var(--bg-3); }
.palette-foot { font-size: 11px; padding: 8px 14px; border-top: 1px solid var(--border); }

/* ─── Sign-in & loading ─── */
.signin, .loading { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.signin-card { width: min(380px, 100%); background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); text-align: center; }
.signin-form { display: grid; gap: 10px; margin-top: 18px; text-align: left; }
.signin-form .btn { justify-content: center; height: 36px; }
.form-status { min-height: 20px; margin: 0; font-size: 13px; color: var(--text-2); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--text-1); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 0.01ms !important; } }

/* ─── Editing & workflows ─── */
.btn kbd { margin-left: 4px; }
.btn.primary kbd { color: inherit; opacity: 0.7; border-color: currentColor; }
.btn.subtle { color: var(--text-2); }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.head-actions { display: flex; align-items: center; gap: 12px; }
.head-side { display: grid; gap: 10px; justify-items: end; }
.nav-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 11px; font-weight: 600; text-align: center; line-height: 18px; }
.banner.subtle { background: var(--bg-3); color: var(--text-2); }
.notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--amber-bg); color: var(--amber); padding: 10px 12px; border-radius: var(--radius); margin: 0 0 16px; }
.small { font-size: 12px; }
.small-select { height: 28px; font-size: 12px; padding: 0 6px; }
.menu-label { padding: 8px 10px 6px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border); margin-bottom: 4px; word-break: break-all; }
.empty-state { text-align: center; padding: 32px 16px; }
.panel > .btn.small:last-child { margin-top: 12px; }
.activity li { display: flex; justify-content: space-between; gap: 12px; }
.activity li .muted { white-space: nowrap; font-size: 12px; }
.evidence li { display: grid; gap: 2px; }
.notes li { display: grid; gap: 2px; }
.notes .inbox-body { margin: 0; }

.review-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.review-card { padding: 20px; }
.review-progress { color: var(--text-3); font-size: 12px; margin-bottom: 6px; }
.review-title { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-title h2 { font-size: 20px; margin: 0; }
.review-title a { text-decoration: none; }
.review-fields { margin: 16px 0; }
.review-block { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.review-block h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--text-2); }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.review-actions .notice { margin: 0; }
.spacer { flex: 1; }

.inbox-list { gap: 10px; }
.inbox-item { margin: 0; }
.inbox-body { white-space: pre-wrap; margin: 0 0 10px; overflow-wrap: anywhere; }
.inbox-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.inbox-meta select { height: 28px; font-size: 12px; max-width: 200px; }
.recent-inbox summary, .archived summary { cursor: pointer; font-weight: 500; }
.recent-inbox ul, .archived ul { margin-top: 10px; }

/* Dialogs */
.dialog { border: 1px solid var(--border); border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--bg-2); color: var(--text-1); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25); }
.dialog.wide { width: min(680px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 0; font-size: 15px; }
.icon-btn { border: 0; background: none; color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--bg-3); }
.stack-form { display: grid; gap: 12px; padding: 16px 18px 18px; }
.form-field { display: grid; gap: 4px; min-width: 0; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.form-hint { font-size: 12px; color: var(--text-3); margin: 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text-1); font: 14px var(--font); padding: 7px 10px; }
.stack-form input, .stack-form select { height: 34px; padding-top: 0; padding-bottom: 0; }
.stack-form textarea { resize: vertical; line-height: 1.45; }
.form-error { color: var(--red); margin: 0; font-size: 13px; }
.form-error:empty { display: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Toasts */
.toasts { position: fixed; bottom: 16px; right: 16px; display: grid; gap: 8px; z-index: 60; width: min(400px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--accent); color: var(--accent-text); padding: 10px 12px; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); font-size: 13px; }
.toast > span { flex: 1; }
.toast.error { background: var(--red); color: #fff; }
.toast-action { border: 1px solid currentColor; background: none; color: inherit; border-radius: 6px; padding: 3px 10px; font: 600 12px var(--font); cursor: pointer; }
.toast-close { border: 0; background: none; color: inherit; opacity: 0.7; font-size: 16px; cursor: pointer; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .graph-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 8px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .topbar-right { gap: 6px; }
  .search-btn { min-width: 0; }
  .search-btn kbd, .btn kbd { display: none; }
  .toasts { right: 16px; left: 16px; width: auto; }
  .search-btn span { display: none; }
  .search-btn::before { content: "⌕"; font-size: 16px; }
  .head-side { justify-items: start; }
  .review-actions .spacer { display: none; }
  .content { padding: 16px 16px 48px; }
  .registry-table .proof, .registry-table th:nth-child(6), .registry-table td:nth-child(6),
  .registry-table th:nth-child(7), .registry-table td:nth-child(7) { display: none; }
  .rel-type { min-width: 110px; }
}
