/* ==========================================================================
   WORLD VIEW LEDGER — design system v2
   Fonts: Clash Display (display) · Satoshi (interface + text) · Sentient (long reads)
   ========================================================================== */

:root {
  /* Surfaces */
  --ink: #08090E;
  --ink-2: #10121A;
  --ink-3: #1A1D29;
  --fog: #EFEEEA;
  --fog-2: #E4E2DC;
  --white: #FFFFFF;

  /* Text */
  --text: #0D0F15;
  --text-2: #3D4250;
  --dim: #6B7080;
  --on-ink: #F4F3F0;
  --on-ink-dim: #9A9EAD;

  /* Signal colours (brand aurora) */
  --iris: #5B4BFF;
  --flare: #FF3D7F;
  --solar: #FFB23F;
  --lagoon: #00C9A7;
  --grad: linear-gradient(100deg, var(--iris) 0%, var(--flare) 55%, var(--solar) 100%);
  --grad-soft: linear-gradient(100deg, rgba(91,75,255,.14), rgba(255,61,127,.12) 55%, rgba(255,178,63,.14));

  --line: rgba(13,15,21,.12);
  --line-ink: rgba(255,255,255,.12);

  --f-display: "Clash Display", "Satoshi", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "Satoshi", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-read: "Sentient", Georgia, "Times New Roman", serif;

  --t-xs: .78rem; --t-sm: .9rem; --t-md: 1.05rem; --t-lg: 1.3rem; --t-xl: 1.7rem;
  --t-2xl: clamp(1.9rem, 3vw, 2.5rem);
  --t-3xl: clamp(2.4rem, 5vw, 4.2rem);
  --t-4xl: clamp(3.2rem, 8vw, 7.5rem);
  --t-mega: clamp(4rem, min(14.5vw, 19.5vh), 15rem);

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 5rem; --s9: 8rem;
  --r-xl: 32px; --r-lg: 22px; --r-md: 14px; --r-pill: 999px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --wrap: 1360px;

  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-io: cubic-bezier(.76, 0, .24, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--fog); color: var(--text);
  font-family: var(--f-ui); font-size: var(--t-md); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 var(--s4); }
h1, h2, h3, h4 { margin: 0 0 var(--s4); font-family: var(--f-display); font-weight: 600; line-height: .98; letter-spacing: -.025em; }
h1 { font-size: var(--t-4xl); } h2 { font-size: var(--t-3xl); } h3 { font-size: var(--t-xl); letter-spacing: -.015em; line-height: 1.08; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--iris); outline-offset: 4px; border-radius: 6px; }
::selection { background: var(--flare); color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 999; background: var(--white); color: var(--text); padding: .8rem 1.1rem; border-radius: var(--r-md); transition: top .3s; }
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dark { background: var(--ink); color: var(--on-ink); }
.dark .dim, .dark p.dim { color: var(--on-ink-dim); }
.dim { color: var(--dim); }

/* Grain overlay for depth */
.grain { position: fixed; inset: -50%; z-index: 400; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-4%)} 60%{transform:translate(-4%,3%)} 80%{transform:translate(3%,1%)} 100%{transform:translate(0,0)} }

