/* CLOAK design system — one stylesheet for every page. */
/* Inter (variable, 100–900), self-hosted: no third-party request can block rendering. SIL Open Font License. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/a/inter-latin.3100e775e8.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/a/inter-latin-ext.34b9c504ca.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --bg: #fbfaf9;
  --card: #ffffff;
  --ink: #0c0c0e;
  --ink-2: #2a2a30;
  --muted: #6e6e78;
  --faint: #9a9aa3;
  --line: #ececef;
  --line-2: #e3e3e8;
  --soft: #f6f5f3;
  --live: #22c55e;
  --ending: #f5b21b;
  --gold: #f6b93b;
  --gold-soft: #fff6dc;
  --pink: #ec4f8c;
  --blue: #3b82f6;
  --good: #16a34a;
  --bad: #dc2626;
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 10px 30px rgba(16, 16, 24, 0.06);
  --shadow-lg: 0 2px 6px rgba(16, 16, 24, 0.06), 0 24px 60px rgba(16, 16, 24, 0.12);
  --progress: linear-gradient(90deg, #8fd3ff, #a5b4fc 55%, #c4b5fd);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #e9e4ff; }

/* ---------- ambient glow blobs ---------- */
.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.glow i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.glow i:nth-child(1) { width: 520px; height: 520px; left: 58%; top: -160px; background: radial-gradient(circle, #ffd1e6, transparent 65%); }
.glow i:nth-child(2) { width: 460px; height: 460px; left: 72%; top: 120px; background: radial-gradient(circle, #d6ccff, transparent 65%); }
.glow i:nth-child(3) { width: 420px; height: 420px; left: -140px; top: 640px; background: radial-gradient(circle, #cfe3ff, transparent 65%); }
.glow i:nth-child(4) { width: 380px; height: 380px; right: -120px; top: 1200px; background: radial-gradient(circle, #ffe0cc, transparent 65%); }
main, header.nav, footer.foot { position: relative; z-index: 1; }
main { overflow-x: clip; }
html { overflow-x: hidden; }

/* ---------- layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.wrap-wide { max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.row { display: flex; gap: 16px; align-items: center; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.side { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.sp-8 { height: 8px; } .sp-16 { height: 16px; } .sp-24 { height: 24px; } .sp-40 { height: 40px; } .sp-64 { height: 64px; }
.hide { display: none !important; }

/* ---------- type ---------- */
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.h-hero { font-size: 104px; line-height: 0.92; font-weight: 900; letter-spacing: -0.05em; margin: 10px 0 12px; }
.h1 { font-size: 52px; line-height: 1.02; font-weight: 850; letter-spacing: -0.035em; margin: 0; }
.h2 { font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.h3 { font-size: 18px; font-weight: 750; letter-spacing: -0.01em; margin: 0; }
.lead { font-size: 18px; color: var(--muted); margin: 6px 0 0; }
.sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.small { font-size: 12.5px; color: var(--muted); }
.tiny { font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.strong { font-weight: 700; }
.upper { text-transform: uppercase; letter-spacing: 0.08em; }
.num { font-variant-numeric: tabular-nums; }
.good { color: var(--good); } .bad { color: var(--bad); } .muted { color: var(--muted); }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- nav ---------- */
header.nav { position: sticky; top: 0; z-index: 30; background: rgba(251, 250, 249, 0.82); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(0, 0, 0, 0.04); }
header.nav .inner { height: 66px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo svg { width: 46px; height: 32px; }
.logo .word { display: flex; flex-direction: column; line-height: 1; }
.logo .word b { font-size: 25px; font-weight: 900; letter-spacing: -0.02em; }
.logo .word small { font-size: 6.6px; letter-spacing: 0.32em; font-weight: 700; margin-top: 2px; }
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--ink-2); }
.nav-links a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a.on { font-weight: 700; border-color: var(--ink); }
.nav-search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-search + .nav-right { margin-left: 0; }
.who { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 13.5px; position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 40; }
.menu.open { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--soft); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font-weight: 650; font-size: 14px; cursor: pointer; transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s; white-space: nowrap; }
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: #1f1f24; }
.btn.lg { height: 52px; padding: 0 30px; font-size: 15px; border-radius: 14px; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn .arr::after { content: '→'; font-weight: 700; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.link { font-weight: 650; border-bottom: 1px solid currentColor; cursor: pointer; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; padding: 0 14px; outline: none; transition: border 0.15s, box-shadow 0.15s; }
.textarea { height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #c9c9d2; box-shadow: 0 0 0 4px rgba(120, 120, 140, 0.08); }
.search { position: relative; }
.search .input { padding-left: 40px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); }
.search::before { content: ''; position: absolute; left: 15px; top: 50%; width: 13px; height: 13px; border: 2px solid var(--faint); border-radius: 50%; transform: translateY(-62%); }
.search::after { content: ''; position: absolute; left: 27px; top: 58%; width: 6px; height: 2px; background: var(--faint); transform: rotate(45deg); }
.guessbar { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 6px 6px 6px 18px; align-items: center; box-shadow: var(--shadow); }
.guessbar input { flex: 1; min-width: 0; border: 0; outline: none; height: 44px; background: transparent; font-size: 15px; }
.guessbar .go { width: 48px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; border: 0; cursor: pointer; font-size: 18px; font-weight: 700; }
.guessbar .go[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- chips, tabs, segmented ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.dark { background: rgba(10, 10, 14, 0.55); color: #fff; border-color: rgba(255, 255, 255, 0.18); backdrop-filter: blur(6px); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.chip.ending .dot { background: var(--ending); box-shadow: 0 0 0 3px rgba(245, 178, 27, 0.25); }
.chip.solved .dot { background: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25); }
.chip.revealed .dot { background: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.chip.gold { background: var(--gold-soft); border-color: #f6e1a6; color: #8a5a00; }
.chip.green { background: #e9f9ef; border-color: #c4ecd3; color: #14803d; }
.chip.soft { background: var(--soft); }
.tabs { display: inline-flex; gap: 4px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tabs button, .tabs a { border: 0; background: none; padding: 8px 16px; border-radius: 10px; font-weight: 650; font-size: 13px; color: var(--muted); cursor: pointer; letter-spacing: 0.02em; }
.tabs .on { background: var(--ink); color: #fff; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 11px 22px; font-weight: 750; font-size: 13px; letter-spacing: 0.04em; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; }

/* ---------- cards ---------- */
.card { background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.card.pad { padding: 22px 24px; }
.card.tight { padding: 16px 18px; }
.card.flat { box-shadow: none; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat span { font-size: 12px; color: var(--muted); }
.stats-row { display: flex; gap: 28px; flex-wrap: wrap; }
.stats-split { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.stats-split > * { padding: 4px 16px; border-left: 1px solid var(--line); text-align: center; }
.stats-split > *:first-child { border-left: 0; }
.statcard { display: flex; gap: 14px; align-items: center; padding: 18px 20px; }
.statcard .ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; flex: none; }
.statcard b { white-space: nowrap; font-size: 24px; font-weight: 850; letter-spacing: -0.02em; display: block; line-height: 1.05; }
.statcard .t { font-weight: 650; font-size: 14px; }
.statcard .d { font-size: 12px; color: var(--muted); }

/* ---------- generated mystery art (never derived from a real identity) ---------- */
.art { position: relative; overflow: hidden; background: #2b2540; isolation: isolate; }
.art .blob { position: absolute; inset: -12%; filter: blur(16px) saturate(1.3); }
.art .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 8, 20, 0) 35%, rgba(10, 8, 20, 0.62) 100%); }
.art.light .shade { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, rgba(10, 8, 20, 0.3) 100%); }
.art img.real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art .grain { position: absolute; inset: 0; opacity: 0.18; mix-blend-mode: overlay; background-image: radial-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px); background-size: 3px 3px; }

/* ---------- cloak card ---------- */
.cc { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); color: #fff; aspect-ratio: 1 / 0.9; display: block; border: 1px solid rgba(255, 255, 255, 0.4); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.cc:hover { transform: translateY(-3px); box-shadow: 0 30px 70px rgba(16, 16, 24, 0.18); }
.cc .art { position: absolute; inset: 0; }
.cc .top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; }
.cc .bottom { position: absolute; left: 16px; right: 16px; bottom: 14px; }
.cc .q { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.cc .meta { font-size: 12.5px; opacity: 0.92; margin-top: 4px; }
.cc .pct { text-align: right; }
.cc .pct b { font-size: 24px; font-weight: 850; display: block; line-height: 1; }
.cc .pct small { font-size: 9.5px; letter-spacing: 0.14em; font-weight: 700; opacity: 0.85; }
.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--progress); }
.bar.light { background: var(--soft); }
.cc.hero { aspect-ratio: auto; height: 100%; min-height: 360px; border-radius: 26px; border: 6px solid rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 40px 90px rgba(120, 80, 200, 0.25), 0 0 120px rgba(255, 130, 200, 0.25); }
.cc.hero .q { font-size: 44px; }
.cc.hero .pct b { font-size: 36px; }
.cc.sm .q { font-size: 20px; }
.cc.sm .meta { font-size: 11px; }
.cc.sm .pct b { font-size: 17px; }
.cc.sm .pct small { font-size: 8px; }
.cc.sm .top .chip { height: 22px; font-size: 10px; padding: 0 8px; }
.cc.sm .bottom { left: 12px; right: 12px; bottom: 10px; }

/* ---------- progress ring ---------- */
.ring { position: relative; width: 116px; height: 116px; margin: 0 auto; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .art { position: absolute; inset: 12px; border-radius: 50%; }
.ringcard { text-align: center; padding: 20px 14px 14px; }
.ringcard .pct { font-size: 22px; font-weight: 850; margin-top: 10px; }

/* ---------- avatars ---------- */
.av { border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; background: #ddd; }
.av img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- lists & tables ---------- */
.list > * { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 550; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl tr.me td, .tbl tr.first td { background: #fffaea; }
.tbl tr:hover td { background: #fbfbfc; }
.rankpill { display: inline-grid; place-items: center; min-width: 30px; height: 24px; border-radius: 8px; font-weight: 750; font-size: 13px; background: var(--soft); padding: 0 6px; }
.rankpill.r1 { background: #fff1c2; color: #8a5a00; } .rankpill.r2 { background: #e7ecf7; color: #2c3e66; } .rankpill.r3 { background: #fbe4dc; color: #8c3a1a; }

/* ---------- clue rows ---------- */
.clue { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.clue .n { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; flex: none; background: var(--soft); font-size: 15px; }
.clue.locked { background: #f7f7f8; color: var(--muted); }
.clue.locked .n { background: #ececf0; }
.clue .thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex: none; }
.clue .thumb img { width: 100%; height: 100%; object-fit: cover; }
.clue .t { font-weight: 650; }
.clue .k { font-size: 11px; letter-spacing: 0.1em; font-weight: 700; color: var(--faint); }
.lock::before { content: '🔒'; font-size: 12px; margin-right: 4px; }

/* ---------- stepper ---------- */
.stepper { display: flex; gap: 6px; padding: 6px; background: rgba(255, 255, 255, 0.8); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.stepper button { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 12px; border-radius: 11px; font-size: 12px; font-weight: 750; letter-spacing: 0.08em; color: var(--faint); cursor: pointer; white-space: nowrap; }
.stepper button i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); font-size: 12px; }
.stepper button.on { color: var(--ink); }
.stepper button.on i { background: #3b6cf6; color: #fff; }
.stepper button.done i { background: var(--ink); color: #fff; }
.stepper button[disabled] { cursor: not-allowed; }

/* ---------- option tiles ---------- */
.tile { border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px; text-align: center; background: #fff; cursor: pointer; transition: border 0.15s, box-shadow 0.15s; }
.tile:hover { box-shadow: var(--shadow); }
.tile .ic { font-size: 22px; height: 30px; }
.tile b { display: block; margin-top: 6px; font-size: 14px; }
.tile small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; line-height: 1.3; }
.tile.on { border: 2px solid #ef4f6b; background: #fff6f7; padding: 15px 11px; }
.tile.on b, .tile.on .ic { color: #e2364f; }
.tile.off { opacity: 0.45; cursor: not-allowed; }
.radio-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; background: #fff; }
.radio-card .rd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfcfd6; flex: none; margin-top: 2px; }
.radio-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.radio-card.on .rd { border: 7px solid var(--ink); }

/* ---------- checklists, banners, toasts ---------- */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.check .b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid #d4d4da; color: #fff; font-size: 13px; font-weight: 900; }
.check.ok .b { background: var(--good); border-color: var(--good); }
.check.ok .b::after { content: '✓'; }
.check.run .b { border-color: var(--blue); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.check b { display: block; font-size: 14px; }
.check small { color: var(--muted); font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { border-radius: 14px; padding: 12px 16px; font-size: 14px; border: 1px solid; }
.banner.err { background: #fff3f3; border-color: #f7cfcf; color: #9d1c1c; }
.banner.ok { background: #effaf3; border-color: #c9ecd6; color: #126b35; }
.banner.info { background: #f3f6ff; border-color: #d8e1fb; color: #23407d; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 100; box-shadow: var(--shadow-lg); font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; border: 1px dashed var(--line-2); border-radius: 18px; background: rgba(255, 255, 255, 0.6); }
.skel { background: linear-gradient(90deg, #f1f1f3, #f8f8f9, #f1f1f3); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(12, 12, 16, 0.35); backdrop-filter: blur(4px); z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: 22px; width: 100%; max-width: 440px; padding: 24px; box-shadow: var(--shadow-lg); }
.walletopt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; margin-top: 10px; font-weight: 650; text-align: left; }
.walletopt:hover { background: var(--soft); }

/* ---------- footer ---------- */
footer.foot { border-top: 1px solid var(--line); margin-top: 80px; padding: 26px 0 40px; }
footer.foot .inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--muted); }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; }
.docnav { position: sticky; top: 86px; align-self: start; padding-right: 8px; font-size: 13.5px; }
.docnav h5 { margin: 18px 0 6px; font-size: 12.5px; font-weight: 750; display: flex; gap: 8px; align-items: center; }
.docnav a { display: block; padding: 6px 10px; border-radius: 9px; color: var(--ink-2); }
.docnav a.on { background: #eceefe; color: #2f3db8; font-weight: 650; }
.prose { max-width: 820px; }
.prose h1 { font-size: 44px; font-weight: 850; letter-spacing: -0.03em; margin: 8px 0 6px; }
.prose h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.prose code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: 13px; }

/* ---------- page details ---------- */
/* Investigation mystery card: square-ish, never taller than the reference proportion. */
.cc.hero.inv-hero { height: auto; min-height: 0; aspect-ratio: 1 / 1.06; max-height: 640px; }
/* Docs overview illustration stays inside its card. */
.docs-orb { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); width: min(300px, 32%); aspect-ratio: 1; border-radius: 50%; overflow: hidden; opacity: 0.92; }
/* Leaderboard recent first solves: compact rows. */
.rfs-art { width: 64px; height: 64px; }
.tbl td b, .tbl td { overflow-wrap: normal; }
.tbl td:last-child { white-space: nowrap; }

/* ---------- official $CLOAK bar ---------- */
.offbar { background: #0c0c0e; color: #fff; position: relative; z-index: 31; min-height: 40px; }
.offbar-in { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 16px; font-size: 13px; letter-spacing: 0.02em; text-align: center; }
.offbar b { font-weight: 800; letter-spacing: 0.03em; }
.offbar .soft { font-weight: 500; letter-spacing: 0.04em; }
.offbar .sep { opacity: 0.4; }
.offbar .spark { display: inline-flex; }
.offbar .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; letter-spacing: 0; }
.offbar .offbtn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 9px; padding: 5px 11px; font: inherit; font-weight: 650; cursor: pointer; }
.offbar .offbtn:hover { background: rgba(255, 255, 255, 0.22); }
.offbar.preview { border-radius: 12px; overflow: hidden; }

/* ---------- admin control center ---------- */
.adm { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; padding-top: 26px; padding-bottom: 60px; align-items: start; }
.adm-nav { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 4px; }
.adm-title { font-weight: 850; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 12px 10px; }
.adm-title small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.adm-nav a:hover { background: rgba(0, 0, 0, 0.04); }
.adm-nav a.on { background: #0c0c0e; color: #fff; }
.adm-who { margin: 16px 0 0 12px; }
.adm-head { margin-bottom: 16px; align-items: flex-end; }
.adm-head .h2 { font-size: 30px; }
.adm-stat { padding: 16px 18px; }
.adm-stat > b { display: block; font-size: 28px; font-weight: 850; letter-spacing: -0.02em; margin: 4px 0 2px; overflow-wrap: anywhere; }
.adm-stat > b.long { font-size: 19px; line-height: 1.25; margin: 8px 0 4px; }
.adm-stat .small b { font-weight: 750; color: var(--ink); }
.adm-audit td:first-child { white-space: nowrap; }
.adm-stat.ok { box-shadow: inset 3px 0 0 #16a34a, var(--shadow); }
.adm-stat.bad { box-shadow: inset 3px 0 0 #e11d48, var(--shadow); }
.adm-stat.live { box-shadow: inset 3px 0 0 #6d5dfc, var(--shadow); }
.adm-ready-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; margin-top: 10px; }
.adm-ready-grid > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.adm-ready-grid > div > span { color: var(--muted); }
.adm-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 16px; align-items: start; }
.adm-live { display: flex; align-items: center; gap: 8px; background: #0c0c0e; color: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 800; letter-spacing: 0.06em; margin-bottom: 16px; }
.adm-kv { display: grid; gap: 0; }
.adm-kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line, #eee); font-size: 13.5px; }
.adm-kv > div:last-child { border-bottom: 0; }
.adm-kv span { color: var(--muted); }
.adm-kv b { font-weight: 600; overflow-wrap: anywhere; }
.adm-toolbar { gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.adm-toolbar .seg button { padding: 8px 10px; font-size: 12px; }
.adm-tablecard { padding: 4px 6px; overflow-x: auto; }
.adm-tbl { font-size: 13px; min-width: 980px; }
.adm-tbl td, .adm-tbl th { padding: 9px 8px; vertical-align: top; }
.adm-tbl tbody tr { cursor: pointer; }
.adm-tbl tbody tr:hover { background: #faf9ff; }
.adm-audit td { vertical-align: top; }
.adm-pre { background: var(--soft); border-radius: 12px; padding: 12px; font-size: 12px; overflow: auto; margin-top: 12px; }
.adm-denied { max-width: 440px; text-align: center; display: grid; justify-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.chip.ok { color: #15803d; background: #e8f7ee; }
.chip.bad { color: #be123c; background: #ffe8ee; }
.chip.warn { color: #a16207; background: #fff4d6; }
.chip.live { color: #4c3ee0; background: #eeecff; }
.btn.danger { color: #be123c; }
.btn.ghost { background: transparent; box-shadow: none; }
.select.sm { height: 34px; padding: 0 10px; font-size: 13px; }
.tbl.compact td, .tbl.compact th { padding: 7px 6px; font-size: 12.5px; }
.drawer-bg { position: fixed; inset: 0; background: rgba(12, 12, 14, 0.28); z-index: 60; display: flex; justify-content: flex-end; }
.drawer { width: min(640px, 100vw); height: 100%; overflow-y: auto; background: #fff; padding: 22px 24px 40px; box-shadow: -20px 0 60px rgba(0, 0, 0, 0.18); }
.dactions { background: var(--soft); border-radius: 14px; padding: 12px; margin: 12px 0 6px; }
.dactions details.adv { margin-top: 10px; }
.dactions summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.dsec { padding: 14px 0; border-bottom: 1px solid var(--line, #eee); }
.dsec h3 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.dscroll { max-height: 260px; overflow: auto; }

/* ---------- responsive ----------
   Desktop/laptop (>1100px): the reference multi-column layouts.
   Small laptop (901-1100px): same layouts, widest grids trimmed, narrower sidebars.
   Tablet (721-900px): two columns, sidebars stack.  Phone (<=720px): one column. */
@media (max-width: 1100px) {
  .rfs-art { width: 48px; height: 48px; }
  .rfs .rfs-bounty { display: none; }
  .docs-orb { display: none; }
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Five stats stay in one row: icon above the value instead of beside it. */
  .statcard { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side, main .side[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) 320px !important; }
  .h-hero { font-size: 76px; }
  .nav-search { display: none; }
}
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .adm-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .adm-title, .adm-who { display: none; }
  .adm-split { grid-template-columns: 1fr; }
  .adm-ready-grid { grid-template-columns: 1fr; }
  .g4, .g5, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side { grid-template-columns: 1fr; }
  main [style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  main .side[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .docs { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 720px) {
  .wrap, .wrap-wide { padding: 0 16px; }
  .docs-orb { display: none; }
  .cc.hero.inv-hero { aspect-ratio: 1 / 1; }
  .offbar-in { font-size: 11.5px; gap: 8px; padding: 6px 12px; row-gap: 4px; flex-wrap: wrap; }
  .offbar .soft { font-size: 10.5px; }
  .offbar .sep { display: none; }
  .offbar a.offbtn { display: none; }
  /* Page layouts set their desktop columns inline; on phones everything stacks. */
  main [style*="grid-template-columns"], main .grid { grid-template-columns: 1fr !important; }
  main [style*="grid-auto-flow:column"] { grid-auto-flow: row !important; grid-template-rows: none !important; grid-auto-rows: 150px; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  main [style*="grid-auto-flow:column"] > * { grid-row: span 1 !important; }
  main [style*="min-width:"] { min-width: 0 !important; }
  .cc.hero { min-height: 340px !important; }
  .cc.hero .q, .h1 { font-size: 34px !important; }
  .stats-row { gap: 18px; }
  .stats-split > * { padding: 6px 8px; }
  .row { flex-wrap: wrap; }
  .nav-links { display: flex; gap: 14px; font-size: 13px; order: 3; width: 100%; overflow-x: auto; }
  header.nav .inner { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; gap: 10px; }
  .nav-right { margin-left: auto; }
  footer.foot .inner { flex-direction: column; align-items: flex-start; }
  .tbl th:nth-child(n+5), .tbl td:nth-child(n+5) { display: none; }
  .seg button { padding: 10px 12px; }
  .stepper button { flex: none; }
}
@media (max-width: 720px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  /* Card rows (4-6 across on desktop) keep two per row on phones. */
  main .g4, main .g5, main .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  main :is(.g4, .g5, .g6) .cc { aspect-ratio: 1 / 1.3; }
  main :is(.g4, .g5, .g6) .cc .q { font-size: 22px; }
  main :is(.g4, .g5, .g6) .cc .meta { font-size: 11px; }
  main :is(.g4, .g5, .g6) .cc .pct b { font-size: 18px; }
  main :is(.g4, .g5, .g6) .cc .top .chip { font-size: 9px; padding: 3px 7px; }
  main :is(.g4, .g5, .g6) .cc .bottom { left: 10px; right: 10px; bottom: 10px; }
  .h1 { font-size: 36px; }
  .h-hero { font-size: 60px; }
  .docs { grid-template-columns: 1fr; }
  .docnav { position: static; max-height: none; }
  .stats-split { grid-auto-flow: row; }
}

/* ---------- official X link ---------- */
.nav-x { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--ink-2); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.7); transition: background 0.15s ease, color 0.15s ease; flex: none; }
.nav-x:hover { background: #fff; color: var(--ink); }
.foot-brand { display: flex; align-items: center; gap: 18px; }
.foot-brand .small { line-height: 1.4; }
.foot-x { display: inline-flex; align-items: center; gap: 6px; }
.foot-x svg { width: 14px; height: 14px; }
.foot-x:hover, .foot-links a:hover { color: var(--ink); }

/* ---------- static examples (illustrations, never data) ---------- */
.cc.ex { cursor: default; }
.cc.ex:hover { transform: none; box-shadow: var(--shadow-lg); }
.ex-art svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ex-art.veiled svg { filter: blur(14px) saturate(1.25); transform: scale(1.25); }
.chip.ex-tag { background: rgba(255, 255, 255, 0.94); color: var(--ink); border-color: transparent; letter-spacing: 0.14em; font-size: 10.5px; }
.ex-thumb { width: 96px; height: 80px; border-radius: 12px; flex: none; }
.unfold { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.unfold-step .k { font-size: 12px; letter-spacing: 0.16em; font-weight: 700; color: var(--faint); margin-bottom: 10px; }
.unfold-step .cap { margin-top: 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.unfold-step .cap b { display: block; font-size: 15px; margin-bottom: 2px; }

/* ---------- starter states (a real section with nothing in it yet) ---------- */
.starter { display: flex; align-items: center; gap: 22px; padding: 24px 26px; border-radius: 22px; background: linear-gradient(115deg, #ffffff 0%, #faf7ff 55%, #fff4f9 100%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.starter-mark { width: 76px; height: 76px; border-radius: 20px; flex: none; position: relative; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffb3d1 0, transparent 45%), radial-gradient(circle at 70% 70%, #9d8cff 0, transparent 50%), linear-gradient(135deg, #2b2540, #4a2a5e); box-shadow: 0 14px 30px rgba(90, 43, 108, 0.25); }
.starter-mark span { color: #fff; font-weight: 900; font-size: 20px; letter-spacing: -0.03em; }
.starter-copy { flex: 1; min-width: 0; }
.starter-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.starter-sub { color: var(--muted); margin-top: 4px; }
.starter-note { color: var(--faint); font-size: 12.5px; margin-top: 8px; }
.starter-cta { margin-top: 14px; }
.starter.compact { padding: 18px 22px; }
.starter.compact .starter-mark { width: 54px; height: 54px; border-radius: 15px; }
.starter.compact .starter-mark span { font-size: 15px; }
.starter.compact .starter-title { font-size: 18px; }
.starter.compact .starter-cta { margin-top: 10px; }
.starter-aside { display: flex; align-items: center; gap: 10px; flex: none; }
.starter-aside .chip { margin-right: 4px; }

/* ---------- SEASON 0 leaderboard (explanatory, no names, ranks or scores) ---------- */
.s0 { margin-top: 40px; }
.s0-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; align-items: start; }
.s0-card { text-align: center; padding: 30px 22px 26px; }
.s0-card .ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--soft); color: var(--ink-2); }
.s0-card .t { font-size: 13px; letter-spacing: 0.16em; font-weight: 800; }
.s0-card .d { color: var(--muted); margin-top: 8px; }
.s0-card.top1 { margin-top: -22px; background: linear-gradient(180deg, #fff8e4, #fff 70%); border-color: #f6e1a6; box-shadow: 0 30px 70px rgba(246, 185, 59, 0.18); }
.s0-card.top1 .ic { background: #fff1c2; color: #b07a00; }
.lb-none { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 16px; }
.unranked { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; }

/* ---------- mainnet proof ---------- */
.proof { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.proof-pair { display: flex; align-items: center; gap: 12px; }
.proof-pair .pa { width: 150px; height: 130px; border-radius: 16px; overflow: hidden; position: relative; }
.proof-pair .pa .lbl { position: absolute; left: 8px; bottom: 8px; z-index: 2; }

@media (max-width: 900px) {
  .unfold { gap: 14px; }
  .unfold-step .cap { font-size: 13.5px; }
}
@media (max-width: 720px) {
  /* Examples become compact rows: small card beside its caption (no tall stack). */
  .unfold { grid-template-columns: 1fr; gap: 12px; }
  .unfold-step { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; align-items: center; }
  .unfold-step .k { grid-column: 1 / -1; margin-bottom: 0; }
  .unfold-step .cc.ex { aspect-ratio: 1 / 1.05; }
  .unfold-step .cc.ex .q { font-size: 20px; }
  .unfold-step .cc.ex .meta { font-size: 9.5px; }
  .unfold-step .cc.ex .top { left: 8px; right: 8px; top: 8px; flex-wrap: wrap; gap: 4px; }
  .unfold-step .cc.ex .top .chip { height: 20px; font-size: 9px; padding: 0 6px; }
  .unfold-step .cc.ex .bottom { left: 10px; right: 10px; bottom: 9px; }
  .unfold-step .cap { margin-top: 0; }
  .starter { flex-wrap: wrap; padding: 20px; gap: 16px; }
  .starter-copy { flex-basis: calc(100% - 92px); }
  .starter-aside { width: 100%; }
  .s0-cards { grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .s0-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); text-align: left; gap: 0 14px; padding: 16px; align-items: center; }
  .s0-card .ic { width: 52px; height: 52px; margin: 0; grid-row: span 2; border-radius: 14px; }
  .s0-card .d { margin-top: 2px; }
  .s0-card.top1 { margin-top: 0; order: -1; }
  .proof { grid-template-columns: 1fr; }
  .proof-pair .pa { width: calc(50% - 20px); height: 120px; }
  .foot-brand { flex-direction: column; align-items: flex-start; gap: 8px; }
  .foot-links { flex-wrap: wrap; gap: 14px 18px !important; }
  .nav-x { width: 34px; height: 34px; }
}
/* Short pages (empty states): the footer sits at the bottom of the window, not mid-screen. */
main#app { min-height: calc(100vh - 290px); }
