/* ── Seraphim Pulse — shares Seraphim Lab design tokens (seraphimlab.ca) ── */
:root {
  /* warm near-blacks — a hair off pure black so the page reads softer and the
     gold sits native to the surface rather than stamped on cold grey */
  --bg: #0e0d0b;
  --bg-raise: #16140f;
  --bg-raise-2: #1c1914;
  --line: #2b2722;
  --line-strong: #3a342c;
  --tx: #f3efe7;
  --tx-2: #c9c3b6;
  --mut: #a39c8d;
  --gold: #c9a14a;
  --gold-soft: #e0b85d;
  --gold-dim: rgba(201, 161, 74, 0.14);
  /* Flare-network secondary accent — used sparingly for network/liveness cues only */
  --flare: #E62058;
  --flare-soft: #FF4D7E;
  --flare-dim: rgba(230, 32, 88, 0.12);
  --ok: #4CC38A;
  --warn: #E0A93D;
  --bad: #E5685C;
  /* surfaces that were hardcoded-dark — tokenised so the light theme can override */
  --header-bg: rgba(10, 10, 10, 0.78);
  --th-bg: #131313;
  --tip-bg: rgba(17, 17, 17, 0.96);
  --glow-opacity: .4;
  --radius: 8px;
  --header-h: 62px;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* motion */
  --motion-fast: .15s;
  --motion-base: .32s;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 400 15.5px/1.66 var(--font-ui);
  position: relative;
  overflow-x: hidden;
}

/* single faint ambient accent, matching the lab's restraint */
.glow { position: fixed; pointer-events: none; z-index: 0; filter: blur(100px); opacity: var(--glow-opacity); }
.glow-a { top: -260px; left: 50%; transform: translateX(-50%); width: 900px; height: 460px;
  background: radial-gradient(ellipse at center, rgba(201,161,74,.11), transparent 65%); }
/* faint off-centre Flare-pink bloom: lifts the flat black and quietly echoes Flare's
   warm-magenta hero glow without ever reading as "pink" */
.glow-b { display: block; top: -180px; left: 64%; transform: translateX(-50%); width: 640px; height: 380px;
  opacity: .42; background: radial-gradient(ellipse at center, rgba(230,32,88,.09), transparent 62%); }

header, main, footer { position: relative; z-index: 1; }