/* ---------- Loader (first visit per session) ---------- */
.loader { position: fixed; inset: 0; z-index: 900; background: var(--ink); color: var(--on-ink); display: none; }
.has-loader .loader { display: grid; }
.loader__inner { align-self: end; padding: var(--gutter); display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s6); }
.loader__word { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.6rem, 9vw, 9rem); line-height: 1; letter-spacing: -.04em; overflow: hidden; display: flex; padding-bottom: .05em; }
.loader__word span { display: inline-block; }
.loader__count { font-family: var(--f-display); font-size: clamp(2rem, 6vw, 5rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.loader__bar { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* ---------- Page transition ---------- */
.swipe { position: fixed; inset: 0; z-index: 800; pointer-events: none; display: grid; grid-template-columns: repeat(5, 1fr); }
.swipe i { display: block; background: var(--ink); transform: scaleY(0); transform-origin: bottom; }
.swipe i:nth-child(odd) { background: var(--ink-2); }
.swipe__mark { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
.swipe__mark span { font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 6vw, 4.5rem); letter-spacing: -.03em; color: var(--on-ink); }
.is-entering .swipe i { transform: scaleY(1); }
.is-entering .swipe__mark { opacity: 1; }

/* ---------- Cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 700; pointer-events: none; mix-blend-mode: difference; display: none; }
.has-cursor .cursor { display: block; }
.cursor__dot { position: fixed; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; }
.cursor__ring { position: fixed; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 1px solid #fff;
  display: grid; place-items: center; transition: width .45s var(--e-out), height .45s var(--e-out), margin .45s var(--e-out), background .3s, border-color .3s; }
.cursor__ring span { font-size: .72rem; font-weight: 700; color: #000; opacity: 0; transition: opacity .2s; }
.cursor.is-hover .cursor__ring { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: #fff; }
.cursor.is-label .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: #fff; }
.cursor.is-label .cursor__ring span { opacity: 1; }
.cursor.is-hidden { opacity: 0; }

/* ---------- Header ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 300; padding-top: var(--s4); transition: transform .6s var(--e-out); }
.header.is-hidden { transform: translateY(-120%); }
.header__bar {
  display: flex; align-items: center; gap: var(--s4);
  padding: .6rem .6rem .6rem 1.2rem; border-radius: var(--r-pill);
  background: rgba(8,9,14,.55); color: var(--on-ink);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.1);
}
.logo { display: flex; align-items: center; gap: .65rem; margin-right: auto; }
.logo__mark { width: 30px; height: 30px; flex: none; }
.logo__mark .spin { transform-origin: 50% 50%; animation: spin 14s linear infinite; }
.logo__name { font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; }
.editions { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: rgba(255,255,255,.07); }
.editions a {
  position: relative; padding: .45rem .85rem; border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 600;
  color: var(--on-ink-dim); transition: color .3s; overflow: hidden; isolation: isolate;
}
.editions a::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--on-ink); transform: translateY(101%); transition: transform .5s var(--e-out); }
.editions a:hover, .editions a[aria-current="page"] { color: var(--ink); }
.editions a:hover::before, .editions a[aria-current="page"]::before { transform: none; }
.header__links { display: flex; gap: var(--s1); }
.header__links a { padding: .45rem .75rem; font-size: var(--t-sm); font-weight: 600; position: relative; }
.header__links a::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .2rem; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--e-out); }
.header__links a:hover::after, .header__links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); flex: none; transition: background .3s; }
.round-btn:hover { background: rgba(255,255,255,.2); }
.round-btn svg { width: 19px; height: 19px; }
.burger { width: 44px; height: 44px; border-radius: 50%; background: var(--on-ink); color: var(--ink); display: grid; place-items: center; flex: none; }
.burger span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .5s var(--e-out); }
.burger span + span { margin-top: 5px; width: 12px; justify-self: start; margin-left: 13px; }
.burger:hover span + span { transform: translateX(6px); }

/* ---------- Full-screen menu ---------- */
.menu { position: fixed; inset: 0; z-index: 500; background: var(--ink); color: var(--on-ink); visibility: hidden; clip-path: inset(0 0 100% 0); overflow-y: auto; }
.menu__glow { position: absolute; inset: auto -20% -40% auto; width: 70vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(91,75,255,.5), rgba(255,61,127,.2) 45%, transparent 70%); filter: blur(30px); pointer-events: none; }
.menu__top { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--s4) + .6rem) var(--gutter); }
.menu__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s7); padding: var(--s6) var(--gutter) var(--s7); position: relative; }
.menu__big { list-style: none; margin: 0; padding: 0; }
.menu__big li { overflow: hidden; }
.menu__big a { display: flex; align-items: baseline; gap: var(--s4); font-family: var(--f-display); font-weight: 600; font-size: clamp(2.6rem, 7vw, 6rem); line-height: 1.02; letter-spacing: -.035em; transition: color .3s, transform .6s var(--e-out); }
.menu__big a small { font-family: var(--f-ui); font-size: var(--t-sm); font-weight: 500; letter-spacing: 0; color: var(--on-ink-dim); }
.menu__big a:hover { transform: translateX(1.2rem); }
.menu__big:hover a { color: rgba(255,255,255,.3); }
.menu__big:hover a:hover { color: var(--on-ink); }
.menu__side h2 { font-family: var(--f-ui); font-size: var(--t-sm); font-weight: 600; color: var(--on-ink-dim); margin: 0 0 var(--s3); letter-spacing: 0; }
.menu__side ul { list-style: none; padding: 0; margin: 0 0 var(--s6); display: grid; gap: .35rem; }
.menu__side a { font-size: var(--t-lg); font-weight: 500; }
.menu__side a:hover { color: var(--solar); }
.motion .menu .reveal-row { transform: translateY(110%); }

