/* Antibody — brand system.
   Deep-space canvas, starlight type, a single electric-blue accent. Headlines
   are set light and large; their closing words fade into the dark. Trust
   classes keep their own hues so meaning never depends on the accent. */

@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-latin-wght-italic.woff2') format('woff2'); font-weight: 100 1000; font-style: italic; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  /* channels for alpha mixing: foreground ink, page background, raised panels */
  --fg-rgb: 255, 255, 255;
  --bg-rgb: 3, 4, 7;
  --panel-rgb: 12, 15, 24;
  --sunk: rgba(0, 0, 0, 0.3);
  --star: #ffffff;
  --tail: linear-gradient(90deg, #f4f6fb 0%, #c9d1e0 35%, #6e7891 100%);
  --bg: #030407;
  --bg-2: #080a11;
  --bg-3: #0d1019;
  --glass: rgba(var(--fg-rgb), 0.028);
  --glass-2: rgba(var(--fg-rgb), 0.05);
  --line: rgba(var(--fg-rgb), 0.08);
  --line-2: rgba(var(--fg-rgb), 0.14);
  --line-3: rgba(var(--fg-rgb), 0.24);
  --text: #f4f6fb;
  --text-2: #b4bccc;
  --muted: #7c879b;
  --faint: #727c92;
  --accent: #2b7fff;
  --accent-hi: #7ab1fe;
  --accent-lo: #a6caff;
  --accent-wash: rgba(43, 127, 255, 0.12);
  --line-accent: rgba(122, 177, 254, 0.35);
  --trusted: #3ddc97;
  --derived: #7ab1fe;
  --untrusted: #fbbf5a;
  --unverified: #ff6b81;
  --garnet: #ff5c7a;
  --allow: #3ddc97;
  --block: #ff5c7a;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(var(--fg-rgb), 0.05) inset, 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1240px;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
::selection { background: rgba(43, 127, 255, 0.4); color: #fff; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 8px; }
img, svg { display: block; max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: 0.85em; }
/* Links inside running text are underlined, so colour is never the only cue (WCAG 1.4.1). */
:where(p, li, td, dd, .auth-note, .wallet-empty) a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
code { color: var(--accent-lo); background: rgba(122, 177, 254, 0.08); border: 1px solid rgba(122, 177, 254, 0.14); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.hidden, [hidden] { display: none !important; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line-3); color: var(--text); font-size: 14px; transform: translateY(-160%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- sky: starfield canvas + ambient glow behind every page ---------------- */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky::after { content: ''; position: absolute; inset: 0; background: radial-gradient(900px 420px at 50% -10%, rgba(43, 127, 255, 0.10), transparent 70%); }

/* ---- type ---------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--sans); color: var(--text); margin: 0; }
h1 { font-size: clamp(42px, 6.6vw, 92px); line-height: 1.02; font-weight: 400; letter-spacing: -0.035em; }
h2 { font-size: clamp(34px, 4.8vw, 64px); line-height: 1.05; font-weight: 400; letter-spacing: -0.03em; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
/* The fade: closing words dissolve from starlight into grey, Jimo-style. */
.tail { background: var(--tail); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.glow { text-shadow: 0 0 28px rgba(255, 255, 255, 0.28), 0 0 2px rgba(255, 255, 255, 0.4); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--text-2); font: 500 12.5px/1 var(--sans); letter-spacing: 0; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 10px 2px rgba(122, 177, 254, 0.6); }
.eyebrow b { font: 400 12px var(--mono); color: var(--muted); }
.lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 56ch; margin: 0; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }

/* ---- layout ---------------------------------------------------------------- */
.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.section { padding: clamp(96px, 13vw, 180px) 0; position: relative; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .wrap { width: calc(100% - 32px); } }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; margin: 0; }

/* ---- navigation ------------------------------------------------------------ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); transition: background 0.4s var(--ease), border-color 0.4s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(var(--bg-rgb), 0.72); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom-color: var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 36px; }
body { padding-top: var(--nav-h); }
body[data-page='home'] { padding-top: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 30px; height: 30px; }
.wordmark { font: 500 21px/1 var(--sans); letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a { padding: 8px 13px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text-2); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current='page'] { color: var(--text); background: rgba(var(--fg-rgb), 0.06); }
.nav-cta { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(var(--fg-rgb), 0.03); color: var(--text); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.2s, top 0.35s var(--ease); }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 21.5px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded='true'] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { top: 21.5px; transform: rotate(-45deg); }
.drawer { position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49; background: rgba(var(--bg-rgb), 0.96); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); overflow-y: auto; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer a { font: 400 30px/1.2 var(--sans); letter-spacing: -0.02em; padding: 14px 4px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; color: var(--text-2); opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.2s; }
.drawer.open a { opacity: 1; transform: none; }
.drawer.open a:nth-child(2) { transition-delay: 0.03s; } .drawer.open a:nth-child(3) { transition-delay: 0.06s; } .drawer.open a:nth-child(4) { transition-delay: 0.09s; }
.drawer.open a:nth-child(5) { transition-delay: 0.12s; } .drawer.open a:nth-child(6) { transition-delay: 0.15s; } .drawer.open a:nth-child(7) { transition-delay: 0.18s; } .drawer.open a:nth-child(8) { transition-delay: 0.21s; }
.drawer a span { font: 400 12px/1 var(--mono); color: var(--faint); }
.drawer a[aria-current='page'] { color: var(--text); }
.drawer .btn { margin-top: 28px; justify-content: center; font: 500 16px/1 var(--sans); border-bottom: 1px solid transparent; padding: 0 22px; }
@media (max-width: 1080px) { .nav-links, .nav-cta { display: none; } .burger { display: block; } }

/* ---- buttons --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px; border-radius: 14px; font: 500 15.5px/1 var(--sans); cursor: pointer; border: 1px solid transparent; transition: transform 0.2s var(--ease), box-shadow 0.35s var(--ease), background 0.25s, border-color 0.25s, color 0.25s; white-space: nowrap; }
.btn:active { transform: scale(0.98); }
.btn-primary { color: #071331; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset, 0 0 32px -4px rgba(255, 255, 255, 0.35); }
.btn-primary:hover { box-shadow: 0 0 0 1px #fff inset, 0 0 48px 0 rgba(255, 255, 255, 0.45); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: rgba(var(--fg-rgb), 0.04); }
.btn-ghost:hover { border-color: var(--line-3); background: rgba(var(--fg-rgb), 0.08); }
.btn-lg { height: 56px; padding: 0 30px; font-size: 17px; border-radius: 16px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.btn:disabled { opacity: 0.45; cursor: progress; }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- surfaces -------------------------------------------------------------- */
.card { background: linear-gradient(180deg, rgba(var(--fg-rgb), 0.045), rgba(var(--fg-rgb), 0.015)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); min-width: 0; position: relative; }
.card.glow { border-color: rgba(122, 177, 254, 0.2); background: radial-gradient(600px 220px at 15% 0%, rgba(43, 127, 255, 0.10), transparent 70%), linear-gradient(180deg, rgba(var(--fg-rgb), 0.05), rgba(var(--fg-rgb), 0.015)); }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-title h3 { font-size: 18px; }
.card-title p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.kicker { font: 500 12px/1 var(--mono); letter-spacing: 0.02em; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font: 500 12px/1 var(--sans); border: 1px solid var(--line-2); color: var(--text-2); background: rgba(var(--fg-rgb), 0.03); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pill.live, .pill.ok { color: var(--allow); border-color: rgba(61, 220, 151, 0.3); }
.pill.rec { color: var(--accent-hi); border-color: var(--line-accent); }
.pill.bad { color: var(--block); border-color: rgba(255, 92, 122, 0.35); }
.pill.plain::before { display: none; }
.tag { font: 500 11px/1 var(--mono); padding: 4px 7px; border-radius: 6px; white-space: nowrap; }
.tag.trusted { color: var(--trusted); background: rgba(61, 220, 151, 0.1); }
.tag.derived { color: var(--derived); background: rgba(122, 177, 254, 0.1); }
.tag.untrusted { color: var(--untrusted); background: rgba(251, 191, 90, 0.1); }
.tag.unverified, .tag.q { color: var(--unverified); background: rgba(255, 107, 129, 0.12); }
.tag.record { color: var(--accent-lo); background: var(--accent-wash); }

/* ---- form ------------------------------------------------------------------ */
input, select { background: rgba(var(--fg-rgb), 0.04); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; height: 48px; padding: 0 16px; font: 400 15px var(--sans); min-width: 0; transition: border-color 0.2s, background 0.2s; }
select option { background: var(--bg-3); color: var(--text); }
input:focus, select:focus { border-color: var(--line-accent); background: rgba(var(--fg-rgb), 0.06); outline: none; }
input[type='checkbox'] { accent-color: var(--accent); width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(var(--fg-rgb), 0.03); color: var(--text-2); font: 500 13px var(--sans); cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.chip:hover { border-color: var(--line-accent); color: var(--text); background: var(--accent-wash); }

/* ---- prompt bar (the Jimo chat input) -------------------------------------- */
.prompt { display: flex; align-items: center; gap: 12px; height: 72px; padding: 0 12px 0 28px; border-radius: 999px; background: linear-gradient(180deg, rgba(var(--fg-rgb), 0.06), rgba(var(--fg-rgb), 0.025)); border: 1px solid var(--line-2); box-shadow: 0 0 0 6px rgba(var(--fg-rgb), 0.015), 0 30px 80px -30px rgba(0, 0, 0, 0.9); }
.prompt input { flex: 1; height: 100%; border: 0; background: transparent; font-size: 18px; padding: 0; border-radius: 0; }
.prompt input:focus { background: transparent; }
.prompt .send { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: #071331; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 30px -2px rgba(255, 255, 255, 0.5); transition: transform 0.2s var(--ease), box-shadow 0.3s; }
.prompt .send:hover { transform: scale(1.05); box-shadow: 0 0 44px 0 rgba(255, 255, 255, 0.6); }
.prompt .send:disabled { opacity: 0.5; cursor: progress; }
.prompt .send svg { width: 18px; height: 18px; }

/* ---- tables ---------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 12.5px/1 var(--sans); color: var(--muted); padding: 0 12px 12px; }
.table td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; color: var(--text-2); }
.table tr:hover td { background: rgba(var(--fg-rgb), 0.02); }
.table-wrap { overflow-x: auto; }
.table td.nowrap, .table td.nowrap code { white-space: nowrap; overflow-wrap: normal; }

/* ---- page header (app pages) ---------------------------------------------- */
.page-head { padding: 72px 0 40px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; position: relative; }
.page-head h1 { font-size: clamp(44px, 6vw, 80px); margin-top: 18px; }
.page-head > * { min-width: 0; max-width: 100%; }
.modebar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; max-width: 100%; }
.modebar select { height: 38px; font-size: 13.5px; border-radius: 999px; max-width: 100%; min-width: 0; flex: 1 1 220px; text-overflow: ellipsis; }
.app-main { padding-bottom: 120px; display: grid; gap: 16px; }
.app-bg { position: absolute; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.app-bg::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(var(--fg-rgb), 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--fg-rgb), 0.045) 1px, transparent 1px); background-size: 112px 112px; background-position: center top; -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent); mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent); }

