/* DeFi on Solana — design system
   Layout: solana.com scale and rhythm on a light Apple/Sanctum canvas. Night hero with aurora,
   1200px column, left-aligned sections. Sanctum-style product cards with Umbra halftone art,
   solana.com hairline tables, Kurate data tables. */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #ececf0;
  --surface: #ffffff;
  --ink: #121214;
  --ink-2: #5d5f6b;
  --ink-3: #8c8e99;
  --line: rgba(18, 18, 20, 0.09);
  --line-2: rgba(18, 18, 20, 0.16);
  --accent: #6a45ff;
  --accent-soft: rgba(106, 69, 255, 0.1);
  --accent-ink: #ffffff;
  --halftone: #5a45ff;
  --dot: rgba(18, 18, 20, 0.07);
  --good: #0c8f61;
  --good-soft: rgba(12, 143, 97, 0.1);
  --warn: #a35f00;
  --warn-soft: rgba(214, 125, 0, 0.12);
  --bad: #cc3b3b;
  --bad-soft: rgba(204, 59, 59, 0.1);
  --info: #2160de;
  --info-soft: rgba(33, 96, 222, 0.1);
  --idle-soft: rgba(93, 95, 107, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.2);
  --nav-bg: rgba(255, 255, 255, 0.78);
  --scrim: rgba(10, 10, 12, 0.36);

  /* night bands (hero, CTA) stay dark in both themes */
  --night: #09090b;
  --night-2: #141418;
  --night-ink: #f4f4f6;
  --night-ink-2: #a5a6b0;
  --night-line: rgba(255, 255, 255, 0.12);
  --sol-violet: #9945ff;
  --sol-mint: #14f195;

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --t-display: clamp(3rem, 7.4vw, 5.5rem);
  --t-h1: clamp(2.5rem, 5.6vw, 4rem);
  --t-h2: clamp(2rem, 4vw, 3rem);
  --t-h3: 1.5rem;
  --t-lead: clamp(1.0625rem, 1.6vw, 1.25rem);
  --t-body: 1.0625rem;
  --t-sm: 0.875rem;
  --t-xs: 0.75rem;
  --maxw: 1200px;
  --nav-h: 56px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0d; --bg-2: #141417; --bg-3: #1d1d22; --surface: #18181c;
    --ink: #f3f3f5; --ink-2: #a2a4af; --ink-3: #747680;
    --line: rgba(255, 255, 255, 0.08); --line-2: rgba(255, 255, 255, 0.16);
    --accent: #9d86ff; --accent-soft: rgba(157, 134, 255, 0.14); --accent-ink: #0d0920;
    --halftone: #8f7bff; --dot: rgba(255, 255, 255, 0.06);
    --good: #3ad79c; --good-soft: rgba(58, 215, 156, 0.12);
    --warn: #ffb44d; --warn-soft: rgba(255, 180, 77, 0.12);
    --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, 0.12);
    --info: #6aa8ff; --info-soft: rgba(106, 168, 255, 0.12); --idle-soft: rgba(162, 164, 175, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.35);
    --nav-bg: rgba(11, 11, 13, 0.75); --scrim: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0d; --bg-2: #141417; --bg-3: #1d1d22; --surface: #18181c;
  --ink: #f3f3f5; --ink-2: #a2a4af; --ink-3: #747680;
  --line: rgba(255, 255, 255, 0.08); --line-2: rgba(255, 255, 255, 0.16);
  --accent: #9d86ff; --accent-soft: rgba(157, 134, 255, 0.14); --accent-ink: #0d0920;
  --halftone: #8f7bff; --dot: rgba(255, 255, 255, 0.06);
  --good: #3ad79c; --good-soft: rgba(58, 215, 156, 0.12);
  --warn: #ffb44d; --warn-soft: rgba(255, 180, 77, 0.12);
  --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, 0.12);
  --info: #6aa8ff; --info-soft: rgba(106, 168, 255, 0.12); --idle-soft: rgba(162, 164, 175, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(11, 11, 13, 0.75); --scrim: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.55; letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 70; background: var(--night); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; }
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }
.tnum, .num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.mono { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; }

.wrap {
  width: 100%; max-width: calc(var(--maxw) + 48px); margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 520px) { .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } }
.narrow { max-width: calc(760px + 48px); }

