/* ═══════════════════════════════════════════════════════════════════════════
   ROYALTY TRAIL SEARCH — Door 06
   Art direction inherited from The Eight Doors, then specialised. The corridor
   metaphor of the front door becomes a toll road here: the hero is a ledger
   strip narrowing under brass plates, and the page's central visual device is
   a vertical chain of nodes where each node visibly costs something.

   Two colour rules carried from the family, unbroken:
     amber is light, never a button and never a body sentence;
     alarm is reserved for money leaving, and green for money arriving.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #f2eee5;
  --paper-2: #eae4d7;
  --paper-3: #e0d9c9;
  --ink: #17150f;
  --ink-2: #3d3830;
  --ink-3: #6b6459;
  --rule: #d3cbb9;
  --rule-2: #c2b8a2;

  --amber: #c08a3e;
  --amber-lt: #e8c48a;
  --alarm: #a8321e;
  --ok: #1f5c46;
  --unread: #8b8474;

  --l-source: #2e5a7a;
  --l-power: #a8321e;
  --l-path: #1f5c46;

  --dark: #12110d;
  --dark-ink: #ede7da;

  --f-disp: 'Zodiak', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Satoshi', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --w: 78rem;
  --w-tight: 46rem;
  --r: 3px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme='dark'] {
  --paper: #12110d;
  --paper-2: #1a1813;
  --paper-3: #221f18;
  --ink: #ede7da;
  --ink-2: #c4bcaa;
  --ink-3: #948c7c;
  --rule: #302c22;
  --rule-2: #413c2f;
  --amber: #d8a558;
  --alarm: #e0705a;
  --ok: #5aab8b;
  --unread: #7d7565;
  --l-source: #6fa3c9;
  --l-power: #e0705a;
  --l-path: #5aab8b;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--f-disp); font-weight: 700; line-height: 1.12; letter-spacing: -0.014em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1rem; }
a { color: inherit; }
strong { font-weight: 700; }
img { max-width: 100%; display: block; }

.wrap { width: min(var(--w), 100% - 2.5rem); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(var(--w), 100% - 1.75rem); } }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.7rem 1.1rem; z-index: 100; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible { outline: 2.5px solid var(--l-source); outline-offset: 2px; }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.7rem clamp(0.9rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand-mark { width: 2rem; height: 2rem; color: var(--ink); flex: none; }
.brand-txt strong { display: block; font-family: var(--f-disp); font-size: 1.0625rem; line-height: 1.15; }
.brand-txt small { display: block; font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); letter-spacing: 0.04em; }

.nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav a { font-size: 0.8125rem; text-decoration: none; color: var(--ink-2); padding-bottom: 2px; border-bottom: 1.5px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--amber); }

.hdr-r { display: flex; align-items: center; gap: 0.75rem; }
.head-up { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; color: var(--amber); border: 1px solid var(--rule-2); border-radius: var(--r); padding: 0.35rem 0.6rem; white-space: nowrap; }
.head-up:hover { border-color: var(--amber); }

.theme { background: none; border: 1px solid var(--rule-2); border-radius: var(--r); color: var(--ink-2); width: 2.1rem; height: 2.1rem; display: grid; place-items: center; cursor: pointer; flex: none; }
.theme svg { width: 1.05rem; height: 1.05rem; }
.theme:hover { color: var(--ink); border-color: var(--ink-3); }

/* The header stacks to three rows below 900px, so the scroll offset has to grow
   with it or every anchor jump lands with the heading hidden behind the bar. */
