/* DOGER v2 — ink and white, one ember accent used only for signal. */
:root {
  --bg: #050b16; --bg2: #0a1424; --ink: #eef2f7; --mute: #8d9cb2; --faint: #3a4a62; --line: rgba(238,242,247,.12);
  --accent: #ff6b1f; --accent2: #ffb054; --panel: rgba(5,11,22,.72);
  --f: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --m: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gut: clamp(16px, 4vw, 56px);
}
:root[data-theme="light"] {
  --bg: #f3f1ec; --bg2: #e9e6df; --ink: #0a111d; --mute: #3e4b5e; --faint: #858e9b; --line: rgba(12,20,34,.22);
  --accent: #d9480f; --accent2: #b35c00; --panel: rgba(243,241,236,.8);
}
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --bg: #f3f1ec; --ink: #0c1422; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; overscroll-behavior-x: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--f); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
.mono { font-family: var(--m); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------- stage: one fixed canvas under everything */
.stage { position: fixed; inset: 0; height: 100lvh; z-index: 0; pointer-events: none; background: var(--bg); }
#pt-canvas { position: absolute; inset: 0; display: block; }
.poster { --ps: min(94vh, 56vw); position: absolute; right: 3vw; top: calc((100vh - var(--ps)) / 2); width: var(--ps); height: var(--ps); opacity: .9; transition: opacity .8s; mix-blend-mode: screen; }
:root[data-theme="light"] .poster { filter: invert(1) hue-rotate(180deg); mix-blend-mode: multiply; }
html.gl-on .poster { opacity: 0; }
.vignette { position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 30%, transparent 55%); }
main { position: relative; z-index: 1; }

/* ---------- top bar */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px var(--gut);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 600 17px var(--f); letter-spacing: .06em; }
.brand img { display: block; height: 26px; width: auto; filter: invert(1); }
:root[data-theme="light"] .brand img { filter: none; }
.top-nav { display: flex; gap: 22px; margin-left: 12px; }
.top-nav a { text-decoration: none; color: var(--mute); font-size: 14px; }
.top-nav a:hover { color: var(--ink); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-toggle { display: flex; border: 1px solid var(--line); }
.lang-toggle button { font: 500 12px var(--m); background: none; color: var(--mute); border: 0; padding: 7px 9px; cursor: pointer; }
.lang-toggle button[aria-pressed="true"] { color: var(--bg); background: var(--ink); }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--mute); width: 32px; height: 30px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
:root[data-theme="dark"] .theme-toggle .moon, :root[data-theme="light"] .theme-toggle .sun { display: none; }

.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: var(--ink); color: var(--bg); font: 500 15px var(--f); padding: 13px 20px; border: 1px solid var(--ink); transition: background .2s, color .2s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-s { padding: 8px 14px; font-size: 13px; }
.btn-l { padding: 17px 28px; font-size: 17px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; font-weight: 500; }
.link:hover { color: var(--accent); }

/* ---------- steps: page progress and quick jumps (strip under the header; on phones a line plus an index sheet) */
.steps { position: absolute; left: 0; right: 0; top: 100%; display: flex; gap: 10px; height: 30px; padding: 0 var(--gut);
  background: color-mix(in srgb, var(--bg) 95%, transparent); border-bottom: 1px solid var(--line); }