/* ------------------------------------------------------------------ announcement + nav */
.announce { background: var(--night); color: var(--night-ink-2); font-size: 0.8125rem; position: relative; z-index: 61; }
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: 10px 16px; min-height: 40px; padding-block: 8px; flex-wrap: wrap; text-align: center; }
.announce b { color: var(--night-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.announce a { color: var(--night-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.announce .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sol-mint); box-shadow: 0 0 10px var(--sol-mint); flex: none; }
.announce-x { position: absolute; right: max(12px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); color: var(--night-ink-2); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.announce-x:hover { color: var(--night-ink); background: rgba(255, 255, 255, 0.08); }

.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.nav.on-night { background: rgba(9, 9, 11, 0.6); border-bottom-color: var(--night-line); color: var(--night-ink); }
.nav-in { height: var(--nav-h); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.02em; white-space: nowrap; }
.mark { width: 22px; height: 22px; border-radius: 50%; flex: none; background: conic-gradient(from 210deg, var(--sol-violet), #5d6bff, var(--sol-mint), var(--sol-violet)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.nav-links { display: flex; gap: 4px; margin-left: 12px; font-size: 0.875rem; }
.nav-links a { padding: 7px 12px; border-radius: 999px; color: var(--ink-2); transition: color 0.15s, background 0.15s; }
.nav.on-night .nav-links a { color: var(--night-ink-2); }
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav.on-night .nav-links a:hover { color: var(--night-ink); background: rgba(255, 255, 255, 0.07); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.nav-act { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search-btn { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--bg-2); color: var(--ink-3); font-size: 0.8125rem; min-width: 200px; transition: background 0.15s; }
.nav.on-night .search-btn { background: rgba(255, 255, 255, 0.08); color: var(--night-ink-2); }
.search-btn kbd { margin-left: auto; }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd { font-family: var(--mono); font-size: 0.6875rem; color: inherit; border: 1px solid currentColor; opacity: 0.6; border-radius: 5px; padding: 1px 5px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); transition: background 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.nav.on-night .icon-btn { color: var(--night-ink-2); }
.nav.on-night .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--night-ink); }
.menu-btn { display: none; }
.mobile-menu { border-top: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); display: grid; background: var(--bg); color: var(--ink); }
.mobile-menu a { padding: 12px 4px; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.025em; border-bottom: 1px solid var(--line); }
@media (max-width: 1040px) { .search-btn { min-width: 0; } .search-btn .lbl, .search-btn kbd { display: none; } .search-btn { width: 36px; padding: 0; justify-content: center; background: none !important; } }
@media (max-width: 900px) { .nav-links { display: none; } .menu-btn { display: inline-grid; } }

/* ------------------------------------------------------------------ buttons, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 0.9375rem; font-weight: 500; white-space: nowrap; transition: transform 0.2s var(--ease), background 0.15s, opacity 0.15s, box-shadow 0.15s; }
.btn:active { transform: scale(0.97); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: 0.86; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { opacity: 0.9; }
.btn-soft { background: var(--bg-2); color: var(--ink); }
.btn-soft:hover { background: var(--bg-3); }
.btn-line { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn-night { background: var(--night-ink); color: var(--night); padding-right: 6px; }
.btn-night:hover { background: #fff; }
.btn-night-line { box-shadow: inset 0 0 0 1px var(--night-line); color: var(--night-ink); }
.btn-night-line:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.btn .orb { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: var(--night-ink); margin-left: 2px; }
.btn .orb .ico { width: 14px; height: 14px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; background: var(--bg-2); color: var(--ink-2); }
.chip-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-live, .s-live { color: var(--good); background: var(--good-soft); }
.chip-claim, .s-claim { color: var(--warn); background: var(--warn-soft); }
.chip-recurring, .s-recurring { color: var(--info); background: var(--info-soft); }
.chip-watch, .s-watch { color: var(--ink-2); background: var(--idle-soft); }
.chip-accent { color: var(--accent); background: var(--accent-soft); }
.chip-on-art { position: absolute; top: 12px; right: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); z-index: 2; }
.chip-on-art.apy::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.tag { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); max-width: 100%; }
.seg button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); transition: background 0.2s, color 0.2s, box-shadow 0.2s; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"], .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.seg-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-radius: 22px; }
.seg-scroll::-webkit-scrollbar { display: none; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; background: var(--bg-2); color: var(--ink-2); transition: background 0.15s, color 0.15s; white-space: nowrap; }
.fchip:hover { color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.fchip .ct { opacity: 0.55; margin-left: 4px; font-variant-numeric: tabular-nums; }

.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.more { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 0.875rem; font-weight: 500; white-space: nowrap; transition: box-shadow 0.15s, background 0.15s; }
.more:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }

/* ------------------------------------------------------------------ night hero */
.night { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden; isolation: isolate; }
.aurora { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 1.2s var(--ease); }
.aurora.ready { opacity: 1; }
.aurora-fallback { position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(60% 50% at 75% 40%, rgba(153, 69, 255, 0.35), transparent 70%),
  radial-gradient(40% 40% at 90% 70%, rgba(20, 241, 149, 0.18), transparent 70%); }
.hero { padding-block: clamp(56px, 8vw, 104px) 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.hero h1 { font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.045em; font-weight: 500; }
.hero h1 .soft { color: var(--night-ink-2); }
.hero .lead { color: var(--night-ink-2); font-size: var(--t-lead); max-width: 30em; margin-top: 24px; line-height: 1.5; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-art { position: relative; height: clamp(360px, 44vw, 560px); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-art { height: 360px; margin-top: 8px; } }
.rise { animation: rise 1s var(--ease) both; }
.rise-2 { animation-delay: 0.08s; } .rise-3 { animation-delay: 0.16s; } .rise-4 { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0.001; transform: translateY(16px); } }

.sphere { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.sphere.dragging { cursor: grabbing; }
.sp { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 23%; overflow: hidden; will-change: transform, opacity; background: #1b1b20; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sp img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sp-tip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); background: rgba(24, 24, 28, 0.88); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; border: 1px solid var(--night-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sp-hint { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: var(--t-xs); color: var(--night-ink-2); opacity: 0.75; pointer-events: none; }
@media (max-width: 640px) { .sp { width: 46px; height: 46px; margin: -23px 0 0 -23px; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--night-line); margin-top: 48px; }
.stats > div { padding: 24px 24px 4px 0; border-right: 1px solid var(--night-line); min-width: 0; }
.stats > div + div { padding-left: 24px; }
.stats > div:last-child { border-right: 0; }
.stats dt { font-size: var(--t-sm); color: var(--night-ink-2); }
.stats dd { margin: 6px 0 0; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 400; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.stats-light { border-top-color: var(--line); }
.stats-light > div { border-right-color: var(--line); }
.stats-light dt { color: var(--ink-2); }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div { padding: 18px 12px 14px 0; }
  .stats > div:nth-child(2n) { border-right: 0; padding-left: 16px; }
  .stats > div:nth-child(2n+1) { padding-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--night-line); }
  .stats-light > div:nth-child(n+3) { border-top-color: var(--line); }
}
.live { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--ink-3); margin-top: 16px; }
.night .live { color: var(--night-ink-2); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.live.on i { background: var(--sol-mint); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(20, 241, 149, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(20, 241, 149, 0); } 100% { box-shadow: 0 0 0 0 rgba(20, 241, 149, 0); } }

.marquee { border-top: 1px solid var(--night-line); overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; padding-block: 22px; animation: scroll 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee a { display: inline-flex; align-items: center; gap: 10px; color: var(--night-ink-2); font-size: 0.9375rem; font-weight: 500; transition: color 0.15s; white-space: nowrap; }
.marquee a:hover { color: var(--night-ink); }
.marquee img { width: 26px; height: 26px; border-radius: 7px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ sections */
.band { padding-block: clamp(80px, 10vw, 136px); }
.band-2 { background: var(--bg-2); }
.band-tight { padding-block: 32px clamp(80px, 9vw, 120px); }
.dots { background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 22px 22px; }
.sh { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 48px); }
.sh > div { max-width: 720px; min-width: 0; }
.sh h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -0.035em; }
.sh p { color: var(--ink-2); font-size: var(--t-lead); margin-top: 14px; line-height: 1.45; max-width: 36em; }
.page-head { padding-block: clamp(56px, 8vw, 104px) 24px; }
.page-head h1 { font-size: var(--t-h1); letter-spacing: -0.045em; line-height: 1.02; }
.page-head .lead { color: var(--ink-2); font-size: var(--t-lead); margin-top: 18px; max-width: 38em; line-height: 1.45; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: var(--t-sm); color: var(--ink-3); margin-bottom: 24px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }

/* manifesto */
.manifesto { font-size: clamp(1.75rem, 3.8vw, 3rem); line-height: 1.18; letter-spacing: -0.035em; font-weight: 450; max-width: 22em; }
.manifesto .w { opacity: 0.22; transition: opacity 0.4s; }
.manifesto .w.on { opacity: 1; }
.manifesto-wrap { padding-block: clamp(96px, 12vw, 160px); }

/* ------------------------------------------------------------------ cards (Sanctum) */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cards, .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards, .cards-4, .cards-2 { grid-template-columns: minmax(0, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--bg-2); border-radius: var(--r-lg); padding: 8px; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); position: relative; min-width: 0; }
.band-2 .card, .card-on-2 { background: var(--surface); }
a.card:hover { transform: translateY(-3px); }
.card-art { position: relative; border-radius: var(--r-md); background: var(--surface); aspect-ratio: 16 / 9; overflow: hidden; max-width: 100%; }
.band-2 .card-art { background: var(--bg-2); }
.card-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-body { padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.25; padding-right: 26px; }
.card-body p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 12px; font-size: var(--t-xs); color: var(--ink-3); }
.card .corner { position: absolute; right: 22px; top: calc(56.25% + 0px); margin-top: 18px; color: var(--ink-3); transition: transform 0.25s var(--ease), color 0.2s; }
.card.no-art .corner { top: 22px; margin-top: 0; }
a.card:hover .corner { color: var(--ink); transform: translate(2px, -2px); }
.card.done .card-art::after { content: "Completed"; position: absolute; left: 12px; top: 12px; font-size: 0.6875rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--good); color: #fff; }

/* ------------------------------------------------------------------ icons */
.appi { width: 48px; height: 48px; border-radius: 23%; overflow: hidden; flex: none; background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line); position: relative; display: inline-block; }
.appi img { width: 100%; height: 100%; object-fit: cover; }
.appi.xs { width: 24px; height: 24px; border-radius: 7px; }
.appi.sm { width: 36px; height: 36px; }
.appi.lg { width: 88px; height: 88px; }
.tile { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 1.25rem; letter-spacing: -0.04em; }
.appi.xs .tile { font-size: 0.6875rem; } .appi.sm .tile { font-size: 0.9375rem; } .appi.lg .tile { font-size: 2rem; }

/* ------------------------------------------------------------------ intents */
.intent-panel { margin-top: 28px; }
.intent-line { color: var(--ink-2); margin-bottom: 18px; display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; }
.intent-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .intent-apps { grid-template-columns: minmax(0, 1fr); } }
.icard { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--r-lg); background: var(--bg-2); animation: fade 0.45s var(--ease) both; min-width: 0; }
.icard:nth-child(2) { animation-delay: 0.05s; } .icard:nth-child(3) { animation-delay: 0.1s; }
.icard .row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.icard h3 { font-size: 1.1875rem; letter-spacing: -0.02em; }
.icard p { color: var(--ink-2); font-size: 0.9375rem; flex: 1; line-height: 1.45; }
.icard .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.icard .k { font-size: var(--t-xs); color: var(--ink-3); }
.icard .v { font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
@keyframes fade { from { opacity: 0.001; transform: translateY(8px); } }

/* ------------------------------------------------------------------ hairline rows (solana.com) */
.rows { border-top: 1px solid var(--line); }
.rowi { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); transition: background 0.15s; }
a.rowi:hover, .rowi.clickable:hover { background: var(--bg-2); }
.rowi .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rowi .who b { font-weight: 500; font-size: 1rem; letter-spacing: -0.015em; display: block; }
.rowi .who span { color: var(--ink-3); font-size: var(--t-sm); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowi .mid { color: var(--ink-2); font-size: 0.9375rem; min-width: 0; }
@media (max-width: 760px) { .rowi { grid-template-columns: minmax(0, 1fr) auto; } .rowi .mid, .rowi .hide-m { display: none; } }

/* ------------------------------------------------------------------ steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { background: var(--surface); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.steps .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 500; font-size: 0.9375rem; margin-bottom: 14px; }
.steps h3 { font-size: 1.125rem; letter-spacing: -0.02em; }
.steps p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }

/* ------------------------------------------------------------------ data tables (Kurate) */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border-radius: var(--r-md); padding: 18px 20px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.kpi dt { color: var(--ink-2); font-size: var(--t-sm); }
.kpi dd { margin: 8px 0 0; font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; display: block; }
.up { color: var(--good); } .down { color: var(--bad); }
.table-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 640px; }
.dtable th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: var(--t-sm); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable th.num, .dtable td.num { text-align: right; }
.dtable th button { display: inline-flex; gap: 4px; align-items: center; color: inherit; font-weight: 500; }
.dtable th button[aria-sort] { color: var(--ink); }
.dtable td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover td { background: var(--bg-2); }
.asset { display: flex; align-items: center; gap: 12px; min-width: 0; }
.asset b { font-weight: 500; display: block; }
.asset span { color: var(--ink-3); font-size: var(--t-xs); display: block; }
.apy { color: var(--good); font-weight: 500; }
.apy-u { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--good) 40%, transparent); text-underline-offset: 3px; }

