/* =========================================================
   EverWitnessed · shared styles
   Used by /, /submit/, /verify/. Page-specific rules stay
   inline next to their markup.
   ========================================================= */

/* Self-hosted Geist (variable). Same-origin + preloaded in HTML.
   Paired with metrically-tuned local fallback faces below so the
   pre-swap render lays out at the same size and line height as Geist
   itself — eliminating both FOIT and layout shift on swap. */
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Tuned fallbacks. Override values computed from the actual Geist OS/2
   tables (unitsPerEm 1000, ascent 1005, descent -295, xHeight 530) and
   the Capsize-published metrics for Arial (xHeight 1062 / em 2048) and
   Courier New (xHeight 866 / em 2048). */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial");
  size-adjust: 102.21%;
  ascent-override: 98.33%;
  descent-override: 28.86%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Mono Fallback";
  src: local("Courier New"), local("Courier");
  size-adjust: 125.34%;
  ascent-override: 80.18%;
  descent-override: 23.54%;
  line-gap-override: 0%;
}

:root{
  /* DARK (default) — checked for WCAG AA */
  --bg:          #0A0B0D;
  --bg-1:        #101215;
  --bg-2:        #16181C;
  --bg-3:        #1C1F24;
  --line:        rgba(255,255,255,0.08);
  --line-2:      rgba(255,255,255,0.14);
  --line-strong: rgba(255,255,255,0.22);

  --fg:          #F2F3F5;   /* body,  ~15:1 on bg   */
  --fg-2:        #C7CBD1;   /* sub-body ~11:1       */
  --fg-3:        #9AA0A8;   /* meta  ~7:1           */
  --fg-4:        #6C7380;   /* muted ~4.7:1 (AA)    */

  --accent:      #22D3A8;   /* one accent only      */
  --accent-ink:  #04281E;

  --warn:        #F5A524;
  --danger:      #F25F5C;

  /* radii */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-4: 16px;

  /* type */
  --f-sans: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --sec-pad: clamp(72px, 10vw, 128px);
}

/* LIGHT (optional tweak) */
body.theme-light{
  --bg:          #FBFBFC;
  --bg-1:        #F4F5F7;
  --bg-2:        #EEF0F3;
  --bg-3:        #E6E9ED;
  --line:        rgba(10,11,13,0.08);
  --line-2:      rgba(10,11,13,0.14);
  --line-strong: rgba(10,11,13,0.24);

  --fg:          #0A0B0D;
  --fg-2:        #2B2F36;
  --fg-3:        #555B64;
  --fg-4:        #7A818B;

  --accent:      #0E8D6B;
  --accent-ink:  #E8FBF4;
}

/* density */
body.dens-airy  { --sec-pad: clamp(96px, 12vw, 160px); }
body.dens-dense { --sec-pad: clamp(48px, 7vw,  96px);  }

/* accent swaps */
body.acc-blue   { --accent:#3B82F6; --accent-ink:#0B1632; }
body.acc-violet { --accent:#A78BFA; --accent-ink:#1B1138; }
body.acc-amber  { --accent:#F5A524; --accent-ink:#2C1608; }

/* ========= reset ========= */
*,*::before,*::after{ box-sizing:border-box }
html,body{ margin:0; padding:0 }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body{
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
img,svg{ display:block; max-width:100% }
a{ color:inherit; text-decoration:none }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; padding:0 }
input,textarea,select{ font:inherit; color:inherit; }
::selection{ background: var(--accent); color: var(--accent-ink) }

.mono{ font-family: var(--f-mono); font-feature-settings: "zero", "ss01"; letter-spacing:0; }

/* ========= layout utilities ========= */
.wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.rule{ height:1px; background: var(--line); border:0; margin:0; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size: 11.5px; font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--f-mono);
}
.eyebrow::before{
  content:""; width:6px; height:6px; border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}
.eyebrow.plain::before{ display:none }

/* ========= top bar ========= */
.topbar{
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand{ display:flex; align-items:center; gap:10px; color: var(--fg); }
.brand-mark{
  width: 26px; height: 26px;
  display:inline-flex; align-items:center; justify-content:center;
  color: var(--fg);
}
.brand-word{
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand-word span{ color: var(--fg-4); font-weight: 400; }

.nav{ display:flex; gap: 28px; justify-content:center; }
.nav a{
  font-size: 14px;
  color: var(--fg-3);
  padding: 8px 0;
  position: relative;
  transition: color .15s ease;
}
.nav a:hover{ color: var(--fg); }
.nav a.is-active{ color: var(--fg); }
.nav a.is-active::after{
  content:""; position:absolute; left:0; right:0; bottom:-1px; height:1px;
  background: var(--fg);
}

.topbar-right{ display:flex; align-items:center; gap: 14px; }

.ticker{
  display:flex; align-items:center; gap: 10px;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-1);
  font-size: 12px;
}
.tick-dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
  animation: pulse 3s infinite ease-in-out;
  transition: background .4s, box-shadow .4s;
}
/* Offline: Hive RPC unreachable from this client (could be the public nodes,
   our network, a firewall, or rate-limiting). Pulse keeps going to signal
   "still trying"; only the color and the readouts change. */
body.is-offline .ticker .tick-dot{
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--warn) 22%, transparent);
}
/* Opacity-only — no scale — so the dot doesn't visually nudge its neighbors. */
@keyframes pulse{
  0%,100%{ opacity:.55; }
  50%   { opacity:1; }
}
.tick-label{ color: var(--fg-4); }
.tick-num{ font-family: var(--f-mono); color: var(--fg); font-weight:500; font-size: 12px;
  transition: color 1s ease-out;
}
.tick-num.is-flash{ color: var(--accent); transition: color 0s; }
#fBlockNum{ transition: color 1s ease-out; }
#fBlockNum.is-flash{ color: var(--accent); transition: color 0s; }

