/* QuantumCage: "Midnight Lab" theme. Shared by every public page. */
:root {
  /* Deep space: midnight-indigo ground, glass surfaces, starlight-cyan accent with a violet partner */
  --bg: #050816;
  --surface: rgba(18, 26, 58, .55);
  --surface-2: rgba(32, 44, 92, .6);
  --line: rgba(140, 160, 255, .14);
  --line-strong: rgba(150, 170, 255, .28);
  --text: #eef1ff;
  --text-2: #d8ddf2;
  --muted: #b4bbdb;
  --faint: #959dc4;
  --accent: #7fe3ff;
  --accent-2: #b59cff;
  --accent-ink: #061022;
  --glow: 0 0 0 1px rgba(127, 227, 255, .35), 0 8px 30px -8px rgba(127, 227, 255, .55);
  --display: "Instrument Serif", "Times New Roman", serif;
  --reading: "Newsreader", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  isolation: isolate;
}
/* Nebula glow and starfield. Fixed layers behind everything; pure CSS, no images. */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(60vw 50vw at 88% -10%, rgba(120, 92, 255, .32), transparent 60%),
    radial-gradient(55vw 45vw at -10% 35%, rgba(40, 150, 255, .20), transparent 62%),
    radial-gradient(45vw 40vw at 70% 110%, rgba(190, 80, 255, .16), transparent 60%),
    radial-gradient(120vw 80vw at 50% 50%, #0a1030 0%, #050816 70%);
}
body::after {
  opacity: .85;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 140px 90px, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 260px 160px, #cfe9ff, transparent),
    radial-gradient(1px 1px at 80px 220px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 330px 40px, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 410px 260px, #e3d9ff, transparent),
    radial-gradient(1px 1px at 190px 330px, rgba(255,255,255,.75), transparent),
    radial-gradient(2px 2px at 460px 120px, rgba(190, 230, 255, .9), transparent),
    radial-gradient(1px 1px at 60px 480px, rgba(255,255,255,.7), transparent),
    radial-gradient(1.5px 1.5px at 520px 300px, #d6e6ff, transparent),
    radial-gradient(1px 1px at 640px 60px, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 300px 600px, rgba(220,210,255,.7), transparent);
  background-size: 480px 360px, 480px 360px, 480px 360px, 480px 360px, 480px 360px, 480px 360px, 480px 360px, 480px 360px, 700px 660px, 700px 660px, 700px 660px, 700px 660px;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: .95; } }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kicker { margin: 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.kicker--accent { color: var(--accent); }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font: 600 14px/1 var(--ui); cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent { box-shadow: var(--glow); }
.btn--accent:hover { color: var(--accent-ink); background: #b0efff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.icon-btn:hover { border-color: var(--text); color: var(--accent); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(5, 8, 22, .72); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 26px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand svg { width: 28px; height: 28px; flex: none; overflow: visible; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.brand:hover svg { transform: scale(1.08); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav__links { display: flex; gap: 28px; }
.progress { height: 2px; background: transparent; }
.progress span { display: block; height: 2px; width: 0; background: var(--accent); }
@media (max-width: 720px) {
  .nav { gap: 10px; }
  .nav__links { display: none; }
  .site-header__row { min-height: 64px; }
  .brand { font-size: 22px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 10vw, 112px); padding-bottom: clamp(40px, 6vw, 64px); }
.hero h1 { margin: 20px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(52px, 10vw, 136px); line-height: .95; letter-spacing: -.025em; max-width: 1040px; }
.hero h1 em { background: linear-gradient(95deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.hero p.lede { margin: 28px 0 0; max-width: 560px; font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--muted); }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cards ---------- */
.media { overflow: hidden; border-radius: 6px; background: var(--surface-2); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .4s ease; }
a:hover .media img { transform: scale(1.035); }
.feature { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding-top: clamp(32px, 5vw, 48px); border-top: 1px solid var(--line); }
.feature .media { aspect-ratio: 16 / 10; }
.feature h2 { margin: 18px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.015em; }
.feature p { margin: 18px 0 0; font-size: 17px; line-height: 1.65; color: var(--muted); }
.feature:hover h2 { color: var(--text); }
.meta { margin-top: 18px; font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 8px; }
.read-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 14px; color: var(--accent); }
.read-link svg { width: 16px; height: 16px; transition: transform .25s ease; }
a:hover .read-link svg { transform: translateX(4px); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

.section { padding-top: clamp(72px, 10vw, 120px); }
.section__head { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.section__head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4vw, 44px); letter-spacing: -.01em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(28px, 3vw, 40px); padding-top: 40px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card .media { aspect-ratio: 4 / 3; }
.card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 29px; line-height: 1.1; letter-spacing: -.005em; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover h3 { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px; }

.placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--line-strong); }
.placeholder svg { width: 40%; height: 40%; }

/* ---------- Archive ---------- */
.search { position: relative; flex: 0 1 320px; }
.search input { width: 100%; height: 44px; padding: 0 16px 0 42px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 14px var(--ui); }
.search input::placeholder { color: var(--faint); }
.search svg { position: absolute; left: 15px; top: 13px; width: 18px; height: 18px; color: var(--faint); }
.archive { list-style: none; margin: 0; padding: 0; counter-reset: idea; }
.archive li { border-bottom: 1px solid var(--line); }
.archive a { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 24px 0; }
.archive .num { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.archive .t { font-family: var(--display); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.18; transition: transform .3s ease, color .2s ease; }
.archive a:hover .t { transform: translateX(6px); color: var(--accent); }
.archive .d { font-size: 13px; color: var(--faint); white-space: nowrap; }
.archive .empty { padding: 32px 0; color: var(--faint); }
@media (max-width: 640px) {
  .archive a { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .archive .num { display: none; }
}

/* ---------- Newsletter ---------- */
.signup { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; position: relative; overflow: hidden; }
.signup::after { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border: 1px solid var(--line-strong); transform: rotate(45deg); pointer-events: none; }
.signup h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; }
.signup p { margin: 12px 0 0; color: var(--muted); }
.signup form { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.signup input[type="email"] { flex: 1 1 220px; height: 52px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(5, 8, 22, .6); color: var(--text); font: 15px var(--ui); }
.signup .btn { min-height: 52px; padding: 0 28px; font-size: 15px; }
@media (max-width: 860px) { .signup { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(80px, 10vw, 128px); border-top: 1px solid var(--line); }
.site-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 48px; font-size: 13px; color: var(--faint); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Article ---------- */
.article-head { max-width: 900px; margin: 0 auto; padding: clamp(48px, 9vw, 96px) var(--pad) clamp(32px, 5vw, 48px); text-align: center; }
.article-head h1 { margin: 22px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6.4vw, 82px); line-height: 1.01; letter-spacing: -.02em; }
.article-head .dek { margin: 26px auto 0; max-width: 660px; font-family: var(--reading); font-style: italic; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; color: var(--muted); }
.byline { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; font-size: 14px; color: var(--faint); }
.byline .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; }
.cover { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.cover img { width: 100%; aspect-ratio: 21 / 10; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
@media (max-width: 640px) { .cover { padding: 0; } .cover img { border-radius: 0; aspect-ratio: 4 / 3; } }

.article-layout { max-width: 1176px; margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--pad) 0; display: grid; grid-template-columns: 220px minmax(0, 680px); gap: 64px; justify-content: center; }
.toc { position: sticky; top: 104px; align-self: start; font-size: 13px; line-height: 1.45; max-height: calc(100vh - 140px); overflow: auto; }
.toc ol { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.toc a { color: var(--faint); display: block; transition: color .2s ease; }
.toc a.is-active, .toc a:hover { color: var(--accent); }
@media (max-width: 1024px) { .article-layout { grid-template-columns: minmax(0, 680px); } .toc { display: none; } }

.prose { font-family: var(--reading); font-size: clamp(18px, 1.9vw, 21px); line-height: 1.72; color: var(--text-2); min-width: 0; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.35em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--faint); }
.prose h2 { margin: 2.3em 0 .6em; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.2vw, 38px); line-height: 1.1; color: var(--text); letter-spacing: -.01em; scroll-margin-top: 96px; }
.prose h3, .prose h4 { margin: 1.9em 0 .5em; font-family: var(--ui); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); scroll-margin-top: 96px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.prose a:hover { color: var(--accent); }
.prose blockquote { margin: 2em 0; padding: 0 0 0 0; border: 0; text-align: center; font-family: var(--display); font-size: clamp(26px, 3.2vw, 36px); line-height: 1.2; color: var(--text); }
.prose blockquote::before { content: "\201C"; display: block; font-size: 1.8em; line-height: .6; color: var(--accent); margin-bottom: 8px; }
.prose blockquote p { margin: 0 0 .4em; }
.prose img { margin: 2em 0; border-radius: 6px; }
.prose hr { border: 0; text-align: center; margin: 2.6em 0; }
.prose hr::before { content: "\2234"; color: var(--faint); font-size: 22px; }
.prose code { font-size: .85em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose .dropcap::first-letter { float: left; font-family: var(--display); font-size: 4.6em; line-height: .82; padding: 6px 12px 0 0; color: var(--accent); }

.share { max-width: 680px; margin: 48px auto 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share__label { font-size: 13px; color: var(--faint); margin-right: auto; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: all .3s ease; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.next { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(24px, 4vw, 40px); align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: clamp(16px, 2.5vw, 24px); background: var(--surface); }
.next .media { aspect-ratio: 3 / 2; }
.next h2 { margin: 10px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; }
@media (max-width: 760px) { .next { grid-template-columns: 1fr; } }

/* ---------- Simple pages ---------- */
.page { max-width: 760px; margin: 0 auto; padding: clamp(56px, 9vw, 104px) var(--pad) 0; }
.page h1 { margin: 18px 0 40px; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 84px); line-height: 1; letter-spacing: -.02em; }
.lost { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; }
.lost h1 { margin: 0; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.hero h1.hero__title em { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; padding-right: 0; }

/* =========================================================
   Motion, reactions, conversation and reading modes
   ========================================================= */
:root { --hot: #ff7aa8; --read-scale: 1; }

/* Smooth page-to-page transitions; cover images morph between list and article */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s cubic-bezier(.4,0,.2,1) both; }
::view-transition-new(root) { animation: vt-in .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* Hero: words rise in one after another */
.hero__title .w { display: inline-block; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 90ms + 80ms); }
.hero h1.hero__title em { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; padding-right: 0; }
.hero__title em .w { background: linear-gradient(95deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.hero .lede, .hero__cta { animation: rise .9s cubic-bezier(.2,.8,.2,1) .45s both; }
.hero__cta { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(.45em); } }
.hero__kicker { display: inline-flex; align-items: center; gap: 10px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(127,227,255,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(127,227,255,0); } 100% { box-shadow: 0 0 0 0 rgba(127,227,255,0); } }

/* Cards: staggered entrance and a glow that follows the pointer */
.grid .reveal { transition-delay: calc(var(--i, 0) * 80ms); }
.card .media, .feature .media { position: relative; isolation: isolate; transition: box-shadow .4s ease, transform .4s cubic-bezier(.2,.8,.2,1); }
.card .media::after, .feature .media::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(127,227,255,.28), transparent 60%); mix-blend-mode: screen; }
.card:hover .media::after, .feature:hover .media::after { opacity: 1; }
.card:hover .media, .feature:hover .media { box-shadow: 0 20px 50px -20px rgba(110, 120, 255, .55), 0 0 0 1px rgba(127,227,255,.25); transform: translateY(-4px); }
.card__likes { position: absolute; right: 10px; top: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: rgba(5,8,22,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #eef1ff; font-size: 12px; font-weight: 600; }
.card__likes[hidden] { display: none; }
.card__likes svg { width: 13px; height: 13px; color: var(--hot); }

/* Hero buttons */
.hero__cta .btn svg { width: 18px; height: 18px; }
[data-surprise]:hover svg { animation: roll .6s ease; }
@keyframes roll { to { transform: rotate(360deg); } }

/* Pick up where you left off */
.resume[hidden] { display: none; }
.resume { padding-top: 8px; }
.resume a { display: flex; align-items: center; gap: 18px; padding: 14px 18px 14px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: 640px; animation: rise .8s cubic-bezier(.2,.8,.2,1) .7s both; }
.resume img, .resume .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.resume .t { display: block; font-family: var(--display); font-size: 22px; line-height: 1.15; margin-top: 4px; }
.resume .bar { display: block; height: 3px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.resume .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Most loved */
[data-loved][hidden] { display: none; }
.loved { list-style: none; margin: 0; padding: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; counter-reset: loved; }
.loved li { counter-increment: loved; }
.loved a { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); height: 100%; transition: border-color .2s ease, transform .3s ease; }
.loved a:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.loved a::before { content: counter(loved, decimal-leading-zero); font-family: var(--display); font-size: 32px; color: var(--accent); line-height: 1; min-width: 40px; }
.loved .t { font-family: var(--display); font-size: 20px; line-height: 1.15; flex: 1; }
.loved .n { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.loved .n svg { width: 13px; height: 13px; color: var(--hot); }

/* Byline like count */
.byline-like { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.byline-like svg { width: 14px; height: 14px; color: var(--hot); }

/* Like button */
.engage { max-width: 744px; margin: 56px auto 0; display: flex; flex-direction: column; gap: 20px; }
.engage .share { margin: 0; max-width: none; }
.engage__like { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.like { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 600 15px var(--ui); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .15s ease; }
.like:hover { border-color: var(--hot); }
.like:active { transform: scale(.96); }
.like__icon { display: inline-flex; color: var(--muted); transition: color .2s ease, transform .35s cubic-bezier(.3,1.6,.5,1); }
.like__icon svg { width: 22px; height: 22px; }
.like__count { min-width: 1.5ch; padding-left: 12px; border-left: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; color: var(--muted); }
.like[aria-pressed="true"] { border-color: var(--hot); background: rgba(255, 122, 168, .12); }
.like[aria-pressed="true"] .like__icon { color: var(--hot); transform: scale(1.15); }
.like[aria-pressed="true"] .like__count { color: var(--text); }
.like .spark { position: absolute; left: 30px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); pointer-events: none; animation: spark .7s ease-out forwards; }
@keyframes spark { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; } }
.hint { font-size: 13px; color: var(--faint); margin: 0; }

/* Conversation */
.comments { max-width: 744px; margin: 64px auto 0; }
.comments__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.comments__head h2 { margin: 0; display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.4vw, 40px); }
.comments__head h2 svg { width: 26px; height: 26px; color: var(--accent); }
.comments__list { list-style: none; margin: 0; padding: 0; }
.comments__list > li { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.comments__list .comments__empty { display: block; color: var(--faint); font-size: 15px; }
.c-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 20px; color: #061022; }
.c-meta { font-size: 13px; color: var(--faint); }
.c-meta b { color: var(--text); font-weight: 600; margin-right: 8px; }
.c-body { margin: 6px 0 0; font-family: var(--reading); font-size: calc(18px * var(--read-scale)); line-height: 1.6; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { margin-top: 28px; padding: clamp(18px, 3vw, 26px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 12px; }
.comment-form input[type="text"], .comment-form textarea { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5, 8, 22, .55); color: var(--text); font: 15px/1.5 var(--ui); }
.comment-form textarea { resize: vertical; min-height: 120px; font-family: var(--reading); font-size: 17px; }
.comment-form input::placeholder, .comment-form textarea::placeholder { color: var(--faint); }
.comment-form__row { max-width: 320px; }
.comment-form__foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.comment-form [data-comment-status]:empty { display: none; }
.comment-form [data-comment-status].ok { color: #8fe8c0; }
.comment-form [data-comment-status].bad { color: #ff9f8a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Reading settings popover */
.reader-menu { position: relative; }
.reader-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 240px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(10, 14, 36, .96); box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); z-index: 30; }
.reader-panel[hidden] { display: none; }
.seg-pub { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.seg-pub button { min-height: 38px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: 500 14px var(--ui); cursor: pointer; }
.seg-pub button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.prose { font-size: calc(clamp(18px, 1.9vw, 21px) * var(--read-scale)); }

/* Paper mode: dark text on light reads best for long articles, so readers can switch */
html[data-theme="paper"] {
  --bg: #f5f2ea; --surface: rgba(255, 255, 255, .75); --surface-2: #ebe6da; --line: rgba(30, 30, 60, .12); --line-strong: rgba(30, 30, 60, .22);
  --text: #15172a; --text-2: #24283d; --muted: #4a4f68; --faint: #5f6480; --accent: #0a6c96; --accent-2: #6a4bd6; --accent-ink: #ffffff; --hot: #d1356e;
  color-scheme: light;
}
html[data-theme="paper"] body::before { background: radial-gradient(70vw 50vw at 90% -10%, rgba(106, 75, 214, .10), transparent 60%), #f5f2ea; }
html[data-theme="paper"] body::after { display: none; }
html[data-theme="paper"] .site-header { background: rgba(245, 242, 234, .85); }
html[data-theme="paper"] .reader-panel { background: #fffdf8; }
html[data-theme="paper"] .btn--accent { box-shadow: none; }
html[data-theme="paper"] .btn--accent:hover { background: #075a7e; color: #fff; }
html[data-theme="paper"] .comment-form input[type="text"], html[data-theme="paper"] .comment-form textarea, html[data-theme="paper"] .signup input[type="email"] { background: #fff; }
html[data-theme="paper"] .toast { background: #15172a; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hero__title .w, .hero .lede, .hero__cta, .resume a, .comments__list > li { animation: none; }
  .pulse { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- Tesseract mark ---------- */
.qc-mark .qc-core { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 3px var(--accent-2)); animation: qcPulse 3.2s ease-in-out infinite; }
.brand:hover .qc-core { filter: drop-shadow(0 0 6px var(--accent-2)) drop-shadow(0 0 12px #8b5cf6); }
.hero { position: relative; }
.hero__emblem { width: clamp(108px, 28vw, 150px); margin: 0 0 8px -6px; color: var(--text); }
.qc-emblem { display: block; width: 100%; height: auto; overflow: visible; }
.qc-emblem .qc-e-cage path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: qcDraw 1.6s cubic-bezier(.65,0,.25,1) forwards; }
.qc-emblem .qc-e-cage path:nth-child(2) { animation-delay: .35s; }
.qc-emblem .qc-e-cage path:nth-child(3) { animation-delay: .7s; }
.qc-emblem .qc-e-inner { transform-box: view-box; transform-origin: 32px 32px; animation: qcFade .8s 1.1s both, qcBreathe 7s 1.9s ease-in-out infinite; }
.qc-emblem .qc-e-core { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 4px #b59cff) drop-shadow(0 0 14px #8b5cf6); animation: qcFade .6s .9s both, qcPulse 2.8s 1.5s ease-in-out infinite; }
@media (min-width: 1080px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 26vw, 380px); align-items: center; gap: 48px; }
  .hero__emblem { order: 2; width: 100%; margin: 0; position: relative; }
  .hero__emblem::after { content: ""; position: absolute; inset: 12%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.32), rgba(139,92,246,0) 70%); filter: blur(10px); }
  .hero h1 { font-size: clamp(52px, 7.4vw, 120px); }
}
@keyframes qcDraw { to { stroke-dashoffset: 0; } }
@keyframes qcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qcPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: .82; } }
@keyframes qcBreathe { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(.82) rotate(60deg); } }
html[data-theme="paper"] .qc-mark .qc-core { fill: #7c3aed; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .qc-mark .qc-core, .qc-emblem * { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }
}

/* ---------- Full images, never cropped ---------- */
.media, .cover { position: relative; isolation: isolate; }
.media .media__img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.media__fill { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(26px) saturate(1.2) brightness(.55); transform: scale(1.2); pointer-events: none; }
a:hover .media .media__fill { transform: scale(1.2); }
.cover { overflow: hidden; border-radius: 6px; padding: 0 !important; max-width: min(1240px, calc(100% - 2 * var(--pad))); background: var(--surface-2); }
.cover .media__img { display: block; width: 100%; height: auto; max-height: 82vh; aspect-ratio: auto; object-fit: contain; border-radius: 0; background: none; }
@media (max-width: 640px) { .cover { border-radius: 0; max-width: 100%; } .cover .media__img { aspect-ratio: auto; max-height: 90vh; } }
html[data-theme="paper"] .media__fill { filter: blur(26px) saturate(1.1) brightness(.9); }
@media (max-width: 430px) {
  .site-header .brand { font-size: 20px; gap: 9px; }
  .site-header .nav { gap: 6px; }
  .site-header__row { gap: 10px; }
  .site-header .nav .btn--accent { padding-inline: 14px; }
  .site-header .icon-btn { width: 40px; height: 40px; }
}

/* ---------- Extras: listen, zoom, quote cards, reactions ---------- */
.listen-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 500 13px var(--ui); cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.listen-btn svg { width: 15px; height: 15px; color: var(--accent); }
.listen-btn:hover, .listen-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.prose .is-speaking { background: linear-gradient(90deg, rgba(127,227,255,.10), rgba(181,156,255,.10)); box-shadow: -14px 0 0 0 rgba(127,227,255,.10), 14px 0 0 0 rgba(181,156,255,.10); border-radius: 6px; transition: background .3s ease; }
.player { position: fixed; z-index: 60; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); display: flex; align-items: center; gap: 12px; width: min(560px, calc(100% - 24px)); box-sizing: border-box; padding: 10px 10px 10px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(10, 14, 36, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 50px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(127,227,255,.08); color: #eef1ff; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.player.in { transform: translate(-50%, 0); }
.player button { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: inherit; cursor: pointer; font: 600 13px var(--ui); }
.player button svg { width: 20px; height: 20px; }
.player .player__toggle { background: #7fe3ff; color: #061022; box-shadow: 0 0 22px -4px rgba(127,227,255,.8); }
.player .player__rate { border: 1px solid rgba(150,170,255,.28); padding: 0 12px; min-width: 56px; }
.player__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.player__k { font: 600 10px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: #7fe3ff; }
.player__t { font: 500 13px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__prog { height: 3px; border-radius: 3px; background: rgba(150,170,255,.18); overflow: hidden; }
.player__prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7fe3ff, #b59cff); transition: width .6s ease; }
.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
html.no-scroll { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px; background: rgba(3, 5, 16, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .25s ease; cursor: zoom-out; }
.lightbox.in { opacity: 1; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); transform: scale(.96); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.lightbox.in img { transform: none; }
.lightbox__x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(150,170,255,.3); background: rgba(10,14,36,.7); color: #eef1ff; display: grid; place-items: center; cursor: pointer; }
.lightbox__x svg { width: 20px; height: 20px; }
.quote-btn { position: absolute; z-index: 55; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: #b59cff; color: #12082e; font: 600 14px var(--ui); cursor: pointer; box-shadow: 0 12px 30px -10px rgba(139,92,246,.9); animation: rise .25s ease both; }
.quote-btn svg { width: 16px; height: 16px; }
.quote-btn[hidden] { display: none; }
.reacts { display: flex; flex-wrap: wrap; gap: 10px; }
.react { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 600 14px var(--ui); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .15s ease; }
.react:hover { border-color: var(--accent-2); }
.react:active { transform: scale(.96); }
.react__e { font-size: 20px; line-height: 1; }
.react__n { min-width: 1ch; color: var(--muted); }
.react[aria-pressed="true"] { border-color: var(--accent-2); background: rgba(181,156,255,.16); }
.react[aria-pressed="true"] .react__n { color: var(--text); }
.react.pop .react__e { animation: reactPop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes reactPop { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(-12deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .react.pop .react__e, .quote-btn { animation: none; } .player, .lightbox, .lightbox img { transition: none; } }
/* Article cover: the exact picture, frame hugs the image, no side panels */
.cover { width: fit-content; background: none; }
.cover .media__fill { display: none; }
.cover .media__img { width: auto; max-width: 100%; height: auto; max-height: 82vh; margin: 0 auto; }

/* ---------- Pictures melt into the page ---------- */
/* Feathered edges: the picture fades into whatever is behind it (Space or Paper). */
.media .media__img, .cover .media__img {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-composite: intersect;
}
/* Frames are invisible: no backdrop, no box. The picture sits centred at its own shape. */
.media { background: none; border-radius: 0; overflow: visible; }
.media .media__fill { display: none; }
.media .media__img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; }
.cover { border-radius: 0; overflow: visible; }
.card:hover .media, .feature:hover .media { box-shadow: none; transform: translateY(-4px); }
.card .media::after, .feature .media::after { background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(127,227,255,.18), transparent 65%); }
a:hover .media .media__img { transform: scale(1.03); }
html[data-theme="paper"] .card .media::after, html[data-theme="paper"] .feature .media::after { display: none; }

/* ---------- Play: verdict, meter, today, hot, readers, badges, intro ---------- */
.verdict { max-width: 744px; margin: 40px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.verdict__card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 14px; }
.verdict__q { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.poll { display: flex; gap: 10px; flex-wrap: wrap; }
.poll__btn { flex: 1; min-height: 48px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 15px var(--ui); cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.poll__btn:hover { border-color: var(--accent); }
.poll__btn[data-poll-pick="agree"][aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.poll__btn[data-poll-pick="disagree"][aria-pressed="true"] { background: var(--accent-2); border-color: var(--accent-2); color: #12082e; }
.split[hidden] { display: none; }
.split__bar { display: flex; height: 10px; border-radius: 10px; overflow: hidden; background: var(--line); }
.split__bar i { display: block; height: 100%; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.split__a { background: var(--accent); } .split__d { background: var(--accent-2); }
.split__lab { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.meter { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.meter__b { min-height: 44px; min-width: 0; padding: 0; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 14px var(--ui); cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease; }
.meter__b:hover { transform: translateY(-2px); border-color: hsl(calc(190 + var(--k) * 14) 90% 72%); }
.meter__b[aria-pressed="true"] { background: hsl(calc(190 + var(--k) * 14) 90% 72%); border-color: transparent; color: #0b0820; transform: translateY(-2px) scale(1.06); }
.today__card .media { aspect-ratio: 4 / 3; }
.today__teaser { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }
.today__card { transition: border-color .2s ease, transform .3s ease; }
.today__card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
/* Trending: a warm halo behind the picture plus a small pill. No frame, so pictures still melt into the page. */
.is-trending .media::before { content: ""; position: absolute; inset: -6%; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,140,90,.30), rgba(255,93,162,.14) 55%, transparent 100%); filter: blur(18px);
  animation: trendGlow 4.5s ease-in-out infinite; }
@keyframes trendGlow { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }
.trend-badge { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); white-space: nowrap; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px;
  background: rgba(5,8,22,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #ffd2b8; font: 600 12px var(--ui);
  box-shadow: 0 0 0 1px rgba(255,140,90,.35), 0 0 18px rgba(255,120,80,.25); }
.trend-chip { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 12px; letter-spacing: .02em; text-transform: none;
  color: #ffd2b8; background: rgba(255,120,80,.12); box-shadow: 0 0 0 1px rgba(255,140,90,.35); vertical-align: middle; }
.trend-chip[hidden] { display: none; }
html[data-theme="paper"] .trend-badge { background: rgba(255,255,255,.85); color: #b2421c; }
html[data-theme="paper"] .trend-chip { color: #b2421c; }
@media (prefers-reduced-motion: reduce) { .is-trending .media::before { animation: none; } }
.readers__list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.readers__list[hidden] { display: none; }
.reader-idea { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.reader-idea__q { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.2; }
.reader-idea__by { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.idea-form { margin-top: 24px; max-width: 744px; }
.mystats { padding-top: 8px; }
.mystats[hidden] { display: none; }
.mystats__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.mystats__nums { display: flex; gap: 22px; flex-wrap: wrap; }
.mystats__stat { display: flex; align-items: baseline; gap: 6px; }
.mystats__stat strong { font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--text); }
.mystats__stat span { font-size: 13px; color: var(--muted); }
.badges { list-style: none; margin: 14px 0 0; padding: 0 0 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.badge { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 999px; border: 1px dashed var(--line-strong); color: var(--faint); font-size: 12px; white-space: nowrap; }
.badge__i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 14px; filter: grayscale(1); opacity: .55; }
.badge.got { border-style: solid; border-color: rgba(181,156,255,.45); color: var(--text); background: rgba(181,156,255,.10); }
.badge.got .badge__i { filter: none; opacity: 1; background: rgba(181,156,255,.22); }
/* Cinematic intro */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: radial-gradient(600px 420px at 50% 46%, rgba(109, 72, 230, .35), rgba(5, 8, 22, 0) 70%), #050816; cursor: pointer; transition: opacity .6s ease, transform .6s ease; }
.intro[hidden] { display: none; }
.intro.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.intro__stage { display: flex; flex-direction: column; align-items: center; gap: 18px; color: #eef1ff; }
.intro__stage .qc-emblem { width: clamp(140px, 30vw, 220px); }
.intro__stage .qc-emblem .qc-e-core { animation: qcFade .6s .9s both, qcFlare 1.4s 1.5s ease-out both; }
.intro__word { margin: 6px 0 0; font-family: var(--display); font-size: clamp(38px, 7vw, 64px); letter-spacing: -.01em; animation: rise .9s cubic-bezier(.2,.8,.2,1) 1.2s both; }
.intro__tag { margin: 0; font: 500 12px var(--ui); letter-spacing: .24em; text-transform: uppercase; color: #7fe3ff; animation: rise .9s cubic-bezier(.2,.8,.2,1) 1.5s both; }
.intro__skip { position: absolute; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(150,170,255,.3); background: rgba(10,14,36,.6); color: #d8ddf2; font: 500 13px var(--ui); cursor: pointer; }
@keyframes qcFlare { 0% { transform: scale(1); } 45% { transform: scale(2.4); filter: drop-shadow(0 0 10px #b59cff) drop-shadow(0 0 40px #8b5cf6); } 100% { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .intro { display: none !important; } .meter__b, .split__bar i { transition: none; } }

/* ---------- Reader accounts ---------- */
.acct-btn { position: relative; }
.acct-btn[hidden] { display: none; }
.acct-btn__ini { display: none; }
.acct-btn.is-in svg { display: none; }
.acct-btn.is-in .acct-btn__ini { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 600 14px var(--ui); color: #0b0820;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 16px rgba(127,227,255,.35); }
.save-btn[hidden] { display: none; }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }
html.acct-open { overflow: hidden; }
.acct { width: min(460px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 24px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 22px;
  background: radial-gradient(120% 80% at 0% 0%, rgba(127,227,255,.10), transparent 55%), radial-gradient(120% 80% at 100% 100%, rgba(181,156,255,.12), transparent 55%), #0a1030;
  color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(127,227,255,.06); overflow: auto; }
.acct::backdrop { background: rgba(3,5,16,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.acct[open] { animation: acctIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes acctIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.acct__box { position: relative; padding: 30px 28px 26px; }
.acct__x { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.acct__x:hover { color: var(--text); border-color: var(--line-strong); }
.acct__x svg { width: 18px; height: 18px; }
.acct h2 { margin: 10px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 6vw, 38px); line-height: 1.05; }
.acct__lead { margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.acct__google { margin-top: 22px; width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.96); color: #1d1d29; font: 600 15px var(--ui); cursor: pointer; transition: transform .15s ease; }
.acct__google:hover { transform: translateY(-1px); }
.acct__google svg { width: 20px; height: 20px; }
.acct__or { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; color: var(--faint); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.acct__or::before, .acct__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acct__form { display: grid; gap: 12px; margin-top: 16px; }
.acct__field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.acct__field input { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5,8,22,.55); color: var(--text); font: 16px var(--ui); }
.acct__field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(127,227,255,.18); }
.acct__go { width: 100%; min-height: 50px; justify-content: center; margin-top: 4px; }
.acct__notice { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(127,227,255,.08); border: 1px solid rgba(127,227,255,.22); font-size: 14px; line-height: 1.5; }
.acct__switch { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.acct__switch button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.acct__me { display: flex; align-items: center; gap: 16px; padding-right: 40px; }
.acct__me h2 { margin-top: 4px; font-size: 30px; }
.acct__avatar { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 600 24px var(--ui); color: #0b0820;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 28px rgba(127,227,255,.35); }
.acct__email { margin: 2px 0 0; color: var(--muted); font-size: 14px; word-break: break-all; }
.acct__notice + .acct__sec, .acct__me + .acct__notice { margin-top: 16px; }
.acct__sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.acct__sec h3 { margin: 0; font: 600 13px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.acct__saved { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.acct__saved li { display: flex; align-items: center; gap: 8px; }
.acct__saved a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 12px; color: var(--text); text-decoration: none; transition: background .2s ease; }
.acct__saved a:hover { background: rgba(127,227,255,.06); }
.acct__thumb { flex: none; width: 54px; height: 54px; display: grid; place-items: center; }
.acct__thumb img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.acct__t { font-family: var(--display); font-size: 18px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acct__rm { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid transparent; background: none; color: var(--faint); font-size: 20px; cursor: pointer; }
.acct__rm:hover { color: var(--text); border-color: var(--line-strong); }
.acct__empty { color: var(--muted); font-size: 14px; padding: 4px 0; }
.acct__news { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.acct__news p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.acct__ok { flex: none; color: var(--accent); font-weight: 600; font-size: 14px; }
.acct__foot { margin-top: 22px; display: flex; justify-content: flex-end; }
html[data-theme="paper"] .acct { background: #fbf9f4; }
html[data-theme="paper"] .acct__field input { background: #fff; }
@media (max-width: 520px) {
  .acct { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .acct[open] { animation-name: acctUp; }
  .acct__box { padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); }
  .acct__news { flex-direction: column; align-items: stretch; }
  .acct__news .btn { width: 100%; justify-content: center; }
}
@keyframes acctUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .acct[open] { animation: none; } }
@media (max-width: 430px) { .acct-btn:not([hidden]) ~ [data-focus-search] { display: none; } }
@media (max-width: 370px) { .site-header .brand { font-size: 0; gap: 0; } }

/* ---------- App feel (home screen app + phones) ---------- */
html { -webkit-tap-highlight-color: transparent; }
.is-app body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
.is-app .site-header { padding-top: env(safe-area-inset-top); }
.is-app .site-header, .is-app .app-tabs, .is-app .btn, .is-app .icon-btn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.app-tabs { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: 62px; padding: 0 6px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: rgba(8, 12, 34, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05); transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease; }
.app-tabs.is-tucked { transform: translateY(calc(100% + 24px)); opacity: 0; }
.app-tab { display: grid; justify-items: center; gap: 3px; padding: 6px 0; border: 0; background: none; color: var(--muted); font: 500 11px var(--ui); text-decoration: none; cursor: pointer; transition: color .2s ease, transform .15s ease; }
.app-tab svg { width: 23px; height: 23px; }
.app-tab:active { transform: scale(.9); }
.app-tab.is-on { color: var(--accent); }
.app-tab--hero { justify-self: center; width: 52px; height: 52px; padding: 0; place-items: center; border-radius: 18px; color: #0b0820;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 22px rgba(127,227,255,.35); transform: translateY(-10px); }
.app-tab--hero:active { transform: translateY(-10px) scale(.92); }
.app-tab--hero svg { width: 26px; height: 26px; }
.is-app .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
html[data-theme="paper"] .app-tabs { background: rgba(251, 249, 244, .82); }
.app-invite { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 44px 16px 16px; border-radius: 20px; border: 1px solid var(--line-strong);
  background: radial-gradient(120% 120% at 0% 0%, rgba(127,227,255,.12), transparent 60%), rgba(10, 16, 48, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5); transform: translateY(140%); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.app-invite.is-up { transform: none; }
.app-invite img { flex: none; border-radius: 14px; box-shadow: 0 0 20px rgba(181,156,255,.3); }
.app-invite__t { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.1; }
.app-invite__d { margin: 4px 0 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.app-invite__how { margin: 0; font-size: 14px; line-height: 1.6; }
.app-invite__ico { display: inline-grid; place-items: center; width: 24px; height: 24px; vertical-align: -6px; color: var(--accent); }
.app-invite__ico svg { width: 20px; height: 20px; }
.app-invite .btn { min-height: 40px; }
.app-invite__x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; }
.app-invite__x svg { width: 18px; height: 18px; }
html[data-theme="paper"] .app-invite { background: rgba(251, 249, 244, .97); }
.offline__list { margin: 8px 0 28px; padding-left: 20px; line-height: 1.9; }
@media (prefers-reduced-motion: reduce) { .app-tabs, .app-invite { transition: none; } }
.offline { padding-top: 48px; padding-bottom: 24px; }
.legal { max-width: 760px; padding-top: clamp(48px, 8vw, 96px); }
.legal h1 { font-size: clamp(44px, 7vw, 80px); line-height: 1; margin: 14px 0 8px; }
.legal__date { color: var(--faint); font-size: 14px; margin: 0 0 28px; }
.legal .prose { font-size: 17px; }
.legal__caps { font-family: var(--ui); font-size: 13px !important; line-height: 1.7; letter-spacing: .02em; color: var(--muted); }
.legal__tldr { margin: 0 0 32px; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); font-family: var(--ui); }
.legal__tldr summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.legal__tldr ul { margin: 12px 0 2px; padding-left: 20px; font-size: 15px; line-height: 1.7; color: var(--text); }

/* ---------- Round two: TL;DR, stance, minds, argue, steelman, nominate, highlights ---------- */
.tldr { max-width: 640px; margin: 26px auto 0; padding: 18px 22px 16px; text-align: left; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tldr.in { animation: rise .35s cubic-bezier(.2,.8,.2,1) both; }
.tldr ul { margin: 10px 0 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.tldr li { font-family: var(--reading); font-size: 17px; line-height: 1.5; color: var(--text-2); }
.tldr li::marker { color: var(--accent); }
.stance { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin: 22px auto 0; font-size: 14px; color: var(--muted); transition: opacity .45s ease, transform .45s ease; }
.stance[hidden] { display: none; }
.stance.out { opacity: 0; transform: translateY(-6px); }
.stance__opts { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.stance__b { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 500 13px var(--ui); cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.stance__b:hover, .stance__b[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.minds { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.minds:empty { display: none; }
.minds p { margin: 0; font-size: 14px; color: var(--muted); }
.minds__you.is-changed { color: var(--accent-2); }
.argue-btn { min-height: 38px; font-size: 13px; }
.argue-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; max-width: 640px; margin: 24px auto 0; padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(181,156,255,.4); background: rgba(139,92,246,.12); font-size: 15px; color: var(--text-2); animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.argue-banner p { margin: 0; }
.argue-banner__e { font-size: 22px; }
.argue-banner .read-link { margin: 0; }
.nominate { max-width: 744px; margin: 14px auto 0; padding: 0 var(--pad); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; }
.nominate__btn[aria-pressed="true"] { border-color: var(--accent-2); color: var(--accent-2); }
.nominate__note a { color: var(--accent); }
.steelman { max-width: 744px; margin: 40px auto 0; }
.steelman__card { padding: clamp(20px, 3vw, 28px); border: 1px solid rgba(255,122,168,.28); border-radius: 18px; background: linear-gradient(160deg, rgba(255,122,168,.07), rgba(18,26,58,.5) 55%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.steelman__card .kicker { color: var(--hot); }
.steelman h2 { margin: 10px 0 12px; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 42px); line-height: 1.05; }
.steelman__lede, .steelman__own { margin: 0; font-family: var(--reading); font-size: 18px; line-height: 1.6; color: var(--text-2); }
.steelman__own p { margin: 0 0 12px; }
.steelman__list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.steelman__list[hidden] { display: none; }
.counter { padding: 14px 16px; border-left: 2px solid var(--hot); background: rgba(5,8,22,.35); border-radius: 0 12px 12px 0; }
.counter__body { margin: 0; font-family: var(--reading); font-size: 17px; line-height: 1.55; white-space: pre-line; }
.counter__by { margin: 8px 0 0; font-size: 13px; color: var(--faint); }
.steelman__add { margin-top: 18px; }
.steelman__add > summary { list-style: none; display: inline-flex; cursor: pointer; }
.steelman__add > summary::-webkit-details-marker { display: none; }
.steelman__add[open] > summary { display: none; }
.steelman__add .comment-form { margin-top: 0; }
.steelman [data-counter-status]:empty { display: none; }
::highlight(qc-hot) { background-color: rgba(181, 156, 255, .26); color: inherit; text-shadow: 0 0 14px rgba(181,156,255,.6); }
::highlight(qc-mine) { background-color: rgba(127, 227, 255, .18); text-decoration: underline; text-decoration-color: rgba(127,227,255,.8); text-decoration-thickness: 2px; text-underline-offset: 4px; }
html[data-theme="paper"] ::highlight(qc-hot) { background-color: rgba(106, 75, 214, .16); text-shadow: none; }
html[data-theme="paper"] ::highlight(qc-mine) { background-color: rgba(7, 90, 126, .1); text-decoration-color: #075a7e; }
.hl-btn { background: #7fe3ff; color: #061022; box-shadow: 0 12px 30px -10px rgba(127,227,255,.8); }
.hl-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 0 auto 18px; max-width: 680px; font-size: 13px; color: var(--faint); }
.hl-note__swatch { flex: none; width: 22px; height: 10px; border-radius: 4px; background: rgba(181,156,255,.35); box-shadow: 0 0 12px rgba(181,156,255,.6); }
.article-layout.has-hl .hl-note { order: -1; }

/* Intro sound + footer explore row */
.intro__sound { position: absolute; left: 20px; bottom: max(20px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(150,170,255,.3); background: rgba(10,14,36,.6); color: #d8ddf2; font: 500 13px var(--ui); cursor: pointer; }
.intro__sound svg { width: 16px; height: 16px; }
.intro__sound[aria-pressed="true"] { border-color: #7fe3ff; color: #7fe3ff; }
.site-footer__explore { border-top: 1px solid var(--line); padding-top: 22px; padding-bottom: 28px; }
.site-footer .site-footer__explore nav { gap: 14px 22px; }
.linkish { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.linkish:hover { color: var(--accent); }
.site-footer__row + .site-footer__explore { margin-top: -24px; }
html.is-app .site-footer__explore { padding-bottom: 96px; }

/* Homepage: one quiet row of explore links */
.explore { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.explore__label { font: 500 12px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
.explore__chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--text-2); transition: border-color .2s ease, color .2s ease, transform .2s ease; }
.explore__chip span { color: var(--accent); }
.explore__chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Explore pages ---------- */
.xp { padding-top: clamp(48px, 8vw, 96px); }
.xp__head { max-width: 760px; }
.xp__head h1 { margin: 14px 0 0; font-size: clamp(44px, 7vw, 84px); line-height: 1; }
.xp__head .lede { margin: 20px 0 0; max-width: 620px; font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--muted); }
.xp__hint { margin-top: 14px; }

/* Star map */
.cmap-wrap { position: relative; margin-top: 36px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(70% 60% at 50% 45%, rgba(109,72,230,.18), rgba(5,8,22,0) 70%), rgba(8,12,32,.55); overflow: hidden; }
.cmap { display: block; width: 100%; height: auto; }
.cmap--tall { display: none; }
@media (max-width: 700px) { .cmap--wide { display: none; } .cmap--tall { display: block; } }
.cmap__dust circle { fill: #dfe6ff; opacity: .35; animation: twinkle 4s ease-in-out infinite; animation-delay: var(--d); }
.cmap__edges line { stroke: #9fb4ff; stroke-width: 1; transition: opacity .25s ease, stroke .25s ease; }
.cmap__edges line.is-on { stroke: #7fe3ff; opacity: .95 !important; stroke-width: 1.6; }
.cmap__names text { fill: #b59cff; font: 500 13px var(--ui); letter-spacing: .22em; text-transform: uppercase; text-anchor: middle; opacity: .7; }
.cmap--tall .cmap__names text { font-size: 15px; }
.star { cursor: pointer; outline: none; }
.star__halo { opacity: .35; transition: opacity .25s ease; }
.star__core { fill: #eef6ff; animation: twinkle 5s ease-in-out infinite; animation-delay: var(--d); }
.star.g1 .star__core { fill: #cfe0ff; } .star.g2 .star__core { fill: #e4dbff; } .star.g3 .star__core { fill: #bff2ff; } .star.g4 .star__core { fill: #ffd9e8; } .star.g5 .star__core { fill: #d9ccff; }
.star__hit { fill: transparent; }
.star:hover .star__halo, .star:focus-visible .star__halo, .star.is-on .star__halo { opacity: 1; }
.star.is-on .star__core { fill: #fff; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.cmap-card { position: absolute; left: 16px; bottom: 16px; max-width: min(360px, calc(100% - 32px)); padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(10,14,36,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: rise .25s ease both; }
.cmap-card[hidden] { display: none; }
.cmap-card h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.15; }
.cmap-card .read-link { margin-top: 10px; }
.xp__groups { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 32px; }
.xp__group h2 { margin: 0 0 10px; font: 500 13px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-2); }
.xp__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.xp__group a { font-size: 15px; color: var(--text-2); }
.xp__group a:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .cmap__dust circle, .star__core { animation: none; } }

/* Swipe mode */
.swipe { max-width: 440px; margin: 32px auto 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.swipe__stack { position: relative; width: 100%; height: min(580px, 64vh); }
.swipe__card:not(:last-child) .swipe__body, .swipe__card:not(:last-child) .swipe__media { visibility: hidden; }
@media (max-width: 600px) { .xp--swipe { padding-top: 28px; } .xp--swipe .xp__head h1 { font-size: 40px; } .xp--swipe .xp__head .lede { display: none; } .swipe { margin-top: 18px; } }
.swipe__card { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 24px; background: linear-gradient(180deg, #161d45, #0a0e24); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); touch-action: pan-y; user-select: none; -webkit-user-select: none; transform: translateY(calc(var(--depth) * 12px)) scale(calc(1 - var(--depth) * .04)); transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s ease; color: var(--text); }
.swipe__card.is-drag { transition: none; cursor: grabbing; }
.swipe__card.go-right { transform: translate(140%, -20px) rotate(18deg) !important; opacity: 0; }
.swipe__card.go-left { transform: translate(-140%, -20px) rotate(-18deg) !important; opacity: 0; }
.swipe__media { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; padding: 16px 16px 0; }
.swipe__media img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 62%, transparent 100%); pointer-events: none; }
.swipe__body { padding: 18px 22px 24px; }
.swipe__t { margin: 8px 0 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.08; }
.swipe__d { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.swipe__stamp { position: absolute; top: 22px; padding: 6px 14px; border-radius: 10px; border: 2px solid; font: 600 18px var(--ui); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.swipe__stamp--save { left: 20px; color: #7fe3ff; transform: rotate(-12deg); opacity: var(--save, 0); }
.swipe__stamp--skip { right: 20px; color: var(--hot); transform: rotate(12deg); opacity: var(--skip, 0); }
.swipe__ctl { display: flex; align-items: center; gap: 18px; }
.swipe__ctl[hidden] { display: none; }
.swipe__btn { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--hot); font: 600 22px var(--ui); cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.swipe__btn:hover { transform: scale(1.06); border-color: currentColor; }
.swipe__btn svg { width: 24px; height: 24px; }
.swipe__btn--save { color: var(--accent); }
.swipe__btn--read { width: auto; height: 48px; padding: 0 22px; border-radius: 999px; color: var(--text); font-size: 15px; }
.swipe__hint { text-align: center; }
.swipe__done { text-align: center; padding: 40px 10px; }
.swipe__done[hidden] { display: none; }
.swipe__done h2 { font-family: var(--display); font-weight: 400; font-size: 36px; margin: 10px 0 18px; }
.swipe__kept { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.swipe__kept a { color: var(--accent); }

/* The Verdict */
.vd { max-width: 820px; margin-top: 40px; display: grid; gap: 28px; }
.vd__last { padding: 22px; border: 1px solid rgba(181,156,255,.4); border-radius: 18px; background: linear-gradient(140deg, rgba(139,92,246,.16), rgba(18,26,58,.5)); }
.vd__last[hidden] { display: none; }
.vd__last h2 { margin: 8px 0 4px; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 40px); line-height: 1.08; }
.vd__list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.vd__row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vd__row.is-lead { border-color: rgba(127,227,255,.45); }
.vd__row.is-mine { box-shadow: inset 3px 0 0 var(--accent-2); }
.vd__rank { font-family: var(--display); font-size: 28px; color: var(--accent); line-height: 1; }
.vd__t { font-family: var(--display); font-size: 20px; line-height: 1.15; }
.vd__bar { display: block; height: 4px; margin-top: 8px; border-radius: 4px; background: rgba(150,170,255,.12); overflow: hidden; }
.vd__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.vd__n { font-size: 13px; color: var(--muted); white-space: nowrap; }
.vd__pick { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.vd__row select, .vd__pick select { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5,8,22,.55); color: var(--text); font: 15px var(--ui); }
.vd__pick .vd__row { display: flex; gap: 10px; padding: 0; border: 0; background: none; margin-top: 10px; }
.vd__pick .hint { margin: 10px 0 0; }

/* Ridiculous → Serious */
.tl { list-style: none; margin: 28px 0 0; padding: 0 0 0 26px; border-left: 1px solid var(--line-strong); display: grid; gap: 22px; max-width: 820px; }
.tl__item { position: relative; }
.tl__dot { position: absolute; left: -32px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.tl__item.is-won .tl__dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.tl__when { margin: 0; font-size: 13px; color: var(--faint); }
.tl__when b { color: var(--accent); font-weight: 600; }
.tl__item h2, .tl__item h3 { margin: 4px 0 0; font-family: var(--display); font-weight: 400; line-height: 1.15; }
.tl__item h2 { font-size: clamp(26px, 3.6vw, 36px); }
.tl__item h3 { font-size: 20px; }
.tl__item a:hover { color: var(--accent); }
.tl__note { margin: 8px 0 0; font-family: var(--reading); font-size: 17px; color: var(--text-2); }
.tl__empty { max-width: 640px; margin-top: 36px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); }
.tl__empty p:last-child { margin: 8px 0 0; }
.tl__wait { margin-top: 56px; }

/* Digest */
.dg { margin-top: 40px; display: grid; gap: 44px; }
.dg__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.dg__h { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 24px; }
.dg__mini { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.dg__mini li { display: flex; flex-direction: column; }
.dg__mini a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dg__mini a:hover { border-color: var(--line-strong); color: var(--accent); }
.dg__mini .t { font-size: 15px; line-height: 1.35; }
.dg__mini .n { font-size: 13px; color: var(--muted); white-space: nowrap; }
.dg__mini > li > .hint { margin: 4px 0 0 14px; }
.signup__status { flex-basis: 100%; margin: 4px 0 0 !important; font-size: 14px; color: var(--accent) !important; }
.signup__status:empty { display: none; }
.signup__status.bad { color: var(--hot) !important; }
.signup form.is-done input[type="email"] { border-color: rgba(127,227,255,.5); }
.acct__open { display: inline-flex; margin: -4px 0 14px; font: 500 14px var(--ui); color: var(--accent); }
.acct__open:hover { text-decoration: underline; }

/* ---------- Your Cage (/cage) ---------- */
.cage { padding-top: clamp(40px, 7vw, 80px); }
.cage-id { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 4vw, 44px); align-items: center; padding: clamp(24px, 4vw, 44px); border: 1px solid rgba(127,227,255,.28); border-radius: 28px; background: radial-gradient(120% 140% at 0% 0%, rgba(127,227,255,.12), transparent 50%), radial-gradient(90% 120% at 100% 100%, rgba(139,92,246,.22), transparent 55%), rgba(12,18,44,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 1px rgba(181,156,255,.08) inset, 0 40px 80px -40px rgba(80,60,200,.6); }
.cage-id::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(150,170,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(150,170,255,.06) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(70% 90% at 70% 50%, #000, transparent); mask-image: radial-gradient(70% 90% at 70% 50%, #000, transparent); pointer-events: none; }
.cage-id__scan { position: absolute; left: 0; right: 0; top: -30%; height: 30%; background: linear-gradient(180deg, transparent, rgba(127,227,255,.10), transparent); animation: cageScan 6s cubic-bezier(.4,0,.2,1) infinite; pointer-events: none; }
@keyframes cageScan { 0% { top: -30%; } 60%, 100% { top: 110%; } }
.cage-id__avatar { position: relative; width: clamp(96px, 14vw, 132px); aspect-ratio: 1; display: grid; place-items: center; }
.cage-id__ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #7fe3ff, #b59cff, #ff7aa8, #7fe3ff); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 8s linear infinite; }
.cage-id__ring--2 { inset: -10px; opacity: .45; animation-duration: 14s; animation-direction: reverse; background: conic-gradient(from 90deg, transparent 0 60%, #7fe3ff 75%, transparent 90%); }
@keyframes spin { to { transform: rotate(360deg); } }
.cage-id__ini { width: 78%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7fe3ff, #b59cff); color: #0a0e24; font: 400 clamp(40px, 6vw, 58px)/1 var(--display); box-shadow: 0 0 40px rgba(127,227,255,.35); }
.cage-id__main { position: relative; min-width: 0; }
.cage-id__main h1 { margin: 10px 0 0; font-size: clamp(40px, 6vw, 72px); line-height: 1; overflow-wrap: anywhere; }
.cage-id__meta { margin: 10px 0 0; color: var(--muted); max-width: 52ch; }
.cage-id__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cage-id__cta:empty { display: none; }
.cage-id__code { position: relative; margin: 0; display: grid; gap: 14px; padding-left: clamp(16px, 3vw, 32px); border-left: 1px solid var(--line-strong); }
.cage-id__code dt { font: 500 11px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.cage-id__code dd { margin: 4px 0 0; font: 500 16px ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--accent); }
@media (max-width: 860px) { .cage-id { grid-template-columns: auto 1fr; } .cage-id__code { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 0; border-top: 1px solid var(--line-strong); padding: 16px 0 0; } }
@media (max-width: 520px) { .cage-id { grid-template-columns: 1fr; text-align: center; justify-items: center; } .cage-id__cta { justify-content: center; } .cage-id__code { text-align: left; gap: 8px; } .cage-id__code dd { font-size: 13px; letter-spacing: .02em; } }
.cage-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.cage-stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cage-stat svg { flex: none; width: 64px; height: 64px; transform: rotate(-90deg); }
.cage-stat__track { fill: none; stroke: rgba(150,170,255,.14); stroke-width: 6; }
.cage-stat__fill { fill: none; stroke: var(--c); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--c)); transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.cage-stat__txt { display: flex; flex-direction: column; min-width: 0; }
.cage-stat__txt strong { font: 400 36px/1 var(--display); }
.cage-stat__txt span { font-size: 13px; color: var(--text-2); }
.cage-stat__txt small { font-size: 12px; color: var(--faint); }
.cage-level { margin-top: 18px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.cage-level__row { display: flex; align-items: center; gap: 14px; font: 500 12px var(--ui); letter-spacing: .16em; text-transform: uppercase; }
.cage-level__now { color: var(--accent); } .cage-level__next { color: var(--faint); }
.cage-level__bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(150,170,255,.12); overflow: hidden; }
.cage-level__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7fe3ff, #b59cff); box-shadow: 0 0 12px rgba(127,227,255,.6); }
.cage-level .hint { margin: 8px 0 0; }
.cage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
@media (max-width: 860px) { .cage-grid { grid-template-columns: 1fr; } }
.cage-panel { padding: clamp(18px, 3vw, 26px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-width: 0; }
.cage-panel[hidden] { display: none; }
.cage-panel--wide { grid-column: 1 / -1; }
.cage-panel__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 16px; }
.cage-panel__bar h2 { margin: 0; font: 400 clamp(26px, 3.4vw, 34px)/1.05 var(--display); }
.cage-empty { color: var(--muted); font-size: 15px; margin: 0; list-style: none; }
.cage-saved { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.cage-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(5,8,22,.35); transition: transform .25s ease, border-color .25s ease; }
.cage-card:hover { transform: translateY(-3px); border-color: rgba(127,227,255,.45); }
.cage-card__media { display: grid; place-items: center; aspect-ratio: 4 / 3; }
.cage-card__media img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 60%, transparent 100%); }
.cage-card__t { font: 400 18px/1.15 var(--display); padding: 0 4px; }
.cage-card__m { font-size: 12px; color: var(--faint); padding: 0 4px; }
.cage-card__rm { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(10,14,36,.8); color: var(--text-2); font-size: 18px; line-height: 1; cursor: pointer; }
.cage-card__rm:hover { color: var(--hot); border-color: var(--hot); }
.cage-card__tag { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(127,227,255,.15); color: var(--accent); font: 500 11px var(--ui); }
.cage-saved__more { grid-column: 1 / -1; justify-self: start; font-size: 14px; color: var(--accent); }
.cage-log, .cage-votes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow: auto; }
.cage-log li, .cage-votes li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cage-log li:last-child, .cage-votes li:last-child { border-bottom: 0; }
.cage-log a, .cage-votes a { font: 400 18px/1.2 var(--display); }
.cage-log a:hover, .cage-votes a:hover { color: var(--accent); }
.cage-log__k { font: 500 11px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.cage-log li.is-now .cage-log__k { color: var(--accent); }
.cage-votes__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--text-2); }
.chip--agree { border-color: rgba(127,227,255,.5); color: var(--accent); }
.chip--disagree { border-color: rgba(255,122,168,.5); color: var(--hot); }
.chip--shift { border-color: rgba(181,156,255,.6); color: var(--accent-2); }
.cage-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cage-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px; border-radius: 16px; border: 1px dashed var(--line-strong); color: var(--faint); font-size: 12px; }
.cage-badge strong { font: 500 13px var(--ui); color: var(--muted); }
.cage-badge__i { font-size: 30px; filter: grayscale(1) opacity(.35); }
.cage-badge.got { border-style: solid; border-color: rgba(181,156,255,.45); background: radial-gradient(80% 80% at 50% 0%, rgba(139,92,246,.22), transparent 70%); color: var(--text-2); }
.cage-badge.got strong { color: var(--text); }
.cage-badge.got .cage-badge__i { filter: drop-shadow(0 0 10px rgba(181,156,255,.7)); }
.cage-news__ok { margin: 0 0 6px; font: 500 18px var(--ui); color: var(--accent); }
.cage-news__form, .cage-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cage-form { margin-bottom: 18px; }
.cage-form label { flex-basis: 100%; margin: 0; }
.cage-news__form input, .cage-form input { flex: 1 1 200px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(5,8,22,.55); color: var(--text); font: 15px var(--ui); }
.cage-news__form .hint { flex-basis: 100%; margin: 0; }
.cage-news__form .hint:empty { display: none; }
.cage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
html[data-theme="paper"] .cage-id { background: #fffdf8; }
html[data-theme="paper"] .cage-news__form input, html[data-theme="paper"] .cage-form input { background: #fff; }
@media (prefers-reduced-motion: reduce) { .cage-id__scan, .cage-id__ring { animation: none; } }
@media (max-width: 520px) { .cage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .cage-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; } .cage-stat svg { width: 46px; height: 46px; } .cage-stat__txt strong { font-size: 30px; } }

/* ---------- Your Cage: ranks, clickable tiles and sheets ---------- */
button.cage-stat { position: relative; width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
button.cage-stat:hover, button.cage-stat:focus-visible { transform: translateY(-2px); border-color: rgba(127,227,255,.45); box-shadow: 0 14px 34px -18px rgba(127,227,255,.55); }
.cage-stat__open { position: absolute; top: 10px; right: 12px; font-size: 13px; color: var(--faint); transition: color .2s ease, transform .2s ease; }
button.cage-stat:hover .cage-stat__open { color: var(--accent); transform: translate(2px, -2px); }
.cage-level:has(.cage-rank) { padding: 0; border: 0; background: none; }
.cage-rank { --rk: #7fe3ff; position: relative; overflow: hidden; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(14px, 3vw, 26px); align-items: center; padding: clamp(16px, 3vw, 22px) clamp(18px, 3vw, 26px); border: 1px solid color-mix(in srgb, var(--rk) 40%, transparent); border-radius: 22px; background: radial-gradient(90% 160% at 0% 50%, color-mix(in srgb, var(--rk) 16%, transparent), transparent 60%), var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.cage-rank:hover, .cage-rank:focus-visible { transform: translateY(-2px); box-shadow: 0 18px 40px -20px var(--rk); }
.cage-rank.r-E { --rk: #959dc4; } .cage-rank.r-D { --rk: #9fd8ff; } .cage-rank.r-C { --rk: #7fe3ff; } .cage-rank.r-B { --rk: #b59cff; }
.cage-rank.r-A { --rk: #ff9ad5; } .cage-rank.r-S { --rk: #ffd36e; } .cage-rank.r-AM { --rk: #ffb8f0; } .cage-rank.r-X { --rk: #ffffff; }
.cage-rank__sigil { position: relative; width: clamp(62px, 9vw, 78px); aspect-ratio: 1; display: grid; place-items: center; }
.cage-rank__ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--rk), transparent 30%, var(--rk) 50%, transparent 80%, var(--rk)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); animation: spin 10s linear infinite; }
.cage-rank__ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--rk) 55%, transparent); }
.cage-rank__g { font: 400 clamp(30px, 4.6vw, 40px)/1 var(--display); color: var(--rk); text-shadow: 0 0 18px var(--rk); }
.cage-rank__mid { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cage-rank__k { font: 500 11px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.cage-rank__name { font: 400 clamp(26px, 3.6vw, 36px)/1 var(--display); color: var(--text); }
.cage-rank .cage-level__bar { display: block; flex: none; height: 6px; }
.cage-rank .cage-level__bar i { background: linear-gradient(90deg, var(--rk), #b59cff); box-shadow: 0 0 12px var(--rk); }
.cage-rank__needs { font-size: 13px; color: var(--muted); }
.cage-rank__pts { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.cage-rank__pts strong { font: 400 clamp(32px, 4.6vw, 46px)/1 var(--display); color: var(--rk); }
.cage-rank__pts span { font-size: 12px; color: var(--faint); }
@media (max-width: 520px) { .cage-rank { grid-template-columns: auto minmax(0, 1fr); } .cage-rank__pts { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; } }
.cage-sheet { width: min(640px, calc(100vw - 32px)); max-height: min(86vh, 820px); padding: 0; border: 1px solid rgba(127,227,255,.28); border-radius: 26px; background: radial-gradient(120% 60% at 0% 0%, rgba(127,227,255,.10), transparent 60%), radial-gradient(90% 60% at 100% 100%, rgba(139,92,246,.18), transparent 60%), #0b1230; color: var(--text); box-shadow: 0 50px 120px -40px rgba(80,60,200,.75); display: none; flex-direction: column; overflow: hidden; }
.cage-sheet[open] { display: flex; animation: cageSheetIn .35s cubic-bezier(.2,.8,.2,1); }
.cage-sheet::backdrop { background: rgba(5,8,22,.66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@keyframes cageSheetIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.cage-sheet__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.cage-sheet__head .kicker { margin: 0 0 6px; }
.cage-sheet__t { margin: 0; font: 400 clamp(28px, 4vw, 38px)/1.05 var(--display); }
.cage-sheet__x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(5,8,22,.5); color: var(--text-2); font-size: 22px; line-height: 1; cursor: pointer; }
.cage-sheet__x:hover { color: var(--accent); border-color: var(--accent); }
.cage-sheet__body { padding: 8px 24px 26px; overflow: auto; overscroll-behavior: contain; }
.cage-sheet__lede { margin: 12px 0 4px; font: italic 400 20px/1.35 var(--reading); color: var(--text-2); }
.cage-sheet__h { margin: 22px 0 10px; font: 500 11px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.cage-sheet__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cage-sheet__idea { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); transition: opacity .25s ease, transform .25s ease; }
.cage-sheet__idea:last-child { border-bottom: 0; }
.cage-sheet__idea > a { flex: 1 1 240px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.cage-sheet__idea > a:hover strong { color: var(--accent); }
.cage-sheet__thumb { flex: none; width: 64px; height: 48px; display: grid; place-items: center; }
.cage-sheet__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); }
.cage-sheet__tx { display: flex; flex-direction: column; min-width: 0; }
.cage-sheet__tx strong { font: 400 18px/1.2 var(--display); }
.cage-sheet__tx small { font-size: 12px; color: var(--faint); }
.cage-sheet__idea .cage-votes__chips { flex-basis: 100%; margin: 0 0 0 76px; }
.cage-sheet__rm { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--text-2); font: 500 13px var(--ui); cursor: pointer; }
.cage-sheet__rm:hover { color: var(--hot); border-color: var(--hot); }
.cage-sheet__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.cage-sheet__nums div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(5,8,22,.35); }
.cage-sheet__nums strong { display: block; font: 400 30px/1 var(--display); color: var(--accent); }
.cage-sheet__nums span { font-size: 12px; color: var(--faint); }
.cage-sheet .cage-badges { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.cage-sheet .hint { margin: 14px 0 0; }
.is-gone { opacity: 0 !important; transform: scale(.96); pointer-events: none; }
.cage-card { transition: transform .25s ease, border-color .25s ease, opacity .25s ease; }
.cage-meter { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.cage-meter__bar { flex: 1; height: 10px; border-radius: 10px; background: rgba(150,170,255,.12); overflow: hidden; }
.cage-meter__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7fe3ff, #b59cff); box-shadow: 0 0 14px rgba(127,227,255,.6); }
.cage-meter strong { font: 400 34px/1 var(--display); color: var(--accent); }
.cage-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
.cage-cal__w { text-align: center; font: 500 11px var(--ui); color: var(--faint); }
.cage-cal__d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.cage-cal__d.on { border-color: rgba(255,122,168,.6); background: radial-gradient(circle, rgba(255,122,168,.35), rgba(255,122,168,.08)); color: var(--text); box-shadow: 0 0 12px -2px rgba(255,122,168,.6); }
.cage-cal__d.today { outline: 1px solid var(--accent); outline-offset: 2px; }
.cage-cal__d.future { opacity: .35; }
.cage-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cage-ladder__r { --rk: #959dc4; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); opacity: .6; }
.cage-ladder__r.r-D { --rk: #9fd8ff; } .cage-ladder__r.r-C { --rk: #7fe3ff; } .cage-ladder__r.r-B { --rk: #b59cff; } .cage-ladder__r.r-A { --rk: #ff9ad5; } .cage-ladder__r.r-S { --rk: #ffd36e; } .cage-ladder__r.r-AM { --rk: #ffb8f0; } .cage-ladder__r.r-X { --rk: #ffffff; }
.cage-ladder__r.done { opacity: .85; }
.cage-ladder__r.now { opacity: 1; border-color: var(--rk); background: color-mix(in srgb, var(--rk) 10%, transparent); box-shadow: 0 0 22px -10px var(--rk); }
.cage-ladder__g { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--rk); color: var(--rk); font: 400 18px/1 var(--display); }
.cage-ladder__tx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cage-ladder__tx strong { font: 500 15px var(--ui); }
.cage-ladder__tx small { font-size: 12px; color: var(--faint); }
.cage-ladder__you { padding: 2px 10px; border-radius: 999px; background: var(--rk); color: #0a0e24; font: 600 11px var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.cage-disc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.cage-disc li { padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line-strong); display: flex; flex-direction: column; gap: 2px; }
.cage-disc li strong { font: 500 14px var(--ui); color: var(--muted); }
.cage-disc li span { font-size: 12px; color: var(--faint); }
.cage-disc li.done { border-style: solid; border-color: rgba(127,227,255,.45); background: rgba(127,227,255,.06); }
.cage-disc li.done strong { color: var(--accent); }
.cage-points { width: 100%; border-collapse: collapse; font-size: 14px; }
.cage-points td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.cage-points td:nth-child(2) { color: var(--faint); font-size: 12px; text-align: right; padding-right: 14px; }
.cage-points td:last-child { text-align: right; font-variant-numeric: tabular-nums; width: 70px; }
.cage-points tr.zero { color: var(--faint); }
.cage-points tr.total td { border-bottom: 0; font-weight: 600; color: var(--accent); font-size: 16px; }
.cage-badge.is-award { border-color: rgba(255,211,110,.55); background: radial-gradient(80% 80% at 50% 0%, rgba(255,211,110,.2), transparent 70%); }
.cage-badge.is-award .cage-badge__i { filter: drop-shadow(0 0 10px rgba(255,211,110,.7)); }
.cage-badge.is-secret.got { border-color: rgba(255,122,168,.5); background: radial-gradient(80% 80% at 50% 0%, rgba(255,122,168,.18), transparent 70%); }
.cage-badge.is-secret:not(.got) .cage-badge__i { font: 400 30px/1 var(--display); filter: none; color: var(--faint); }
.cage-reward { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 16px 18px; border-radius: 18px; border: 1px solid rgba(255,211,110,.45); background: radial-gradient(100% 120% at 0% 0%, rgba(255,211,110,.16), transparent 60%); }
.cage-reward__i { font-size: 46px; filter: drop-shadow(0 0 16px rgba(255,211,110,.7)); animation: cageRewardIn .9s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes cageRewardIn { from { transform: scale(.2) rotate(-30deg); opacity: 0; } }
.cage-reward strong { display: block; font: 400 26px/1.1 var(--display); }
.cage-reward__pts { display: inline-block; margin-top: 4px; font: 600 13px var(--ui); color: #ffd36e; }
.cage-reward p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.swipe__btn--undo { width: 48px; height: 48px; color: var(--muted); font-size: 20px; }
.swipe__btn--undo:disabled { opacity: .35; cursor: default; transform: none; }
@media (max-width: 600px) {
  .cage-sheet { width: 100vw; max-width: 100vw; max-height: 90vh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .cage-sheet[open] { animation: cageSheetUp .35s cubic-bezier(.2,.8,.2,1); }
  .cage-sheet__head::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-strong); }
  .cage-sheet__head { position: relative; padding-top: 24px; }
  .cage-sheet__body { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
}
@keyframes cageSheetUp { from { transform: translateY(100%); } }
html[data-theme="paper"] .cage-sheet, html[data-theme="paper"] .rd-dlg { background: #fffdf8; }
@media (prefers-reduced-motion: reduce) { .cage-rank__ring, .cage-sheet[open], .cage-reward__i { animation: none; } }

/* "In this idea" on phones and tablets: a tidy fold-out above the article */
.toc-m { display: none; }
@media (max-width: 1024px) {
  .toc-m { display: block; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .toc-m summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; cursor: pointer; list-style: none; }
  .toc-m summary::-webkit-details-marker { display: none; }
  .toc-m summary .kicker { margin: 0; }
  .toc-m__n { font-size: 12px; color: var(--faint); }
  .toc-m__n::after { content: " ▾"; color: var(--accent); }
  .toc-m[open] .toc-m__n::after { content: " ▴"; }
  .toc-m ol { list-style: none; margin: 0; padding: 0 18px 16px; display: grid; gap: 10px; font-size: 14px; line-height: 1.45; counter-reset: tocm; }
  .toc-m li { counter-increment: tocm; display: flex; gap: 10px; }
  .toc-m li::before { content: counter(tocm, decimal-leading-zero); flex: none; font: 500 11px/1.9 var(--ui); color: var(--accent); }
  .toc-m a { color: var(--text-2); }
}
.prose .toc-anchor { scroll-margin-top: 96px; }

/* ---------- Invite a friend (Elixirs) ---------- */
.cage-level:has(.cage-rank) { display: grid; gap: 14px; }
.cage-invite { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(240px, auto); gap: clamp(14px, 3vw, 24px); align-items: center; padding: clamp(16px, 3vw, 22px) clamp(18px, 3vw, 26px); border: 1px solid rgba(255,122,168,.35); border-radius: 22px; background: radial-gradient(80% 160% at 0% 50%, rgba(255,122,168,.14), transparent 60%), radial-gradient(60% 120% at 100% 0%, rgba(181,156,255,.14), transparent 60%), var(--surface); }
.cage-invite__flask { font-size: clamp(38px, 6vw, 52px); filter: drop-shadow(0 0 16px rgba(255,122,168,.7)); animation: cageFlask 3.6s ease-in-out infinite; }
@keyframes cageFlask { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-4px); } }
.cage-invite__mid { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cage-invite__t { font: 400 clamp(24px, 3.2vw, 32px)/1.05 var(--display); }
.cage-invite__p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 62ch; }
.cage-invite__act { display: flex; flex-direction: column; gap: 8px; }
.cage-invite__act input { min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(5,8,22,.55); color: var(--accent); font: 13px ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-overflow: ellipsis; }
@media (max-width: 860px) { .cage-invite { grid-template-columns: auto minmax(0, 1fr); } .cage-invite__act { grid-column: 1 / -1; } }
.cage-reward.is-elixir { border-color: rgba(255,122,168,.55); background: radial-gradient(100% 120% at 0% 0%, rgba(255,122,168,.2), transparent 60%); }
.cage-reward.is-elixir .cage-reward__i { filter: drop-shadow(0 0 18px rgba(255,122,168,.85)); }
html[data-theme="paper"] .cage-invite__act input { background: #fff; }
@media (prefers-reduced-motion: reduce) { .cage-invite__flask { animation: none; } }
.cage-invite__flask svg, .cage-reward__i svg { display: block; width: clamp(44px, 6vw, 58px); height: auto; }
.cage-invite__flask { filter: drop-shadow(0 0 14px rgba(181,156,255,.6)); }