/* ------------------------------------------------------------------ charts */
.chart-card { background: var(--surface); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 28px); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.chart-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chart-top h2, .chart-top h3 { font-size: 1.25rem; letter-spacing: -0.025em; }
.chart { position: relative; height: 260px; }
.chart-tall { height: 340px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis text { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); }
.chart .grid line { stroke: var(--line); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .line2 { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 5 5; }
.chart .bar { fill: var(--accent); opacity: 0.8; }
.chart .bar.on { opacity: 1; }
.chart .cross { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; z-index: 4; pointer-events: none; background: var(--surface); color: var(--ink); border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); font-size: var(--t-sm); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.tip b { display: block; font-size: 1rem; font-weight: 500; letter-spacing: -0.02em; }
.tip span { color: var(--ink-2); font-size: var(--t-xs); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--t-sm); color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--accent); }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 7px); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: 0.9375rem; }
.bars .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .vl { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bars .tr { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.bars .tr span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

/* ------------------------------------------------------------------ apps directory */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.field { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: var(--r-md); background: var(--bg-2); color: var(--ink-3); min-width: 0; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 1rem; color: var(--ink); }
.field input::placeholder { color: var(--ink-3); }
.select { position: relative; }
.select select { height: 48px; padding: 0 40px 0 16px; border-radius: var(--r-md); border: 0; background: var(--bg-2); color: var(--ink); font-size: 0.9375rem; -webkit-appearance: none; appearance: none; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 18px; top: 20px; width: 6px; height: 6px; border: solid var(--ink-2); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); pointer-events: none; }
.applist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
@media (max-width: 860px) { .applist { grid-template-columns: minmax(0, 1fr); } }
.arow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.arow:hover .an { color: var(--accent); }
.an { font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.02em; display: flex; gap: 8px; align-items: center; transition: color 0.15s; min-width: 0; }
.an > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at { color: var(--ink-2); font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.am { display: flex; gap: 10px; align-items: center; margin-top: 3px; font-size: var(--t-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pts { font-size: 0.6875rem; font-weight: 600; color: var(--good); background: var(--good-soft); padding: 2px 7px; border-radius: 999px; letter-spacing: 0; flex: none; }
.empty { color: var(--ink-2); text-align: center; padding: 56px 0; }

/* ------------------------------------------------------------------ app page */
.app-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; }
@media (max-width: 760px) { .app-hero { grid-template-columns: auto minmax(0, 1fr); } .app-hero .acts { grid-column: 1 / -1; } }
.app-hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.04em; }
.app-hero .tl { color: var(--ink-2); font-size: var(--t-lead); margin-top: 6px; }
.app-hero .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.status-note { margin-top: 24px; padding: 12px 16px; border-radius: var(--r-md); background: var(--info-soft); color: var(--ink); font-size: 0.9375rem; display: flex; gap: 10px; align-items: center; }
.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
@media (max-width: 960px) { .app-layout { grid-template-columns: minmax(0, 1fr); } }
.sec + .sec { margin-top: 56px; }
.sec h2 { font-size: 1.75rem; letter-spacing: -0.03em; margin-bottom: 16px; }
.sec p { color: var(--ink-2); line-height: 1.65; }
.prods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .prods { grid-template-columns: minmax(0, 1fr); } }
.prod { background: var(--bg-2); border-radius: var(--r-md); padding: 18px; }
.prod b { font-weight: 500; display: block; margin-bottom: 4px; }
.prod span { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; display: block; }
.olist { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; }
.olist li { counter-increment: s; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; line-height: 1.55; }
.olist li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-size: 0.8125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.risks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.risks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--ink-2); line-height: 1.55; }
.risks li::before { content: "!"; width: 20px; height: 20px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 0.75rem; display: grid; place-items: center; margin-top: 2px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 18px 20px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline time { font-size: var(--t-xs); color: var(--ink-3); font-family: var(--mono); display: block; }
.timeline p { color: var(--ink); line-height: 1.5; margin-top: 2px; }
.aside { display: grid; gap: 16px; position: sticky; top: calc(var(--nav-h) + 24px + env(safe-area-inset-top, 0px)); }
@media (max-width: 960px) { .aside { position: static; } }
.panel { background: var(--bg-2); border-radius: var(--r-lg); padding: 20px; }
.panel h3 { font-size: 1rem; letter-spacing: -0.015em; margin-bottom: 12px; }
.panel-good { background: var(--good-soft); }
.panel-night { background: var(--night); color: var(--night-ink); }
.panel-night p { color: var(--night-ink-2); }
.plinks { display: grid; gap: 4px; }
.plinks a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.plinks a:last-child { border-bottom: 0; }
.plinks a:hover { color: var(--accent); }
.plinks small { color: var(--ink-3); white-space: nowrap; }
.minis { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mini { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); transition: background 0.15s; height: 100%; }
.mini:hover { background: var(--bg-3); }
.mini b { display: block; font-weight: 500; letter-spacing: -0.015em; font-size: 0.9375rem; }
.mini small { display: block; color: var(--ink-2); font-size: var(--t-xs); line-height: 1.35; }
.disclose { font-size: var(--t-xs); color: var(--ink-3); line-height: 1.6; }

/* ------------------------------------------------------------------ academy */
.progress { display: flex; align-items: center; gap: 14px; font-size: var(--t-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pbar { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; min-width: 80px; }
.pbar span { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--sol-violet), var(--sol-mint)); transition: width 0.6s var(--ease); }
.track + .track { margin-top: 72px; }
.track-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.track-head h2 { font-size: 2rem; letter-spacing: -0.035em; }
.track-head p { color: var(--ink-2); margin-top: 6px; }
.track-n { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-3); letter-spacing: 0.04em; display: block; margin-bottom: 8px; }
.chapter-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
@media (max-width: 960px) { .chapter-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.lnav { position: sticky; top: calc(var(--nav-h) + 28px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - var(--nav-h) - 56px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
@media (max-width: 960px) { .lnav { position: static; max-height: none; } .lnav details:not([open]) .lnav-list { display: none; } }
.lnav summary { cursor: pointer; list-style: none; font-size: var(--t-sm); color: var(--ink-3); padding: 6px 0; display: flex; justify-content: space-between; }
.lnav summary::-webkit-details-marker { display: none; }
.lnav-list { list-style: none; padding: 0; margin: 2px 0 14px; display: grid; gap: 1px; }
.lnav-list a { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 8px; font-size: 0.875rem; color: var(--ink-2); line-height: 1.3; }
.lnav-list a:hover { background: var(--bg-2); color: var(--ink); }
.lnav-list a[aria-current="page"] { background: var(--bg-2); color: var(--ink); font-weight: 500; }
.lnav-list .ck { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); flex: none; position: relative; }
.lnav-list a.done .ck { background: var(--good); box-shadow: none; }
.lnav-list a.done .ck::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.ch-head { margin-bottom: 40px; }
.ch-head h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.04em; line-height: 1.05; margin: 14px 0 16px; }
.ch-head .lead { font-size: var(--t-lead); color: var(--ink-2); line-height: 1.5; max-width: 34em; }
.ch-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prose { max-width: 700px; min-width: 0; font-size: 1.0625rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.75rem; letter-spacing: -0.03em; margin-top: 2.2em; line-height: 1.15; }
.prose h3 { font-size: 1.25rem; letter-spacing: -0.02em; margin-top: 1.8em; }
.prose p, .prose li { line-height: 1.7; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose a:not(.mini):not(.inline-tool) { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.prose strong { font-weight: 600; }
.prose code { font-family: var(--mono); font-size: 0.875em; background: var(--bg-2); padding: 2px 6px; border-radius: 6px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; color: var(--ink-2); font-size: var(--t-sm); white-space: nowrap; }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--ink-2); }
.callout { background: var(--bg-2); border-radius: var(--r-md); padding: 18px 20px; }
.callout p { margin: 0; line-height: 1.6; }
.callout-warn { background: var(--warn-soft); }
.diagram { margin: 2em 0; background: var(--bg-2); border-radius: var(--r-lg); padding: 20px 20px 16px; overflow-x: auto; }
.diagram svg { width: 100%; min-width: 520px; height: auto; }
.diagram figcaption { color: var(--ink-2); font-size: var(--t-sm); margin-top: 12px; line-height: 1.5; }
.dt { fill: var(--ink); font-family: var(--sans); }
.dt2 { fill: var(--ink-2); font-family: var(--sans); }
.dt-on { fill: #fff; font-family: var(--sans); }
.dl { stroke: var(--ink-3); fill: none; }
.da { stroke: var(--accent); }
.dg { stroke: var(--good); }
.dw { stroke: var(--warn); }
.dp { fill: var(--surface); stroke: var(--line-2); }
.dv { fill: var(--accent-soft); stroke: color-mix(in srgb, var(--accent) 40%, transparent); }
.daf { fill: var(--accent); }
.dm { fill: #12b886; }
.dg-fill { fill: var(--good); opacity: 0.85; } .dw-fill { fill: var(--warn); opacity: 0.85; } .dr-fill { fill: var(--bad); opacity: 0.85; }
.dg-fill-soft { fill: var(--good-soft); stroke: color-mix(in srgb, var(--good) 40%, transparent); }
.dr-fill-soft { fill: var(--bad-soft); stroke: color-mix(in srgb, var(--bad) 40%, transparent); }
.dt-line { stroke: var(--ink); }
.dot-ink { fill: var(--ink); stroke: var(--surface); stroke-width: 3; }
.inline-tool { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-md); background: var(--accent-soft); margin: 1.6em 0; }
.inline-tool b { font-weight: 500; }
.inline-tool span:last-child { grid-column: 2; color: var(--ink-2); font-size: 0.9375rem; }
.it-tag { grid-row: span 2; font-family: var(--mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.inline-stat b { font-weight: 600; }
.takeaways { margin-top: 56px; background: var(--night); color: var(--night-ink); border-radius: var(--r-lg); padding: 28px; position: relative; overflow: hidden; }
.takeaways h2 { font-size: 1.375rem; letter-spacing: -0.025em; margin-bottom: 16px; }
.takeaways ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.takeaways li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--night-ink); line-height: 1.55; }
.takeaways li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sol-mint); margin-top: 8px; }
.quiz { margin-top: 40px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); padding: 28px; }
.quiz h2 { font-size: 1.375rem; letter-spacing: -0.025em; }
.quiz .qn { margin-top: 24px; }
.quiz .q { font-weight: 500; margin-bottom: 12px; line-height: 1.45; }
.quiz .opts { display: grid; gap: 8px; }
.quiz .opt { text-align: left; padding: 12px 16px; border-radius: var(--r-sm); background: var(--bg-2); font-size: 0.9375rem; line-height: 1.4; transition: background 0.15s, box-shadow 0.15s; }
.quiz .opt:hover:not([disabled]) { background: var(--bg-3); }
.quiz .opt.right { background: var(--good-soft); box-shadow: inset 0 0 0 1.5px var(--good); }
.quiz .opt.wrong { background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); }
.quiz .why { font-size: 0.9375rem; color: var(--ink-2); margin-top: 10px; line-height: 1.5; }
.quiz-result { margin-top: 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 48px; }
.pn a { padding: 18px 20px; border-radius: var(--r-md); background: var(--bg-2); display: grid; gap: 4px; transition: background 0.15s; min-width: 0; }
.pn a:hover { background: var(--bg-3); }
.pn small { color: var(--ink-3); font-size: var(--t-xs); }
.pn b { font-weight: 500; letter-spacing: -0.015em; }
.pn .nx { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pn { grid-template-columns: minmax(0, 1fr); } .pn .nx { grid-column: 1; } }