/* ---------- Search ---------- */
.search { position: fixed; inset: 0; z-index: 520; background: rgba(8,9,14,.92); color: var(--on-ink); visibility: hidden; opacity: 0;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: grid; align-content: center; transition: opacity .5s, visibility .5s; }
.search.is-open { visibility: visible; opacity: 1; }
.search form { display: flex; align-items: center; gap: var(--s4); border-bottom: 2px solid rgba(255,255,255,.25); padding-bottom: var(--s3); transform: translateY(30px); transition: transform .8s var(--e-out); }
.search.is-open form { transform: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: inherit; font-family: var(--f-display); font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 500; letter-spacing: -.03em; outline: none; }
.search input::placeholder { color: rgba(255,255,255,.28); }
.search__close { position: absolute; top: var(--s5); right: var(--gutter); }
.search p { margin-top: var(--s4); color: var(--on-ink-dim); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--text); --fg: var(--fog);
  position: relative; display: inline-flex; align-items: center; gap: .7rem; min-height: 54px; padding: 0 1.6rem;
  border-radius: var(--r-pill); background: var(--bg); color: var(--fg); font-weight: 700; font-size: var(--t-md);
  overflow: hidden; isolation: isolate; white-space: nowrap;
}
.btn::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--grad); border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--e-out); }
.btn:hover::before { transform: none; }
.btn:hover { color: #fff; }
.btn__label { display: inline-block; position: relative; overflow: hidden; }
.btn__label span { display: block; transition: transform .6s var(--e-out); }
.btn__label span + span { position: absolute; inset: 0; transform: translateY(110%); }
.btn:hover .btn__label span:first-child { transform: translateY(-110%); }
.btn:hover .btn__label span + span { transform: none; }
.btn__icon { width: 30px; height: 30px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; margin-right: -1rem; transition: transform .6s var(--e-out); }
.btn:hover .btn__icon { transform: rotate(-45deg); background: #fff; color: var(--ink); }
.btn__icon svg { width: 15px; height: 15px; }
.btn--light { --bg: var(--on-ink); --fg: var(--ink); }
.btn--line { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--line .btn__icon { background: currentColor; }
.btn--line .btn__icon svg { color: var(--fog); }
.dark .btn--line .btn__icon svg { color: var(--ink); }
.btn--sm { min-height: 42px; padding: 0 1.1rem; font-size: var(--t-sm); }

.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 600; border: 1px solid var(--line); background: var(--white); color: var(--text-2); transition: background .3s, color .3s, border-color .3s; }
a.pill:hover, button.pill:hover { background: var(--text); color: var(--fog); border-color: var(--text); }
.pill[aria-pressed="true"] { background: var(--text); color: var(--fog); border-color: var(--text); }
.dark .pill { background: rgba(255,255,255,.06); border-color: var(--line-ink); color: var(--on-ink); }
.pill--grad { background: var(--grad-soft); border-color: transparent; color: var(--text); }
.tag { font-size: var(--t-xs); font-weight: 700; color: var(--iris); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; padding: 170px 0 var(--s6); }
.hero__canvas, .hero__fallback { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.hero__fallback { background:
  radial-gradient(40% 50% at 20% 30%, rgba(91,75,255,.65), transparent 70%),
  radial-gradient(35% 45% at 80% 25%, rgba(255,61,127,.5), transparent 70%),
  radial-gradient(40% 50% at 60% 80%, rgba(255,178,63,.35), transparent 70%), var(--ink); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,9,14,.2), rgba(8,9,14,0) 40%, rgba(8,9,14,.75) 100%); }
.hero__top { position: absolute; top: 108px; left: 0; right: 0; }
.hero__top .wrap { display: flex; justify-content: space-between; gap: var(--s5); font-size: var(--t-sm); color: var(--on-ink-dim); }
.hero__live { display: inline-flex; align-items: center; gap: .55rem; color: var(--on-ink); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flare); box-shadow: 0 0 0 0 rgba(255,61,127,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,61,127,0); } 100% { box-shadow: 0 0 0 0 rgba(255,61,127,0); } }
.hero__title { font-size: var(--t-mega); line-height: .82; letter-spacing: -.055em; font-weight: 600; margin: 0 0 var(--s6); color: var(--on-ink); }
.hero__title .row { display: flex; align-items: center; gap: .12em; overflow: hidden; padding-block: .02em .22em; margin-bottom: -.18em; }
.hero__title .row--indent { padding-left: 14vw; }
.hero__title .row--right { justify-content: flex-end; }
.rotator {
  display: inline-grid; height: 1.5em; min-width: 5.4em; padding: 0 .6em; margin-left: .3em; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px);
  font-size: .2em; letter-spacing: -.01em; line-height: 1.5em; overflow: hidden; align-self: center; font-weight: 500;
}
.rotator span { grid-area: 1/1; align-self: center; justify-self: center; transform: translateY(120%); white-space: nowrap; }
.rotator span.is-on { transform: none; }
.hero__foot { display: grid; grid-template-columns: 1fr auto; gap: var(--s6); align-items: end; color: var(--on-ink); border-top: 1px solid rgba(255,255,255,.18); padding-top: var(--s5); }
.hero__lede { font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.4; max-width: 36ch; margin: 0; color: var(--on-ink); }
.hero__actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
.scroll-cue { display: inline-flex; align-items: center; gap: .6rem; font-size: var(--t-sm); color: var(--on-ink-dim); }
.scroll-cue i { width: 1px; height: 38px; background: rgba(255,255,255,.25); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: translateY(-100%); animation: cue 2s var(--e-io) infinite; }
@keyframes cue { 50% { transform: none; } 100% { transform: translateY(100%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(5rem, 11vw, 10rem); position: relative; }
.section--flush-top { padding-top: 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: var(--s6); flex-wrap: wrap; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.head h2 { margin: 0; max-width: 14ch; }
.head p { max-width: 40ch; margin: 0; color: var(--dim); font-size: var(--t-lg); line-height: 1.4; }
.dark .head p { color: var(--on-ink-dim); }
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-size: var(--t-sm); font-weight: 600; color: var(--dim); margin-bottom: var(--s4); }
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--grad); border-radius: 2px; }
.dark .kicker { color: var(--on-ink-dim); }

/* Manifesto scrub text */
.manifesto { font-family: var(--f-display); font-weight: 500; font-size: clamp(2rem, 4.6vw, 4.4rem); line-height: 1.04; letter-spacing: -.03em; max-width: 20ch; margin: 0; }
.manifesto .w { opacity: .14; transition: opacity .1s; }
.no-motion .manifesto .w { opacity: 1; }
.manifesto em { font-style: normal; }

/* Line mask reveal */
.mask { overflow: hidden; display: block; }
.mask > span { display: block; }

