/* ===========================================================================
   ProofReveal — design system
   A single, dependency-free stylesheet. Dark-first, premium, high-contrast,
   tuned for trust: a verification-green accent over a deep indigo brand.
   =========================================================================== */

:root {
  /* brand — electric blue (verification/primary), gold (premium), green (verified) */
  --brand-1: #2b8fff;       /* electric blue */
  --brand-2: #37a7ff;
  --brand-3: #5bc0ff;
  --gold: #f5c76b;          /* premium proof */
  --gold-dim: #c9a14e;
  --verify: #48e6a0;        /* verified status */
  --verify-dim: #1f9d6a;
  --danger: #ff5f7a;
  --warn: #f5c76b;
  --info: #37a7ff;

  /* surfaces — near-black navy with glass panels */
  --bg: #050711;
  --bg-grad-1: #0a0e1f80;
  --surface: #0d1120;
  --surface-2: #121830;
  --surface-3: #1a2140;
  --glass: rgba(255,255,255,.05);
  --glass-strong: rgba(255,255,255,.085);
  --elev: #121830;
  --line: rgba(255,255,255,.12);
  --line-soft: rgba(255,255,255,.07);

  /* text */
  --text: #f6f8ff;
  --muted: #9ca7c7;
  --faint: #69739a;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 10px 40px -12px rgba(0,0,0,.8);
  --shadow-glow: 0 0 0 1px rgba(55,167,255,.25), 0 12px 50px -12px rgba(55,167,255,.4);
  --ring: 0 0 0 3px rgba(55,167,255,.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(55,167,255,.16), transparent 60%),
    radial-gradient(900px 520px at -10% 10%, rgba(72,230,160,.08), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(245,199,107,.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  letter-spacing: .1px;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1rem; color: var(--muted); }
code, .mono { font-family: var(--mono); }

/* layout ------------------------------------------------------------------ */
.container { width: min(1180px, 92vw); margin: 0 auto; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: 1rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.center { text-align: center; }
.grid { display: grid; gap: 1rem; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px){ .cols-2,.cols-3 { grid-template-columns: 1fr; } }

/* top bar ----------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10,11,20,.85), rgba(10,11,20,.55));
  border-bottom: 1px solid var(--line-soft);
}
.topbar .inner { display: flex; align-items: center; gap: 1rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 6px 20px -6px var(--brand-1);
  color: white; font-weight: 900;
}
.brand small { color: var(--faint); font-weight: 600; font-size: .7rem; display: block; letter-spacing: .14em; text-transform: uppercase; }
.navlinks { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.navlinks .tab {
  padding: .5rem .85rem; border-radius: 10px; color: var(--muted); font-weight: 600; cursor: pointer;
  border: 1px solid transparent;
}
.navlinks .tab:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.navlinks .tab.active { color: var(--text); background: var(--surface-2); border-color: var(--line); }

/* cards ------------------------------------------------------------------- */
.panel {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.panel.glow { box-shadow: var(--shadow-glow); border-color: rgba(55,167,255,.4); }
.panel.pad-lg { padding: 2rem 2.1rem; }
.panel h2, .panel h3 { margin-top: 0; }
.subtle { color: var(--muted); }
.faint { color: var(--faint); }
.hr { height: 1px; background: var(--line-soft); border: 0; margin: 1.2rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: var(--brand-2); }

/* stat cards */
.stat { padding: 1.1rem 1.2rem; }
.stat .n { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--faint); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }

/* buttons ----------------------------------------------------------------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: .62rem 1.05rem; border-radius: 11px; font-weight: 650; font-size: .92rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .5rem; transition: transform .08s ease, background .15s ease, box-shadow .15s ease, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--brand-1); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-color: transparent; color: white;
  box-shadow: 0 8px 26px -10px var(--brand-1);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.verify { background: linear-gradient(135deg, var(--verify-dim), var(--verify)); border-color: transparent; color: #04130a; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255,93,108,.35); background: rgba(255,93,108,.08); }
.btn.sm { padding: .42rem .7rem; font-size: .82rem; border-radius: 9px; }
.btn.lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }

/* forms ------------------------------------------------------------------- */
label.field { display: block; }
.field .lbl { display: block; font-size: .82rem; font-weight: 650; color: var(--muted); margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: .68rem .8rem; font-size: .94rem; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 80px; }
.field + .field { margin-top: .9rem; }
.inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }

/* pills / badges ---------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .65rem; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .02em; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); text-transform: capitalize;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.committed { color: var(--info); border-color: rgba(76,194,255,.3); background: rgba(76,194,255,.08); }
.pill.committed .dot { background: var(--info); }
.pill.anchored { color: var(--brand-2); border-color: rgba(245,199,107,.3); background: rgba(245,199,107,.08); }
.pill.anchored .dot { background: var(--brand-2); }
.pill.assigned { color: var(--warn); border-color: rgba(255,180,84,.3); background: rgba(255,180,84,.08); }
.pill.assigned .dot { background: var(--warn); }
.pill.revealed, .pill.verified { color: var(--verify); border-color: rgba(72,230,160,.32); background: rgba(72,230,160,.1); }
.pill.revealed .dot, .pill.verified .dot { background: var(--verify); box-shadow: 0 0 8px var(--verify); }
.pill.failed { color: var(--danger); border-color: rgba(255,93,108,.32); background: rgba(255,93,108,.1); }
.pill.failed .dot { background: var(--danger); }

/* tables ------------------------------------------------------------------ */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; color: var(--faint); font-weight: 650; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.table td { padding: .7rem .7rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:hover td { background: rgba(255,255,255,.018); }
.table .mono { font-size: .82rem; color: var(--muted); }

/* mono hash chip */
.hash { font-family: var(--mono); font-size: .8rem; color: var(--muted); background: var(--bg); border: 1px solid var(--line-soft); border-radius: 7px; padding: .2rem .5rem; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: copy; }
.hash:hover { border-color: var(--brand-1); color: var(--text); }

/* verification checklist -------------------------------------------------- */
.checks { display: grid; gap: .55rem; }
.check { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: 11px; border: 1px solid var(--line-soft); background: var(--surface); }
.check .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .8rem; font-weight: 900; }
.check.pass .ic { background: rgba(72,230,160,.16); color: var(--verify); box-shadow: inset 0 0 0 1px rgba(72,230,160,.4); }
.check.fail .ic { background: rgba(255,93,108,.16); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255,93,108,.4); }
.check .txt { font-weight: 600; }
.check .sub { color: var(--faint); font-size: .82rem; font-weight: 500; }

/* big verdict banner */
.verdict { display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem 1.6rem; border-radius: var(--radius); }
.verdict.ok { background: linear-gradient(135deg, rgba(72,230,160,.16), rgba(72,230,160,.04)); border: 1px solid rgba(72,230,160,.4); }
.verdict.no { background: linear-gradient(135deg, rgba(255,93,108,.16), rgba(255,93,108,.04)); border: 1px solid rgba(255,93,108,.4); }
.verdict .seal { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem; flex: none; }
.verdict.ok .seal { background: rgba(72,230,160,.18); color: var(--verify); box-shadow: 0 0 30px -6px var(--verify); }
.verdict.no .seal { background: rgba(255,93,108,.18); color: var(--danger); }
.verdict h2 { margin: 0; }
.verdict .sub { color: var(--muted); }

/* card tiles (revealed cards) */
.cardtile { display: flex; gap: .9rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cardtile .badge { width: 42px; height: 56px; border-radius: 7px; background: linear-gradient(160deg, var(--brand-1), var(--brand-2)); flex: none; display: grid; place-items: center; color: white; font-weight: 800; font-size: .7rem; }
.cardtile .meta { line-height: 1.3; }
.cardtile .meta .name { font-weight: 700; }
.cardtile .meta .sub { color: var(--faint); font-size: .82rem; }

/* toast ------------------------------------------------------------------- */
#toasts { position: fixed; bottom: 1.2rem; right: 1.2rem; display: flex; flex-direction: column; gap: .6rem; z-index: 90; }
.toast { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--brand-1); padding: .8rem 1rem; border-radius: 11px; box-shadow: var(--shadow); min-width: 240px; max-width: 360px; animation: slideIn .25s ease; }
.toast.ok { border-left-color: var(--verify); }
.toast.err { border-left-color: var(--danger); }
.toast .t { font-weight: 700; font-size: .9rem; }
.toast .d { color: var(--muted); font-size: .82rem; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0%{ transform: scale(.6); opacity: 0;} 60%{ transform: scale(1.12);} 100%{ transform: scale(1); opacity: 1;} }
.pop { animation: pop .35s cubic-bezier(.2,1.3,.4,1) both; }

/* modal ------------------------------------------------------------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,6,12,.72); backdrop-filter: blur(6px); display: none; place-items: center; z-index: 80; padding: 1rem; }
.modal-bg.show { display: grid; }
.modal { width: min(620px, 96vw); max-height: 90vh; overflow: auto; }

/* misc -------------------------------------------------------------------- */
.muted-box { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 11px; padding: 1rem 1.1rem; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: .5rem 1rem; align-items: center; }
.kv .k { color: var(--faint); font-size: .85rem; }
.kv .v { font-weight: 600; word-break: break-all; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--faint); }
.empty .big { font-size: 2.4rem; margin-bottom: .4rem; opacity: .5; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.hide { display: none !important; }
.tag { font-size: .72rem; color: var(--faint); background: var(--surface); border: 1px solid var(--line-soft); padding: .12rem .45rem; border-radius: 6px; }
footer.site { color: var(--faint); font-size: .82rem; padding: 2.5rem 0 2rem; text-align: center; }
.step-dots { display: flex; gap: .4rem; }
.step-dots .d { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.step-dots .d.on { background: var(--brand-2); }