/* ------------------------------------------------------------------ playbooks */
.meter { display: inline-flex; gap: 3px; align-items: center; }
.meter i { width: 14px; height: 6px; border-radius: 2px; background: var(--bg-3); }
.meter.r1 i:nth-child(-n+1), .meter.r2 i:nth-child(-n+2), .meter.r3 i:nth-child(-n+3), .meter.r4 i:nth-child(-n+4), .meter.r5 i:nth-child(-n+5) { background: var(--warn); }
.meter.r1 i:nth-child(1), .meter.r2 i:nth-child(-n+2) { background: var(--good); }
.pb-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
@media (max-width: 760px) { .pb-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pb-facts > div { background: var(--bg-2); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 6px; min-width: 0; }
.pb-facts small { color: var(--ink-3); font-size: var(--t-xs); }
.pb-facts b { font-weight: 500; font-size: 1.125rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ tools */
.tool-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }
.form { background: var(--bg-2); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 18px; }
.fl { display: grid; gap: 8px; }
.fl > label, .fl > .lbl { font-size: var(--t-sm); color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.fl output { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }
.inp { display: flex; align-items: center; height: 46px; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 0 14px; gap: 8px; }
.inp:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.inp input, .inp select { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 1rem; height: 100%; font-variant-numeric: tabular-nums; color: var(--ink); }
.inp span { color: var(--ink-3); font-size: var(--t-sm); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--bg-3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), inset 0 0 0 1px var(--line-2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--bg-3); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); }
.result { background: var(--surface); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); padding: 24px; display: grid; gap: 20px; min-width: 0; }
.big { font-size: clamp(2.5rem, 6vw, 3.75rem); letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.res-grid > div { background: var(--bg-2); border-radius: var(--r-md); padding: 14px 16px; min-width: 0; }
.res-grid small { color: var(--ink-3); font-size: var(--t-xs); display: block; }
.res-grid b { font-weight: 500; font-size: 1.125rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; display: block; margin-top: 4px; }
.verdict { padding: 14px 16px; border-radius: var(--r-md); font-size: 0.9375rem; line-height: 1.5; }
.verdict.ok { background: var(--good-soft); } .verdict.mid { background: var(--warn-soft); } .verdict.bad { background: var(--bad-soft); }

/* ------------------------------------------------------------------ airdrops */
.drop { border-bottom: 1px solid var(--line); }
.drop summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 130px 120px 24px; gap: 16px; align-items: center; padding: 18px 4px; transition: background 0.15s; }
.drop summary::-webkit-details-marker { display: none; }
.drop summary:hover { background: var(--bg-2); }
.drop .chev { transition: transform 0.25s var(--ease); color: var(--ink-3); }
.drop[open] .chev { transform: rotate(180deg); }
.drop-body { padding: 4px 4px 28px 66px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; }
.drop-body p { color: var(--ink-2); line-height: 1.6; }
.drop-meta { display: grid; gap: 8px; font-size: var(--t-sm); color: var(--ink-2); align-content: start; }
.drop-meta b { color: var(--ink); font-weight: 500; }
@media (max-width: 860px) {
  .drop summary { grid-template-columns: minmax(0, 1fr) auto 24px; }
  .drop summary .hide-m { display: none; }
  .drop-body { grid-template-columns: minmax(0, 1fr); padding-left: 4px; gap: 18px; }
}
.rules-card { background: var(--night); color: var(--night-ink); border-radius: var(--r-lg); padding: 28px; }
.rules-card h2 { font-size: 1.5rem; letter-spacing: -0.03em; }
.rules-card ol { margin: 18px 0 0; padding-left: 20px; display: grid; gap: 10px; color: var(--night-ink-2); line-height: 1.5; }
.rules-card strong { color: var(--night-ink); font-weight: 500; }