.theme-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width: 34px; height: 34px;
  border-radius: var(--r-2);
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  color: var(--fg-3);
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.theme-toggle:hover{ color: var(--fg); border-color: var(--fg-3); background: var(--bg-2); }
/* Show sun in dark mode, moon in light mode */
body:not(.theme-light) .ti-moon{ display:none }
body.theme-light .ti-sun{ display:none }

/* ========= buttons ========= */
.btn{
  display:inline-flex; align-items:center; gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-2);
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
  white-space: nowrap;
}
.btn .arr{ transition: transform .2s; display:inline-block; }
.btn:hover .arr{ transform: translateX(2px); }
.btn.sm{ padding: 8px 12px; font-size: 13px; }
.btn.lg{ padding: 12px 20px; font-size: 15px; }
.btn.xl{ padding: 16px 24px; font-size: 15px; }
.btn[disabled]{ opacity: .5; cursor: not-allowed; }

.btn-accent{
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-accent:hover{ background: color-mix(in oklab, var(--accent) 88%, white); }

.btn-ghost{
  color: var(--fg);
  border-color: var(--line-2);
  background: transparent;
}
.btn-ghost:hover{ border-color: var(--fg); background: var(--bg-1); }

.btn-link{
  color: var(--fg-2);
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  padding: 6px 0;
}
.btn-link:hover{ color: var(--fg); border-bottom-color: var(--fg); }

/* ========= chips ========= */
.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--fg-3);
  font-family: var(--f-mono);
  letter-spacing: 0.02em;
}
.chip-dot{ width:5px; height:5px; border-radius:50%; background: currentColor; }
.chip-accent{ color: var(--accent); border-color: color-mix(in oklab, var(--accent) 40%, var(--line-2)); }

/* ========= sections (used on every page) ========= */
.section{
  padding: var(--sec-pad) var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
}
.section + .section{ border-top: 1px solid var(--line); }

.section-head{
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  margin-bottom: 72px;
  align-items: end;
}
.section-h{
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
  color: var(--fg);
  max-width: 20ch;
}
.section-h .accent{ color: var(--accent); }
.section-h .dim{ color: var(--fg-4); }
.sh-right{
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-2);
  max-width: 48ch;
  margin: 0;
}

/* ========= code cards ========= */
.code-stack{ display:flex; flex-direction:column; gap: 16px; }
.code-card{
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}
.code-head{
  display:flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--bg-2), var(--bg-1));
}
.code-title{
  font-family: var(--f-mono); font-size: 12px;
  color: var(--fg-2);
}
.code-title .dim{ color: var(--fg-4); }
.code-body{
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
}
/* Code body color tokens — three tiers only:
   keys (t-k), brand (t-acct), and values (t-s).
   Quoting / escaping / structural punctuation use the muted t-o.
   We deliberately don't differentiate between value *types* (number vs string
   vs hash) — they're all just data. */