.sg { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
:where(.steps) button { all: unset; cursor: pointer; box-sizing: border-box; }
.steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sg-l { font: 500 10px/1 var(--m); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.sg.done .sg-l { color: var(--mute); }
.sg.on .sg-l, .sg-l:hover { color: var(--ink); }
.sg.on .sg-l span { color: var(--accent); }
.sg-b { display: flex; gap: 3px; }
.sb { flex: 1; height: 14px; margin: -3px 0 -2px; display: flex; align-items: center; }
.sb i { display: block; width: 100%; height: 2px; background: linear-gradient(var(--accent), var(--accent)) left / 100% 100% no-repeat, var(--line); background-size: 0 100%; }
.sb:hover i { background-color: var(--mute); }
.idx-btn { display: none; }
.idx { position: fixed; inset: 0; z-index: 18; padding: 64px 0 24px; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; animation: idx-in .22s ease-out; }
@keyframes idx-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.idx ol { list-style: none; margin: 0 auto; padding: 0 var(--gut); max-width: 640px; }
.idx button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 34px 1fr; gap: 8px; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
.idx button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.idx .n { font: 500 12px/1.6 var(--m); color: var(--faint); }
.idx b { display: block; font: 500 16px/1.3 var(--f); }
.idx small { display: block; font-size: 14px; line-height: 1.35; color: var(--mute); margin-top: 2px; }
.idx [aria-current] .n, .idx [aria-current] b { color: var(--accent); }
html.idx-on, html.idx-on body { overflow: hidden; }
.idx { touch-action: pan-y; }
section[tabindex="-1"]:focus, .slide[tabindex="-1"]:focus, .hero-top[tabindex="-1"]:focus, .ask[tabindex="-1"]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .idx { animation: none; } }
.chnav { display: none !important; }

/* ---------- hero */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 124px 0 56px; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 620px); }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 12px var(--m); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 0 0 22px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
h1 { font: 300 clamp(40px, min(5.6vw, 8.4vh), 84px)/1.0 var(--f); letter-spacing: -0.045em; margin: 0 0 24px; text-wrap: balance; }
h2 { font: 300 clamp(32px, 3.6vw, 56px)/1.05 var(--f); letter-spacing: -0.04em; margin: 0 0 20px; text-wrap: balance; }
h2.big { font-size: clamp(36px, 4.6vw, 72px); max-width: 18ch; }
h3 { font: 500 21px/1.25 var(--f); letter-spacing: -0.015em; margin: 0 0 10px; }
.lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--mute); max-width: 52ch; margin: 0 0 30px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }

.ask { max-width: 600px; }
.ask-l { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; overflow: hidden; font: 400 14px var(--f); color: var(--ink); background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--line); padding: 8px 13px; cursor: pointer; backdrop-filter: blur(6px); transition: border-color .2s, background .3s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.chip[aria-pressed="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform-origin: left; }
.answer { min-height: 6.2em; margin-top: 16px; }
.answer p { margin: 0 0 6px; font-size: 17px; line-height: 1.45; animation: swap .6s cubic-bezier(.2,.7,.2,1) both; }
.answer small { animation: swap .6s .08s cubic-bezier(.2,.7,.2,1) both; display: block; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.also { font: 400 12px/1.5 var(--m); color: var(--mute); margin: 14px 0 0; max-width: 56ch; }
.answer small { font: 400 11px var(--m); color: var(--mute); letter-spacing: .02em; }

/* ---------- motion: hero rises on load, sections rise as they enter and fall back as they leave */
.intro { animation: rise 1.1s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * .12s + .1s); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
html.js .rv { opacity: 0; transform: translateY(40px); filter: blur(6px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1) var(--d, 0s), transform 1s cubic-bezier(.2,.7,.2,1) var(--d, 0s), filter .9s var(--d, 0s); }
html.js .rv.in { opacity: 1; transform: none; filter: none; }
.hero-copy { will-change: opacity, transform; }
@media (prefers-reduced-motion: reduce) {
  .intro, .answer p, .answer small { animation: none; }
  html.js .rv, html.js .slide { transform: none; filter: none; transition: none; }
  .chip[aria-pressed="true"]::after { animation: none; }
}
.find { position: relative; margin-top: 18px; max-width: 340px; }
.find input { width: 100%; font: 400 15px var(--f); color: var(--ink); background: color-mix(in srgb, var(--bg) 70%, transparent); border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; outline: none; }
.find input:focus { border-bottom-color: var(--accent); }
.find ul { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px 0; list-style: none; background: var(--bg2); border: 1px solid var(--line); z-index: 5; }
.find li { padding: 8px 12px; cursor: pointer; font-size: 15px; }
.find li[aria-selected="true"], .find li:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.caption { position: absolute; right: var(--gut); bottom: 22px; margin: 0; font-size: 11px; color: var(--mute); letter-spacing: .02em; }
.hint { color: var(--accent2); letter-spacing: .04em; }

/* ---------- readout following the lens */
.readout { position: fixed; left: 0; top: 0; z-index: 15; width: 280px; pointer-events: none; opacity: 0;
  transform: translateY(8px) scale(.985); transform-origin: 0 50%; will-change: translate, opacity;
  transition: opacity .32s ease, transform .42s cubic-bezier(.2,.8,.2,1), translate .55s cubic-bezier(.2,.8,.2,1);
  background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 12px 14px; backdrop-filter: blur(10px); }
.readout.on { opacity: 1; transform: none; }
.readout.intro { transition-duration: .5s, .6s, 0s; }
.readout.intro > * { animation: ro-in .55s cubic-bezier(.2,.8,.2,1) both; }
.readout.intro > :nth-child(2) { animation-delay: .08s; } .readout.intro > :nth-child(3) { animation-delay: .16s; }
.readout.intro > :nth-child(4) { animation-delay: .22s; } .readout.intro > :nth-child(5) { animation-delay: .28s; }
.readout.intro > :nth-child(n+6) { animation-delay: .34s; }
@keyframes ro-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ro-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 2px; padding: 10px 0 8px; border-top: 1px solid var(--line); }
.ro-stat b { display: block; font: 500 21px/1.1 var(--m); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ro-stat.hl b { color: var(--accent2); }
.ro-stat span { display: block; font-size: 12px; color: var(--mute); margin-top: 4px; line-height: 1.25; }
.ro-stat small { display: block; font: 400 10px/1.35 var(--m); color: var(--faint); margin-top: 2px; }
.ro-v { display: flex; flex-direction: column; align-items: flex-end; }
.ro-rk { font: 400 9.5px var(--m); font-style: normal; color: var(--faint); margin-top: 3px; white-space: nowrap; }
.mini { display: none; }
.readout.snap { transition: none; }   /* placed before it appears, so it never slides in from its last spot */
.readout.swap > * { animation: ro-swap .3s ease-out both; }
@keyframes ro-swap { from { opacity: .15; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .readout { transform: none; transition: opacity .2s; } .readout.swap > * { animation: none; } }
.ro-h { display: flex; flex-direction: column; margin-bottom: 8px; }
.ro-h b { font: 500 18px var(--f); letter-spacing: -0.01em; }
.ro-h span { font: 400 11px var(--m); color: var(--mute); }
.ro-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.ro-l { font-size: 12.5px; color: var(--mute); display: flex; flex-direction: column; line-height: 1.25; }
.ro-l small { font: 400 10px var(--m); color: var(--faint); }
.ro-v { font: 500 15px var(--m); font-variant-numeric: tabular-nums; }
.ro-row.hl .ro-v { color: var(--accent2); }
.find li small { color: var(--mute); font-size: 12px; margin-left: 6px; }
.ro-note { font: 400 10.5px var(--m); color: var(--mute); margin-top: 6px; }
.readout { width: 330px; } .ro-v { white-space: nowrap; }
@media (min-width: 821px) and (max-width: 1599px) { .readout { width: 290px; } }
@media (min-width: 821px) and (max-width: 1439px) { .readout { width: 260px; } }   /* fits right of Lisboa at 1280 */
.ro-calc { font: 500 10px var(--m); letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); margin: 12px 0 2px; padding-top: 10px; border-top: 1px solid var(--accent); }
.ro-calc + .ro-row { border-top: 0; }

.islands { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .6s; }
.islands.on { opacity: 1; }
.islands span { position: absolute; left: 0; top: 0; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

/* ---------- manifesto */
.manifesto { min-height: 100vh; display: flex; align-items: center; padding: 16vh 0 12vh; }
.man { font: 300 clamp(28px, 3.4vw, 54px)/1.18 var(--f); letter-spacing: -0.035em; max-width: 26ch; margin: 0 auto; text-align: left; text-wrap: pretty; }
.man span { color: var(--faint); transition: color .35s; }
.man span.lit { color: var(--ink); }

/* ---------- chapters over the fixed canvas */
.chnav { position: fixed; left: var(--gut); bottom: 22px; z-index: 10; display: flex; gap: 14px; font: 500 12px var(--m); opacity: 0; transition: opacity .3s; pointer-events: none; }
.chnav.show { opacity: 1; pointer-events: auto; }
.chnav a { text-decoration: none; color: var(--faint); }
.chnav a.on { color: var(--accent); }
.chapter { min-height: 100svh; display: flex; align-items: center; padding: 12vh 0; }
.slides { display: grid; }
html.js .slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateX(48px); filter: blur(4px);
  transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), filter .55s, visibility 0s .7s; }
html.js .slide.past { transform: translateX(-48px); }
html.js .slide.on { opacity: 1; visibility: visible; transform: none; filter: none; transition-delay: .12s, .12s, .12s, 0s; }
html:not(.js) .snav { display: none; }
.snav { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.snav button { font: 400 20px/1 var(--f); color: var(--ink); background: none; border: 1px solid var(--line); width: 46px; height: 46px; cursor: pointer; transition: border-color .2s, opacity .2s; }
.snav button:hover:not(:disabled) { border-color: var(--accent); }
.snav button:disabled { opacity: .3; cursor: default; }
.snav .segs { display: flex; gap: 6px; }
.snav .seg { width: 34px; height: 46px; border: 0; padding: 0; position: relative; }
.snav .seg::after { content: ''; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--faint); transition: background .3s; }
.snav .seg.on::after { background: var(--accent); }
.panel { max-width: 500px; padding: 28px 0; }
.k { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 0 0 18px; }
.k span:first-child { color: var(--accent); margin-right: 6px; }
.panel p { color: color-mix(in srgb, var(--ink) 82%, transparent); font-size: 18px; }
.big-stat { font-size: clamp(34px, 3.6vw, 56px) !important; line-height: 1.08 !important; }
.stat { font: 300 clamp(24px, 2.4vw, 34px)/1.2 var(--f) !important; letter-spacing: -0.03em; color: var(--ink) !important; margin: 18px 0 10px; }
.src { font-size: 11px !important; color: var(--mute) !important; }
.tag { font: 500 11px var(--m); letter-spacing: .1em; text-transform: uppercase; color: var(--mute) !important; margin: 0 0 14px !important; }
.tag.d { color: var(--accent) !important; }
.ia { margin: 4px 0 16px; display: grid; gap: 10px; }
.ia > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ia dt { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding-top: 4px; }
.ia > div:last-child dt { color: var(--accent); }
.ia dd { margin: 0; font-size: 16px; line-height: 1.45; color: color-mix(in srgb, var(--ink) 86%, transparent); }
.tag.d::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }

/* ---------- solid sections (canvas dimmed behind) */
.solid { position: relative; padding: 18vh 0; }
.solid::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 82%, transparent) 14%, color-mix(in srgb, var(--bg) 82%, transparent) 86%, transparent); z-index: -1; }
.three { list-style: none; padding: 0; margin: 64px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; border-top: 1px solid var(--line); }
.three li { padding-top: 28px; }
.three .n { display: block; font: 600 48px/1 var(--f); letter-spacing: -0.04em; margin-bottom: 22px; color: var(--ink); }
.three li:last-child .n { color: var(--accent); }
.three p { color: var(--mute); margin: 0; }
.layer-tag { display: none; }



.rec { margin-top: 10vh; text-shadow: 0 0 10px var(--bg), 0 0 3px var(--bg); }
.rec .k { font-size: 11px; margin: 0 0 12px; }
.wall { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; border-top: 1px solid var(--line); }
.wall > div { padding: 16px 18px 0 0; }
.wall dt { font: 400 clamp(18px, 1.6vw, 24px)/1 var(--m); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--mute); margin-bottom: 8px; }
.wall dd { margin: 0; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.35; color: var(--mute); }
.wall dd small { font: 400 10px var(--m); color: var(--faint); margin-top: 3px; }
@media (min-width: 821px) and (max-width: 1199px) { .wall { grid-template-columns: repeat(3, 1fr); } .wall > div { padding-bottom: 14px; } }

.cta { padding-bottom: 40px; }