/* ------------------------------------------------------------------ creators, glossary */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .people { grid-template-columns: minmax(0, 1fr); } }
.person { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: var(--bg-2); }
.person .row { display: flex; gap: 14px; align-items: center; min-width: 0; }
.person h3 { font-size: 1.0625rem; letter-spacing: -0.02em; }
.person .h { color: var(--ink-3); font-size: var(--t-sm); }
.person p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; flex: 1; }
.av { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; position: relative; background: var(--bg-3); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av .tile { border-radius: 50%; font-size: 1.125rem; }
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 24px 12px; }
.face { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-width: 0; }
.face .av { width: 72px; height: 72px; transition: transform 0.3s var(--ease); }
.face:hover .av { transform: scale(1.06); }
.face span { font-size: var(--t-sm); font-weight: 500; line-height: 1.25; }
.az { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
.az a { width: 34px; height: 34px; border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; font-size: 0.875rem; font-weight: 500; }
.az a:hover { background: var(--ink); color: var(--bg); }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
@media (max-width: 760px) { .gloss { grid-template-columns: minmax(0, 1fr); } }
.gloss > div { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 24px); }
.gloss dt { font-weight: 500; letter-spacing: -0.015em; }
.gloss dd { margin: 4px 0 0; color: var(--ink-2); line-height: 1.55; }
.gloss > div:target { background: var(--accent-soft); border-radius: var(--r-sm); padding-inline: 12px; }

