/* ===========================================================================
   Blocked Address Registry — public mirror design system.

   Self-contained: no external fonts, no third-party assets (strict CSP).
   Theming: dark is the default :root token set; `prefers-color-scheme: light`
   overrides the neutrals + status surfaces. Colours are chosen for WCAG-AA
   text contrast in BOTH themes.

   Token layers
     --rg-*  raw scale tokens (type / space / radius / elevation / colour)
     semantic surface + text + status tokens consumed by components
   NOTE: the canonical text token is --text-primary. Never use a bare
   `var(--text)` without a fallback.
   ===========================================================================*/

:root {
  /* --- type scale (rem, 1rem = 16px) --- */
  --rg-fs-2xs: 0.75rem;   /* 12px micro labels */
  --rg-fs-xs:  0.8125rem; /* 13px meta */
  --rg-fs-sm:  0.875rem;  /* 14px secondary */
  --rg-fs-base: 1rem;     /* 16px body */
  --rg-fs-md:  1.125rem;  /* 18px lead */
  --rg-fs-lg:  1.375rem;  /* 22px h2 */
  --rg-fs-xl:  1.75rem;   /* 28px h1 */
  --rg-fs-2xl: 2.25rem;   /* 36px hero stat / display */

  /* --- 8px spacing scale --- */
  --rg-space-1: 4px;
  --rg-space-2: 8px;
  --rg-space-3: 12px;
  --rg-space-4: 16px;
  --rg-space-5: 24px;
  --rg-space-6: 32px;
  --rg-space-7: 48px;
  --rg-space-8: 64px;

  /* --- radius scale --- */
  --rg-radius-sm: 6px;
  --rg-radius-md: 10px;
  --rg-radius-lg: 16px;
  --rg-radius-pill: 999px;

  /* --- elevation (one subtle token + a stronger hero token) --- */
  --rg-shadow: 0 1px 2px rgba(2, 6, 23, 0.4), 0 4px 16px rgba(2, 6, 23, 0.32);
  --rg-shadow-hero: 0 8px 32px rgba(2, 6, 23, 0.5);

  --rg-maxw: 1080px;

  /* --- neutral + brand palette (DARK theme, the default) --- */
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --bg-card: #161f33;
  --bg-inset: #0d1320;
  --border: #283450;
  --border-strong: #3a496e;

  --text-primary: #eef2fb;
  --text-secondary: #c2cce0; /* AA on --bg / --bg-card */
  --text-muted: #93a0bd;     /* AA (>=4.5) on --bg / --bg-card / --bg-elevated */

  /* teal brand accent (links / focus / primary actions) */
  --accent: #2dd4bf;          /* teal-400 */
  --accent-strong: #14b8a6;   /* teal-500, button bg */
  --accent-hover: #0d9488;    /* teal-600 */
  --accent-contrast: #03201c; /* text on accent bg (AA on teal) */
  --accent-ink: #7ff0e2;      /* brighter teal for text-on-dark links */

  /* --- 4 verdict status colours (dark theme) ---
     *-fg  : foreground/text + icon colour (AA on dark surfaces)
     *-bd  : badge / accent border
     *-bg  : tinted hero/badge surface
     *-on  : text colour to sit ON the solid hero band              */
  --blocked-fg: #fb7185; --blocked-bd: #f43f5e; --blocked-bg: #2a1320; --blocked-band: #b91c3c; --blocked-on: #fff1f3;
  --pending-fg: #fbbf24; --pending-bd: #f59e0b; --pending-bg: #2a2009; --pending-band: #b45309; --pending-on: #fffbeb;
  --removed-fg: #34d399; --removed-bd: #10b981; --removed-bg: #0c241c; --removed-band: #047857; --removed-on: #ecfdf5;
  --clean-fg:   #34d399; --clean-bd:   #10b981; --clean-bg:   #0c241c; --clean-band:   #047857; --clean-on:   #ecfdf5;
  --delisted-fg:#22d3ee; --delisted-bd:#06b6d4; --delisted-bg:#0a2230; --delisted-band:#0e7490; --delisted-on:#ecfeff;

  font-synthesis: none;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-inset: #eef2f9;
    --border: #d7deeb;
    --border-strong: #c2ccde;

    --text-primary: #0f1729;
    --text-secondary: #2f3a52; /* AA on white */
    --text-muted: #586079;     /* AA (>=4.5) on white / #f5f7fb */

    --accent: #0d9488;          /* darker teal so links pass AA on white */
    --accent-strong: #0d9488;
    --accent-hover: #0f766e;
    --accent-contrast: #ffffff;
    --accent-ink: #0b7d72;      /* link text on light */

    --rg-shadow: 0 1px 2px rgba(15, 23, 41, 0.06), 0 4px 14px rgba(15, 23, 41, 0.08);
    --rg-shadow-hero: 0 10px 30px rgba(15, 23, 41, 0.12);

    /* status colours retuned for AA text contrast on light surfaces */
    --blocked-fg: #be123c; --blocked-bd: #e11d48; --blocked-bg: #fff1f3; --blocked-band: #be123c; --blocked-on: #fff1f3;
    --pending-fg: #b45309; --pending-bd: #d97706; --pending-bg: #fff8eb; --pending-band: #b45309; --pending-on: #fffbeb;
    --removed-fg: #047857; --removed-bd: #059669; --removed-bg: #ecfdf5; --removed-band: #047857; --removed-on: #ecfdf5;
    --clean-fg:   #047857; --clean-bd:   #059669; --clean-bg:   #ecfdf5; --clean-band:   #047857; --clean-on:   #ecfdf5;
    --delisted-fg:#0e7490; --delisted-bd:#0891b2; --delisted-bg:#ecfeff; --delisted-band:#0e7490; --delisted-on:#ecfeff;

    color-scheme: light;
  }
}

