/* PORTENT — design tokens and shell.
   The brand is a warning light in the dark: near-black ground, one amber signal,
   and verdict colours that are the only other colour on the page. */

:root {
  /* black and graphite: the only colour on the page is the amber signal and
     the verdicts, so a coloured verdict reads as an event */
  --ink:        #050505;
  --ink-2:      #0A0A0A;
  --paper:      #101011;
  --paper-2:    #161617;
  --line:       rgba(255, 255, 255, .07);
  --line-2:     rgba(255, 255, 255, .13);
  --text:       #ECECEC;
  --dim:        #A1A1A6;
  --dimmer:     #85858B;   /* 5.3:1 on #050505 */

  --signal:     #F5B841;
  --signal-dim: rgba(245, 184, 65, .14);

  --safe:       #35D08A;
  --caution:    #F5B841;
  --danger:     #FF7A45;
  --rug:        #FF4D5E;
  --custodial:  #6C9BFF;
  --unproven:   #8C95A8;

  /* SIBYL is a mind, not a verdict: the verdict blue stays reserved */
  --sibyl:      #8FB4FF;

  --radius:     14px;
  --radius-sm:  10px;
  --maxw:       1180px;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* the ground: graphite light falling from above onto black */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1300px 780px at 50% -18%, rgba(255, 255, 255, .075), transparent 62%),
    radial-gradient(900px 900px at 50% 120%, rgba(255, 255, 255, .035), transparent 60%),
    linear-gradient(180deg, #070707 0%, #0b0b0c 45%, #060606 100%);
}

/* the eye lives on one fixed canvas under everything */
#eye-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.eye-ready #eye-canvas { opacity: 1; }
.no-webgl #eye-canvas { display: none; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 22px; position: relative; z-index: 1; }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.9rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.35rem); }
p { margin: 0 0 1em; }

.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.kicker::before { content: ''; width: 26px; height: 1px; background: var(--signal); opacity: .6; }

.lede { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--dim); max-width: 62ch; }
.mono { font-family: var(--mono); }
.sec-label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--dimmer); margin-bottom: 14px;
}

/* ---------- nav ---------- */