@media (max-width: 900px) {
  .nav { order: 3; width: 100%; gap: 0.75rem 1rem; padding-top: 0.4rem; border-top: 1px solid var(--rule); }
  html { scroll-padding-top: 11.5rem; }
}
@media (max-width: 420px) { html { scroll-padding-top: 13rem; } }

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero { position: relative; background: var(--dark); color: var(--dark-ink); overflow: hidden; }
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(18,17,13,0.95) 0%, rgba(18,17,13,0.86) 46%, rgba(18,17,13,0.42) 100%); }
.hero-in { position: relative; z-index: 2; width: min(var(--w), 100% - 2.5rem); margin-inline: auto; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); }
.eyebrow { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber-lt); margin-bottom: 1.1rem; }
.hero h1 { font-size: clamp(2.15rem, 6.2vw, 4.1rem); max-width: 24ch; margin-bottom: 1.5rem; }
.lede { font-size: clamp(1.0625rem, 1.9vw, 1.25rem); color: #cfc7b6; max-width: 62ch; }
.lede-2 { color: #a8a091; font-size: 1.0625rem; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }

.btn { display: inline-block; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; text-decoration: none; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: var(--r); padding: 0.7rem 1.15rem; cursor: pointer; transition: opacity 0.18s var(--ease); }
.btn:hover { opacity: 0.82; }
.hero .btn { background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); }
.hero .btn-2 { background: transparent; color: var(--dark-ink); border-color: #4a4638; }
.btn-2 { background: transparent; color: var(--ink); border-color: var(--rule-2); }

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
.sect { padding: clamp(3rem, 7vw, 5.25rem) 0 0; }
.sh { font-size: clamp(1.4rem, 3.1vw, 2.05rem); display: flex; align-items: baseline; gap: 0.85rem; margin-bottom: 0.85rem; }
.sh-n { font-family: var(--f-mono); font-size: 0.75rem; color: var(--amber); letter-spacing: 0.08em; flex: none; }
.sh3 { font-size: 1.125rem; margin: 2.25rem 0 0.85rem; }
.sub { color: var(--ink-2); max-width: 74ch; margin-bottom: 1.75rem; }

/* ── STRUCTURE ───────────────────────────────────────────────────────────── */
.struct { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); }
.struct article { background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--amber); border-radius: var(--r); padding: 1.4rem 1.5rem; }
.struct h3 { font-size: 1.0625rem; margin-bottom: 0.6rem; }
.struct p { color: var(--ink-2); font-size: 0.9375rem; margin-bottom: 0.75rem; }
.src { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.02em; display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem; }
.src a { color: var(--l-source); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--l-source) 40%, transparent); }
.src a:hover { border-bottom-color: var(--l-source); }

/* ── SEARCH ──────────────────────────────────────────────────────────────── */
.search { display: flex; gap: 0.6rem; max-width: 40rem; flex-wrap: wrap; }
.search input { flex: 1 1 16rem; min-width: 0; font-family: var(--f-body); font-size: 1rem; padding: 0.7rem 0.9rem; background: var(--paper-2); color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--r); }
.search input::placeholder { color: var(--ink-3); }
.hint { font-size: 0.8125rem; color: var(--ink-3); margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; align-items: baseline; }
.ex { font-family: var(--f-body); font-size: 0.8125rem; background: none; border: none; border-bottom: 1px dotted var(--ink-3); color: var(--ink-2); cursor: pointer; padding: 0; }
.ex:hover { color: var(--ink); border-bottom-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.5rem 0 0; }
.chip { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.03em; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 100px; padding: 0.4rem 0.8rem; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-selected='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── THE TRAIL ───────────────────────────────────────────────────────────── */
.trail-out { margin-top: 2rem; }
.trail-out:empty { display: none; }

.tr-head { border: 1px solid var(--rule); border-top: 3px solid var(--l-power); border-radius: var(--r); background: var(--paper-2); padding: 1.5rem clamp(1.1rem, 3vw, 1.75rem); }
.tr-kicker { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.55rem; display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem; }
.tr-kicker .side { color: var(--l-power); }
.tr-kicker .stat { color: var(--ok); }
.tr-head h3 { font-size: clamp(1.2rem, 2.6vw, 1.6rem); margin-bottom: 0.7rem; }
.tr-right { color: var(--ink-2); font-size: 0.9375rem; max-width: 78ch; margin: 0; }

.chain { list-style: none; margin: 0; padding: 0; }
.node { position: relative; padding: 1.35rem 0 1.35rem 3.5rem; border-bottom: 1px solid var(--rule); }
.node::before { content: ''; position: absolute; left: 1.06rem; top: 2.1rem; bottom: -1px; width: 1px; background: var(--rule-2); }
.node:last-child::before { display: none; }
.node-dot { position: absolute; left: 0; top: 1.35rem; width: 2.15rem; height: 2.15rem; border-radius: 50%; border: 1.5px solid var(--rule-2); background: var(--paper); display: grid; place-items: center; font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-3); }
.node.is-alarm .node-dot { border-color: var(--alarm); color: var(--alarm); }
.node.is-good .node-dot { border-color: var(--ok); color: var(--ok); }
.node.is-you .node-dot { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.node-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem; margin-bottom: 0.4rem; }
.node-org { font-family: var(--f-disp); font-weight: 700; font-size: 1.0625rem; }
.node-cut { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.03em; border: 1px solid var(--rule-2); border-radius: 100px; padding: 0.15rem 0.6rem; color: var(--ink-2); white-space: nowrap; }
.node.is-alarm .node-cut { border-color: var(--alarm); color: var(--alarm); }
.node.is-good .node-cut { border-color: var(--ok); color: var(--ok); }
.node-cut.na { border-style: dashed; color: var(--unread); }
.node-holds { color: var(--ink); font-size: 0.9375rem; margin-bottom: 0.4rem; }
.node-detail { color: var(--ink-2); font-size: 0.9375rem; margin-bottom: 0.55rem; max-width: 76ch; }
.node-keyed { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); margin-bottom: 0.5rem; }
.node-keyed b { color: var(--ink-2); font-weight: 600; }