/* ---------------------------------------------------------------------------
   Reset / base
   ---------------------------------------------------------------------------*/
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary, #eef2fb);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.55;
  font-size: var(--rg-fs-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--rg-maxw);
  margin: 0 auto;
  padding: 0 var(--rg-space-5);
}

a { color: var(--accent-ink, #7ff0e2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; color: var(--text-primary); }

code, .mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
    monospace;
  word-break: break-all;
  font-variant-ligatures: none;
}

/* Tabular numerals for every figure that should align/compare. */
.stat-value, .lf-value, .tx-stat-value, .num-col,
.verdict-fields dd, .data-grid .dg-value { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Global visible focus ring (keyboard + assistive). */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--rg-radius-sm);
}
a:focus-visible { outline-offset: 3px; }

/* ---------------------------------------------------------------------------
   Header / nav
   ---------------------------------------------------------------------------*/
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%);
}
.site-header .container {
  display: flex; align-items: center; gap: var(--rg-space-4);
  padding-top: var(--rg-space-3); padding-bottom: var(--rg-space-3);
  flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--rg-space-2);
  font-weight: 700; color: var(--text-primary); font-size: var(--rg-fs-md);
  margin-right: auto; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand .brand-mark {
  width: 22px; height: 22px; flex: 0 0 22px; color: var(--accent);
}
.primary-nav { display: flex; gap: var(--rg-space-1); }
.primary-nav a {
  color: var(--text-secondary); font-size: var(--rg-fs-sm); font-weight: 600;
  padding: 6px 10px; border-radius: var(--rg-radius-sm);
}
.primary-nav a:hover {
  color: var(--text-primary); text-decoration: none; background: var(--bg-inset);
}
.lang-switch { display: flex; gap: var(--rg-space-1); }
.lang-switch a {
  color: var(--text-muted); font-size: var(--rg-fs-xs); font-weight: 600;
  padding: 4px 8px; border-radius: var(--rg-radius-sm);
}
.lang-switch a:hover { color: var(--text-primary); text-decoration: none; }
.lang-switch a.active {
  color: var(--accent-contrast); background: var(--accent-strong);
}

/* ---------------------------------------------------------------------------
   Footer (trust layer)
   ---------------------------------------------------------------------------*/
.site-footer {
  margin-top: var(--rg-space-8);
  padding: var(--rg-space-6) 0 var(--rg-space-5);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--rg-fs-sm);
  background: var(--bg-elevated);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--rg-space-5) var(--rg-space-6);
  margin-bottom: var(--rg-space-5);
}
.footer-col h3 {
  font-size: var(--rg-fs-xs); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-secondary);
  margin: 0 0 var(--rg-space-3);
}
.footer-col p { margin: 0 0 var(--rg-space-2); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--rg-space-2); }
.footer-brand {
  display: inline-flex; align-items: center; gap: var(--rg-space-2);
  font-weight: 700; color: var(--text-primary); margin-bottom: var(--rg-space-2);
}
.footer-brand .brand-mark { width: 20px; height: 20px; color: var(--accent); }
.footer-disclaimer {
  font-size: var(--rg-fs-xs); line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: var(--rg-space-4); margin-top: var(--rg-space-2);
}
.footer-meta {
  display: flex; flex-wrap: wrap; gap: var(--rg-space-2) var(--rg-space-4);
  align-items: center; font-size: var(--rg-fs-xs);
  margin-top: var(--rg-space-3);
}
.freshness-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--removed-bd); margin-right: 6px; vertical-align: middle;
}