/* ── header ── */
header {
  display: flex; gap: 2.2rem; align-items: center;
  height: var(--header-h);
  padding: 0 clamp(1.2rem, 4vw, 3rem);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  font-weight: 700; font-size: 1.08rem; letter-spacing: 0.01em;
  color: var(--tx); text-decoration: none;
  display: flex; align-items: center; gap: 0.65rem;
}
.brand img { border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.brand span { color: var(--gold); }
nav { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }
nav a {
  color: var(--mut); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.2rem 0; border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
nav a:hover { color: var(--gold-soft); border-bottom-color: var(--gold); }
nav a.cta {
  color: #161003; background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-radius: 99px; padding: 0.34rem 0.95rem; font-weight: 600;
  border-bottom: none; text-transform: none; letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(201, 161, 74, 0.22);
}
nav a.cta:hover { color: #161003; filter: brightness(1.06); }
nav a.home {
  color: var(--tx-2);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 0.32rem 0.85rem;
  text-transform: none; letter-spacing: 0.02em;
}
nav a.home:hover { color: var(--gold-soft); border-color: var(--gold); }

/* ── layout ── */
main { max-width: 1280px; margin: 0 auto; padding: clamp(1.4rem, 3.5vw, 2.6rem); }

h1 {
  font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.015em; line-height: 1.2;
  margin: 0.4rem 0 0.9rem;
}
h2 {
  font-weight: 600; font-size: 1.15rem; letter-spacing: -0.005em;
  margin: 2.6rem 0 0.9rem; color: var(--tx);
}
h2::after { content: ""; display: block; width: 44px; height: 2px; margin-top: 7px;
  background: linear-gradient(90deg, var(--gold), var(--flare-soft) 78%, transparent); border-radius: 2px; }
p { color: var(--tx-2); }
.eyebrow {
  color: var(--gold); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; margin: 1rem 0 0;
}
.lede { font-size: 1.02rem; max-width: 56ch; margin-top: -0.2rem; color: var(--mut); }
a { color: var(--gold); text-decoration: none; transition: color .12s ease; }
a:hover { color: var(--gold-soft); }
/* one shared keyboard-focus ring (previously only inputs had a focus state) */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem; color: var(--tx-2);
  background: var(--bg-raise); border: 1px solid var(--line);
  padding: 0.1rem 0.4rem; border-radius: 4px;
}

/* ── stat cards ── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem; margin: 1.4rem 0; }
.card {
  background: linear-gradient(165deg, var(--bg-raise-2), var(--bg-raise) 75%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.45rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 6px 22px rgba(0,0,0,.22);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.card .v {
  font-size: 1.55rem; font-weight: 600; color: var(--gold);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.25;
}
.card .k { color: var(--mut); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; margin-top: 0.3rem; }

/* ── tables ── */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 0.85rem; font-variant-numeric: tabular-nums;
  background: var(--bg-raise);
  border: 1px solid var(--line); border-radius: var(--radius);
}
th, td { padding: 0.6rem 0.8rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; padding-left: 1.1rem; }
th:last-child, td:last-child { padding-right: 1.1rem; }
tr:last-child td { border-bottom: none; }
/* rounded corners on cells (overflow:hidden would break sticky headers) */
thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child { border-top-right-radius: var(--radius); }
tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }
th {
  color: var(--mut); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  cursor: pointer; user-select: none;
  position: sticky; top: var(--header-h); z-index: 5;
  background: var(--th-bg);
  background-clip: padding-box;
}
th:hover { color: var(--gold-soft); }
tbody tr { transition: background .12s ease; }
tbody tr:hover td { background: rgba(201, 161, 74, 0.05); }
td a { font-weight: 500; color: var(--tx); }
td a:hover { color: var(--gold-soft); }

.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .mut { color: var(--mut); }

.pill {
  display: inline-block; margin-left: 0.45rem;
  padding: 0.08rem 0.55rem; border-radius: 99px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--tx-2);
  background: var(--bg-raise);
}
.pill.ok { border-color: rgba(76, 195, 138, 0.4); color: var(--ok); background: rgba(76, 195, 138, 0.08); }
.pill.bad { border-color: rgba(229, 104, 92, 0.4); color: var(--bad); background: rgba(229, 104, 92, 0.08); }

.logo { width: 20px; height: 20px; border-radius: 5px; vertical-align: -4px; margin-right: 0.55rem;
  box-shadow: 0 0 0 1px var(--line); }