/* ------------------------------------------------------------------ CTA + footer */
.cta { padding-block: clamp(72px, 9vw, 120px); }
.cta h2 { font-size: var(--t-h2); letter-spacing: -0.04em; max-width: 14em; }
.cta p { color: var(--night-ink-2); font-size: var(--t-lead); margin-top: 16px; max-width: 32em; }
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: 64px 40px; font-size: var(--t-sm); color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer h4 { color: var(--ink); font-size: var(--t-sm); font-weight: 500; letter-spacing: -0.01em; margin-bottom: 12px; }
.footer nav { display: grid; gap: 8px; align-content: start; }
.footer nav a:hover { color: var(--ink); }
.footer .about p { margin-top: 12px; max-width: 30em; line-height: 1.55; }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; font-size: var(--t-xs); line-height: 1.65; display: grid; gap: 10px; }
.footer .theme-row { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--bg-3); }
.footer .theme-row button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: var(--t-xs); color: var(--ink-2); }
.footer .theme-row button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }

/* ------------------------------------------------------------------ search palette */
.cmdk { position: fixed; inset: 0; z-index: 95; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: calc(10vh + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn 0.18s; }
@keyframes fadeIn { from { opacity: 0; } }
.cmdk-box { width: min(640px, 100%); background: var(--surface); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); overflow: hidden; animation: pop 0.22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } }
.cmdk-field { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.cmdk-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 1.0625rem; color: var(--ink); }
.cmdk-list { list-style: none; margin: 0; padding: 8px; max-height: min(62vh, 480px); overflow-y: auto; }
.cmdk-list li[role="option"] { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.cmdk-list li[aria-selected="true"] { background: var(--bg-2); }
.cmdk-list .kg { padding: 10px 12px 4px; font-size: var(--t-xs); color: var(--ink-3); }
.cmdk-list .km { flex: 1; min-width: 0; }
.cmdk-list b { display: block; font-weight: 500; font-size: 0.9375rem; letter-spacing: -0.01em; }
.cmdk-list small { display: block; color: var(--ink-2); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kglyph { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; flex: none; color: var(--ink-2); font-size: 0.75rem; font-weight: 600; font-family: var(--mono); }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 99; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; animation: pop 0.22s var(--ease); }
body.lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee-track { animation: none; }
}
.prose .minis li + li, .prose .minis li { margin-top: 0; }
.prose .minis { padding-left: 0; }
.checklist-v2 { list-style: none; padding: 0 !important; margin: 18px 0 0; display: grid; gap: 8px; }
.prose .checklist-v2 li + li { margin-top: 0; }
.checklist-v2 label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-2); cursor: pointer; line-height: 1.45; }
.checklist-v2 input { -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; cursor: pointer; transition: background 0.2s; }
.checklist-v2 input::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 0.2s var(--ease); }
.checklist-v2 input:checked { background: var(--good); box-shadow: none; }
.checklist-v2 input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.ck-progress { margin-top: 16px; }
.plinks a > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-card, .table-scroll, .prose table, .diagram { position: relative; }
.app-layout > *, .chapter-layout > *, .tool-grid > *, .plinks, .plinks a { min-width: 0; }

/* follow card in the closing band (every page) */
.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: clamp(32px, 6vw, 80px); align-items: center; }
.follow-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 24px; color: var(--night-ink);
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--night-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease); }
.follow-card:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.follow-card:focus-visible { outline: 2px solid var(--night-ink); outline-offset: 4px; }
.fc-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fc-av { width: 56px; height: 56px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14); }
.fc-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fc-id b { font-size: 1.0625rem; letter-spacing: -0.01em; }
.fc-id span { color: var(--night-ink-2); font-size: 0.9375rem; }
.fc-x { width: 20px; height: 20px; color: var(--night-ink-2); flex: none; }
.fc-x svg, .fc-btn svg { width: 100%; height: 100%; }
.fc-bio { color: var(--night-ink-2); line-height: 1.5; }
.fc-btn { justify-content: center; gap: 10px; padding: 0 20px; }
.fc-btn svg { width: 16px; height: 16px; }
@media (max-width: 820px) { .cta-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .follow-card, .follow-card:hover { transition: none; transform: none; } }

/* ---------------------------------------------------------------- quiz: Proof of Knowledge */
.quiz-stage > .wrap { padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 112px); position: relative; }
.quiz-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.quiz-intro h1 { font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.045em; font-weight: 500; text-wrap: balance; }
.quiz-intro .lead { color: var(--night-ink-2); font-size: var(--t-lead); max-width: 30em; margin-top: 24px; line-height: 1.5; }
.qi-meta { margin-top: 20px; color: var(--night-ink-2); font-size: var(--t-sm); }
.qi-best { margin-top: 8px; color: var(--night-ink-2); font-size: var(--t-sm); }
.qi-best b { color: var(--night-ink); font-weight: 500; }
.qi-side { display: grid; gap: 20px; min-width: 0; }
.qcard { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 18px; background: var(--night-2);
  box-shadow: 0 0 0 1px var(--night-line), 0 30px 80px rgba(0, 0, 0, 0.45); }