/* ---------- Story cards ---------- */
.feed { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 2.4vw, 2rem); }
.story { grid-column: span 4; position: relative; display: flex; flex-direction: column; gap: var(--s3); }
.story__media { position: relative; aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; background: var(--fog-2); transform: translateZ(0); }
.story__media img { width: 100%; height: 115%; object-fit: cover; transition: transform 1.2s var(--e-out); }
.story:hover .story__media img { transform: scale(1.06); }
.story__media .art { position: absolute; inset: 0; }
.story__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: var(--t-xs); color: var(--dim); font-weight: 600; }
.story__title { font-family: var(--f-display); font-size: var(--t-xl); font-weight: 600; line-height: 1.04; letter-spacing: -.02em; margin: 0; }
.story__title a { background: linear-gradient(currentColor, currentColor) 0 96% / 0 2px no-repeat; transition: background-size .6s var(--e-out); }
.story:hover .story__title a { background-size: 100% 2px; }
.story__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.story__dek { color: var(--text-2); margin: 0; font-size: var(--t-md); }
.story__by { font-size: var(--t-xs); color: var(--dim); font-weight: 500; }
.story--lead { grid-column: span 12; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; }
.story--lead .story__media { aspect-ratio: 16/11; border-radius: var(--r-xl); }
.story--lead .story__title { font-size: var(--t-3xl); line-height: .98; letter-spacing: -.035em; }
.story--lead .story__dek { font-size: var(--t-lg); line-height: 1.45; }
.story--lead .story__body { display: grid; gap: var(--s4); }

/* Empty state */
.empty { grid-column: 1 / -1; position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); background: var(--ink); color: var(--on-ink);
  padding: clamp(2rem, 6vw, 5rem); display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s7); align-items: center; min-height: 420px; }