/* ---- footer ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 72px 0 40px; position: relative; overflow: hidden; }
.footer::before { content: ''; position: absolute; left: 50%; top: 0; width: 60%; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(122, 177, 254, 0.5), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid > div:first-child p { color: var(--muted); font-size: 14px; margin: 16px 0 0; max-width: 30ch; }
.footer h4 { font: 500 13px/1 var(--sans); color: var(--muted); margin: 0 0 16px; }
.footer a { display: block; color: var(--text-2); font-size: 14.5px; padding: 5px 0; transition: color 0.2s; }
.footer a:hover { color: var(--text); }
.footer a.brand { display: inline-flex; padding: 0; }
.footer .legal { margin-top: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 13px; }
.footer .legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer .giant { margin-top: 40px; padding-bottom: 0.08em; font: 500 clamp(64px, 17vw, 240px)/1 var(--sans); letter-spacing: -0.06em; text-align: center; background: linear-gradient(180deg, rgba(var(--fg-rgb), 0.10), rgba(var(--fg-rgb), 0)); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---- toast ----------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 80; max-width: min(560px, calc(100% - 32px)); background: rgba(var(--panel-rgb), 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-2); color: var(--text); padding: 14px 18px; border-radius: 16px; box-shadow: var(--shadow); font-size: 14.5px; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- app components -------------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, rgba(var(--fg-rgb), 0.04), rgba(var(--fg-rgb), 0.012)); }
.stat { padding: 22px 24px; min-width: 0; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .kicker { margin-bottom: 12px; display: block; font-family: var(--sans); font-size: 13px; }
.stat .v { font: 400 30px/1.1 var(--sans); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat .v.mono { font: 500 14px/1.5 var(--mono); color: var(--accent-lo); }
.stat .sub { margin-top: 8px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n + 3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .stat-row { grid-template-columns: 1fr; } .stat { border-left: 0; } .stat + .stat { border-top: 1px solid var(--line); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.pane { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--sunk); min-width: 0; overflow-wrap: anywhere; }
.pane.protected { border-color: rgba(61, 220, 151, 0.2); box-shadow: 0 0 60px -30px rgba(61, 220, 151, 0.35) inset; }
.pane.unprotected { border-color: rgba(255, 92, 122, 0.2); box-shadow: 0 0 60px -30px rgba(255, 92, 122, 0.35) inset; }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.verdict { font: 400 38px/1.05 var(--sans); letter-spacing: -0.03em; margin: 6px 0 10px; }
.verdict.allow { color: var(--allow); text-shadow: 0 0 30px rgba(61, 220, 151, 0.35); }
.verdict.block, .verdict.would { color: var(--block); text-shadow: 0 0 30px rgba(255, 92, 122, 0.35); }
.verdict small { display: block; font: 500 12px/1.6 var(--mono); color: inherit; opacity: 0.85; margin-top: 6px; text-shadow: none; letter-spacing: 0; }
.rules { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: 13.5px; }
.rules li { display: grid; grid-template-columns: 22px 30px 1fr; gap: 6px; color: var(--text-2); }
.rules .r { font: 500 12px var(--mono); color: var(--muted); }
.rules .i.pass { color: var(--allow); }
.rules .i.fail { color: var(--block); }
.ctx { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ctx li { font-size: 13.5px; color: var(--text-2); padding: 10px 12px; border-radius: 12px; background: rgba(var(--fg-rgb), 0.025); border: 1px solid var(--line); display: grid; gap: 6px; }
.empty { color: var(--muted); font-size: 14.5px; padding: 18px 0; }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: '+ '; color: var(--accent-hi); }
details[open] summary::before { content: '– '; }

.lane { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.lane:first-child { border-top: 0; padding-top: 0; }
.lane .name { font: 500 14px var(--mono); color: var(--text); }
.lane .key { grid-column: 1 / -1; font: 400 11.5px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }

.feed { display: grid; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: rgba(var(--fg-rgb), 0.02); display: grid; gap: 8px; overflow-wrap: anywhere; transition: border-color 0.2s, background 0.2s; }
.item:hover { border-color: var(--line-2); background: rgba(var(--fg-rgb), 0.035); }
.item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.item p { margin: 0; color: var(--text-2); font-size: 14px; }
.quote { font: 400 13px/1.65 var(--mono); color: var(--text-2); background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* graph */
.graph-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(circle at 1px 1px, rgba(var(--fg-rgb), 0.09) 1px, transparent 0) 0 0 / 24px 24px, var(--sunk); }
.graph svg { display: block; }
.g-edge { fill: none; stroke: rgba(var(--fg-rgb), 0.18); stroke-width: 1.3; }
.g-edge.hot { stroke: var(--garnet); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(255, 92, 122, 0.7)); }
.g-node { cursor: pointer; transition: opacity 0.3s; }
.g-node.dim { opacity: 0.2; }
.g-node text { font: 500 11.5px var(--sans); fill: var(--text); }
.g-node .sub { font: 400 9.5px var(--mono); fill: var(--muted); }
.g-node.sel .shape { stroke-width: 2.6; filter: drop-shadow(0 0 6px currentColor); }
.g-node:hover .shape { stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.legend .trusted { background: var(--trusted); box-shadow: 0 0 8px var(--trusted); }
.legend .derived { background: var(--derived); box-shadow: 0 0 8px var(--derived); }
.legend .untrusted { background: var(--untrusted); box-shadow: 0 0 8px var(--untrusted); }
.legend .unverified { background: var(--unverified); box-shadow: 0 0 8px var(--unverified); }
.legend .q { border: 1.5px dashed var(--garnet); }
.detail pre { font: 400 12.5px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); background: var(--sunk); border: 1px solid var(--line); padding: 16px; border-radius: 12px; margin: 14px 0 0; max-height: 360px; overflow: auto; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---- motion ------------------------------------------------------------------ */
/* Everything is visible without JS; motion arms only once the script runs. */
.motion .reveal { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.motion .reveal.in { opacity: 1; transform: none; filter: none; }
.motion .reveal.d1 { transition-delay: 0.08s; } .motion .reveal.d2 { transition-delay: 0.16s; } .motion .reveal.d3 { transition-delay: 0.24s; }
.motion .words .w { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(0.18em); transition: opacity 0.9s var(--ease), filter 0.9s var(--ease), transform 0.9s var(--ease); }
.motion .words.in .w { opacity: 1; filter: none; transform: none; }


/* ---- security invariants ---------------------------------------------------------- */
.inv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, rgba(var(--fg-rgb), 0.035), rgba(var(--fg-rgb), 0.01)); }
.inv { position: relative; padding: 26px 24px 24px; min-height: 168px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 0.4s var(--ease); }
.inv:nth-child(4n) { border-right: 0; }
.inv:nth-last-child(-n + 4) { border-bottom: 0; }
.inv::after { content: ''; position: absolute; inset: 0; background: radial-gradient(260px 120px at 30% 0%, rgba(43, 127, 255, 0.16), transparent 70%); opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none; }
.inv:hover::after { opacity: 1; }
.inv-n { font: 400 13px var(--mono); color: var(--accent-hi); }
.inv h3 { font-size: 20px; font-weight: 400; letter-spacing: -0.015em; }
.inv-t { margin-top: auto; font: 400 12px var(--mono); color: var(--faint); }
@media (max-width: 980px) { .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .inv:nth-child(4n) { border-right: 1px solid var(--line); } .inv:nth-child(2n) { border-right: 0; } .inv:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); } .inv:nth-last-child(-n + 2) { border-bottom: 0; } }
@media (max-width: 520px) { .inv-grid { grid-template-columns: 1fr; } .inv { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; min-height: 0; } .inv:last-child { border-bottom: 0 !important; } }