header.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: rgba(5, 6, 10, .82);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; letter-spacing: .03em; font-size: 1.06rem; }
/* the mark: the logo's own figure, cut from it, never redrawn (224 x 310) */
.brand .brand-mark { width: auto; height: 28px; flex: none; display: block; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; font-size: .9rem; color: var(--dim); }
.nav-links a:hover { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--dim);
  white-space: nowrap;
}
.chip.live { color: var(--safe); border-color: rgba(53, 208, 138, .3); }
.chip.soon { color: var(--signal); border-color: rgba(245, 184, 65, .32); background: var(--signal-dim); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.dot.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: .92rem;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line-2);
  background: transparent; color: var(--text); cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.btn:hover { border-color: var(--signal); background: var(--signal-dim); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: #14100A; }
.btn.primary:hover { filter: brightness(1.08); background: var(--signal); }
.btn.sm { padding: 8px 14px; font-size: .84rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-x { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn-x svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- layout blocks ---------- */

section { padding-block: clamp(64px, 9vw, 116px); position: relative; z-index: 1; }
.card {
  background: linear-gradient(180deg, var(--paper), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---------- hero ---------- */

.hero { padding-top: clamp(52px, 7vw, 86px); padding-bottom: clamp(40px, 5vw, 64px); }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--signal); }
.hero .lede { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); }

.scanbox { margin-top: 34px; max-width: 720px; }
.scanrow { display: flex; gap: 10px; }
.scanrow input {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: .92rem;
  padding: 16px 18px; border-radius: 12px;
  background: var(--paper-2); color: var(--text);
  border: 1px solid var(--line-2); outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.scanrow input:focus { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }
.scanrow input::placeholder { color: var(--dimmer); }
.scanrow .btn { padding-inline: 28px; }
@media (max-width: 560px) { .scanrow { flex-direction: column; } }

.trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- verdict ---------- */

#result { margin-top: 26px; }
.verdict {
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--paper), var(--ink-2));
  overflow: hidden;
}
.verdict-head { display: flex; align-items: center; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gauge { position: relative; width: 92px; height: 92px; flex: none; }
.gauge svg { transform: rotate(-90deg); }
.gauge .num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 1.45rem; font-weight: 700;
}
.verdict-meta { min-width: 0; flex: 1; }
.verdict-name { font-family: var(--display); font-size: 1.4rem; font-weight: 700; }
.verdict-word { font-family: var(--display); font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase; }
.verdict-action { color: var(--dim); font-size: .94rem; margin-top: 6px; }
.verdict-body { padding: 22px 26px; display: grid; gap: 22px; }

.sign { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sign:last-child { border-bottom: 0; }
.sign-mark { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; }
.sign-label { font-weight: 600; font-size: .95rem; }
.sign-why { color: var(--dim); font-size: .88rem; margin-top: 3px; }
.sign-detail { font-family: var(--mono); font-size: .76rem; color: var(--dimmer); margin-top: 5px; word-break: break-all; }
.sign-weight { margin-left: auto; font-family: var(--mono); font-size: .74rem; color: var(--dimmer); flex: none; padding-left: 12px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 14px; }
.fact-k { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dimmer); }
.fact-v { font-family: var(--display); font-size: 1.06rem; font-weight: 600; margin-top: 3px; word-break: break-word; }

.plain { color: var(--dim); font-size: .9rem; }
.plain li { margin-bottom: 5px; }
.plain ul { margin: 0; padding-left: 18px; }

.v-SAFE      { color: var(--safe); }
.v-CAUTION   { color: var(--caution); }
.v-DANGER    { color: var(--danger); }
.v-RUG       { color: var(--rug); }
.v-CUSTODIAL { color: var(--custodial); }
.v-UNPROVEN  { color: var(--unproven); }
.bg-SAFE { background: var(--safe); } .bg-CAUTION { background: var(--caution); }
.bg-DANGER { background: var(--danger); } .bg-RUG { background: var(--rug); }
.bg-CUSTODIAL { background: var(--custodial); } .bg-UNPROVEN { background: var(--unproven); }
.sev-critical { background: var(--rug); } .sev-high { background: var(--danger); }
.sev-medium { background: var(--caution); } .sev-low { background: var(--dimmer); }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--signal); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- stats ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink-2); padding: 22px 20px; }
.stat-v { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 700; }
.stat-k { font-family: var(--mono); font-size: .66rem; letter-spacing: .15em; text-transform: uppercase; color: var(--dimmer); margin-top: 5px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- video ---------- */

.film { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--ink-2); position: relative; }
.film video { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink); }
.film-cap { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: .86rem; display: flex; gap: 10px; align-items: flex-start; }
.film-cap b { color: var(--text); font-weight: 600; }

/* ---------- agents ---------- */

.agent { position: relative; overflow: hidden; }
.agent::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 200px at 100% 0%, var(--glow, rgba(245,184,65,.10)), transparent 70%);
}
.agent-name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: .04em; }
.agent-role { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dimmer); margin-top: 3px; }
.agent ul { list-style: none; padding: 0; margin: 18px 0 0; }
.agent li { padding: 9px 0 9px 20px; border-top: 1px solid var(--line); position: relative; font-size: .91rem; color: var(--dim); }
.agent li::before { content: ''; position: absolute; left: 0; top: 17px; width: 7px; height: 1px; background: var(--signal); }

/* ---------- feed ---------- */

.feed { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feed-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--ink-2); font-size: .9rem; }
.feed-row:last-child { border-bottom: 0; }
.feed-v { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; width: 82px; flex: none; }
.feed-sym { font-weight: 600; }
.feed-addr { font-family: var(--mono); font-size: .76rem; color: var(--dimmer); }
.feed-act { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--dimmer); flex: none; }
.feed-empty { padding: 34px 18px; text-align: center; color: var(--dimmer); background: var(--ink-2); font-size: .9rem; }