.empty__orb { position: absolute; z-index: -1; width: 60%; aspect-ratio: 1; right: -15%; top: -30%; border-radius: 50%; background: conic-gradient(from 0deg, var(--iris), var(--flare), var(--solar), var(--iris)); filter: blur(70px); opacity: .55; animation: spin 18s linear infinite; }
.empty h3 { font-size: var(--t-2xl); line-height: 1; letter-spacing: -.03em; margin-bottom: var(--s4); }
.empty p { color: var(--on-ink-dim); font-size: var(--t-lg); line-height: 1.45; max-width: 34ch; }
.empty__ghosts { display: grid; gap: var(--s3); }
.ghost { display: flex; gap: var(--s4); align-items: center; padding: var(--s3); border-radius: var(--r-lg); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.ghost b { width: 72px; height: 56px; border-radius: 10px; flex: none; background: rgba(255,255,255,.1); }
.ghost div { flex: 1; display: grid; gap: 8px; }
.ghost i { display: block; height: 10px; border-radius: 6px; background: rgba(255,255,255,.14); position: relative; overflow: hidden; }
.ghost i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-100%); animation: shimmer 2.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Horizontal sections rail ---------- */
.rail { position: relative; overflow: hidden; }
.rail__track { display: flex; gap: clamp(1rem, 2vw, 1.6rem); padding-inline: var(--gutter); width: max-content; }
.rail__card {
  position: relative; width: clamp(300px, 34vw, 520px); height: clamp(420px, 62vh, 620px); border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--s6); color: var(--on-ink); background: var(--ink-2); flex: none;
}
.rail__card .art { position: absolute; inset: 0; z-index: -1; transition: transform 1.2s var(--e-out); }
.rail__card:hover .art { transform: scale(1.08) rotate(2deg); }
.rail__card h3 { font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: .92; letter-spacing: -.04em; margin: 0; }
.rail__card p { color: rgba(255,255,255,.78); max-width: 28ch; margin: 0; font-size: var(--t-md); }
.rail__card .go { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; margin-top: var(--s4); }
.rail__card .go i { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; transition: transform .6s var(--e-out); }
.rail__card:hover .go i { transform: rotate(-45deg); }
.rail__card .go svg { width: 16px; height: 16px; }
.rail__intro { width: clamp(280px, 30vw, 420px); flex: none; display: flex; flex-direction: column; justify-content: flex-end; padding-right: var(--s5); }
.rail__progress { margin: var(--s6) var(--gutter) 0; height: 2px; background: var(--line-ink); border-radius: 2px; overflow: hidden; }
.rail__progress span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* Generative art for topics / placeholder images */
.art { background: var(--ink-2); overflow: hidden; }
.art::before, .art::after { content: ""; position: absolute; border-radius: 50%; filter: blur(40px); }
.art::before { width: 80%; aspect-ratio: 1; left: -20%; top: -20%; background: var(--a1, var(--iris)); opacity: .9; animation: drift 14s ease-in-out infinite alternate; }
.art::after { width: 70%; aspect-ratio: 1; right: -25%; bottom: -20%; background: var(--a2, var(--flare)); opacity: .8; animation: drift 18s ease-in-out infinite alternate-reverse; }
.art--politics { --a1: #5B4BFF; --a2: #00C9A7; }
.art--economy { --a1: #FFB23F; --a2: #FF3D7F; }
.art--technology { --a1: #00C9A7; --a2: #5B4BFF; }
.art--business { --a1: #FF3D7F; --a2: #5B4BFF; }
.art--climate { --a1: #00C9A7; --a2: #FFB23F; }
.art--culture { --a1: #FF3D7F; --a2: #FFB23F; }
@keyframes drift { to { transform: translate(18%, 14%) scale(1.15); } }

/* ---------- Stacking principles ---------- */
.stack { display: grid; gap: var(--s5); }
.stack__card {
  position: sticky; top: 14vh; min-height: 52vh; border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 4rem);
  display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s7); align-items: center; transform-origin: center top;
  background: var(--white); border: 1px solid var(--line); box-shadow: 0 -20px 60px -40px rgba(8,9,14,.35);
}
.stack__card:nth-child(2) { top: calc(14vh + 24px); background: #F7F5FF; }
.stack__card:nth-child(3) { top: calc(14vh + 48px); background: #FFF4F8; }
.stack__card:nth-child(4) { top: calc(14vh + 72px); background: var(--ink); color: var(--on-ink); border-color: transparent; }
.stack__card h3 { font-size: var(--t-3xl); line-height: .95; letter-spacing: -.035em; margin: 0; }
.stack__card p { font-size: var(--t-lg); line-height: 1.45; color: var(--text-2); margin: 0; max-width: 40ch; }
.stack__card:nth-child(4) p { color: var(--on-ink-dim); }
.stack__glyph { width: clamp(70px, 9vw, 120px); aspect-ratio: 1; border-radius: 30%; background: var(--grad); margin-bottom: var(--s5); display: grid; place-items: center; color: #fff; }
.stack__glyph svg { width: 45%; height: 45%; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding-block: var(--s5); border-block: 1px solid var(--line); }
.dark .marquee { border-color: var(--line-ink); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__item { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.6rem); padding-right: clamp(1.2rem, 3vw, 2.6rem); font-family: var(--f-display); font-size: clamp(2rem, 5vw, 4.6rem); font-weight: 600; letter-spacing: -.03em; white-space: nowrap; line-height: 1; }
.marquee__item .star { width: .55em; height: .55em; color: var(--flare); flex: none; animation: spin 8s linear infinite; }
.marquee__item .outline { color: transparent; -webkit-text-stroke: 1.5px currentColor; }
.dark .marquee__item .outline { -webkit-text-stroke-color: var(--on-ink); }

/* ---------- Newsletter ---------- */
.brief { position: relative; border-radius: var(--r-xl); overflow: hidden; isolation: isolate; background: var(--ink); color: var(--on-ink); padding: clamp(2.5rem, 7vw, 6.5rem); display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s7); align-items: end; }
.brief__bg { position: absolute; inset: 0; z-index: -1; }
.brief__bg span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; }
.brief__bg span:nth-child(1) { width: 45%; aspect-ratio: 1; background: var(--iris); left: -10%; bottom: -40%; animation: drift 12s ease-in-out infinite alternate; }
.brief__bg span:nth-child(2) { width: 35%; aspect-ratio: 1; background: var(--flare); right: 10%; top: -30%; animation: drift 15s ease-in-out infinite alternate-reverse; }
.brief__bg span:nth-child(3) { width: 25%; aspect-ratio: 1; background: var(--solar); right: -5%; bottom: -20%; animation: drift 10s ease-in-out infinite alternate; }
.brief h2 { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: .9; letter-spacing: -.045em; margin: 0 0 var(--s4); }
.brief p { color: rgba(255,255,255,.75); font-size: var(--t-lg); max-width: 34ch; margin: 0; }
.field-pill { display: flex; gap: var(--s2); padding: 6px; border-radius: var(--r-pill); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); }
.field-pill input { flex: 1; min-width: 0; background: none; border: 0; color: inherit; font: inherit; font-size: var(--t-md); padding: 0 1rem; outline: none; }
.field-pill input::placeholder { color: rgba(255,255,255,.55); }
.form-note { font-size: var(--t-xs); color: rgba(255,255,255,.6); margin-top: var(--s3); }
.form-note a { text-decoration: underline; }
.form-status { min-height: 1.5em; margin-top: var(--s3); font-weight: 600; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; }
.choices span { display: inline-block; padding: .5rem 1rem; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.25); font-size: var(--t-sm); font-weight: 600; transition: background .3s, color .3s; }
.choices input:checked + span { background: #fff; color: var(--ink); }
.choices input:focus-visible + span { outline: 2px solid var(--solar); outline-offset: 2px; }

/* ---------- Page hero (inner pages) ---------- */
.phero { position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: var(--on-ink); padding: calc(140px + 4vw) 0 clamp(3rem, 7vw, 6rem); }
.phero__orb { position: absolute; z-index: -1; width: 55vw; aspect-ratio: 1; right: -12vw; top: -22vw; border-radius: 50%; background: conic-gradient(from 90deg, var(--iris), var(--flare), var(--solar), var(--lagoon), var(--iris)); filter: blur(80px); opacity: .55; animation: spin 24s linear infinite; }
.phero h1 { font-size: clamp(3.2rem, 10vw, 9.5rem); line-height: .86; letter-spacing: -.055em; margin: 0 0 var(--s6); max-width: 12ch; }
.phero .lede { font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 1.45; color: rgba(255,255,255,.78); max-width: 46ch; margin: 0; }
.phero__row { display: flex; justify-content: space-between; align-items: end; gap: var(--s6); flex-wrap: wrap; }
.phero__clock { text-align: right; }
.phero__clock b { display: block; font-family: var(--f-display); font-size: clamp(3rem, 8vw, 7rem); font-weight: 500; line-height: .85; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.phero__clock span { font-size: var(--t-sm); color: var(--on-ink-dim); }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 var(--s6); padding: 0; font-size: var(--t-sm); color: var(--on-ink-dim); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .5; }
.crumbs a:hover { color: var(--on-ink); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s7); }
.toolbar h2 { font-size: var(--t-2xl); margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- Docs (legal / about) ---------- */
.doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(2rem, 7vw, 7rem); padding-block: clamp(3rem, 7vw, 6rem); }
.doc__toc { position: sticky; top: 110px; align-self: start; font-size: var(--t-sm); }
.doc__toc p { font-weight: 700; margin-bottom: var(--s3); }
.doc__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc__toc a { display: block; padding: .4rem .8rem; border-radius: 10px; color: var(--dim); transition: background .3s, color .3s; }
.doc__toc a:hover { color: var(--text); background: var(--fog-2); }
.doc__toc a.is-active { color: var(--fog); background: var(--text); }
.updated { font-size: var(--t-sm); color: var(--dim); margin-bottom: var(--s5); display: inline-flex; gap: .5rem; align-items: center; }
.prose { font-family: var(--f-read); font-size: 1.17rem; line-height: 1.72; color: #20232C; max-width: 70ch; }
.prose h2 { font-family: var(--f-display); font-size: var(--t-2xl); line-height: 1.05; margin: var(--s8) 0 var(--s4); color: var(--text); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--f-display); font-size: var(--t-lg); margin: var(--s6) 0 var(--s3); color: var(--text); letter-spacing: -.01em; }
.prose a { color: var(--iris); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 var(--s4); }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--flare); }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { font-size: .85em; background: var(--fog-2); padding: .1em .35em; border-radius: 6px; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--f-ui); font-size: var(--t-sm); margin: var(--s5) 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--white); }
.prose th, .prose td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.prose blockquote { margin: var(--s7) 0; padding-left: var(--s5); border-left: 3px solid var(--flare); font-family: var(--f-display); font-size: var(--t-xl); line-height: 1.2; letter-spacing: -.02em; color: var(--text); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: var(--s7) 0; }
.note { font-family: var(--f-ui); font-size: var(--t-sm); padding: var(--s4) var(--s5); border-radius: var(--r-md); background: var(--grad-soft); border: 1px solid rgba(91,75,255,.2); margin: var(--s5) 0; line-height: 1.55; }
.linkish { text-decoration: underline; text-underline-offset: .18em; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 7vw, 6rem); }
.routes { display: grid; gap: var(--s3); align-content: start; }
.route { padding: var(--s5) var(--s5); border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); transition: transform .5s var(--e-out), box-shadow .5s; }
.route:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(8,9,14,.35); }
.route h3 { font-size: var(--t-lg); margin-bottom: var(--s2); }
.route p { margin: 0; color: var(--text-2); font-size: var(--t-sm); }
.route a { color: var(--iris); font-weight: 600; }
.form { background: var(--white); border-radius: var(--r-xl); padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); display: grid; gap: var(--s5); }
.form h2 { font-size: var(--t-2xl); margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 1.5px solid var(--line);
  padding: 1.4rem 0 .6rem; outline: none; border-radius: 0; transition: border-color .3s; appearance: none; -webkit-appearance: none;
}
.field select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230D0F15' stroke-width='1.6'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .2rem center; }
.field textarea { min-height: 150px; resize: vertical; }
.field label { position: absolute; left: 0; top: 1.35rem; color: var(--dim); pointer-events: none; transition: transform .4s var(--e-out), font-size .4s, color .3s; transform-origin: left; }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label, .field textarea:not(:placeholder-shown) ~ label,
.field select ~ label { transform: translateY(-1.25rem) scale(.78); color: var(--text); }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--e-out); }
.field:focus-within::after { transform: scaleX(1); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: var(--t-sm); color: var(--text-2); }
.check input { margin-top: .25rem; accent-color: var(--iris); width: 18px; height: 18px; }
.check a { color: var(--iris); text-decoration: underline; }