/* ---------------------------------------------------------------------------
   Hero + search (home)
   ---------------------------------------------------------------------------*/
.hero {
  text-align: center;
  padding: var(--rg-space-8) 0 var(--rg-space-6);
}
.hero h1 {
  font-size: var(--rg-fs-2xl); margin: 0 0 var(--rg-space-3);
  letter-spacing: -0.02em;
}
.tagline {
  color: var(--text-secondary); margin: 0 auto var(--rg-space-6);
  font-size: var(--rg-fs-md); max-width: 56ch;
}

.search-form {
  display: flex; gap: var(--rg-space-2); max-width: 660px;
  margin: 0 auto; flex-wrap: wrap;
}
.search-form input[type="text"] {
  flex: 1 1 300px; min-width: 0;
  padding: 15px 18px; font-size: var(--rg-fs-base);
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--rg-radius-md);
  box-shadow: var(--rg-shadow);
}
.search-form input[type="text"]::placeholder { color: var(--text-muted); }
.search-form input[type="text"]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
  border-color: var(--accent);
}
.search-form button {
  padding: 15px 28px; font-size: var(--rg-fs-base); font-weight: 700;
  background: var(--accent-strong); color: var(--accent-contrast);
  border: none; border-radius: var(--rg-radius-md); cursor: pointer;
  transition: background 0.15s ease;
}
.search-form button:hover { background: var(--accent-hover); }
.hero-events-link { margin: var(--rg-space-4) 0 0; font-size: var(--rg-fs-sm); }

/* ---------------------------------------------------------------------------
   Stat cards (trust layer)
   ---------------------------------------------------------------------------*/
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--rg-space-4); margin: var(--rg-space-6) 0;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--rg-radius-lg); padding: var(--rg-space-5) var(--rg-space-4);
  text-align: center; box-shadow: var(--rg-shadow);
}
.stat-value {
  font-size: var(--rg-fs-2xl); font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label {
  color: var(--text-muted); font-size: var(--rg-fs-xs); margin-top: var(--rg-space-2);
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}

/* Section heading shared rhythm. */
.section-title {
  font-size: var(--rg-fs-lg); margin: 0 0 var(--rg-space-4);
  display: flex; align-items: center; gap: var(--rg-space-2);
}
.recent h2, .history h2, .cta h2, .explorers h2, .how h2 {
  font-size: var(--rg-fs-lg); margin: 0 0 var(--rg-space-4);
}
.recent { margin-top: var(--rg-space-6); }

/* ---------------------------------------------------------------------------
   "How it works" strip
   ---------------------------------------------------------------------------*/
.how { margin-top: var(--rg-space-7); }
.how-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--rg-space-4);
}
.how-step {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--rg-radius-lg); padding: var(--rg-space-5);
}
.how-step .how-icon {
  width: 28px; height: 28px; color: var(--accent); margin-bottom: var(--rg-space-3);
}
.how-step h3 { font-size: var(--rg-fs-base); margin: 0 0 var(--rg-space-2); }
.how-step p { margin: 0; color: var(--text-muted); font-size: var(--rg-fs-sm); }