/* ── forms ── */
input[type=text], input[type=number], select {
  background: var(--bg-raise-2); color: var(--tx);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0.55rem 0.85rem; font: inherit; font-size: 0.88rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
input#q { min-width: 260px; }
button {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #161003; border: none; border-radius: 8px;
  padding: 0.58rem 1.25rem; font: 600 0.88rem var(--font-ui); letter-spacing: 0.02em;
  cursor: pointer; box-shadow: 0 4px 14px rgba(201, 161, 74, 0.16);
  transition: transform .15s ease, box-shadow .15s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(201, 161, 74, 0.24); }

/* ── misc ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.elig td { text-align: center; }
.error {
  background: rgba(229, 104, 92, 0.07); border: 1px solid rgba(229, 104, 92, 0.35);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1rem 0;
}
svg { max-width: 100%; height: auto; display: block; }

/* ── delegate widget ── */
.dg { max-width: 640px; }
.dg-steps { color: var(--tx-2); line-height: 2; padding-left: 1.2rem; margin-bottom: 1.6rem; }
.dg-status { margin: 0.9rem 0; font-size: 0.88rem; min-height: 1.4em; color: var(--tx-2); }
.dg-status.ok { color: var(--ok); } .dg-status.bad { color: var(--bad); }
.dg-balances span { margin-right: 1.4rem; font-variant-numeric: tabular-nums; }
.dg-balances b { color: var(--gold); font-size: 1.1rem; }
.dg-row { display: flex; gap: 0.7rem; margin: 0.9rem 0; flex-wrap: wrap; }
.dg-row input, .dg-row select { flex: 1; min-width: 180px; }
#dg-current ul { color: var(--tx-2); padding-left: 1.2rem; }
.gold { color: var(--gold); }

/* ── footer ── */
footer {
  max-width: 1280px; margin: 3.5rem auto 0;
  padding: 1.6rem clamp(1.2rem, 3.5vw, 2.6rem) 2.4rem;
  color: var(--mut); font-size: 0.78rem; line-height: 1.7;
  border-top: 1px solid var(--line);
}
footer a { color: var(--tx-2); } footer a:hover { color: var(--gold-soft); }
.prov { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }

/* ── "Built on Flare" lockup — the canonical ecosystem signal ── */
.foot-lockup { margin: 0 0 1.1rem; }
.flare-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--tx-2); text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 99px;
  padding: .3rem .8rem; letter-spacing: .02em;
  transition: border-color .15s ease, color .15s ease;
}
.flare-badge:hover { border-color: var(--flare); color: var(--tx); }
.flare-badge b { color: var(--flare-soft); font-weight: 600; }
.flare-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--flare);
  box-shadow: 0 0 0 0 rgba(230,32,88,.35); animation: netpulse 2.6s var(--ease-out) infinite;
}
@keyframes netpulse {
  0%   { box-shadow: 0 0 0 0 rgba(230,32,88,.38); }
  70%  { box-shadow: 0 0 0 7px rgba(230,32,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,32,88,0); }
}
@media (prefers-reduced-motion: reduce) { .flare-dot { animation: none; box-shadow: 0 0 7px rgba(230,32,88,.5); } }

/* Band chart: 6 view×zoom groups, CSS-toggled by the svg's data-view + data-zoom */
svg.bandview .bv-view { display: none; }
svg.bandview[data-view="ppm"][data-zoom="iqr"] .bv-view[data-view="ppm"][data-zoom="iqr"],
svg.bandview[data-view="ppm"][data-zoom="reward"] .bv-view[data-view="ppm"][data-zoom="reward"],
svg.bandview[data-view="ppm"][data-zoom="full"] .bv-view[data-view="ppm"][data-zoom="full"],
svg.bandview[data-view="price"][data-zoom="iqr"] .bv-view[data-view="price"][data-zoom="iqr"],
svg.bandview[data-view="price"][data-zoom="reward"] .bv-view[data-view="price"][data-zoom="reward"],
svg.bandview[data-view="price"][data-zoom="full"] .bv-view[data-view="price"][data-zoom="full"] { display: block; }
.bandview-wrap { position: relative; }
.bv-controls { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 8px; }
.bv-group { display: inline-flex; gap: 2px; }
.bv-btn { font: inherit; font-size: 0.78rem; color: var(--mut); background: var(--bg-raise); border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.bv-btn:hover { color: var(--tx); }
.bv-btn.is-active { color: #161003; background: var(--gold); border-color: var(--gold); font-weight: 600; }
details.explainer { margin: 10px 0; color: var(--mut); }
details.explainer summary { cursor: pointer; }
details.explainer ul { margin: 8px 0 0 0; }
.bv-legend { color: var(--mut); font-size: 0.78rem; margin: 6px 0 0; }
.mk-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ffcf5a; vertical-align: middle; margin-right: 4px; }

/* ── motion: cross-document view transitions (progressive enhancement) ── */
/* Supported browsers cross-fade between same-origin pages; others get plain
   navigations. The sticky header is lifted into its own group so it stays put
   while page content transitions. */
@view-transition { navigation: auto; }
header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out var(--motion-base) var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in var(--motion-base) var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* gentle on-load reveal for content blocks (reduced-motion safe) */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise var(--motion-base) var(--ease-out) both; }
.reveal-2 { animation-delay: .07s; } .reveal-3 { animation-delay: .14s; } .reveal-4 { animation-delay: .21s; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal-2, .reveal-3, .reveal-4 { animation: none; } }