/* ---------- Article ---------- */
.progress { position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 350; }
.progress span { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }
.a-hero { background: var(--ink); color: var(--on-ink); padding: calc(140px + 3vw) 0 clamp(2rem, 5vw, 4rem); position: relative; overflow: hidden; isolation: isolate; }
.a-hero .phero__orb { opacity: .35; }
.a-hero__tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.a-title { font-size: clamp(2.4rem, 6vw, 5.4rem); line-height: .94; letter-spacing: -.045em; max-width: 18ch; margin: 0 0 var(--s5); }
.a-dek { font-family: var(--f-read); font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.4; color: rgba(255,255,255,.8); max-width: 44ch; margin: 0 0 var(--s6); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); padding-top: var(--s5); border-top: 1px solid var(--line-ink); }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline__who b { display: block; }
.byline__who span { font-size: var(--t-sm); color: var(--on-ink-dim); }
.share { margin-left: auto; display: flex; gap: var(--s2); }
.share a, .share button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid var(--line-ink); color: var(--on-ink); transition: background .3s, transform .4s var(--e-out); }
.share a:hover, .share button:hover { background: #fff; color: var(--ink); transform: translateY(-3px); }
.share svg { width: 17px; height: 17px; }
.a-figure { margin: 0; }
.a-figure .frame { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 21/10; background: var(--ink-2); margin-top: calc(-1 * clamp(1rem, 3vw, 2rem)); }
.a-figure img { width: 100%; height: 100%; object-fit: cover; }
figcaption { font-size: var(--t-xs); color: var(--dim); margin-top: var(--s2); }
.a-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 6vw, 5rem); }
.a-aside { position: sticky; top: 110px; align-self: start; display: grid; gap: var(--s5); }
.toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); font-size: var(--t-sm); }
.toc p { font-weight: 700; margin-bottom: var(--s3); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: t; }
.toc a { display: flex; gap: .6rem; padding: .35rem .5rem; border-radius: 8px; color: var(--text-2); transition: background .3s, color .3s; }
.toc li { counter-increment: t; }
.toc a::before { content: counter(t, decimal-leading-zero); color: var(--dim); font-variant-numeric: tabular-nums; }
.toc a.is-active { background: var(--text); color: var(--fog); }
.toc a.is-active::before { color: var(--solar); }
.prose--article > p:first-of-type::first-letter { float: left; font-family: var(--f-display); font-weight: 600; font-size: 5.2em; line-height: .78; margin: .08em .12em 0 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.keypoints { font-family: var(--f-ui); background: var(--ink); color: var(--on-ink); border-radius: var(--r-lg); padding: var(--s5) var(--s6); margin: 0 0 var(--s7); position: relative; overflow: hidden; }
.keypoints::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.keypoints h2 { font-size: var(--t-lg) !important; margin: 0 0 var(--s3) !important; color: var(--on-ink) !important; }
.keypoints ul { margin: 0; }
.keypoints li::marker { color: var(--solar); }
.bignum { font-family: var(--f-ui); display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: center; padding: var(--s6) 0; margin: var(--s6) 0; border-block: 1px solid var(--line); }
.bignum b { font-family: var(--f-display); font-size: clamp(3.5rem, 9vw, 6.5rem); font-weight: 600; line-height: .85; letter-spacing: -.05em; }
.bignum span { color: var(--text-2); font-size: var(--t-md); }
.bignum small { display: block; color: var(--dim); font-size: var(--t-xs); margin-top: var(--s2); }
.compare { font-family: var(--f-ui); display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); margin: var(--s6) 0; }
.compare div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); position: relative; overflow: hidden; }
.compare div::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.compare b { display: block; font-family: var(--f-display); font-size: var(--t-xl); letter-spacing: -.03em; }
.compare span { font-size: var(--t-sm); color: var(--dim); }
.pullquote { margin: var(--s8) 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -.035em; color: var(--text); }
.pullquote::before { content: "“"; display: block; font-size: 2.2em; line-height: .6; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pullquote cite { display: block; font-family: var(--f-ui); font-size: var(--t-sm); font-style: normal; font-weight: 500; letter-spacing: 0; color: var(--dim); margin-top: var(--s4); }
.inline-fig { margin: var(--s7) 0; }
.inline-fig .frame { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/9; position: relative; background: var(--fog-2); }
.sources { font-family: var(--f-ui); font-size: var(--t-sm); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s5); margin-top: var(--s7); }
.sources ol { margin: var(--s2) 0 0; }
.authorbox { font-family: var(--f-ui); display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: center; padding: var(--s5); border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); margin-top: var(--s6); }
.authorbox .avatar { width: 72px; height: 72px; font-size: 1.3rem; }
.authorbox p { margin: 0; font-size: var(--t-sm); color: var(--text-2); }
.a-tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); font-family: var(--f-ui); }