/* ---------------------------------------------------------------------------
   Tables (recent / events / addresses)
   ---------------------------------------------------------------------------*/
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border); border-radius: var(--rg-radius-lg);
  background: var(--bg-card); box-shadow: var(--rg-shadow);
}
.recent-table, .events-table {
  width: 100%; border-collapse: collapse; font-size: var(--rg-fs-sm);
}
.recent-table th, .recent-table td,
.events-table th, .events-table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.recent-table tbody tr:last-child td,
.events-table tbody tr:last-child td { border-bottom: 0; }
.recent-table thead th, .events-table thead th {
  color: var(--text-muted); font-weight: 600; font-size: var(--rg-fs-xs);
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg-inset); white-space: nowrap;
  position: sticky; top: 0;
}
.recent-table tbody tr:hover, .events-table tbody tr:hover { background: var(--bg-inset); }
.recent-table .addr-col, .events-table .addr-col { max-width: 280px; }
.recent-table .addr-col a, .events-table .addr-col a,
.events-table .addr-col code { word-break: break-all; }
.events-table td.num-col, .events-table th.num-col,
.recent-table td.num-col, .recent-table th.num-col {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.events-table .time-col, .recent-table .time-col {
  color: var(--text-muted); white-space: nowrap;
}
.empty {
  color: var(--text-muted); padding: var(--rg-space-5);
  border: 1px dashed var(--border); border-radius: var(--rg-radius-lg);
  text-align: center;
}

/* ===========================================================================
   VERDICT PAGE (the money shot) — hero band + authority grid + badges + timeline
   ===========================================================================*/
.breadcrumb { margin: var(--rg-space-5) 0 var(--rg-space-3); font-size: var(--rg-fs-sm); }
.breadcrumb a { color: var(--text-muted); }

.verdict { margin-bottom: var(--rg-space-6); }

/* (1) VERDICT HERO — solid coloured band in the state colour. */
.verdict-hero {
  display: flex; align-items: center; gap: var(--rg-space-4);
  padding: var(--rg-space-5) var(--rg-space-5);
  border-radius: var(--rg-radius-lg);
  box-shadow: var(--rg-shadow-hero);
  margin-bottom: var(--rg-space-4);
}
.verdict-hero .hero-icon {
  flex: 0 0 auto; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.verdict-hero .hero-icon svg { width: 44px; height: 44px; }
.verdict-hero .hero-text { display: flex; flex-direction: column; gap: 2px; }
.verdict-hero .hero-verdict {
  font-size: var(--rg-fs-xl); font-weight: 800; letter-spacing: -0.01em;
  line-height: 1.15;
}
.verdict-hero .hero-sub { font-size: var(--rg-fs-sm); opacity: 0.92; }
.verdict-hero .hero-addr {
  margin-left: auto; font-size: var(--rg-fs-xs);
  text-align: right; opacity: 0.9; max-width: 46%;
}

/* state band colours — solid, with AA text-on-band */
.verdict-hero.state-blocked  { background: var(--blocked-band);  color: var(--blocked-on); }
.verdict-hero.state-pending  { background: var(--pending-band);  color: var(--pending-on); }
.verdict-hero.state-removed  { background: var(--delisted-band); color: var(--delisted-on); }
.verdict-hero.state-clean    { background: var(--clean-band);    color: var(--clean-on); }
.verdict-hero.state-invalid  { background: var(--pending-band);  color: var(--pending-on); }
/* removed/delisted reads blue/teal per the design direction */

/* The big monospace address line under the hero. */
.verdict-address {
  margin: 0 0 var(--rg-space-4);
  background: var(--bg-inset); border: 1px solid var(--border);
  border-radius: var(--rg-radius-md); padding: var(--rg-space-3) var(--rg-space-4);
}
.verdict-address code { font-size: var(--rg-fs-md); color: var(--text-primary); }
.clean-note { color: var(--text-secondary); margin: 0 0 var(--rg-space-2); }

/* (3) STATE BADGES (pills: token / network / program) */
.state-badges {
  display: flex; flex-wrap: wrap; gap: var(--rg-space-2);
  margin: 0 0 var(--rg-space-5);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--rg-radius-pill);
  font-size: var(--rg-fs-xs); font-weight: 700; letter-spacing: 0.01em;
  border: 1px solid var(--border-strong); background: var(--bg-inset);
  color: var(--text-secondary);
}
.pill .pill-k { color: var(--text-muted); font-weight: 600; }
.pill-network { border-color: var(--delisted-bd); color: var(--delisted-fg); }
.pill-token   { border-color: var(--accent); color: var(--accent-ink); }
.pill-program { border-color: var(--blocked-bd); color: var(--blocked-fg); }

/* (2) AUTHORITY DATA GRID */
.data-grid {
  border: 1px solid var(--border); border-radius: var(--rg-radius-lg);
  background: var(--bg-card); box-shadow: var(--rg-shadow);
  overflow: hidden;
}
.verdict-fields { /* kept class name; rendered as a definition list */
  display: grid; grid-template-columns: max-content 1fr;
  gap: 0; margin: 0;
}
.verdict-fields dt {
  color: var(--text-muted); font-weight: 600; font-size: var(--rg-fs-xs);
  text-transform: uppercase; letter-spacing: 0.03em;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-inset); white-space: nowrap;
}
.verdict-fields dd {
  margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border);
  word-break: break-word; color: var(--text-primary);
}
.verdict-fields dt:last-of-type, .verdict-fields dd:last-of-type { border-bottom: 0; }
.verdict-fields dd a { word-break: break-all; }
.verdict-fields .dd-source-link {
  display: inline-flex; align-items: center; gap: 4px;
}
.verdict-fields .dd-source-link svg { width: 13px; height: 13px; }
.verdict-fields dd.dd-money { font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--bg-inset); border: 1px solid var(--border-strong);
  border-radius: var(--rg-radius-pill); padding: 2px 10px;
  font-size: var(--rg-fs-xs); color: var(--text-secondary);
}