/* ── hero (landing) ── */
.hero { position: relative; text-align: center; padding: clamp(2.4rem, 7vw, 5.5rem) 0 clamp(1.8rem, 4vw, 3rem); max-width: 760px; margin: 0 auto; }
.hero > :not(.nodecloud) { position: relative; z-index: 1; }
.hero .flame { width: 76px; height: 76px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 12px 40px rgba(201,161,74,.18); }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); letter-spacing: -0.025em; margin: 1.2rem 0 0.5rem; }
.hero h1 .gold { color: var(--gold); }
.hero .lede { font-size: clamp(1.02rem, 2.2vw, 1.22rem); color: var(--tx-2); max-width: 60ch; margin: 0 auto 1.8rem; }
.cta-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  border-radius: 99px; padding: 0.7rem 1.4rem; font-weight: 600; font-size: 0.92rem; letter-spacing: .01em;
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out), border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}
.btn-primary { color: #161003; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); box-shadow: 0 6px 20px rgba(201,161,74,.25); }
.btn-primary:hover { color: #161003; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201,161,74,.34); }
.btn-ghost { color: var(--tx-2); border: 1px solid var(--line-strong); }
.btn-ghost:hover { color: var(--gold-soft); border-color: var(--gold); transform: translateY(-2px); }

/* ── feature / tier grids ── */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.tier-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: linear-gradient(165deg, var(--bg-raise-2), var(--bg-raise) 75%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; text-decoration: none; color: var(--tx);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 6px 22px rgba(0,0,0,.22);
  transition: border-color var(--motion-base) ease, transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) ease;
}
.tier-card:hover { border-color: rgba(201,161,74,.55); transform: translateY(-3px); color: var(--tx); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 30px rgba(0,0,0,.28); }
.tier-card h3 { margin: .2rem 0 0; font-size: 1.12rem; font-weight: 650; color: var(--tx); }
.tier-card p { margin: 0; color: var(--mut); font-size: .9rem; }
.tier-card .who { color: var(--gold); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.tier-card .links { margin-top: auto; padding-top: .6rem; display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.tier-card .links a { font-size: .82rem; color: var(--tx-2); }
.tier-card .links a:hover { color: var(--gold-soft); }

.tier-badge { display: inline-block; padding: .12rem .6rem; border-radius: 99px; font-size: .68rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--gold); background: var(--gold-dim); }

/* ── lessons (long-form articles) ── */
.lesson { max-width: 74ch; }
.lesson .crumb { font-size: .78rem; color: var(--mut); margin: .2rem 0 .4rem; }
.lesson .crumb a { color: var(--tx-2); }
.lesson p { color: var(--tx-2); }
.lesson li { color: var(--tx-2); margin: .3rem 0; }
.lesson h2 { margin-top: 2.2rem; }
.lesson h3 { font-size: 1rem; color: var(--tx); margin: 1.6rem 0 .5rem; }
.lesson .figure { margin: 1.4rem 0; }
.lesson .figcap { color: var(--mut); font-size: .82rem; margin-top: .4rem; }
.callout { border: 1px solid var(--line-strong); border-left: 3px solid var(--gold); background: var(--bg-raise);
  border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.3rem 0; color: var(--tx-2); font-size: .92rem; }
.callout.warn { border-left-color: var(--warn); }
.callout b, .callout strong { color: var(--tx); }
.next-prev { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.6rem;
  padding-top: 1.4rem; border-top: 1px solid var(--line); }
.next-prev a { display: inline-flex; flex-direction: column; gap: .15rem; font-size: .9rem; }
.next-prev .lbl { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.reviewed { color: var(--mut); font-size: .76rem; margin-top: 1.4rem; }
.lesson pre { background: var(--bg-raise); border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  border-radius: var(--radius); padding: .85rem 1rem; overflow-x: auto; font-size: .8rem; line-height: 1.5; color: var(--tx-2); }
.lesson pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.lesson ol { color: var(--tx-2); } .lesson ol li { margin: .35rem 0; }
.keyline { display:flex; gap:.5rem; flex-wrap:wrap; margin:.4rem 0 0; }
.keyline .pill { margin-left: 0; }

/* ── interactive feed chart (uPlot) ── */
.uplot-host { position: relative; margin-top: 4px; }
.uplot-host .u-axis { font-size: 11px; }
.uplot-tip {
  position: absolute; pointer-events: none; z-index: 6; transform: translateX(-50%);
  background: var(--tip-bg); border: 1px solid var(--line-strong); border-radius: 6px;
  padding: .45rem .6rem; font-size: .76rem; line-height: 1.5; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.45); color: var(--tx-2);
}
.uplot-tip b { color: var(--tx); font-variant-numeric: tabular-nums; }
.uplot-tip span { display: block; }
.uplot-tip .mut { color: var(--mut); }
.chart-note { color: var(--warn); font-size: .8rem; margin: .5rem 0 0; }

/* ── mobile responsiveness ── */
@media (max-width: 760px) {
  /* wide data tables scroll within their own box, not the whole page */
  main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  /* header nav wraps instead of overflowing the viewport */
  header { flex-wrap: wrap; height: auto; gap: .5rem 1.1rem; padding-top: .55rem; padding-bottom: .55rem; }
  nav { gap: .9rem 1.1rem; flex-wrap: wrap; margin-left: auto; }
  nav a { font-size: .8rem; }
  body { overflow-x: hidden; } /* belt-and-suspenders against incidental 1-2px spill */
}

/* attestation flow "trust pulse" */
.trust-pulse { cx: 0; animation: trust 3.4s var(--ease-out) infinite; }
@keyframes trust { 0% { cx: 8px; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { cx: 752px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .trust-pulse { display: none; } }

/* ── header "network live" indicator — Flare-pink heartbeat motif ── */
.net-live {
  display: inline-flex; align-items: center; gap: .42rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mut); text-decoration: none; padding: .35rem .2rem; border-bottom: none;
}
.net-live:hover { color: var(--flare-soft); border-bottom: none; }
.net-live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--flare);
  box-shadow: 0 0 0 0 rgba(230,32,88,.4); animation: netpulse 2.6s var(--ease-out) infinite;
}
@media (prefers-reduced-motion: reduce) { .net-live i { animation: none; box-shadow: 0 0 7px rgba(230,32,88,.5); } }

/* ── faint Flare-style node-cloud motif behind the landing hero ── */
.nodecloud {
  position: absolute; left: 50%; top: 8%; transform: translateX(-50%);
  width: min(680px, 96%); height: 320px; z-index: -1; opacity: .5; pointer-events: none;
}

/* ── sort affordance on sortable tables (glyph, not colour-only) ── */
/* NB: do NOT set position here — the base `th` rule is `position: sticky`,
   which already anchors the ::after glyph AND keeps the header banner pinned.
   Overriding to `position: relative` reactivated the base `top: 62px` as a
   relative offset, shoving the header down 62px onto the first data rows. */
table.sortable th { padding-right: 1.4rem; }
table.sortable th::after {
  content: "⇅"; position: absolute; right: .55rem; opacity: .28; font-size: .8em; font-weight: 400;
}
table.sortable th[aria-sort="ascending"]::after { content: "▲"; opacity: .9; color: var(--gold-soft); }
table.sortable th[aria-sort="descending"]::after { content: "▼"; opacity: .9; color: var(--gold-soft); }
table.sortable th:first-child { padding-right: 1.4rem; }

/* ── larger tap targets (WCAG 2.5.8 — was under 24px) ── */
nav a { padding: .4rem .15rem; }
nav a.cta, nav a.home { padding-top: .34rem; padding-bottom: .34rem; }
.bv-btn { padding: 6px 11px; }
.net-live { min-height: 24px; }

/* ── delegate status: non-colour cue alongside the colour ── */
.dg-status.ok::before { content: "✓ "; }
.dg-status.bad::before { content: "✕ "; }

/* ── theme toggle (sun/moon) — defaults to dark; light is opt-in ── */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 99px;
  color: var(--tx-2); cursor: pointer; box-shadow: none;
  transition: color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--gold-soft); border-color: var(--gold); transform: none; box-shadow: none; }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .i-moon { display: none; }