/* ---------- check list ---------- */

.check { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); }
.check h3 { font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; font-family: var(--mono); font-weight: 500; color: var(--signal); }
.check p { margin: 10px 0 0; color: var(--dim); font-size: .9rem; }

/* ---------- faq ---------- */

details.qa { border-bottom: 1px solid var(--line); padding: 18px 0; }
details.qa summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.06rem; list-style: none; display: flex; gap: 14px; align-items: flex-start; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::before { content: '+'; color: var(--signal); font-family: var(--mono); flex: none; }
details.qa[open] summary::before { content: '\2212'; }
details.qa .a { color: var(--dim); font-size: .94rem; padding: 12px 0 0 28px; max-width: 74ch; }

/* ---------- token ---------- */

.ca {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: .86rem;
  padding: 16px 18px; border-radius: 12px;
  border: 1px dashed rgba(245, 184, 65, .38); background: var(--signal-dim); color: var(--signal);
}

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line); padding-block: 40px; color: var(--dimmer); font-size: .84rem; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer .wrap .foot-mark + span { margin-left: -10px; }
footer a:hover { color: var(--text); }

/* ---------- scroll reveal (GSAP adds .in) ---------- */

.rise { opacity: 0; transform: translateY(26px); }
.rise.in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; } }

.hide { display: none !important; }

/* ---------- narrow screens ---------- */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-in { gap: 12px; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 16px; }
  #pulse-chip { display: none; }
  .verdict-head { padding: 18px; gap: 14px; }
  .verdict-body { padding: 18px; }
  .gauge { width: 72px; height: 72px; }
  .gauge svg { width: 72px; height: 72px; }
  .gauge .num { font-size: 1.15rem; }
  .feed-row { flex-wrap: wrap; gap: 8px 12px; }
  .feed-act { margin-left: 0; width: 100%; }
  .film-cap { font-size: .8rem; }
  footer .wrap span:last-child { margin-left: 0; }
}


/* ---------- menu on phones ---------- */

.nav-mobile { display: none; position: relative; }
.nav-mobile > summary {
  list-style: none; cursor: pointer;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px;
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile[open] > summary { color: var(--signal); border-color: var(--signal); }
.nav-sheet {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 70;
  display: flex; flex-direction: column; gap: 2px; min-width: 190px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px;
}
.nav-sheet a { padding: 10px 12px; border-radius: 8px; font-size: .92rem; color: var(--dim); }
.nav-sheet a:hover { background: var(--paper-2); color: var(--text); }

@media (max-width: 860px) { .nav-mobile { display: block; } }

/* ---------- when JavaScript never arrives ---------- */
/* .rise starts invisible and is revealed by script. If the script is blocked,
   everything below the hero would be a blank page, so opt out entirely. */

@media (scripting: none) { .rise { opacity: 1 !important; transform: none !important; } }

/* ---------- visible focus ---------- */

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 6px; }
.scanrow input:focus-visible { outline: none; }

/* ================= the eye design ================= */

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; line-height: 1.02; }
h1 { font-size: clamp(3.1rem, 7.6vw, 6.6rem); }
h2 { font-size: clamp(2.3rem, 4.8vw, 3.9rem); }
h1 em, h2 em { font-style: italic; }

header.nav { background: rgba(5, 5, 5, .78); }

/* words over a moving field need their own shadow to stay readable */
.hero .kicker, .hero h1, .hero .lede, section h2, section .lede, .sec-label, .charm-note {
  text-shadow: 0 0 28px rgba(0, 0, 0, .9), 0 0 3px rgba(0, 0, 0, .9);
}

