/* ============================================================
   One Global Mind — white paper reading page
   Long-form, Glasswing-inspired. Inherits tokens from site.css
   ============================================================ */

/* Reading progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; background: transparent; }
.progress-bar { height: 100%; background: var(--accent-text); transform: scaleX(0); transform-origin: 0 50%; transition: transform .1s linear; }

/* ---------- Article header ---------- */
.paper-hero { padding: clamp(56px, 9vw, 120px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.paper-hero .wrap { max-width: 940px; }
.paper-kicker { margin-bottom: 26px; }
.paper-title { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.02; margin-bottom: 24px; }
.paper-sub { font-family: var(--lead-font); font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.4;
  color: var(--ink-2); max-width: 36ch; font-weight: 400; }
[data-direction="paper"] .paper-sub, [data-direction="press"] .paper-sub { font-style: italic; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 38px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.byline a { color: var(--accent-text); }
.byline a:hover { text-decoration: underline; }

.paper-epi { max-width: 940px; margin: clamp(36px,5vw,56px) auto 0; padding: 0 var(--pad); }
.paper-epi blockquote { margin: 0; font-family: var(--f-body); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.3; color: var(--ink); border-left: 2px solid var(--accent-text); padding-left: 26px; max-width: 30ch; }
.paper-epi cite { display: block; margin-top: 14px; font-style: normal; font-family: var(--f-mono);
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Visual summary band ---------- */
.visual-summary { max-width: 940px; margin: clamp(44px,6vw,72px) auto 0; padding: 0 var(--pad); }
.vs-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.vs-note { font-family: var(--f-body); font-size: 1.02rem; color: var(--ink-2); margin: 0; max-width: 52ch; }
.vs-figure { margin: 0; }
.vs-thumb { display: block; width: 100%; padding: clamp(14px,2.4vw,30px); border: 1px solid var(--line);
  background: var(--bg-2); cursor: zoom-in; position: relative; overflow: hidden; transition: border-color .25s ease; }
.vs-thumb img { width: 100%; max-width: 560px; margin: 0 auto; display: block;
  box-shadow: 0 18px 50px -24px rgba(0,0,0,.5); transition: transform .35s ease; }
.vs-thumb:hover { border-color: var(--line-2); }
.vs-thumb:hover img { transform: scale(1.012); }
.vs-thumb:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.vs-zoom { position: absolute; bottom: clamp(14px,2.4vw,30px); left: 50%; transform: translateX(-50%) translateY(8px);
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; opacity: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--accent); border-radius: 2px; transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.vs-zoom svg { width: 15px; height: 15px; }
.vs-thumb:hover .vs-zoom, .vs-thumb:focus-visible .vs-zoom { opacity: 1; transform: translateX(-50%) translateY(0); }
.vs-cap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 16px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.vs-cap a { color: var(--accent-text); border-bottom: 1px solid color-mix(in srgb, var(--accent-text) 38%, transparent); padding-bottom: 2px; }
.vs-cap a:hover { border-bottom-color: var(--accent-text); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  padding: clamp(20px,4vw,56px); background: rgba(8,8,10,.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox.open { display: flex; }
.lightbox .lb-img { max-width: min(560px, 100%); max-height: 92vh; width: auto; height: auto;
  box-shadow: 0 30px 90px -30px rgba(0,0,0,.8); animation: lbpop .3s ease; }
@keyframes lbpop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lightbox .lb-img { animation: none; } }
.lb-close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font-size: 17px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.lb-close:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); }

/* ---------- Layout: TOC + article ---------- */
.paper-layout { display: grid; grid-template-columns: 1fr; gap: 0;
  max-width: 1160px; margin: 0 auto; padding: clamp(40px,6vw,80px) var(--pad) 0; }
@media (min-width: 1000px) {
  .paper-layout { grid-template-columns: 230px minmax(0, 720px); justify-content: center; gap: clamp(40px, 6vw, 90px); }
}

.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
}
.toc-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 7px 0; font-family: var(--f-mono);
  font-size: 12.5px; line-height: 1.35; color: var(--ink-3); border-left: 2px solid transparent; padding-left: 14px; transition: color .2s, border-color .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--ink-3); }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--accent-text); }
.toc a.active::before { color: var(--accent-text); }

/* ---------- Prose ---------- */
.article { min-width: 0; }
.prose-sec { padding: clamp(36px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.prose-sec:first-child { border-top: 0; padding-top: 0; }
.prose-kicker { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.prose-kicker .pn { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--accent-text); }
.prose-kicker .pk { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.prose-sec h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.08; margin-bottom: 24px; }
.article p { font-family: var(--body-font); font-size: 1.16rem; line-height: 1.72; color: var(--ink-2); margin: 0 0 1.3em; }
.article p:last-child { margin-bottom: 0; }
.article p strong { color: var(--ink); font-weight: 600; }
.article p em { font-style: italic; }
.article a.inline { color: var(--accent-text); border-bottom: 1px solid color-mix(in srgb, var(--accent-text) 40%, transparent); }
.article a.inline:hover { border-bottom-color: var(--accent-text); }

/* drop cap on opener */
.dropcap::first-letter { font-family: var(--head-font); font-weight: var(--head-weight); float: left;
  font-size: 3.6em; line-height: .82; padding: 6px 12px 0 0; color: var(--ink); }
[data-direction="paper"] .dropcap::first-letter { color: var(--accent); }

/* pull quote */
.pull { margin: clamp(30px,4vw,48px) 0; padding: 0; }
.pull blockquote { margin: 0; font-family: var(--f-body); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.24; color: var(--ink); letter-spacing: -0.01em;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.pull blockquote .accent { color: var(--accent-text); }

/* component spacing inside article */
.article .timeline-block, .article .contrast-grid { margin: clamp(30px,4vw,44px) 0; }

/* end / references */
.refs { border-top: 1px solid var(--line); padding-top: 40px; }
.refs h2 { font-size: 1.4rem; margin-bottom: 24px; }
.refs ol { margin: 0; padding-left: 0; list-style: none; counter-reset: ref; display: flex; flex-direction: column; gap: 14px; }
.refs li { counter-increment: ref; position: relative; padding-left: 36px;
  font-size: 0.98rem; line-height: 1.55; color: var(--ink-2); font-family: var(--f-body); }
.refs li::before { content: counter(ref); position: absolute; left: 0; top: 0;
  font-family: var(--f-mono); font-size: 12px; line-height: 1.9; color: var(--accent-text); }
.refs cite { font-style: italic; color: var(--ink); }

/* in-article CTA */
.paper-cta { margin-top: clamp(48px,6vw,72px); padding: clamp(30px,4vw,44px); border: 1px solid var(--line);
  background: var(--bg-2); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
[data-direction="press"] .paper-cta { background: var(--bg-2); color: #ECECEC; --ink:#ECECEC; --ink-2:#B7B7B9; --line: rgba(236,236,236,.14); }
.paper-cta .lbl { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.paper-cta h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); max-width: 22ch; }
.cta-aside { margin: 4px 0 0; font-family: var(--f-body); font-size: 0.98rem; color: var(--ink-2); }
.cta-aside a { color: var(--accent-text); border-bottom: 1px solid color-mix(in srgb, var(--accent-text) 38%, transparent); }
.cta-aside a:hover { border-bottom-color: var(--accent-text); }
.menu a.vs-open { cursor: pointer; }

@media (max-width: 999px) {
  .pull blockquote { font-size: 1.5rem; }
}