html.light .theme-toggle .i-sun { display: none; }
html.light .theme-toggle .i-moon { display: block; }

/* ── light theme — opt-in via the toggle (html.light); darker gold holds AA on light ── */
html.light {
  --bg: #faf7f1;
  --bg-raise: #ffffff;
  --bg-raise-2: #f5f0e7;
  --line: #e7decd;
  --line-strong: #d8cdb6;
  --tx: #1a1714;
  --tx-2: #433d33;
  --mut: #6e6657;
  --gold: #8f7128;      /* darkened for ≥4.5:1 as text on the light surfaces */
  --gold-soft: #a8842f;
  --gold-dim: rgba(143, 113, 40, 0.14);
  --header-bg: rgba(255, 253, 249, 0.82);
  --th-bg: #efe9dd;
  --tip-bg: rgba(255, 255, 255, 0.97);
  --glow-opacity: .55;
}
/* card gradient stops are near-white in light — keep a hairline shadow for separation */
html.light .card, html.light .tier-card { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 16px rgba(60,46,16,.10); }
html.light .tier-card:hover { box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 26px rgba(60,46,16,.14); }
/* gold-as-fill must stay BRIGHT (the darkened --gold is for gold-as-text only),
   so buttons keep a vivid gold gradient with dark text for AA contrast */