/* (4) HISTORY TIMELINE */
.history { margin-top: var(--rg-space-6); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline-item {
  border-left: 2px solid var(--border-strong);
  padding: 0 0 var(--rg-space-5) var(--rg-space-5);
  position: relative; margin-left: 6px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -7px; top: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 3px var(--bg);
}
.timeline-item.event-added::before     { background: var(--blocked-bd); }
.timeline-item.event-removed::before   { background: var(--delisted-bd); }
.timeline-item.event-destroyed::before { background: var(--pending-bd); }
.event-head {
  display: flex; gap: var(--rg-space-3); align-items: baseline; flex-wrap: wrap;
}
.event-label { font-weight: 700; font-size: var(--rg-fs-sm); }
.timeline-item.event-added .event-label     { color: var(--blocked-fg); }
.timeline-item.event-removed .event-label   { color: var(--delisted-fg); }
.timeline-item.event-destroyed .event-label { color: var(--pending-fg); }
.event-time { color: var(--text-muted); font-size: var(--rg-fs-xs); }
.event-body {
  display: flex; flex-wrap: wrap; gap: var(--rg-space-1) var(--rg-space-4);
  color: var(--text-secondary); font-size: var(--rg-fs-sm); margin-top: var(--rg-space-1);
}
.event-body code { color: var(--text-secondary); }

/* ---------------------------------------------------------------------------
   Explorers + CTA
   ---------------------------------------------------------------------------*/
.explorers { margin-top: var(--rg-space-6); }
.explorer-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: var(--rg-space-3); flex-wrap: wrap;
}
.explorer-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; font-weight: 600; font-size: var(--rg-fs-sm);
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--rg-radius-md); color: var(--text-secondary);
}
.explorer-links a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-ink); }
.explorer-links a::after { content: "↗"; font-size: 0.9em; color: var(--text-muted); }

.cta {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border); border-radius: var(--rg-radius-lg);
  padding: var(--rg-space-6); margin-top: var(--rg-space-6); text-align: center;
  box-shadow: var(--rg-shadow);
}
.cta p { color: var(--text-secondary); max-width: 60ch; margin: 0 auto var(--rg-space-4); }
.cta-button {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: var(--rg-space-2); padding: 12px 26px;
  background: var(--accent-strong); color: var(--accent-contrast); font-weight: 700;
  border-radius: var(--rg-radius-md);
}
.cta-button:hover { background: var(--accent-hover); text-decoration: none; }
.cta-button svg { width: 18px; height: 18px; }

/* ===========================================================================
   EVENTS FEED + ADDRESSES LISTING (v2)
   ===========================================================================*/
.events-hero { text-align: center; padding: var(--rg-space-7) 0 var(--rg-space-3); }
.events-hero h1 { font-size: var(--rg-fs-xl); margin: 0 0 var(--rg-space-2); letter-spacing: -0.01em; }

.lost-funds { margin: var(--rg-space-4) 0 var(--rg-space-6); }
.lost-funds-title { font-size: var(--rg-fs-lg); margin: 0 0 var(--rg-space-3); }
.lost-funds-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--rg-space-4); }
.lf-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--rg-radius-lg); padding: var(--rg-space-5); text-align: center;
  box-shadow: var(--rg-shadow); border-top-width: 3px;
}
.lf-frozen { border-top-color: var(--blocked-bd); }
.lf-destroyed { border-top-color: var(--pending-bd); }
.lf-value { font-size: var(--rg-fs-2xl); font-weight: 800; letter-spacing: -0.02em; }
.lf-label { color: var(--text-secondary); font-size: var(--rg-fs-sm); margin-top: var(--rg-space-1); font-weight: 600; }
.lf-count { color: var(--text-muted); font-size: var(--rg-fs-xs); margin-top: 2px; }

.events-filters { margin: 0 0 var(--rg-space-5); }
.filter-form {
  display: flex; flex-wrap: wrap; gap: var(--rg-space-3) var(--rg-space-4);
  align-items: flex-end;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--rg-radius-lg); padding: var(--rg-space-4);
}
.filter-group { display: flex; flex-direction: column; gap: var(--rg-space-1); }
.filter-group label {
  color: var(--text-muted); font-size: var(--rg-fs-2xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.filter-group select {
  padding: 9px 12px; font-size: var(--rg-fs-sm);
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--rg-radius-sm);
  min-width: 130px;
}
.filter-apply {
  padding: 10px 24px; font-size: var(--rg-fs-sm); font-weight: 700;
  background: var(--accent-strong); color: var(--accent-contrast);
  border: none; border-radius: var(--rg-radius-sm); cursor: pointer;
}
.filter-apply:hover { background: var(--accent-hover); }

/* event-type + status pills inside tables */
.ev-badge, .status-badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--rg-radius-pill);
  font-size: var(--rg-fs-2xs); font-weight: 700;
  border: 1px solid var(--border-strong); background: var(--bg-inset);
  white-space: nowrap;
}
.ev-freeze   { color: var(--blocked-fg);  border-color: var(--blocked-bd); }
.ev-unfreeze { color: var(--removed-fg);  border-color: var(--removed-bd); }
.ev-burn     { color: var(--pending-fg);  border-color: var(--pending-bd); }
.status-badge-blocked { color: var(--blocked-fg); border-color: var(--blocked-bd); }
.status-badge-pending { color: var(--pending-fg); border-color: var(--pending-bd); }
.status-badge-removed { color: var(--delisted-fg); border-color: var(--delisted-bd); }

