:root {
  --ground: #FBF9F4; --surface: #FFFFFF; --surface-2: #F4EFE4; --ink: #16130E; --muted: #504839;
  --border: #E4DDCF; --border-strong: #D6CCB8; --sats: #B26B00; --sats-soft: #F3E4C6;
  --tokens: #0E7C86; --tokens-soft: #D7EBEC; --good: #2F7A3D; --good-soft: #DCEEDD;
  --bad: #B3261E; --bad-soft: #F6DAD7;
  --font-display: "Bricolage Grotesque", -apple-system, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E0D0B; --surface: #17150F; --surface-2: #1E1B14; --ink: #EDE7D8; --muted: #B0A68F;
    --border: #2A271F; --border-strong: #39352A; --sats: #E7A33E; --sats-soft: #3A2E17;
    --tokens: #4FD1C5; --tokens-soft: #123230; --good: #7BC98A; --good-soft: #17301C;
    --bad: #F28B82; --bad-soft: #3A1715;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0E0D0B; --surface: #17150F; --surface-2: #1E1B14; --ink: #EDE7D8; --muted: #B0A68F;
  --border: #2A271F; --border-strong: #39352A; --sats: #E7A33E; --sats-soft: #3A2E17;
  --tokens: #4FD1C5; --tokens-soft: #123230; --good: #7BC98A; --good-soft: #17301C;
  --bad: #F28B82; --bad-soft: #3A1715;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 17px/1.6 "IBM Plex Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--tokens); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--font-mono); font-size: .9em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -.025em; max-width: 15ch; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
section { padding: 56px 0 8px; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--sats); font-weight: 700; }
nav { display: flex; align-items: center; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--ink); }
.theme { background: none; border: 1px solid var(--border-strong); color: var(--ink); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }

.btn { display: inline-block; background: var(--sats); color: #fff; padding: 12px 20px; border-radius: 10px; font: 600 1rem "IBM Plex Sans", sans-serif; text-decoration: none; border: 1px solid var(--sats); cursor: pointer; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--tokens); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn.ghost:hover { border-color: var(--sats); background: var(--surface-2); filter: none; }

.hero { padding-top: 64px; }
.eyebrow { font-family: var(--font-mono); font-size: .75rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 64ch; }
.lede.small { font-size: 1.05rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

.score { display: flex; align-items: center; gap: 36px; margin-top: 34px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.dial { position: relative; width: 150px; height: 150px; flex: none; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 10; }
.dial .track { stroke: var(--surface-2); }
.dial .fill { stroke: var(--good); stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.dial.bad .fill { stroke: var(--bad); }
.dialText { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dialText b { font: 800 2.6rem/1 var(--font-display); }
.dialText span { font-size: .85rem; color: var(--muted); }
.dialText i { font-style: normal; }
.stats { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin: 0; }
.stats dt { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 2px 0 0; font: 700 1.35rem/1.25 var(--font-display); overflow-wrap: anywhere; }

.group { margin-top: 34px; }
.group > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 16px; }
.group > header h3 { margin: 0; font-size: 1.35rem; }
.group > header p { margin: 0; color: var(--muted); font-size: .95rem; flex-basis: 100%; }
.group > header a { font-size: .9rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .3s; }
.card.ok { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.card.fail { border-color: var(--bad); }
.card > header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card h4 { font-size: 1.08rem; margin: 0 0 2px; }
.txid { font-size: .78rem; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.txid:hover { color: var(--tokens); }
.pill { flex: none; font: 600 .75rem var(--font-mono); padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.run { background: var(--tokens-soft); color: var(--tokens); }
.pill.ok { background: var(--good-soft); color: var(--good); }
.pill.fail { background: var(--bad-soft); color: var(--bad); }
.pill.tampered { background: var(--sats-soft); color: var(--sats); }
.claim { margin: 0; font-size: .95rem; }

.checks { list-style: none; padding: 0; margin: 2px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.checks li { font: 600 .68rem/1.2 var(--font-mono); text-align: center; padding: 8px 2px 7px; border-radius: 8px; background: var(--surface-2); color: var(--muted); position: relative; }
.checks li::before { content: ""; display: block; width: 10px; height: 10px; margin: 0 auto 5px; border-radius: 50%; background: var(--border-strong); }
.checks li.ok { background: var(--good-soft); color: var(--good); }
.checks li.ok::before { background: var(--good); }
.checks li.fail { background: var(--bad-soft); color: var(--bad); }
.checks li.fail::before { background: var(--bad); }
.checks li.run::before { background: var(--tokens); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.found { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.found b { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 4px; }
.link { background: none; border: 0; padding: 0; color: var(--tokens); font: 500 .88rem "IBM Plex Sans", sans-serif; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.more { border-top: 1px dashed var(--border-strong); padding-top: 10px; font-size: .84rem; }
.more table { width: 100%; border-collapse: collapse; }
.more td { padding: 4px 0; vertical-align: top; border-bottom: 1px solid var(--border); }
.more td:first-child { width: 1.5em; }
.more .d { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
.more pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .74rem/1.5 var(--font-mono); background: var(--surface-2); padding: 10px; border-radius: 8px; max-height: 220px; overflow: auto; margin: 8px 0 0; }
.tamperNote { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--sats-soft); color: var(--ink); font-size: .84rem; }

.any { display: flex; gap: 10px; margin: 18px 0; max-width: 760px; }
.any input { flex: 1; min-width: 0; font: 400 .95rem var(--font-mono); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); }
#anyOut .card { max-width: 760px; }

.how { padding-left: 1.2em; max-width: 72ch; }
.how li { margin-bottom: 10px; }
.trust { margin-top: 22px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--sats); border-radius: 12px; max-width: 80ch; }
.trust p { margin: 0 0 10px; color: var(--muted); }
.foot { padding: 48px 20px 40px; color: var(--muted); font-size: .9rem; }

@media (max-width: 720px) {
  nav a:not(:last-of-type) { display: none; }
  .score { flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; }
  .dial { margin: 0 auto; }
  .stats dd { font-size: 1.1rem; }
  .cards { grid-template-columns: 1fr; }
  .checks li { font-size: .6rem; }
  .any { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