/* ---------- how it grows */
.grow-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: center; margin-top: 24px; }
.grow-viz { position: relative; aspect-ratio: 4 / 3; max-height: 72vh; margin-left: -4vw;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%); }
.grow-viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.grow-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.grow-steps li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.grow-steps .n { font-size: 13px; color: var(--accent); padding-top: 4px; }
.grow-steps p { margin: 0; font-size: 18px; color: color-mix(in srgb, var(--ink) 86%, transparent); }
.osint-box { position: relative; margin-top: 36px; aspect-ratio: 16 / 10; max-height: 82vh; width: 100%; border: 1px solid var(--line); background: #0d1117; overflow: hidden; }
.osint-box iframe { position: absolute; left: 0; right: 0; top: 40px; bottom: 0; width: 100%; height: calc(100% - 40px); border: 0; }
.osint-bar { position: absolute; left: 0; right: 0; top: 0; height: 40px; display: none; align-items: center; justify-content: space-between; padding: 0 6px 0 14px; background: #0d1117; border-bottom: 1px solid rgba(255,255,255,.12); color: #c9d1d9; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.osint-box.on .osint-bar { display: flex; }
.osint-x { font: 500 13px var(--f); color: #fff; background: none; border: 1px solid rgba(255,255,255,.3); padding: 6px 10px; cursor: pointer; letter-spacing: 0; text-transform: none; }
.osint-x:hover { border-color: var(--accent); }
.osint-open { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.osint-open img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: .6; transition: opacity .3s; }
.osint-open:hover img { opacity: .85; }
.osint-open .btn { position: relative; }
.osint-box.on .osint-open { display: none; }
.osint-box:not(.on) iframe { visibility: hidden; } /* closed: the poster alone; the map stays loaded for a quick reopen */
.osint .src { margin-top: 12px; }
@media (max-width: 1100px) { .osint-box { aspect-ratio: 4 / 3; } }
/* the map opens full screen at every size */
html.osint-full .osint-box { position: fixed; inset: 0; z-index: 30; max-height: none; aspect-ratio: auto; margin: 0; border: 0; }
html.osint-full .osint-bar { height: 48px; padding-top: env(safe-area-inset-top); }
html.osint-full .osint-box iframe { top: 48px; height: calc(100% - 48px); }
html.osint-full .osint-x { min-height: 40px; }
html.osint-full, html.osint-full body { overflow: hidden; }
html.osint-full main { z-index: 21; }
.ask-us { margin-top: 64px; padding-top: 44px; border-top: 1px solid var(--line); }
.cta-h { font: 400 clamp(28px, 2.8vw, 42px)/1.12 var(--f); letter-spacing: -0.03em; max-width: 24ch; margin: 0 0 14px; }
.sec { font-size: 12px; color: var(--mute); margin-top: 22px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16vh; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.foot nav { display: flex; gap: 18px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.noscript { position: relative; z-index: 2; padding: 20px; }

/* ---------- no WebGL / save-data: poster stays, readout docks */
html.no-gl .poster { opacity: .9; }
html.no-gl .readout { left: auto; top: auto; right: 16px; bottom: 16px; translate: none !important; }
html.no-gl .chips, html.no-gl .ask-l, html.no-gl .answer, html.no-gl .hint, html.no-data .find { display: none; }

/* ---------- desktop: the phone-only wrappers and map slots take no part in the layout */
.mslot { display: none; }
.hero-top, .ans-box { display: contents; }

/* ---------- phones (either orientation; same query as DogerMap.PHONE): one message per screen.
   Each screen has a map slot; the canvas is laid over the active slot and scrolls with the page,
   so no text ever sits on the map and scrolling costs the GPU nothing. Motion is opacity and transform only. */
@media (max-width: 820px), (max-height: 520px) and (hover: none) {
  html { scroll-snap-type: y proximity; }
  html.typing { scroll-snap-type: none; }
  body { font-size: 17px; }
  .stage { position: absolute; inset: auto; left: 0; top: 0; width: 0; height: 0; opacity: 0; transition: opacity .45s ease-out; background: none; }
  html.map-on .stage { opacity: 1; }
  .poster, .vignette, .layer-tag, .chnav { display: none; }
  .hero { position: relative; }
  .caption { position: absolute; left: var(--gut); right: var(--gut); bottom: 8px; padding: 0; font-size: 10px; }
  html.no-gl .slide > * { opacity: 1 !important; transform: none !important; }
  html.no-gl .mslot { background: url(assets/v2/poster.jpg) 62% 50% / auto 100% no-repeat; opacity: .8; }
  :root[data-theme="light"].no-gl .mslot { filter: invert(1) hue-rotate(180deg); }
  .mslot { display: block; flex: 1 1 auto; min-height: 240px; position: relative; -webkit-tap-highlight-color: transparent; }

  .top { gap: 8px; padding: 10px 14px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .top-nav { display: none; }
  .brand span { display: none; }
  .idx-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 9px; margin-left: 2px; font: 500 12px var(--m); color: var(--ink); background: none; border: 1px solid var(--line); cursor: pointer; }
  .idx-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .idx-btn .i-x, .idx-btn[aria-expanded="true"] .i-open { display: none; }
  .idx-btn[aria-expanded="true"] .i-x { display: inline; }
  .steps { height: 2px; padding: 0; gap: 2px; background: none; border: 0; pointer-events: none; }
  .sg { gap: 0; } .sg-l { display: none; } .sg-b { gap: 2px; } .sb { height: 2px; } .sb i { background-color: color-mix(in srgb, var(--ink) 14%, transparent); }
  .top-r { gap: 6px; }
  .top .btn-s { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
  .lang-toggle button { padding: 7px 7px; }
  .theme-toggle { width: 30px; }

  .intro { animation-name: rise-m; }
  @keyframes rise-m { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  html.js .rv { filter: none; transform: translateY(22px); transition: opacity .6s cubic-bezier(.2,.7,.2,1) var(--d, 0s), transform .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
  .answer p, .answer small { animation-name: swap-m; }
  @keyframes swap-m { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  /* screen 1: the claim and the country */
  .hero { display: block; min-height: 0; padding: 0; }
  .hero-grid { display: block; }
  .hero-top { display: flex; flex-direction: column; min-height: 100svh; padding: 70px 0 20px; scroll-snap-align: start; }
  .eyebrow { margin: 0 0 12px; font-size: 11px; }
  h1 { font-size: clamp(32px, 9.4vw, 44px); line-height: 1.02; margin: 0; }
  .hero-top .mslot { margin: 8px 0 8px; }
  .mini { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; margin: 0 0 14px; padding: 7px 12px; min-height: 50px; white-space: nowrap; overflow: hidden;
    border: 1px solid var(--line); border-left: 2px solid var(--accent); background: var(--bg2); font-size: 13px; color: var(--mute); }
  .mini.on { color: var(--ink); }
  .mini b { font-weight: 500; font-size: 15px; flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; }
  .mini span { font: 400 12px var(--m); color: var(--mute); }
  .mini span + span::before { content: '· '; color: var(--faint); }
  .mini.swap > * { animation: ro-swap .3s ease-out both; }
  .readout .ro-rk { display: none; }
  .hero .lead { font-size: 16px; line-height: 1.45; margin: 0 0 16px; }
  .ctas { margin: 0; flex-wrap: nowrap; gap: 10px; }
  .ctas .btn { flex: 1; justify-content: center; padding: 13px 8px; font-size: 15px; }

  /* screen 2: explore the layers */
  .ask { display: flex; flex-direction: column; min-height: 100svh; max-width: none; padding: 66px 0 30px; scroll-snap-align: start; }
  .ask-l { margin-bottom: 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 2px; overscroll-behavior-x: contain; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; font-size: 15px; padding: 10px 14px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ask .mslot { margin: 6px 0; min-height: 220px; }
  .ans-box { display: block; position: relative; height: 128px; }
  .answer { min-height: 0; margin: 0; transition: opacity .25s; }
  .answer p { font-size: 16px; }
  .ans-box .readout.on + .answer { opacity: 0; visibility: hidden; }
  .also { display: none; }
  .find { margin-top: 8px; max-width: none; }
  .find input { font-size: 16px; }
  .find ul { top: auto; bottom: 100%; margin: 0 0 4px; }

  /* the concelho card, docked in the Explore card */
  .ans-box .readout { position: absolute; left: 0; right: 0; top: 0; width: auto; translate: none !important; transform-origin: 50% 0;
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; padding: 8px 12px 6px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg2); }
  .readout .ro-h { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; margin: 0 0 4px; min-width: 0; }
  .readout .ro-h b { font-size: 16px; white-space: nowrap; }
  .readout .ro-h span { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .readout .ro-row { padding: 5px 0; gap: 6px; align-items: center; }
  .readout .ro-l { font-size: 11px; line-height: 1.2; } .readout .ro-l small { display: none; }
  .readout .ro-v { font-size: 13.5px; }
  .readout .ro-note { grid-column: 1 / -1; margin: 4px 0 0; }

  /* chapters: each slide is a screen; the chapter label stays pinned over its two slides */
  .chapter { display: block; min-height: 0; padding: 0; }
  .chapter .wrap { padding: 0; }
  .chapter .panel, html.js .chapter .panel.rv { max-width: none; padding: 0; margin: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; opacity: 1; transform: none; }
  .chapter .k { position: sticky; top: 51px; z-index: 3; margin: 0; padding: 12px var(--gut) 8px; background: var(--bg); min-height: 0; }
  .snav { display: none; }
  .slides { display: block; }
  html.js .slide, .slide { grid-area: auto; opacity: 1; visibility: visible; transform: none; filter: none; transition: none;
    display: flex; flex-direction: column; min-height: 100svh; padding: 92px var(--gut) 24px; scroll-snap-align: start; }
  .slide .mslot { margin-bottom: 12px; min-height: 190px; }
  html.js .slide > :not(.mslot) { opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .6s cubic-bezier(.2,.7,.2,1); }
  html.js .slide.act > :not(.mslot) { opacity: 1; transform: none; }
  html.js .slide.act > :nth-child(3) { transition-delay: .08s; } html.js .slide.act > :nth-child(4) { transition-delay: .16s; } html.js .slide.act > :nth-child(5) { transition-delay: .22s; }
  .panel h2 { margin: 0 0 10px; }
  .ia { gap: 6px; margin-bottom: 10px; } .ia > div { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding-top: 7px; } .ia dd { font-size: 15px; }
  .panel p { font-size: 16px; margin: 0 0 10px; }
  .stat { font-size: 23px !important; margin: 0 0 10px; }
  .big-stat { font-size: 32px !important; }
  h2 { font-size: clamp(28px, 8vw, 36px); }

  /* text screens */
  .manifesto { min-height: 0; padding: 16vh 0 10vh; }
  .man { font-size: clamp(27px, 7.6vw, 34px); }
  .rec { margin-top: 7vh; text-shadow: none; }
  .wall { grid-template-columns: 1fr 1fr; }
  .wall > div { padding: 14px 12px 4px 0; }
  .solid { padding: 11vh 0; }
  .solid::before { display: none; }
  .lead { font-size: 17px; margin-bottom: 24px; }
  .grow-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 16px; }
  .grow-viz { aspect-ratio: 1 / 1; margin: 0 -16px; max-height: none; }
  .grow-steps p { font-size: 16px; } .grow-steps li { grid-template-columns: 40px 1fr; padding: 16px 0; }
  .three { grid-template-columns: 1fr; gap: 28px; margin: 40px 0; }
  .three .n { font-size: 40px; margin-bottom: 14px; }
  .ask-us { margin-top: 44px; }
  .foot { margin-top: 10vh; }
}
@media (max-width: 820px) and (max-height: 620px) { .slide .mslot { min-height: 130px; } .slide { padding-bottom: 14px; } .stat { font-size: 21px !important; }
  .hero-top .mslot { min-height: 120px; } .hero .lead { font-size: 15px; margin-bottom: 12px; } .mini { margin-bottom: 10px; } .eyebrow { margin-bottom: 8px; } }
/* phones held sideways: the map takes the left of each screen, the words the right */
@media (max-height: 520px) and (hover: none) and (orientation: landscape) {
  .hero-top, .ask, html.js .slide, .slide { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); column-gap: 28px; align-content: center; grid-auto-rows: min-content; }
  .hero-top > :not(.mslot), .ask > :not(.mslot), .slide > :not(.mslot) { grid-column: 2; }
  .hero-top .mslot, .ask .mslot, .slide .mslot { grid-column: 1; grid-row: 1 / span 8; align-self: stretch; min-height: 0; height: calc(100svh - 96px); margin: 0; }
  .hero-top { padding: 60px 0 16px; } .ask { padding: 58px 0 12px; } .slide { padding: 88px var(--gut) 12px; }
  h1 { font-size: 30px; } .hero .lead { font-size: 15px; margin-bottom: 12px; }
  .ans-box { height: 112px; } .stat { font-size: 20px !important; } .big-stat { font-size: 26px !important; } .panel h2 { font-size: 26px; }
}
@media (max-width: 359px) { .theme-toggle { display: none; } .idx-btn { padding: 0 7px; } }
@media (max-width: 820px) and (prefers-reduced-motion: reduce), (max-height: 520px) and (hover: none) and (prefers-reduced-motion: reduce) {
  html.js .slide > :not(.mslot) { opacity: 1; transform: none; transition: none; }
  html.js .rv { transform: none; transition: none; }
  .intro, .answer p, .answer small { animation: none; }
  .stage { transition: none; }
}
@media (min-width: 821px) and (max-height: 800px) {
  .chapter h2 { font-size: clamp(30px, 3.4vw, 44px); }
  .chapter .panel p { font-size: 16px; }
  .chapter .stat { font-size: clamp(20px, 2vw, 26px) !important; margin: 12px 0 8px; }
  .chapter .big-stat { font-size: clamp(28px, 3vw, 42px) !important; }
}