/* pagination / keyset "load more" links */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: var(--rg-space-4);
  margin: var(--rg-space-5) 0 0;
}
.page-link {
  display: inline-block; padding: 9px 18px; font-weight: 600; font-size: var(--rg-fs-sm);
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--rg-radius-md); color: var(--text-secondary);
}
.page-link:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-ink); }
.page-link.disabled { color: var(--text-muted); opacity: 0.5; pointer-events: none; }
.page-current { color: var(--text-muted); font-size: var(--rg-fs-sm); }

/* ---------------------------------------------------------------------------
   Transaction page
   ---------------------------------------------------------------------------*/
.tx-header { padding: var(--rg-space-6) 0 var(--rg-space-2); }
.tx-header h1 { font-size: var(--rg-fs-xl); margin: 0 0 var(--rg-space-3); }
.tx-hash {
  margin: 0 0 var(--rg-space-5); word-break: break-all;
  background: var(--bg-inset); border: 1px solid var(--border);
  border-radius: var(--rg-radius-md); padding: var(--rg-space-3) var(--rg-space-4);
}
.tx-hash-label { color: var(--text-muted); font-size: var(--rg-fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.tx-hash code { color: var(--text-primary); }
.tx-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--rg-space-4); margin: var(--rg-space-2) 0;
}
.tx-stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--rg-radius-lg); padding: var(--rg-space-5);
  text-align: center; box-shadow: var(--rg-shadow);
}
.tx-stat-value { font-size: var(--rg-fs-xl); font-weight: 800; word-break: break-word; letter-spacing: -0.02em; }
.tx-stat-label { color: var(--text-muted); font-size: var(--rg-fs-xs); margin-top: var(--rg-space-1); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------------------------------------------------------------------------
   Responsive (mobile-first refinements at breakpoints)
   ---------------------------------------------------------------------------*/
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { padding: 0 var(--rg-space-4); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tx-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: var(--rg-space-6) 0 var(--rg-space-5); }
  .hero h1 { font-size: var(--rg-fs-xl); }
  .site-header .container { gap: var(--rg-space-2); }
  .brand { font-size: var(--rg-fs-base); }
  .primary-nav a { padding: 6px 8px; }

  /* verdict hero stacks; address moves below the headline */
  .verdict-hero { flex-wrap: wrap; padding: var(--rg-space-4); }
  .verdict-hero .hero-addr { margin-left: 0; max-width: 100%; text-align: left; flex-basis: 100%; }
  .verdict-hero .hero-verdict { font-size: var(--rg-fs-lg); }

  /* authority grid collapses to stacked rows */
  .verdict-fields { grid-template-columns: 1fr; }
  .verdict-fields dt { border-bottom: 0; padding-bottom: 2px; }
  .verdict-fields dd { padding-top: 2px; }

  .filter-group, .filter-group select { width: 100%; }
  .filter-form { flex-direction: column; align-items: stretch; }
  .filter-apply { width: 100%; }
  .lost-funds-grid { grid-template-columns: 1fr; }
}

/* Honour reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ===========================================================================
   PREMIUM LAYER (2026-06-21) — certificate · terminal · ticker · provenance ·
   command-console · cinematic reveal · print. Pure CSS, CSP-safe.
   =========================================================================== */