.terminal { margin-top: 1.5rem; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.term-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.85rem 1.25rem; background: var(--paper-3); border-bottom: 1px solid var(--rule); }
.term-tier { font-family: var(--f-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 0.2rem 0.55rem; }
.term-vd { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.vd-claimable, .vd-claimable-but-timed { color: var(--ok); }
.vd-partial, .vd-private { color: var(--amber); }
.vd-no-accrual, .vd-deadend { color: var(--alarm); }
.term-body { padding: 1.15rem 1.25rem; }
.term-body p { color: var(--ink-2); font-size: 0.9375rem; margin: 0 0 0.9rem; max-width: 78ch; }
.term-body p:last-child { margin-bottom: 0; }
.term-rec { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); }
.claim { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px dashed var(--rule-2); }
.claim-h { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ok); margin-bottom: 0.5rem; }
.claim-cost { font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-2); margin: 0.6rem 0 0; }
.claim-also { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin-top: 0.6rem; }

/* ── GAP CHECK ───────────────────────────────────────────────────────────── */
.gapgrid { display: grid; gap: 1.75rem; grid-template-columns: minmax(0, 1.35fr) minmax(min(20rem, 100%), 1fr); align-items: start; }
@media (max-width: 960px) { .gapgrid { grid-template-columns: 1fr; } }