/* the hero: the eye owns the top of the screen, the words sit under it */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: clamp(260px, 56vh, 640px);
  padding-bottom: clamp(36px, 6vh, 72px);
  text-align: center;
}
.hero .wrap { display: flex; flex-direction: column; align-items: center; }
.hero .kicker { justify-content: center; }
.hero .kicker::after { content: ''; width: 26px; height: 1px; background: var(--signal); opacity: .6; }
.hero h1 { max-width: 14ch; margin-inline: auto; }
.hero h1 em { color: var(--signal); }
.hero .lede { margin-inline: auto; max-width: 58ch; }
.hero .scanbox { margin-inline: auto; width: 100%; }
.hero .trust { justify-content: center; }
#result { width: 100%; max-width: 980px; text-align: left; }

/* the primary action wears the signal colour: a white block was the only
   achromatic bright surface on the page and read as a different brand */
.btn.primary { background: var(--signal); border-color: var(--signal); color: #14100A; }
.btn.primary:hover { background: #FFC85C; border-color: #FFC85C; filter: none; }

/* surfaces let the field glow through without a blur that would repaint every frame */
.card, .verdict { background: linear-gradient(180deg, rgba(20, 20, 21, .86), rgba(10, 10, 10, .9)); }
.check, .feed-row, .feed-empty, .stat { background: rgba(10, 10, 10, .82); }
.film { background: rgba(10, 10, 10, .9); }
.scanrow input { background: rgba(20, 20, 21, .92); }

/* the record opens on an empty stage where the eye gathers again */
.record { padding-top: 0; }
.record-stage { height: 80vh; }
.no-webgl .record-stage { display: none; }

/* ---------- the oldest portent: a moon that turns ---------- */

.charm {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding-block: 0;
  overflow: hidden;
}
.charm-stage { position: absolute; inset: 0; z-index: 0; }
#moon-canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.1s ease; }
.moon-ready #moon-canvas { opacity: 1; }
.charm-copy { position: relative; z-index: 2; pointer-events: none; }
.charm-copy > * { max-width: 31rem; }
.charm-copy h2 em { color: var(--signal); }
.charm-copy .lede { margin-top: 18px; }
.charm-note { color: var(--dimmer); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 22px; }
.no-webgl .charm { min-height: 0; padding-block: clamp(64px, 9vw, 116px); }
@media (max-width: 860px) {
  .charm { align-items: end; min-height: 115vh; }
  .charm-copy { padding-bottom: 56px; }
  .charm-copy > * { max-width: none; }
}

/* the input comes straight after the headline: the scanner is the product and
   has to sit above the fold, with the eye still taking most of the screen */
.hero { padding-top: clamp(250px, 50vh, 600px); }
.hero h1 { font-size: clamp(2.9rem, 6.3vw, 5.6rem); }
.hero .scanbox { margin-top: 28px; }
.hero .scanbox .lede { margin: 22px auto 0; max-width: 60ch; font-size: clamp(1rem, 1.35vw, 1.1rem); }
.hero .trust { margin-top: 14px; }

/* phones: a header that fits on one line, a kicker that does not break */
@media (max-width: 520px) {
  .nav-in { gap: 8px; }
  .nav-right { gap: 6px; }
  #connect { white-space: nowrap; padding: 8px 12px; }
  .hero .kicker { letter-spacing: .12em; font-size: .66rem; }
  .hero .kicker::before, .hero .kicker::after { width: 14px; }
}
@media (max-width: 380px) {
  .hero .kicker::before, .hero .kicker::after { display: none; }
}

/* ================= fixes after review ================= */

/* the canvas follows the large viewport on phones, so the address bar sliding
   in and out neither stretches the eye nor makes it jump */
#eye-canvas { width: 100%; height: 100vh; height: 100lvh; }

/* the nav blur recomputed every frame over the moving field; a solid bar is
   indistinguishable at this opacity */
header.nav { backdrop-filter: none; background: rgba(5, 5, 5, .92); }

/* the crowd passes under the text: give reading surfaces more body */
.feed-row, .feed-empty, .stat { background: rgba(10, 10, 10, .92); }
.check { background: linear-gradient(180deg, rgba(20, 20, 21, .94), rgba(10, 10, 10, .96)); }
.card, .verdict { background: linear-gradient(180deg, rgba(20, 20, 21, .94), rgba(10, 10, 10, .96)); }

.charm-copy { pointer-events: auto; }

/* short laptop screens and phones held sideways: the scanner stays on screen */
@media (max-height: 760px) and (min-width: 561px) {
  .hero { padding-top: clamp(190px, 38vh, 420px); }
  .hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
}
@media (max-height: 500px) {
  .hero { min-height: 0; padding-top: 30vh; }
  .hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
}

/* captions that depend on having a cursor */
.on-touch { display: none; }
@media (hover: none) {
  .on-hover { display: none; }
  .on-touch { display: inline; }
}

/* no 3D at all: an ordinary page, no empty stages */
.no-webgl .hero { min-height: 0; padding-top: clamp(64px, 9vw, 110px); }
.no-moon .charm { min-height: 0; padding-block: clamp(64px, 9vw, 116px); }
.no-moon .charm-stage, .no-moon .charm-note { display: none; }

/* the status dot sits beside the first line instead of wrapping onto its own */
.ca { flex-wrap: nowrap; align-items: flex-start; }
.ca .dot { margin-top: .55em; }

/* ================= type: Bricolage Grotesque ================= */
/* A grotesque with character - ink traps at display sizes, a slightly
   hand-cut feel - next to the Instrument Serif headlines. Optical size is
   automatic, so body text gets the calm cut and big numbers the lively one. */
:root {
  --sans: 'Bricolage Grotesque', ui-sans-serif, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
}
body { font-optical-sizing: auto; letter-spacing: -.004em; }
.lede { letter-spacing: -.008em; }
.brand { font-weight: 750; letter-spacing: .01em; font-size: 1.12rem; }
.stat-v { font-weight: 650; letter-spacing: -.03em; }
.verdict-name, .agent-name { font-weight: 700; letter-spacing: -.01em; }
.verdict-word { font-weight: 650; }
.btn { font-weight: 600; letter-spacing: -.005em; }
.check h3 { letter-spacing: .06em; }

/* ================= alive: loops, verdict scale, ticker, word reveals ================= */

/* short loops that show what each block describes */
video.loop { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #050505; }
.check, .agent { overflow: hidden; }
.check video.loop { width: calc(100% + 44px); max-width: none; margin: -22px -22px 18px; border-bottom: 1px solid var(--line); }
.agent video.agent-loop { width: calc(100% + 52px); max-width: none; margin: -26px -26px 22px; border-bottom: 1px solid var(--line); }
.bag-grid { align-items: center; gap: 34px; }
.token-card { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 34px; align-items: center; }
.token-card video.coin { width: 270px; aspect-ratio: 1; border-radius: 20px; border: 1px solid var(--line); }
@media (max-width: 760px) {
  .token-card { grid-template-columns: 1fr; }
  .token-card video.coin { width: 210px; margin: 0 auto; order: -1; }
}

/* the six verdicts */
@property --fill { syntax: '<number>'; inherits: false; initial-value: 0; }
.verdicts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
@media (max-width: 1100px) { .verdicts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .verdicts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vt {
  padding: 18px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(10, 10, 10, .985); transition: border-color .25s ease;
}
.vt:hover { border-color: color-mix(in srgb, var(--vc) 55%, transparent); }
.vt-ring {
  --fill: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: conic-gradient(var(--vc) calc(var(--fill) * 360deg), rgba(255, 255, 255, .08) 0);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 58%);
          mask: radial-gradient(circle, transparent 56%, #000 58%);
  transition: --fill 1.1s cubic-bezier(.2, .8, .2, 1) .2s;
}
.vt.in .vt-ring { --fill: var(--p); }
.vt-name { margin-top: 12px; font-weight: 700; letter-spacing: .08em; font-size: .92rem; color: var(--vc); }
.vt-when { margin-top: 4px; font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; text-transform: uppercase; color: var(--dimmer); line-height: 1.45; min-height: calc(3 * 1.45em); }
.vt p { margin: 10px 0 0; font-size: .86rem; line-height: 1.45; color: var(--dim); }

/* live ticker: chain and record data scrolling under the hero */
.ticker {
  position: relative; z-index: 1; margin-bottom: 44px; display: flex; align-items: center;
  border-block: 1px solid var(--line); background: rgba(8, 8, 8, .88);
}
.ticker-view {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: tick var(--tick-dur, 45s) linear infinite; }
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track,
.ticker.paused .ticker-track { animation-play-state: paused; }
.tk-toggle {
  flex: none; width: 32px; height: 32px; margin: 0 12px 0 4px; border-radius: 8px;
  border: 1px solid var(--line-2); background: transparent; color: var(--dim);
  display: grid; place-items: center; cursor: pointer; transition: color .18s, border-color .18s;
}
.tk-toggle:hover, .tk-toggle:focus-visible { color: var(--text); border-color: var(--signal); }
.tk-ico { width: 9px; height: 11px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.ticker.paused .tk-ico { width: 0; height: 0; border-right: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.tk {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 0 12px 28px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); white-space: nowrap;
}
.tk::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--signal); opacity: .55; margin-left: 28px; }
.tk b { color: var(--text); font-weight: 500; }
.tk .dot { color: var(--safe); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .tk-toggle { display: none; } }

/* iOS in Low Power Mode refuses autoplay and draws its own play button over a
   decorative loop; the poster is the fallback there */
video.loop::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* headings arrive word by word */
.split .w {
  display: inline-block; opacity: 0; transform: translateY(.42em); filter: blur(5px);
  transition: opacity .6s ease, transform .75s cubic-bezier(.2, .8, .2, 1), filter .6s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}
.split.in .w { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .split .w { opacity: 1; transform: none; filter: none; transition: none; } }
.vt.rise.in { transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .45s cubic-bezier(.2,.7,.3,1), border-color .25s ease; }
.vt.no-score .vt-ring { background: none; border: 3px dashed color-mix(in srgb, var(--vc) 55%, transparent); box-sizing: border-box; -webkit-mask: none; mask: none; }
.vt:nth-child(2) .vt-ring { transition-delay: .3s; }
.vt:nth-child(3) .vt-ring { transition-delay: .4s; }
.vt:nth-child(4) .vt-ring { transition-delay: .5s; }
.vt:nth-child(5) .vt-ring { transition-delay: .6s; }
.vt:nth-child(6) .vt-ring { transition-delay: .7s; }
@media (prefers-reduced-motion: reduce) { .vt-ring { transition: none; } }

/* a wallet row that has been read shows its verdict in place of "Read it" */
.btn.vpill { border-color: currentColor; border-radius: 999px; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; font-weight: 500; }
.btn.vpill:hover { background: transparent; filter: brightness(1.15); }

/* the small moving picture on each verdict tile: what the word means, in motion */
.vt-top { display: flex; align-items: center; gap: 10px; }
.vt-fx { width: 54px; height: 30px; flex: none; color: var(--vc); margin-left: auto; overflow: visible; }
.vt-fx .fx-lines rect { fill: currentColor; opacity: .35; }
.fx-safe .fx-sweep { fill: currentColor; animation: fx-sweep 2.6s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes fx-sweep { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(48px); opacity: 0; } }
.fx-caution .fx-needle { transform-box: fill-box; transform-origin: bottom center; animation: fx-needle 2.4s ease-in-out infinite; }
@keyframes fx-needle { 0%, 100% { transform: rotate(-38deg); } 50% { transform: rotate(34deg); } }
.fx-danger .fx-flash { fill: currentColor; animation: fx-flash 1.5s steps(1, end) infinite; }
@keyframes fx-flash { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .45; } }
.fx-rug .fx-drain { transform-box: fill-box; transform-origin: bottom center; animation: fx-drain 2.8s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes fx-drain { 0%, 18% { transform: scaleY(1); opacity: .85; } 55%, 72% { transform: scaleY(.04); opacity: .5; } 100% { transform: scaleY(1); opacity: .85; } }
.fx-cust .fx-bolt { transform-box: fill-box; transform-origin: bottom center; animation: fx-bolt 3s ease-in-out infinite; }
@keyframes fx-bolt { 0%, 30% { transform: translateY(0); } 50%, 70% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
.fx-unproven .fx-spin { transform-box: fill-box; transform-origin: center; animation: fx-spin 5s linear infinite; opacity: .75; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vt-fx * { animation: none !important; } }

footer .foot-mark { height: 18px; width: auto; display: block; opacity: .9; }

/* ---------- wallet dialog ---------- */

/* the gutter stays when the dialog locks scrolling, so the page does not jump sideways */
html { scrollbar-gutter: stable; }
html.wm-open { overflow: hidden; }
.wm {
  padding: 0; margin: auto; border: 1px solid var(--line-2); border-radius: 16px;
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto;
  background: linear-gradient(180deg, #151516 0%, var(--paper) 100%); color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65), 0 0 0 1px rgba(245, 184, 65, .05);
}
.wm::backdrop { background: rgba(3, 3, 3, .66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.wm[open] { animation: wm-in .22s cubic-bezier(.2, .7, .3, 1); }
@keyframes wm-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wm[open] { animation: none; } }
.wm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 4px 20px; }
.wm-head h3 { margin: 0; font-family: var(--display); font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.wm-x {
  width: 32px; height: 32px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line-2); border-radius: 9px; background: transparent; color: var(--dim);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.wm-x:hover, .wm-x:focus-visible { color: var(--text); border-color: var(--signal); }
.wm-body { display: grid; gap: 8px; padding: 12px 20px 4px; }
.wm-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--ink-2); color: var(--text);
  font: 600 .95rem var(--sans); text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.wm-opt:hover { border-color: var(--signal); background: var(--signal-dim); }
.wm-opt:focus-visible { border-color: var(--signal); background: var(--signal-dim); outline: 2px solid var(--signal); outline-offset: 2px; }
.wm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wm-title:focus { outline: none; }
.wm-opt img, .wm-ico { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.wm-ico { display: grid; place-items: center; background: var(--paper-2); border: 1px solid var(--line); font: 600 .78rem var(--mono); color: var(--dim); }
.wm-tag { margin-left: auto; font: 500 .64rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--safe); }
.wm-go { margin-left: auto; color: var(--dim); }
.wm-note { margin: 2px 0 4px; color: var(--dim); font-size: .88rem; line-height: 1.55; }
.wm-note.err { color: var(--danger); }
.wm-note.ok { color: var(--safe); font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.wm-sub { margin: 10px 0 0; font: 500 .66rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dimmer); }
.wm-install { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.wm-install .wm-sub { flex-basis: 100%; }
.wm-link { color: var(--dim); font-size: .88rem; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.wm-link:hover { color: var(--signal); text-decoration-color: currentColor; }
.wm-wait {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--dim); font-size: .9rem; line-height: 1.5;
}
.wm-wait .spin { margin-top: 3px; flex: none; }
.wm-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); }
.wm-addr { font: 500 .84rem var(--mono); word-break: break-all; user-select: all; -webkit-user-select: all; line-height: 1.45; }
.wm-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.wm-row .btn { flex: 1 1 auto; }
.wm-row .btn.primary { flex-basis: 100%; }
.wm-foot { margin: 16px 0 0; padding: 12px 20px 18px; border-top: 1px solid var(--line); color: var(--dimmer); font-size: .78rem; line-height: 1.55; }
.wm-ta { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
#connect.is-on { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; }