:root{
  --rg-fs-3xl: 3rem;            /* 48px display */
  --accent-grad: linear-gradient(135deg, #2dd4bf 0%, #38bdf8 100%);
  --hairline: rgba(255,255,255,.06);
  --glass: rgba(22,31,51,.72);
}

/* --- cinematic reveal (runs once on load; respects reduced-motion) --- */
@keyframes rgUp { from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
@keyframes rgFade { from{ opacity:0; } to{ opacity:1; } }
@keyframes rgStamp { 0%{ opacity:0; transform:scale(1.35) rotate(-8deg); } 60%{ opacity:1; } 100%{ opacity:1; transform:none; } }
.hero, .stats, .recent, .how, .cta, .certificate, .history, .explorers{ animation: rgUp .5s cubic-bezier(.2,.7,.2,1) both; }
.stats{ animation-delay:.05s; } .recent{ animation-delay:.1s; } .how{ animation-delay:.12s; }
.certificate{ animation-delay:.02s; }
@media (prefers-reduced-motion: reduce){ *{ animation:none !important; } }

/* --- provenance / freshness bar (under header) --- */
.provenance{
  border-bottom:1px solid var(--hairline); background:var(--bg-inset);
}
.provenance .container{
  display:flex; align-items:center; gap:var(--rg-space-3); flex-wrap:wrap;
  padding-top:7px; padding-bottom:7px; font-size:var(--rg-fs-2xs); color:var(--text-muted);
}
.provenance .pv-live{ display:inline-flex; align-items:center; gap:7px; color:var(--text-secondary); font-weight:600; }
.pv-pulse{ width:7px; height:7px; border-radius:50%; background:var(--accent);
  box-shadow:0 0 0 0 rgba(45,212,191,.6); animation:pvPulse 2.4s ease-out infinite; }
@keyframes pvPulse{ 0%{ box-shadow:0 0 0 0 rgba(45,212,191,.55);} 70%{ box-shadow:0 0 0 7px rgba(45,212,191,0);} 100%{ box-shadow:0 0 0 0 rgba(45,212,191,0);} }
.pv-srcs{ display:inline-flex; gap:6px; flex-wrap:wrap; }
.pv-chip{ padding:1px 8px; border:1px solid var(--border); border-radius:var(--rg-radius-pill);
  background:var(--bg-card); color:var(--text-secondary); letter-spacing:.02em; white-space:nowrap; }
.pv-sep{ opacity:.5; } .pv-upd{ margin-left:auto; }

/* --- live ticker (CSS marquee of recent blocks) --- */
.ticker{ overflow:hidden; border:1px solid var(--border); border-radius:var(--rg-radius-pill);
  background:var(--bg-inset); margin:0 0 var(--rg-space-5); position:relative; }
.ticker::before, .ticker::after{ content:""; position:absolute; top:0; bottom:0; width:48px; z-index:2; pointer-events:none; }
.ticker::before{ left:0; background:linear-gradient(90deg,var(--bg-inset),transparent); }
.ticker::after{ right:0; background:linear-gradient(270deg,var(--bg-inset),transparent); }
.ticker-track{ display:inline-flex; gap:var(--rg-space-5); white-space:nowrap; padding:8px 0;
  animation:rgTicker 48s linear infinite; will-change:transform; }
.ticker:hover .ticker-track{ animation-play-state:paused; }
@keyframes rgTicker{ from{ transform:translateX(0);} to{ transform:translateX(-50%);} }
.tk-item{ display:inline-flex; align-items:center; gap:8px; font-size:var(--rg-fs-xs); color:var(--text-secondary); }
.tk-dot{ width:6px; height:6px; border-radius:50%; background:var(--blocked-fg); }
.tk-net{ font-weight:700; color:var(--text-muted); font-size:var(--rg-fs-2xs); letter-spacing:.04em; }
.tk-addr{ font-family:ui-monospace,Menlo,Consolas,monospace; color:var(--accent-ink); }

/* --- hero + command-console search --- */
.hero h1{ font-size:clamp(2rem,5vw,var(--rg-fs-3xl)); background:var(--accent-grad);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.search-form{ position:relative; }
.search-form input[type="text"]{ padding-left:46px; font-family:ui-monospace,Menlo,Consolas,monospace;
  letter-spacing:.01em; box-shadow:var(--rg-shadow),0 0 0 0 rgba(45,212,191,0); transition:box-shadow .18s, border-color .18s; }
.search-form input[type="text"]:focus-visible{ box-shadow:var(--rg-shadow-hero),0 0 0 4px rgba(45,212,191,.18); }
.search-glyph{ position:absolute; left:16px; top:50%; transform:translateY(-50%); color:var(--text-muted);
  width:20px; height:20px; pointer-events:none; }
.search-net{ position:absolute; right:140px; top:50%; transform:translateY(-50%); display:none;
  font:700 11px/1 ui-monospace,monospace; letter-spacing:.06em; padding:4px 9px; border-radius:var(--rg-radius-pill);
  background:rgba(45,212,191,.14); color:var(--accent-ink); border:1px solid rgba(45,212,191,.3); }
.search-net.show{ display:inline-block; }
.search-kbd{ display:inline-flex; gap:4px; justify-content:center; margin-top:var(--rg-space-3); color:var(--text-muted); font-size:var(--rg-fs-2xs); }
.search-kbd kbd{ font-family:ui-monospace,monospace; background:var(--bg-card); border:1px solid var(--border);
  border-bottom-width:2px; border-radius:5px; padding:1px 6px; color:var(--text-secondary); }

/* --- terminal KPI cards --- */
.stat-card{ position:relative; overflow:hidden; text-align:left;
  background:linear-gradient(180deg,var(--bg-card),var(--bg-elevated)); }
.stat-card::before{ content:""; position:absolute; inset:0 0 auto 0; height:2px; background:var(--accent-grad); opacity:.85; }
.stat-value{ font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace; font-variant-numeric:tabular-nums; white-space:nowrap; font-size:clamp(1.15rem,2.2vw,1.6rem);
  font-weight:700; letter-spacing:-.01em; color:var(--text-primary); }
.stat-label{ text-align:left; }
.stat-spark{ display:flex; align-items:flex-end; gap:3px; height:18px; margin-top:var(--rg-space-3); opacity:.8; }
.stat-spark i{ flex:1; background:var(--accent); border-radius:2px 2px 0 0; opacity:.55; }

/* ===========================================================================
   CERTIFICATE — the verdict reframed as an authoritative document
   =========================================================================== */
.certificate{ max-width:760px; margin:var(--rg-space-5) auto var(--rg-space-6);
  background:var(--bg-card); border:1px solid var(--border-strong); border-radius:var(--rg-radius-lg);
  box-shadow:var(--rg-shadow-hero); overflow:hidden; position:relative; }
.certificate::after{ /* guilloché-ish corner seal hint */ content:""; position:absolute; right:-40px; top:-40px;
  width:140px; height:140px; border-radius:50%; background:radial-gradient(circle,rgba(45,212,191,.12),transparent 70%); }
.cert-top{ display:flex; align-items:center; gap:10px; padding:11px var(--rg-space-5);
  border-bottom:1px solid var(--hairline); color:var(--text-muted); font-size:var(--rg-fs-2xs);
  letter-spacing:.08em; text-transform:uppercase; font-weight:700; }
.cert-top .brand-mark{ width:18px; height:18px; color:var(--accent); }
.cert-seal{ margin-left:auto; font-size:var(--rg-fs-2xs); }
.verdict-hero{ animation:rgStamp .55s cubic-bezier(.2,.8,.2,1) both; }
.verdict-hero .hero-verdict{ font-size:clamp(1.6rem,4vw,2rem); letter-spacing:-.01em; }
.cert-body{ padding:var(--rg-space-5); }
.cert-addr{ text-align:center; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:var(--rg-fs-md);
  color:var(--text-primary); background:var(--bg-inset); border:1px dashed var(--border-strong);
  border-radius:var(--rg-radius-md); padding:14px; word-break:break-all; margin:0 0 var(--rg-space-4); }
.cert-foot{ display:flex; align-items:center; gap:var(--rg-space-3); flex-wrap:wrap;
  padding:var(--rg-space-4) var(--rg-space-5); border-top:1px solid var(--hairline); background:var(--bg-inset); }
.cert-stamp{ font-size:var(--rg-fs-2xs); color:var(--text-muted); }
.cert-stamp b{ color:var(--text-secondary); font-variant-numeric:tabular-nums; }
.cert-actions{ margin-left:auto; display:flex; gap:var(--rg-space-2); }
.cert-btn{ display:inline-flex; align-items:center; gap:6px; font-size:var(--rg-fs-xs); font-weight:600;
  padding:8px 13px; border-radius:var(--rg-radius-md); border:1px solid var(--border-strong);
  background:var(--bg-card); color:var(--text-secondary); cursor:pointer; transition:.15s; }
.cert-btn:hover{ border-color:var(--accent); color:var(--accent-ink); text-decoration:none; }
.cert-btn.primary{ background:var(--accent-strong); color:var(--accent-contrast); border-color:transparent; }
.cert-btn.primary:hover{ background:var(--accent-hover); color:var(--accent-contrast); }
.cert-btn svg{ width:14px; height:14px; }

/* sources as trust-chips inside the data grid */
.src-chip{ display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:var(--rg-radius-pill);
  background:rgba(45,212,191,.1); border:1px solid rgba(45,212,191,.28); color:var(--accent-ink);
  font-size:var(--rg-fs-xs); font-weight:600; }

/* --- print → save-as-PDF: only the certificate, clean white --- */
@media print{
  .site-header,.site-footer,.provenance,.ticker,.breadcrumb,.history,.explorers,.cta,.cert-actions{ display:none !important; }
  body{ background:#fff; color:#111; }
  .certificate{ box-shadow:none; border:1.5px solid #111; max-width:100%; }
  .certificate::after{ display:none; }
  .verdict-hero{ animation:none; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  a{ color:#111; }
}