/* ---- 404 --------------------------------------------------------------------------------- */
.lost { min-height: calc(100svh - var(--nav-h)); display: grid; place-items: center; position: relative; text-align: center; padding: 80px 0; }
.lost-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 26px; }
.lost .lede { text-align: center; }
.lost-planet { position: absolute; width: min(560px, 90vw); aspect-ratio: 1; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 60% 40%, #030407 0%, #050810 58%, #18233d 80%, #6b84b8 95%, #dce7ff 99.3%, transparent 100%); box-shadow: 0 0 90px 10px rgba(43, 127, 255, 0.14); opacity: 0.75; }

/* lineage graph, single-column layout on narrow screens: scales to fit, never scrolls sideways */
.graph-wrap.is-col { overflow: visible; }
.graph svg.col, .view .graph svg.col { width: 100%; height: auto; max-width: 100%; }

/* ---- soft light theme ----------------------------------------------------------------
   Toggled by the theme switch (theme.js), applied before first paint (theme-init.js).
   Same structure as the dark theme: tokens flip, a few glows and the planets are redrawn. */
:root[data-theme='light'] {
  color-scheme: light;
  --fg-rgb: 15, 23, 42;
  --bg-rgb: 247, 246, 242;
  --panel-rgb: 255, 255, 255;
  --sunk: rgba(15, 23, 42, 0.035);
  --star: rgba(15, 23, 42, 0.55);
  --tail: linear-gradient(90deg, #0f172a 0%, #3a4560 40%, #8b94a8 100%);
  --bg: #f7f6f2;
  --bg-2: #efede7;
  --bg-3: #ffffff;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-2: rgba(255, 255, 255, 0.9);
  --line: rgba(15, 23, 42, 0.09);
  --line-2: rgba(15, 23, 42, 0.14);
  --line-3: rgba(15, 23, 42, 0.24);
  --text: #0f172a;
  --text-2: #3d4659;
  --muted: #555d6e;
  --faint: #5f6779;
  --accent: #1f5bd6;
  --accent-hi: #1f5bd6;
  --accent-lo: #1d4ed8;
  --accent-wash: rgba(37, 99, 235, 0.08);
  --line-accent: rgba(37, 99, 235, 0.3);
  --trusted: #0b7a53;
  --derived: #2f5fd0;
  --untrusted: #96530a;
  --unverified: #c43048;
  --garnet: #c43048;
  --allow: #0b7a53;
  --block: #c43048;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 40px -26px rgba(15, 23, 42, 0.22);
}
:root[data-theme='light'] .glow { text-shadow: none; }
:root[data-theme='light'] .sky::after { background: radial-gradient(1000px 460px at 50% -12%, rgba(37, 99, 235, 0.08), transparent 70%); }
:root[data-theme='light'] .btn-primary { color: #fff; background: #0f172a; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 26px -12px rgba(15, 23, 42, 0.55); }
:root[data-theme='light'] .btn-primary:hover { background: #1e293b; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 14px 30px -12px rgba(15, 23, 42, 0.6); }
:root[data-theme='light'] .btn-ghost { background: #fff; }
:root[data-theme='light'] .card, :root[data-theme='light'] .stat-row, :root[data-theme='light'] .inv-grid { background: #fff; }
:root[data-theme='light'] .card.glow { background: radial-gradient(600px 220px at 15% 0%, rgba(37, 99, 235, 0.06), transparent 70%), #fff; border-color: rgba(37, 99, 235, 0.18); }
:root[data-theme='light'] input, :root[data-theme='light'] select { background: #fff; }
:root[data-theme='light'] .prompt .send { background: #0f172a; color: #fff; box-shadow: 0 8px 22px -8px rgba(15, 23, 42, 0.5); }
:root[data-theme='light'] .verdict.allow, :root[data-theme='light'] .verdict.block, :root[data-theme='light'] .verdict.would { text-shadow: none; }
:root[data-theme='light'] .verdict small { opacity: 1; }
:root[data-theme='light'] code { background: rgba(37, 99, 235, 0.06); border-color: rgba(37, 99, 235, 0.14); }
:root[data-theme='light'] .g-edge.hot { filter: none; }
:root[data-theme='light'] .pill::before { box-shadow: none; }
:root[data-theme='light'] .eyebrow::before { box-shadow: none; }

:root[data-theme='light'] .lost-planet { background: radial-gradient(circle at 60% 40%, #f7f6f2 0%, #f2f1ed 58%, #e2e9f6 80%, #9fb8ea 95%, #6f95e2 99.3%, transparent 100%); }

:root[data-theme='light'] .pane { background: #fff; }
:root[data-theme='light'] .pane.protected { box-shadow: inset 3px 0 0 var(--allow); }
:root[data-theme='light'] .pane.unprotected { box-shadow: inset 3px 0 0 var(--block); }

/* ---- theme switch ---------------------------------------------------------------------- */
/* the white mark reads as navy with blue tips on soft white */
:root[data-theme='light'] img[src$='mark.svg'] { filter: invert(1) hue-rotate(180deg) saturate(1.4); }
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--fg-rgb), 0.03); }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 500 13px var(--sans); cursor: pointer; transition: background 0.2s, color 0.2s; }
.theme-switch button svg { width: 15px; height: 15px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed='true'] { background: rgba(var(--fg-rgb), 0.08); color: var(--text); }
:root[data-theme='light'] .theme-switch button[aria-pressed='true'] { background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); }
.drawer-theme { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 4px 4px; color: var(--muted); font-size: 14px; }
.footer .legal { align-items: center; }
.drawer a.btn { align-items: center; justify-content: center; height: 52px; padding: 0 22px; flex: none; }
.drawer a.btn-primary { color: #071331; }
.drawer a.btn-ghost { color: var(--text); }
:root[data-theme='light'] .drawer a.btn-primary { color: #fff; }