/* ---------- Ads (hidden until switched on) ---------- */
.ad-slot { display: none; }
.ads-on .ad-slot { display: grid; place-items: center; position: relative; width: 100%; margin: var(--s7) auto; min-height: 110px; border-radius: var(--r-md); background: var(--fog-2); }
.ads-on .ad-slot::before { content: "Advertisement"; position: absolute; top: 6px; left: 12px; font-size: .68rem; color: var(--dim); }
.ads-on .ad-slot--leader { max-width: 970px; min-height: 120px; }
.ads-on .ad-slot--rect { max-width: 336px; min-height: 280px; }
.ads-on .ad-slot--infeed { grid-column: 1 / -1; }
.ads-preview .ad-slot::after { content: attr(data-label); color: var(--dim); font-size: var(--t-sm); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; isolation: isolate; padding-top: clamp(4rem, 9vw, 8rem); }
.footer__cta { display: flex; justify-content: space-between; align-items: end; gap: var(--s6); flex-wrap: wrap; padding-bottom: var(--s8); }
.footer__cta h2 { font-size: clamp(2.6rem, 6.5vw, 6rem); line-height: .9; letter-spacing: -.045em; margin: 0; max-width: 12ch; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s6); padding-block: var(--s7); border-top: 1px solid var(--line-ink); }
.footer__grid h3 { font-family: var(--f-ui); font-size: var(--t-sm); color: var(--on-ink-dim); font-weight: 600; letter-spacing: 0; margin-bottom: var(--s4); }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer__grid a, .footer__grid button { font-size: var(--t-md); transition: color .3s; }
.footer__grid a:hover, .footer__grid button:hover { color: var(--solar); }
.footer__about p { color: var(--on-ink-dim); max-width: 34ch; }
.footer__word { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.4rem, 10.6vw, 11.5rem); line-height: 1; letter-spacing: -.055em; white-space: nowrap; display: flex; justify-content: center; overflow: hidden; padding: 0 0 .08em; }
.footer__word span { display: inline-block; background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.08)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3); padding-block: var(--s5); font-size: var(--t-xs); color: var(--on-ink-dim); border-top: 1px solid var(--line-ink); position: relative; z-index: 1; background: var(--ink); }
.footer__glow { position: absolute; z-index: -1; left: 50%; bottom: -30%; width: 90vw; height: 60%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(91,75,255,.45), rgba(255,61,127,.18), transparent); filter: blur(20px); }