.code-body .t-k   { color: #93C5FD; }                          /* keys */
.code-body .t-s   { color: var(--fg); }                        /* values — readable, body color */
.code-body .t-c   { color: var(--fg-4); font-style: italic; }  /* comments */
.code-body .t-o   { color: var(--fg-4); }                      /* punctuation, quotes, escapes — fades into background */
.code-body .t-acct{ color: var(--accent); font-weight: 500; }  /* meaningful data: brand, hash, tx id, RPC method, version marker — not boilerplate */

/* Light-theme overrides */
body.theme-light .code-body .t-k{ color: #1D4ED8; }
body.theme-light .code-body .t-s{ color: var(--fg); }

/* Copy button (placed in .code-head, right side) */
.code-copy{
  display:inline-flex; align-items:center; gap: 6px;
  padding: 4px 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  letter-spacing: 0.02em;
  background: transparent;
}
.code-copy:hover{ color: var(--fg); border-color: var(--fg-3); background: var(--bg-2); }
.code-copy.is-copied{ color: var(--accent); border-color: color-mix(in oklab, var(--accent) 50%, var(--line-2)); }
.code-copy svg{ flex-shrink: 0; }

/* ========= footer ========= */
.footer{
  border-top: 1px solid var(--line);
  padding: 48px var(--gutter) 28px;
  background: var(--bg-1);
}
.footer-inner{
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.f-brand .brand{ margin-bottom: 14px; }
.f-tag{ font-size: 13.5px; color: var(--fg-3); line-height: 1.6; max-width: 34ch; margin: 0; }
.f-domain{
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-3);          /* matches .f-tag brightness above it */
  margin-top: 10px;
  display: block;
  transition: color .15s;
}
.f-domain:hover{ color: var(--accent); }
.f-domain + .f-domain{ margin-top: 4px; }

.powered-by{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 4px 10px;
  border: 1px solid color-mix(in oklab, var(--accent) 50%, var(--line-2));
  border-radius: 999px;
  background: transparent;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color .15s, background .15s, border-color .15s;
}
.powered-by:hover{
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.powered-by svg{ flex-shrink: 0; }

.f-col{ display:flex; flex-direction:column; gap: 10px; }
.f-head{
  font-size: 11.5px;
  color: var(--fg-3);
  font-family: var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.f-col a{
  font-size: 13.5px; color: var(--fg-2);
  transition: color .15s;
}
.f-col a:hover{ color: var(--fg); }

.f-foot{
  max-width: var(--maxw); margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display:flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 12px;
  color: var(--fg-4);
}
.ff-right{ font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.02em; }
.ff-right .g{ color: var(--accent); transition: color .4s; }
body.is-offline .ff-right .g{ color: var(--warn); }

/* ========= tweaks panel ========= */
.tweaks{
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 280px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-3);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
  font-size: 13px;
  overflow: hidden;
}
.tweaks[hidden]{ display:none; }
.tw-head{
  display:flex; justify-content:space-between; align-items:center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tw-x{ font-size: 18px; line-height: 1; color: var(--fg-3); padding: 0 6px; }
.tw-x:hover{ color: var(--fg); }
.tw-body{ padding: 14px; display:flex; flex-direction:column; gap: 14px; }
.tw-row{ display:flex; flex-direction:column; gap: 6px; }
.tw-k{ font-family: var(--f-mono); font-size: 11px; color: var(--fg-4); letter-spacing: 0.06em; text-transform: uppercase; }
.tw-seg{ display:flex; gap: 4px; flex-wrap: wrap; }
.tw-seg button{
  padding: 6px 10px;
  font-size: 12px;
  color: var(--fg-3);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  transition: all .15s;
}
.tw-seg button:hover{ color: var(--fg); border-color: var(--line-2); }
.tw-seg button.on{ background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* =========================================================
   FORM PAGES (/submit/, /verify/) — page header, card, form
   controls, status, result card. Page-specific bits stay inline.
   ========================================================= */

/* Page header */
.page-head{
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(24px, 4vw, 48px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.page-h{
  font-weight: 500;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 14px 0 16px;
  color: var(--fg);
  max-width: 22ch;
}
.page-h .accent{ color: var(--accent); }
.page-lede{
  max-width: 60ch;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0;
}
.page-body{
  padding: 0 var(--gutter) clamp(48px, 8vw, 96px);
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Card */
.card{
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-1);
  overflow: hidden;
}
.card + .card{ margin-top: 20px; }
.card-head{
  display:flex; align-items:center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--bg-2), var(--bg-1));
  gap: 12px; flex-wrap: wrap;
}
.card-title{
  font-size: 14px; font-weight: 500; color: var(--fg);
  display:flex; align-items:center; gap: 10px;
}
.card-title .step-n{
  display:inline-flex; align-items:center; justify-content:center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: 11px; font-family: var(--f-mono);
  color: var(--fg-3);
}
.card-body{ padding: 24px 20px; }

/* Segmented control */
.seg{
  display:inline-flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--bg-2);
  padding: 3px;
  gap: 2px;
}
.seg button{
  padding: 8px 14px;
  font-size: 13px;
  color: var(--fg-3);
  border-radius: var(--r-1);
  transition: color .15s, background .15s, box-shadow .15s;
  font-weight: 500;
}
.seg button:hover{ color: var(--fg); }
.seg button.on{
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 1px 0 var(--line-2) inset, 0 1px 2px rgba(0,0,0,0.2);
}

/* Drop zone */
.drop{
  display: block;
  margin-top: 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-3);
  background: var(--bg-2);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  position: relative;
}
.drop:hover, .drop.is-over{
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, var(--bg-2));
}
.drop-icon{ width: 40px; height: 40px; margin: 0 auto 14px; color: var(--fg-3); }
.drop:hover .drop-icon, .drop.is-over .drop-icon{ color: var(--accent); }
.drop-h{ font-size: 15px; color: var(--fg); font-weight: 500; margin-bottom: 4px; }
.drop-s{ font-size: 13px; color: var(--fg-3); }
.file-hidden{
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Text & hex inputs */
.text-input{
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  resize: vertical;
  min-height: 140px;
  color: var(--fg);
  white-space: pre;
  overflow: auto;
}
.text-input:focus{ outline: 0; border-color: var(--accent); }
.text-meta{
  display:flex; flex-wrap: wrap; gap: 4px 14px;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--fg-4);
}
.text-meta strong{ color: var(--fg-2); font-weight: 500; }
.warn-bytes{
  margin-top: 10px;
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.6;
}
.warn-bytes strong{ color: var(--warn); font-weight: 500; }

.hash-input{
  width: 100%;
  padding: 14px;
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: var(--fg);
}
.hash-input:focus{ outline: 0; border-color: var(--accent); }
.hash-input.bad{ border-color: var(--danger); }
.mode > .hash-input{ margin-top: 16px; }   /* extra space inside segmented-mode panels */

/* Form rows */
.row{ display:grid; gap: 8px; }
.row + .row{ margin-top: 18px; }
.lbl{
  font-size: 11.5px;
  font-family: var(--f-mono);
  color: var(--fg-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.help{ font-size: 12px; color: var(--fg-4); line-height: 1.5; }
.help a{ color: var(--fg-3); border-bottom: 1px solid var(--line-2); }
.help a:hover{ color: var(--fg); border-bottom-color: var(--fg); }

/* Actions strip + status line */
.actions{
  display:flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.status{
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-3);
}
.status.err  { color: var(--danger); }
.status.ok   { color: var(--accent); }
.status.warn { color: var(--warn); }

/* Result card */
.result{
  margin-top: 24px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--line-2));
  border-radius: var(--r-3);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 70%),
    var(--bg-1);
  overflow: hidden;
}
.result.is-warn{
  border-color: color-mix(in oklab, var(--warn) 50%, var(--line-2));
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, color-mix(in oklab, var(--warn) 10%, transparent), transparent 70%),
    var(--bg-1);
}
.result.is-bad{
  border-color: color-mix(in oklab, var(--danger) 50%, var(--line-2));
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, color-mix(in oklab, var(--danger) 10%, transparent), transparent 70%),
    var(--bg-1);
}
.result[hidden]{ display:none }
.result-head{
  padding: 24px 24px 0;
  display:flex; align-items: center; gap: 10px;
}
.result-head .ok-dot{
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.result.is-warn .result-head .ok-dot{ background: var(--warn); box-shadow: 0 0 0 4px color-mix(in oklab, var(--warn) 22%, transparent); }
.result.is-bad  .result-head .ok-dot{ background: var(--danger); box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger) 22%, transparent); }
.result-head .lbl{ color: var(--accent); }
.result.is-warn .result-head .lbl{ color: var(--warn); }
.result.is-bad  .result-head .lbl{ color: var(--danger); }
.result-h{
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 6px 24px 0;
  padding: 0 0 16px;
}
.result-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.result-grid .kv{
  padding: 16px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.result-grid .kv:nth-child(2n){ border-right: 0; }
.result-grid .kv:nth-last-child(-n+2){ border-bottom: 0; }
.result-grid .kv-k{
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.result-grid .kv-v{
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--fg);
  word-break: break-all;
  line-height: 1.5;
}
.result-grid .kv-v.accent{ color: var(--accent); }
.result-grid .kv-v a{ color: var(--fg); border-bottom: 1px solid var(--line-2); }
.result-grid .kv-v a:hover{ border-bottom-color: var(--fg); }
.result-foot{
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  display:flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--bg-1);
}

/* ========= shared responsive ========= */
@media (max-width: 980px){
  .nav{ display:none; }
  .topbar-inner{ grid-template-columns: auto 1fr; }
  .topbar-right .ticker{ display:none }
  .section-head{ grid-template-columns: 1fr; gap: 20px; }
  .footer-inner{ grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-inner > .f-brand{ grid-column: 1 / -1; }
}
@media (max-width: 720px){
  .result-grid{ grid-template-columns: 1fr; }
  .result-grid .kv{ border-right: 0 !important; }
  .result-grid .kv:not(:last-child){ border-bottom: 1px solid var(--line); }
  .seg{ flex-wrap: wrap; }
}
@media (max-width: 600px){
  .footer-inner{ grid-template-columns: 1fr; }
  .footer-inner > .f-brand{ grid-column: 1; }
}