.gq { border-bottom: 1px solid var(--rule); padding: 1.05rem 0; }
.gq:first-child { border-top: 1px solid var(--rule); }
.gq-q { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: baseline; justify-content: space-between; }
.gq-t { font-weight: 500; font-size: 0.9375rem; flex: 1 1 18rem; }
.gq-btns { display: flex; gap: 0.35rem; flex: none; }
.gq-btns button { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; background: none; border: 1px solid var(--rule-2); border-radius: var(--r); padding: 0.3rem 0.7rem; color: var(--ink-2); cursor: pointer; }
.gq-btns button:hover { border-color: var(--ink-3); color: var(--ink); }
.gq-btns button[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gq-a { font-size: 0.875rem; color: var(--ink-2); margin: 0.7rem 0 0; padding-left: 0.85rem; border-left: 2px solid var(--rule-2); max-width: 70ch; }
.gq.st-good .gq-a { border-left-color: var(--ok); }
.gq.st-fix .gq-a { border-left-color: var(--amber); }
.gq.st-lost .gq-a { border-left-color: var(--alarm); }
.gq-a .src { margin-top: 0.45rem; }

.gap-out { position: sticky; top: 6rem; border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: var(--r); background: var(--paper-2); padding: 1.35rem; }
@media (max-width: 960px) { .gap-out { position: static; } }
.go-h { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.9rem; }
.go-empty { color: var(--ink-3); font-size: 0.875rem; margin: 0; }
.go-grp { margin-bottom: 1.15rem; }
.go-grp:last-child { margin-bottom: 0; }
.go-lbl { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.45rem; }
.go-reach .go-lbl { color: var(--ok); }
.go-fix .go-lbl { color: var(--amber); }
.go-lost .go-lbl { color: var(--alarm); }
.go-grp ul { margin: 0; padding-left: 1.1rem; }
.go-grp li { font-size: 0.875rem; color: var(--ink-2); margin-bottom: 0.3rem; }
.go-grp li a { text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.go-grp li a:hover { border-bottom-color: var(--ink); }
.go-note { font-size: 0.8125rem; color: var(--ink-3); margin: 1.1rem 0 0; padding-top: 0.85rem; border-top: 1px solid var(--rule); }

/* ── BLACK BOX ───────────────────────────────────────────────────────────── */
.bb-nums { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.bb-num { background: var(--paper-2); padding: 1.25rem 1.35rem; }
.bb-num b { display: block; font-family: var(--f-mono); font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.45rem; overflow-wrap: anywhere; }
.bb-num:last-child b { color: var(--alarm); }
.bb-num p { font-size: 0.8125rem; color: var(--ink-2); margin: 0 0 0.55rem; }

.bb-detail { margin-top: 1.5rem; border-left: 3px solid var(--rule-2); padding-left: 1.15rem; }
.bb-detail dl { margin: 0; display: grid; gap: 0.7rem; }
.bb-detail div { display: flex; flex-wrap: wrap; gap: 0.3rem 0.85rem; align-items: baseline; }
.bb-detail dt { font-family: var(--f-mono); font-size: 0.875rem; font-weight: 600; flex: none; }
.bb-detail dd { margin: 0; font-size: 0.9375rem; color: var(--ink-2); flex: 1 1 22rem; }

.bb-rules { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); }
.bb-rule { border: 1px solid var(--rule); border-radius: var(--r); padding: 1.35rem 1.5rem; background: var(--paper-2); }
.bb-rule.is-alarm { border-left: 3px solid var(--alarm); }
.bb-rule.is-warn { border-left: 3px solid var(--amber); }
.bb-rule h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.bb-hold { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.7rem; }
.bb-rule p { font-size: 0.9375rem; color: var(--ink-2); }

/* ── DEAD ENDS ───────────────────────────────────────────────────────────── */
.de-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.de-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr)); }
.de { border: 1px solid var(--rule); border-radius: var(--r); padding: 1.2rem 1.35rem; background: var(--paper-2); }
.de-top { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.55rem; flex-wrap: wrap; }
.de-id { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); flex: none; }
.de-kind { font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.07em; text-transform: uppercase; border: 1px solid var(--rule-2); border-radius: 100px; padding: 0.1rem 0.5rem; color: var(--ink-3); }
.de h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.de p { font-size: 0.875rem; color: var(--ink-2); margin-bottom: 0.7rem; }
.de[data-kind='no-right'] { border-left: 3px solid var(--alarm); }
.de[data-kind='timing'] { border-left: 3px solid var(--amber); }
.de[data-kind='no-registry'] { border-left: 3px solid var(--alarm); }
.de[data-kind='data'] { border-left: 3px solid var(--l-source); }
.de[data-kind='private'] { border-left: 3px solid var(--unread); }
.de.hide { display: none; }

/* ── TABLE ───────────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 40rem; }
.tbl th, .tbl td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl thead th { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2); position: sticky; top: 0; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--paper-2); }
.tbl td:first-child { font-weight: 500; white-space: nowrap; }
.tbl td:nth-child(2) { color: var(--ink-2); }
.tbl .na { font-family: var(--f-mono); color: var(--unread); }

/* ── REGISTRIES ──────────────────────────────────────────────────────────── */
.reg-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.reg { border: 1px solid var(--rule); border-radius: var(--r); padding: 1.2rem 1.35rem; background: var(--paper-2); }
.reg-code { font-family: var(--f-mono); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 0.2rem; }
.reg-what { font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 0.85rem; }
.reg dl { margin: 0 0 0.85rem; display: grid; gap: 0.5rem; }
.reg dt { font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.reg dd { margin: 0.15rem 0 0; font-size: 0.875rem; color: var(--ink-2); }
.reg-cost { font-weight: 600; color: var(--ink); }
.reg-look { font-family: var(--f-mono); font-size: 0.6875rem; }
.reg-look a { color: var(--l-source); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--l-source) 40%, transparent); }
.reg-look.none { color: var(--unread); }