/* ---------- Consent ---------- */
.consent { position: fixed; z-index: 600; right: var(--s4); bottom: var(--s4); width: min(440px, calc(100% - 2rem)); background: var(--ink-2); color: var(--on-ink); border: 1px solid var(--line-ink); border-radius: var(--r-lg); padding: var(--s5); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); transform: translateY(130%) rotate(2deg); transition: transform .9s var(--e-out); }
.consent.is-open { transform: none; }
.consent h2 { font-family: var(--f-display); font-size: var(--t-lg); margin-bottom: var(--s2); }
.consent p { font-size: var(--t-sm); color: var(--on-ink-dim); }
.consent p a { color: var(--on-ink); text-decoration: underline; }
.consent__btns { display: flex; flex-wrap: wrap; gap: var(--s2); }
.consent__btns button { padding: .6rem 1rem; border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 700; border: 1px solid var(--line-ink); transition: background .3s, color .3s; }
.consent__btns button:first-child { background: var(--on-ink); color: var(--ink); }
.consent__btns button:hover { background: var(--solar); color: var(--ink); border-color: var(--solar); }
.consent__prefs { display: none; gap: var(--s2); margin-bottom: var(--s4); font-size: var(--t-sm); }
.consent.show-prefs .consent__prefs { display: grid; }
.consent__prefs label { display: flex; justify-content: space-between; align-items: center; padding: .65rem .85rem; border-radius: 12px; background: rgba(255,255,255,.05); }
.consent__prefs input { accent-color: var(--flare); width: 18px; height: 18px; }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: var(--on-ink); padding: 140px 0 4rem; }
.lost b { display: block; font-family: var(--f-display); font-size: clamp(8rem, 30vw, 26rem); line-height: .78; letter-spacing: -.07em; font-weight: 600; }
.lost h1 { font-size: var(--t-2xl); margin: var(--s5) 0 var(--s3); }
.lost p { color: var(--on-ink-dim); margin: 0 auto var(--s6); max-width: 40ch; }
.lost .row { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }

/* ---------- Design system page ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s3); }
.swatch { border-radius: var(--r-md); overflow: hidden; background: var(--white); border: 1px solid var(--line); font-size: var(--t-xs); }
.swatch i { display: block; height: 90px; }
.swatch div { padding: .6rem .8rem; }
.ds { padding-block: var(--s7); border-top: 1px solid var(--line); }
.ds h2 { font-size: var(--t-2xl); }
.ds-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* ---------- Motion initial states (only when JS + motion are on) ---------- */
.motion [data-reveal] { opacity: 0; transform: translateY(40px); }
.motion [data-reveal="left"] { transform: translateX(-60px); }
.motion [data-clip] { clip-path: inset(100% 0% 0% 0%); }
.motion .split .ch { display: inline-block; transform: translateY(110%); }
.motion .split .wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .2em; margin-bottom: -.2em; }
.split .wd { white-space: nowrap; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .header__links { display: none; }
  .story { grid-column: span 6; }
  .a-body { grid-template-columns: 1fr; }
  .a-aside { position: static; order: -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .editions { display: none; }
  .hero__title .row--indent { padding-left: 0; }
  .hero__foot, .story--lead, .empty, .brief, .menu__grid, .stack__card, .contact, .doc { grid-template-columns: 1fr; }
  .hero__foot .scroll-cue { display: none; }
  .doc__toc { position: static; }
  .row2 { grid-template-columns: 1fr; }
  .phero__clock { text-align: left; }
  .rail__track { overflow-x: auto; width: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s3); scrollbar-width: none; }
  .rail__track::-webkit-scrollbar { display: none; }
  .rail__card { scroll-snap-align: start; width: 82vw; height: 440px; }
  .rail__intro { display: none; }
  .rail__progress { display: none; }
  .stack__card { position: relative; top: 0 !important; min-height: 0; gap: var(--s4); }
  .lede-wide { display: none; }
}
@media (max-width: 560px) {
  .story { grid-column: span 12; }
  .field-pill { flex-direction: column; border-radius: var(--r-lg); }
  .field-pill input { padding: .9rem 1rem; }
  .share { margin-left: 0; }
  .logo__name { font-size: 1rem; }
  .header__bar { padding-left: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}
@media print {
  .header, .footer, .consent, .swipe, .loader, .cursor, .grain, .ad-slot, .a-aside, .share, .progress { display: none !important; }
  .a-hero, .phero { background: #fff; color: #000; padding-top: 1rem; }
}