.ladder { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ladder li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: var(--t-sm); }
.ladder b { font-weight: 500; color: var(--night-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladder span { font-family: var(--mono); color: var(--night-ink-2); font-size: var(--t-xs); align-self: center; }

.quiz-play { max-width: 840px; }
.qp-top { display: flex; justify-content: space-between; gap: 12px; color: var(--night-ink-2); font-size: var(--t-sm); }
.qp-topic { color: var(--night-ink); font-weight: 500; }
.qp-count { font-family: var(--mono); }
.ticks { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 4px; margin-top: 14px; }
.ticks span { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); transition: background 0.25s var(--ease); }
.ticks .now { background: var(--night-ink); }
.ticks .ok { background: var(--sol-mint); }
.ticks .no { background: #ff6b6b; }
.qp-q { font-size: clamp(1.625rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; margin: clamp(32px, 5vw, 48px) 0 28px; text-wrap: balance; outline: none; }
.qp-opts { display: grid; gap: 10px; }
.qopt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 18px; border-radius: 16px; color: var(--night-ink);
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--night-line); font-size: 1.0625rem; line-height: 1.4;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.2s, transform 0.15s var(--ease); }
.qopt:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); }
.qopt:active:not(:disabled) { transform: scale(0.99); }
.qopt:focus-visible { outline: 2px solid var(--night-ink); outline-offset: 2px; }
.qopt kbd { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-family: var(--mono); font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08); color: var(--night-ink-2); transition: background 0.15s, color 0.15s; }
.qopt:disabled { cursor: default; }
.qopt.right { background: rgba(20, 241, 149, 0.12); box-shadow: inset 0 0 0 1px rgba(20, 241, 149, 0.55); }
.qopt.right kbd { background: var(--sol-mint); color: #09090b; }
.qopt.wrong { background: rgba(255, 107, 107, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.55); }
.qopt.wrong kbd { background: #ff6b6b; color: #09090b; }
.qopt.dim { opacity: 0.45; }
.qp-explain { margin-top: 18px; padding: 20px 22px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--night-line); }
.qp-explain p { color: var(--night-ink-2); line-height: 1.55; }
.qverdict { font-weight: 600; margin-right: 4px; }
.qverdict.ok { color: var(--sol-mint); }
.qverdict.no { color: #ff8a8a; }
.qp-act { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-top: 18px; }
.qp-learn { display: inline-flex; align-items: center; gap: 8px; color: var(--night-ink-2); font-size: var(--t-sm); min-width: 0; }
.qp-learn:hover { color: var(--night-ink); }
.qp-learn .ico { width: 16px; height: 16px; flex: none; }
.qp-keys { margin-top: 24px; color: var(--night-ink-2); font-size: var(--t-xs); opacity: 0.8; }

.quiz-done { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.qd-card { min-width: 0; }
.qd-side { min-width: 0; }
.qd-score { display: flex; align-items: baseline; gap: 6px; }
.qd-score b { font-size: clamp(4rem, 9vw, 6.5rem); line-height: 0.9; letter-spacing: -0.05em; font-weight: 700;
  background: linear-gradient(90deg, var(--sol-violet), #6a7dff, var(--sol-mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qd-score span { color: var(--night-ink-2); font-size: 1.5rem; }
.qd-side h2 { font-size: var(--t-h2); letter-spacing: -0.04em; font-weight: 500; margin-top: 10px; }
.qd-line { color: var(--night-ink-2); margin-top: 10px; line-height: 1.5; max-width: 28em; }
.qd-handle { display: grid; gap: 8px; margin-top: 28px; font-size: var(--t-sm); color: var(--night-ink-2); }
.qd-handle input { height: 46px; border-radius: 999px; border: 0; padding: 0 18px; font: inherit; font-size: 1rem; color: var(--night-ink);
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--night-line); width: 100%; max-width: 340px; }
.qd-handle input:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); }
.qd-handle input.bad { box-shadow: inset 0 0 0 1px #ff6b6b; }
.qd-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.qd-share { padding-right: 20px; }
.qd-share svg { width: 16px; height: 16px; }
.qd-tip { margin-top: 14px; color: var(--night-ink-2); font-size: var(--t-xs); line-height: 1.5; max-width: 30em; }
.qd-retake { margin-top: 18px; color: var(--night-ink); font-size: var(--t-sm); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.quiz-review h2 { font-size: var(--t-h2); letter-spacing: -0.04em; font-weight: 500; }
.review { list-style: none; margin: 28px 0 36px; max-width: 760px; }
.review li { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.review .rq { font-weight: 500; font-size: 1.0625rem; }
.review .ra { font-size: var(--t-sm); }
.review .ra.no { color: var(--bad); }
.review .ra.ok { color: var(--good); }
.review .rw { color: var(--ink-2); line-height: 1.55; }
.review .rl { color: var(--accent); font-size: var(--t-sm); justify-self: start; }
@media (max-width: 900px) { .quiz-intro, .quiz-done { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qopt { font-size: 1rem; padding: 13px 14px; } }
@media (prefers-reduced-motion: reduce) { .qopt, .ticks span { transition: none; } }

/* quiz promo on home */
.quiz-promo .wrap { padding-block: clamp(72px, 9vw, 120px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: center; position: relative; }
.quiz-promo h2 { font-size: var(--t-h2); letter-spacing: -0.04em; font-weight: 500; max-width: 12em; }
.quiz-promo p { color: var(--night-ink-2); font-size: var(--t-lead); margin-top: 16px; max-width: 28em; line-height: 1.5; }
@media (max-width: 900px) { .quiz-promo .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px), (hover: none) { .qp-keys { display: none; } }

/* night sections that sit right under a night-styled nav extend up behind it, so the glass nav shows night, not page white */
.nav.on-night ~ main .under-nav { margin-top: calc(-1 * var(--nav-h) - 1px); padding-top: calc(var(--nav-h) + 1px); }
body[data-page^="quiz"] .cta { box-shadow: inset 0 1px 0 var(--night-line); }
.nav.on-night .nav-links a[aria-current="page"] { color: var(--night-ink); background: rgba(255, 255, 255, 0.1); }
.review { padding: 0; }

/* home gate: the quiz greets first-time visitors; Skip or finishing reveals the site */
.gate { position: fixed; inset: 0; z-index: 90; overflow-y: auto; overscroll-behavior: contain; background: var(--night); color: var(--night-ink);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); animation: fadeIn 0.3s; }
.gate-seen .gate { display: none; }
html:not(.gate-seen) body[data-page="home"] { overflow: hidden; }
.gate.gate-out { opacity: 0; transform: scale(1.01); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.gate-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); position: relative; z-index: 2; }
.gate-bar .brand { color: var(--night-ink); }
.gate .quiz-stage > .wrap { padding-block: clamp(24px, 5vw, 72px) clamp(56px, 7vw, 96px); }
.gate .quiz-stage { min-height: calc(100vh - var(--nav-h)); min-height: calc(100dvh - var(--nav-h)); }
.gate .quiz-review { background: var(--bg); color: var(--ink); }
.qi-kicker { color: var(--night-ink-2); font-size: var(--t-sm); margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .gate { animation: none; } .gate.gate-out { transition: none; } }
.ladder { padding: 0; }

/* quiz: handle step */
.quiz-handle { max-width: 720px; }
.quiz-handle h2 { font-size: var(--t-h1); line-height: 1.02; letter-spacing: -0.045em; font-weight: 500; }
.quiz-handle .lead { color: var(--night-ink-2); font-size: var(--t-lead); margin-top: 18px; line-height: 1.5; max-width: 34em; }
.qh-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.qh-field { flex: 1 1 260px; max-width: 380px; display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--night-line); font-size: 1.0625rem; }
.qh-field:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }
.qh-field.bad { box-shadow: inset 0 0 0 1px #ff6b6b; }
.qh-field span { color: var(--night-ink-2); }
.qh-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--night-ink); font: inherit; outline: none; }
.qh-form .btn { height: 48px; }
.qh-tiers { list-style: none; padding: 0; margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qh-tiers li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.qh-tiers b { font-weight: 500; font-size: var(--t-sm); color: var(--night-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qh-tiers small { grid-column: 2; color: var(--night-ink-2); font-size: var(--t-xs); }
.qh-dot { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; }
.qh-tiers .t0 .qh-dot { background: linear-gradient(135deg, #5d5f6b, #d9d9de); }
.qh-tiers .t1 .qh-dot { background: linear-gradient(135deg, #170c38, #cdbbff); box-shadow: 0 0 0 2px #9d86ff; }
.qh-tiers .t2 .qh-dot { background: linear-gradient(135deg, #05271a, #8dffcd); box-shadow: 0 0 0 2px #14f195; }
.qh-tiers .t3 .qh-dot { background: radial-gradient(circle, #8f9bff 1.5px, transparent 2px) 0 0 / 5px 5px, #0b0b14; box-shadow: 0 0 0 2px #6a7dff; }
.qh-tiers .t4 .qh-dot { background: linear-gradient(135deg, #b0583a, #f0b37a); box-shadow: 0 0 0 2px #f5c45a, 0 0 12px rgba(245, 196, 90, 0.5); }
.qh-tiers .t5 .qh-dot { background: linear-gradient(135deg, #9945ff, #14f195); box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(120, 140, 255, 0.7); }
.qd-status { margin-top: 10px; color: var(--night-ink-2); font-size: var(--t-xs); }
@media (max-width: 560px) { .qh-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qh-form .btn { flex: 1 1 100%; } .qh-field { max-width: none; } }

/* quiz: prize line on the intro */
.qi-prize { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 8px 14px 8px 12px; border-radius: 999px; font-size: var(--t-sm);
  color: var(--night-ink); background: rgba(20, 241, 149, 0.08); box-shadow: inset 0 0 0 1px rgba(20, 241, 149, 0.35); }
.qi-prize-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sol-mint); box-shadow: 0 0 10px var(--sol-mint); flex: none; }

/* quiz: prize spin */
.spin { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  margin-top: clamp(48px, 7vw, 88px); padding-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--night-line); }
.spin-wheel { position: relative; width: min(100%, 400px); aspect-ratio: 1; justify-self: center; }
.wheel { position: absolute; inset: 0; border-radius: 50%; will-change: transform; box-shadow: 0 0 0 1px var(--night-line), 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 80px rgba(106, 69, 255, 0.25); }
.wheel svg { display: block; width: 100%; height: 100%; font-family: var(--sans); }
.wheel-pointer { position: absolute; left: 50%; top: -6px; z-index: 2; width: 0; height: 0; transform: translateX(-50%);
  border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 24px solid var(--night-ink); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center;
  background: var(--night); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.5); }
.wheel-hub .mark { width: 46%; height: 46%; }
.spin-copy { min-width: 0; }
.spin-copy h2 { font-size: var(--t-h2); letter-spacing: -0.04em; font-weight: 500; line-height: 1.05; }
.spin-lead { color: var(--night-ink-2); margin-top: 12px; line-height: 1.5; max-width: 32em; }
.odds { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 22px; }
.odds li { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: var(--t-sm); }
.odds li b { font-weight: 600; }
.odds li span { font-family: var(--mono); color: var(--night-ink-2); font-size: var(--t-xs); }
.odds .v2 b { color: #b9a6ff; }
.odds .v3 b { color: var(--sol-mint); }
.odds .cap { background: none; padding-left: 4px; color: var(--night-ink-2); font-size: var(--t-xs); align-self: center; }
.spin-need { margin-top: 10px; color: var(--night-ink-2); font-size: var(--t-sm); }
.spin [data-spin]:disabled { opacity: 0.45; cursor: not-allowed; }
.claim { margin-top: 18px; }
.claim-steps { padding-left: 1.2em; display: grid; gap: 10px; color: var(--night-ink-2); line-height: 1.5; max-width: 34em; }
.claim-steps b { color: var(--night-ink); font-weight: 500; }
.claim-steps a { color: var(--night-ink); text-decoration: underline; text-underline-offset: 3px; }
.claim-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.claim-code code { font-family: var(--mono); font-size: 1.125rem; letter-spacing: 0.04em; padding: 10px 16px; border-radius: 12px; color: var(--sol-mint);
  background: rgba(20, 241, 149, 0.08); box-shadow: inset 0 0 0 1px rgba(20, 241, 149, 0.35); }
.spin-terms { margin-top: 22px; color: var(--night-ink-2); font-size: var(--t-xs); line-height: 1.5; max-width: 36em; opacity: 0.85; }
@media (max-width: 900px) { .spin { grid-template-columns: minmax(0, 1fr); } .spin-wheel { width: min(100%, 320px); } }

/* claim checker */
.verify { display: grid; gap: 14px; max-width: 520px; }
.verify label { display: grid; gap: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.verify input { height: 46px; border-radius: 12px; border: 0; padding: 0 14px; font: inherit; color: var(--ink); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.verify input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink-3); }
.verify .btn { justify-self: start; }
.verify-out { margin-top: 18px; max-width: 520px; font-weight: 500; }
.verify-out.ok { color: var(--good); }
.verify-out.bad { color: var(--bad); }
.verify-notes { margin-top: 48px; max-width: 640px; }

/* quiz: "spin below" hint next to the result card */
.spin-hint { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 16px 10px 14px; border-radius: 14px; font-size: var(--t-sm); line-height: 1.35;
  color: var(--night-ink); background: rgba(20, 241, 149, 0.08); box-shadow: inset 0 0 0 1px rgba(20, 241, 149, 0.35); transition: background 0.15s; }
.spin-hint:hover { background: rgba(20, 241, 149, 0.14); }
.spin-hint .ico { width: 16px; height: 16px; flex: none; color: var(--sol-mint); }
@media (prefers-reduced-motion: no-preference) { .spin-hint .ico { animation: hintNudge 1.6s var(--ease) infinite; } }
@keyframes hintNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* quiz admin */
.adm-key { display: grid; gap: 12px; max-width: 420px; }
.adm-key label { display: grid; gap: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.adm-key input, .adm-tools input[type=search] { height: 44px; border-radius: 12px; border: 0; padding: 0 14px; font: inherit; color: var(--ink); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.adm-key .btn { justify-self: start; }
.adm-msg { color: var(--ink-2); font-size: var(--t-sm); min-height: 1.4em; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.adm-stat { padding: 16px; border-radius: var(--r-md); background: var(--bg-2); display: grid; gap: 4px; }
.adm-stat span { font-size: var(--t-xs); color: var(--ink-2); }
.adm-stat b { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.adm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 14px; }
.adm-bar h2 { font-size: 1.5rem; letter-spacing: -0.03em; }
.adm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.adm-tools input[type=search] { height: 36px; min-width: 0; width: 220px; }
.adm-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.adm-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.adm-table th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table tr.flag td { background: var(--warn-soft); }
.adm-table code { font-family: var(--mono); font-size: var(--t-xs); }
.adm-table a { color: var(--accent); }
.adm-foot { margin-top: 18px; color: var(--ink-2); font-size: var(--t-xs); max-width: 60em; line-height: 1.5; }