/* ── LENSES + PROMPT ─────────────────────────────────────────────────────── */
.lens-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); margin-bottom: 2rem; }
.lens { border: 1px solid var(--rule); border-top: 3px solid var(--l-power); border-radius: var(--r); padding: 1.2rem 1.35rem; background: var(--paper-2); }
.lens-id { font-family: var(--f-mono); font-size: 0.75rem; font-weight: 600; color: var(--l-power); margin-bottom: 0.5rem; }
.lens p { font-size: 0.875rem; color: var(--ink-2); margin: 0; }

.prompt { border: 1px solid var(--rule); border-radius: var(--r); padding: 1.35rem; background: var(--paper-2); }
.prompt-row { display: flex; flex-wrap: wrap; gap: 0.6rem 0.85rem; align-items: center; margin-bottom: 1.1rem; }
.prompt-row label { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.prompt-row select { font-family: var(--f-mono); font-size: 0.8125rem; padding: 0.5rem 0.6rem; background: var(--paper); color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--r); max-width: 100%; }
.prompt-out { font-family: var(--f-mono); font-size: 0.8125rem; line-height: 1.7; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.1rem; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.prompt-out b { color: var(--ink); font-weight: 600; }
.prompt-out .ok { color: var(--ok); }
.prompt-out .al { color: var(--alarm); }
.prompt-note { font-size: 0.8125rem; color: var(--ink-3); margin: 1rem 0 0; }

/* ── REFUSALS ────────────────────────────────────────────────────────────── */
.ref-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.ref { background: var(--paper-2); padding: 1.35rem 1.5rem; }
.ref-w { font-family: var(--f-disp); font-weight: 700; font-size: 1.0625rem; color: var(--alarm); margin-bottom: 0.6rem; }
.ref p { font-size: 0.9375rem; color: var(--ink-2); margin-bottom: 0.7rem; max-width: 82ch; }

/* ── PROVENANCE ──────────────────────────────────────────────────────────── */
.prov { padding-bottom: clamp(3rem, 7vw, 5rem); }
.prov > p { color: var(--ink-2); font-size: 0.9375rem; max-width: 78ch; }
.tiers { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin-top: 1.5rem; }
.tier { background: var(--paper-2); padding: 0.75rem 1.1rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; align-items: baseline; font-size: 0.875rem; }
.tier b { font-family: var(--f-mono); font-size: 0.75rem; font-weight: 600; flex: none; width: 2.2rem; }
.tier .t-n { font-weight: 500; flex: none; }
.tier .t-d { color: var(--ink-3); font-size: 0.8125rem; flex: 1 1 18rem; }
.tier:first-child b { color: var(--ok); }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.foot { background: var(--dark); color: var(--dark-ink); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.foot-in { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.foot-b { font-family: var(--f-disp); font-weight: 700; font-size: 1.125rem; margin-bottom: 0.4rem; }
.foot-s { font-size: 0.8125rem; color: #a09889; margin-bottom: 0.5rem; }
.foot-up { display: inline-block; font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber-lt); text-decoration: none; border-bottom: 1px solid #4a4638; padding-bottom: 2px; margin-top: 0.4rem; }
.foot-up:hover { border-bottom-color: var(--amber-lt); }
.foot-addr a { display: block; font-family: var(--f-mono); font-size: 0.75rem; color: #cfc7b6; text-decoration: none; margin-bottom: 0.35rem; overflow-wrap: anywhere; }
.foot-addr a:hover { color: var(--amber-lt); }

/* ── REVEAL ──────────────────────────────────────────────────────────────── */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
