/* /psi: the explainer. A paper, set like a lab notebook, in the site's system (tokens in site.css). */

/* the lattice the page opens under, and the layer the words are built on */
.decode { position: fixed; inset: 0; z-index: 120; background: var(--void); display: none; }
html.psi-enter .decode { display: block; } /* only when arriving from "What is ψ?": a direct visit opens on the text */
.decode canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.decode.open { background: transparent; pointer-events: none; }
.assemble-layer { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 35; pointer-events: none; }
.pending { opacity: 0; }
.assembling, .assembling * { color: transparent !important; text-shadow: none !important; }

.psi { padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
.psi-hero { padding-block: clamp(36px, 6vh, 64px) clamp(48px, 7vh, 88px); display: grid; gap: 24px; }
.acro { margin: 0; font-weight: 500; font-size: clamp(46px, 7.2vw, 112px); line-height: .95; letter-spacing: -0.045em; display: grid; }
.acro .w b { font-weight: 500; color: var(--cherenkov); text-shadow: 0 0 26px var(--cherenkov-glow); }
.psi-hero .lede { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink); max-width: 58ch; margin: 0; }

/* equations: mono, with a math fallback for the symbols Geist Mono lacks */
.eq { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--glass, var(--panel)); padding: 16px 20px; margin: 20px 0; font: 400 15px/1.7 var(--mono), "Cambria Math", "STIX Two Math", "Latin Modern Math", serif; color: var(--ink); overflow-x: auto; }
.eq .eq-l { white-space: nowrap; }
.eq .eq-r { color: var(--muted); font-size: 13px; }
.eq sup, .eq sub { font-size: .7em; line-height: 0; }
.hero-eq { font-size: clamp(14px, 1.35vw, 18px); max-width: 980px; }

.psi-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-bottom: 120px; border-top: 1px solid var(--line); padding-top: 64px; }
.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 4px; }
.toc a { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--muted); font-size: 14px; transition: background var(--t-snap), color var(--t-snap); }
.toc a b { font: 500 20px/1 var(--sans); color: var(--ink); }
.toc a:hover, .toc a.on { background: var(--panel); color: var(--ink); }
.toc a.on b { color: var(--cherenkov); }

.paper { min-width: 0; max-width: 76ch; }
.part { padding-block: 8px 72px; scroll-margin-top: 90px; }
.part + .part { border-top: 1px solid var(--line); padding-top: 64px; }
.part-k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.paper h2 { margin: 14px 0 20px; max-width: 24ch; font-size: clamp(28px, 3vw, 42px); }
.paper h2 b { font-weight: 500; color: var(--cherenkov); }
.paper h3 { margin: 34px 0 10px; font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.paper p { color: #B9BEC5; font-size: 16px; line-height: 1.72; margin: 12px 0; }
.paper p .mono { color: var(--ink); font-size: .92em; }
.paper sup, .paper sub { font-size: .72em; line-height: 0; }

.facts { margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts div { background: var(--void); padding: 14px 16px; }
.facts dt { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.facts dd { margin: 6px 0 0; font-size: 15px; color: var(--ink); }

.chain { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 0; counter-reset: c; position: relative; }
.chain::before { content: ""; position: absolute; left: 92px; top: 12px; bottom: 12px; width: 1px; background: linear-gradient(var(--cherenkov), var(--line) 18%, var(--line) 82%, var(--cherenkov)); opacity: .6; }
.chain li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 32px; padding: 11px 0; font-size: 14px; color: var(--ink); align-items: baseline; }
.chain li .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: right; }
.chain li:first-child .k, .chain li:last-child .k { color: var(--cherenkov); }

.psi-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

@media (max-width: 960px) {
  .psi-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .chain::before { left: 70px; }
  .chain li { grid-template-columns: 56px minmax(0, 1fr); gap: 28px; font-size: 13px; }
  .eq { font-size: 13px; padding: 14px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}

/* before launch (html.locked): the explainer is the only page open, so nothing here links into the locked site */
.lock-pill { display: none; align-items: center; gap: 9px; height: 32px; padding: 0 12px 0 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(5, 5, 7, .6); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.lock-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pulse 2.4s ease-in-out infinite; }
html.locked .lock-pill { display: inline-flex; }
html.locked .nav-links a:not(.on), html.locked #ca-chip, html.locked #buy-btn, html.locked .nav-right .btn.icon,
html.locked .psi-cta, html.locked .feedbar, html.locked .foot a[href^="https://x.com"] { display: none !important; }
html.locked body { padding-bottom: 0; }