html.light button, html.light .btn-primary, html.light nav a.cta {
  background: linear-gradient(180deg, #e8c25e, #d6a83d); color: #2a1f06;
}
/* the toggle itself is a <button> — keep it transparent, not gold-filled, in light too */
html.light .theme-toggle { background: transparent; color: var(--tx-2); }
html.light .theme-toggle:hover { color: var(--gold-soft); }
html.light .bv-btn.is-active { background: #d6a83d; border-color: #d6a83d; color: #2a1f06; }
html.light .uplot-tip { color: var(--tx-2); }

/* ── /collection: NFT gallery ── */
.badge { display: inline-block; padding: .05rem .4rem; border-radius: 99px; font-size: .7rem; font-weight: 600; color: var(--gold); background: var(--gold-dim); border: 1px solid var(--line); }
.nft-hero code { font-size: .85em; word-break: break-all; }
.nft-stats { opacity: .8; }
.nft-wallets { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.nft-timeline { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; padding: 1rem 0; }
.nft-q { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nft-qbar { width: 18px; border-radius: 3px 3px 0 0; background: var(--gold); }
.nft-qlabel { font-size: .6rem; opacity: .7; white-space: nowrap; }
.nft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.nft-card { margin: 0; background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nft-card img, .nft-card video.nft-media { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--bg-raise-2); }

/* click-to-expand lightbox */
.nft-lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.9); padding: 2rem; }
.nft-lightbox[hidden] { display: none; }
.nft-lb-media { max-width: 95vw; max-height: 92vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 60px rgba(0,0,0,.6); }
.nft-lb-close { position: absolute; top: 1rem; right: 1.25rem; background: transparent; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; opacity: .8; }
.nft-lb-close:hover { opacity: 1; }
.nft-card figcaption { padding: .5rem .6rem; display: flex; flex-direction: column; gap: .15rem; font-size: .8rem; }
.nft-note { margin: -.15rem 0 .75rem; max-width: 60ch; font-size: .82rem; line-height: 1.45; opacity: .75; border-left: 2px solid var(--gold); padding-left: .6rem; }
.nft-departed { margin: 2rem 0; opacity: .8; }
.rotd-open { margin-left: .6rem; font-size: .78rem; font-weight: 600; color: var(--gold); white-space: nowrap; }

/* Network-history milestone timeline */
.nft-sub { opacity: .7; margin: .1rem 0 .4rem; font-size: .9rem; }
.nh { margin: 1.5rem 0 2rem; }
.nh-head { font-size: 1.05rem; margin: 0 0 1rem; }
.nh-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.nh-item { position: relative; display: flex; gap: 1rem; padding: 0 0 1.4rem 1.25rem; }
.nh-item::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--bg); }
.nh-date { flex: 0 0 4.5rem; font-variant-numeric: tabular-nums; font-size: .8rem; opacity: .7; padding-top: .15rem; }
.nh-body { flex: 1; }
.nh-title { font-size: .95rem; margin: 0 0 .2rem; }
.nh-chain { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .08rem .4rem; border-radius: 999px; vertical-align: middle; opacity: .85; }
.nh-songbird { background: rgba(224,101,58,.18); color: var(--gold); }
.nh-flare { background: rgba(255,120,150,.16); color: #ff90a8; }
.nh-blurb { font-size: .85rem; line-height: 1.45; opacity: .82; margin: 0 0 .3rem; max-width: 64ch; }
.nh-proof { font-size: .78rem; color: var(--gold); }

/* Rise of the Deviants comic reader */
.rotd { max-width: 1000px; margin: 0 auto; }
.rotd-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.rotd-back { font-size: .85rem; opacity: .8; white-space: nowrap; }
.rotd-title { display: flex; flex-direction: column; line-height: 1.25; }
.rotd-title strong { font-size: 1.15rem; }
.rotd-title span { font-size: .78rem; opacity: .7; }
.rotd-count { margin-left: auto; font-variant-numeric: tabular-nums; font-size: .85rem; opacity: .8; white-space: nowrap; }
.rotd-stage { position: relative; display: flex; align-items: center; justify-content: center; background: var(--bg-raise-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rotd-book { display: flex; align-items: flex-start; justify-content: center; gap: 2px; }
.rotd-stage.spread .rotd-book { box-shadow: 0 0 40px rgba(0,0,0,.5); }
/* faint gutter line down the middle of an open spread */
.rotd-stage.spread .rotd-book::after { content: ""; position: absolute; top: 6%; bottom: 6%; left: 50%; width: 1px; background: rgba(0,0,0,.35); pointer-events: none; }
.rotd-img { display: block; max-width: 100%; max-height: 82vh; width: auto; height: auto; cursor: pointer; user-select: none; }
.rotd-stage.spread .rotd-img { max-width: 50%; }
.rotd-nav { position: absolute; top: 0; bottom: 0; width: 18%; border: 0; background: transparent; color: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer; opacity: .35; transition: opacity .15s, background .15s; }
.rotd-nav:hover:not(:disabled) { opacity: 1; background: linear-gradient(90deg, rgba(0,0,0,.35), transparent); }
.rotd-next { right: 0; background: linear-gradient(270deg, rgba(0,0,0,.15), transparent); }
.rotd-prev { left: 0; }
.rotd-nav:disabled { opacity: .1; cursor: default; }
.rotd-foot { display: flex; align-items: center; gap: 1rem; margin-top: .75rem; }
.rotd-range { flex: 1; accent-color: var(--gold); }
.rotd-explorer { font-size: .8rem; opacity: .8; white-space: nowrap; }
