:root {
  --void: #030807;
  --void-soft: #07110f;
  --paper: #eef6ef;
  --muted: #91a89f;
  --emerald: #9dffb7;
  --cyan: #61e7df;
  --gold: #ffc46b;
  --line: rgba(183, 231, 209, .15);
  --accent: var(--emerald);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "DM Mono", monospace;
  color-scheme: dark;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--void); }
body { margin: 0; background: var(--void); color: var(--paper); overflow-x: hidden; }
button, a, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
em { color: var(--accent); font-style: normal; }
.mono { font-family: var(--font-mono); }
::selection { color: #02100b; background: var(--emerald); }

#worldCanvas { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: .34; }
.noise { position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .024; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.cursor { position: fixed; z-index: 110; width: 34px; height: 34px; border: 1px solid rgba(157,255,183,.55); border-radius: 50%; pointer-events: none; transform: translate(-50%,-50%); transition: width .2s, height .2s, border-color .2s; mix-blend-mode: screen; }
.cursor::before, .cursor::after { content: ""; position: absolute; background: var(--accent); }
.cursor::before { width: 8px; height: 1px; left: -5px; top: 16px; }
.cursor::after { width: 1px; height: 8px; left: 16px; top: -5px; }
.cursor i { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); position: absolute; left: 15px; top: 15px; }
.cursor.active { width: 58px; height: 58px; border-color: var(--gold); }

.nav-shell { position: fixed; z-index: 90; top: 0; left: 0; right: 0; height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 3.6vw; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(3,8,7,.88), rgba(3,8,7,.28)); backdrop-filter: blur(18px); }
.identity { display: flex; align-items: center; gap: .72rem; font: 600 .74rem var(--font-display); letter-spacing: .13em; }
.identity sup { color: var(--accent); font: 400 .48rem var(--font-mono); margin-left: .18rem; vertical-align: top; }
.identity-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font: 500 .58rem var(--font-mono); position: relative; clip-path: polygon(0 0, 100% 0, 100% 78%, 78% 100%, 0 100%); }
.identity-mark::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 4px; height: 4px; background: var(--accent); }
nav { display: flex; gap: 2.4rem; }
nav a { font: 400 .62rem var(--font-mono); color: #a9bbb4; letter-spacing: .07em; text-transform: uppercase; transition: color .25s; }
nav a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 1.1rem; }
.system-status { display: flex; align-items: center; gap: .5rem; font: 400 .5rem var(--font-mono); color: #91a89f; letter-spacing: .08em; }
.system-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.6s infinite; }
.sound-control { width: 38px; height: 38px; border: 1px solid var(--line); background: rgba(5,14,12,.5); display: flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.sound-control span { width: 2px; height: 7px; background: #8aa098; transition: .3s; }
.sound-control span:nth-child(2) { height: 13px; }
.sound-control[aria-pressed="true"] span { background: var(--accent); animation: sound 1s ease-in-out infinite alternate; }
.sound-control[aria-pressed="true"] span:nth-child(2) { animation-delay: -.4s; }
.sound-control[aria-pressed="true"] span:nth-child(3) { animation-delay: -.7s; }

main, footer { position: relative; z-index: 2; }
.hero { min-height: 100svh; position: relative; isolation: isolate; display: flex; align-items: center; padding: 10rem 7.5vw 9rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -5; background: url('/assets/tanzania-2045-hero.png') center/cover no-repeat; transform: scale(1.025); animation: heroDrift 20s ease-in-out infinite alternate; }
.hero-grid { position: absolute; inset: 0; z-index: -3; background-image: linear-gradient(rgba(127,226,196,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(127,226,196,.055) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to right, black, transparent 72%); }
.hero-vignette { position: absolute; inset: 0; z-index: -4; background: linear-gradient(90deg, rgba(3,8,7,.98) 0%, rgba(3,8,7,.85) 37%, rgba(3,8,7,.16) 70%), linear-gradient(0deg, var(--void) 0%, transparent 34%), radial-gradient(circle at 72% 40%, transparent, rgba(3,8,7,.35)); }
.hero::after { content: ""; position: absolute; z-index: -2; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(0deg, var(--void), transparent); }
.hero-content { width: min(960px, 77vw); position: relative; z-index: 4; }
.transmission { color: #adc3ba; font-size: .56rem; letter-spacing: .12em; display: flex; align-items: center; gap: .8rem; margin-bottom: 1.7rem; }
.transmission i { width: 32px; height: 1px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
h1 { font-size: clamp(4.2rem, 8.9vw, 10rem); line-height: .79; letter-spacing: -.075em; text-transform: uppercase; max-width: 1100px; }
h1 span { color: rgba(238,246,239,.65); font-weight: 400; }
.hero-thesis { display: flex; align-items: center; gap: 1.4rem; margin: 2rem 0 1.3rem; }
.thesis-line { width: clamp(45px, 8vw, 120px); height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.hero-thesis p { font: 500 clamp(1.4rem, 2.4vw, 2.6rem) var(--font-display); letter-spacing: -.035em; margin: 0; }
.hero-description { width: min(570px, 100%); color: #a4b7af; font-size: .9rem; line-height: 1.78; margin: 0 0 2.3rem clamp(46px, 8vw, 120px); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-left: clamp(46px, 8vw, 120px); }
.cta-primary, .cta-ghost { min-height: 52px; padding: 0 1.15rem; display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; font: 500 .61rem var(--font-mono); letter-spacing: .07em; cursor: pointer; transition: transform .2s, box-shadow .3s, background .3s; }
.cta-primary { border: 1px solid var(--accent); background: var(--accent); color: #031009; }
.cta-primary:hover { box-shadow: 0 0 38px rgba(157,255,183,.25); }
.cta-ghost { border: 1px solid var(--line); background: rgba(3,8,7,.38); backdrop-filter: blur(12px); color: #c8d8d1; }
.cta-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-side { position: absolute; z-index: 4; right: 2.1vw; top: 32%; writing-mode: vertical-rl; font-size: .48rem; color: rgba(224,241,232,.45); letter-spacing: .11em; display: flex; gap: 1.5rem; }
.hero-side span { color: var(--accent); }
.hero-data { position: absolute; z-index: 4; right: 4.5vw; bottom: 8vh; display: flex; border: 1px solid var(--line); background: rgba(3,8,7,.5); backdrop-filter: blur(12px); }
.hero-data div { min-width: 130px; padding: .8rem 1rem; border-right: 1px solid var(--line); display: grid; gap: .36rem; }
.hero-data div:last-child { border-right: 0; }
.hero-data span { color: #6f8880; font-size: .45rem; }
.hero-data b { font-size: .54rem; color: #c5d6cf; font-weight: 400; }
.scroll-indicator { position: absolute; left: 3vw; bottom: 2.4rem; font-size: .46rem; color: #648079; writing-mode: vertical-rl; display: flex; gap: .7rem; align-items: center; }
.scroll-indicator span { width: 1px; height: 35px; background: var(--accent); }
.future-orbit { position: absolute; right: 14vw; top: 23%; width: 170px; aspect-ratio: 1; display: grid; place-items: center; opacity: .7; }
.orbit { position: absolute; border: 1px solid rgba(157,255,183,.24); border-radius: 50%; }
.orbit-a { inset: 0; animation: spin 15s linear infinite; border-style: dashed; }
.orbit-b { inset: 24px; border-color: rgba(255,196,107,.3); animation: spinReverse 10s linear infinite; }
.orbit-c { inset: 49px; box-shadow: 0 0 30px rgba(157,255,183,.12); }
.orbit-core { font: 500 .6rem var(--font-mono); color: var(--accent); }

.signal-strip { position: relative; z-index: 4; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #07110f; }
.signal-track { width: max-content; height: 58px; display: flex; align-items: center; gap: 2rem; font-size: .53rem; letter-spacing: .1em; color: #8ba198; animation: marquee 28s linear infinite; }
.signal-track i { color: var(--accent); font-style: normal; }

.section { padding: 10rem 6vw; position: relative; overflow: hidden; }
.section-kicker { display: flex; align-items: center; gap: .7rem; color: #77938a; font-size: .55rem; letter-spacing: .12em; }
.section-kicker span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--accent); }
.nation { background: radial-gradient(circle at 10% 55%, rgba(28,95,74,.14), transparent 28%), var(--void); }
.nation-intro { max-width: 1260px; margin: 2rem auto 5rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 4rem; }
.section h2 { font-size: clamp(3.4rem, 6.5vw, 7.3rem); line-height: .91; letter-spacing: -.065em; }
.nation-intro > p { width: min(440px, 100%); color: var(--muted); font-size: .87rem; line-height: 1.8; margin: 0 0 .5rem; }
.nation-console { max-width: 1280px; min-height: 760px; margin: auto; display: grid; grid-template-columns: 1.08fr .92fr; border: 1px solid var(--line); background: rgba(5,14,12,.58); box-shadow: 0 40px 100px rgba(0,0,0,.35); }
.map-shell { position: relative; min-height: 760px; border-right: 1px solid var(--line); background: radial-gradient(circle at 53% 45%, rgba(57,152,116,.12), transparent 35%), linear-gradient(rgba(134,211,183,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(134,211,183,.035) 1px, transparent 1px); background-size: auto, 35px 35px, 35px 35px; overflow: hidden; }
.map-topline, .panel-head { height: 48px; padding: 0 1.1rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: #708a81; font-size: .48rem; }
.map-topline span:last-child { color: var(--accent); }
.tz-map { width: min(520px, 92%); height: 620px; display: block; margin: 60px auto 0; filter: drop-shadow(0 0 35px rgba(79,192,150,.08)); }
.map-outline, .zanzibar, .pemba { fill: url(#mapFill); stroke: rgba(157,255,183,.44); stroke-width: 1.2; }
.map-routes path { fill: none; stroke: rgba(97,231,223,.22); stroke-width: 1.2; stroke-dasharray: 5 7; animation: dash 24s linear infinite; }
.map-node { cursor: pointer; outline: none; }
.map-node circle:first-child { fill: rgba(97,231,223,.05); stroke: rgba(157,255,183,.28); stroke-width: 1; transition: .3s; }
.map-node circle:nth-child(2) { fill: #77a493; transition: .3s; }
.map-node text { fill: #799289; font: 10px var(--font-mono); letter-spacing: 1px; transition: .3s; }
.map-node:hover circle:first-child, .map-node.active circle:first-child { fill: rgba(157,255,183,.14); stroke: var(--accent); filter: url(#glow); }
.map-node:hover circle:nth-child(2), .map-node.active circle:nth-child(2) { fill: var(--accent); }
.map-node:hover text, .map-node.active text { fill: var(--paper); }
.map-node.active circle:first-child { animation: mapPulse 2s infinite; }
.map-readout { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; min-height: 45px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-around; gap: 1rem; background: rgba(3,8,7,.65); color: #6c8980; font-size: .46rem; }
.map-readout b { color: #c8d9d1; font-weight: 400; margin-left: .3rem; }
.challenge-panel { display: flex; flex-direction: column; min-width: 0; }
.challenge-list { display: grid; grid-template-columns: 1fr 1fr; }
.challenge { min-height: 104px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 25px 1fr 18px; grid-template-rows: auto auto; column-gap: .5rem; padding: 1rem; text-align: left; cursor: pointer; transition: background .3s, box-shadow .3s; }
.challenge:nth-child(even) { border-right: 0; }
.challenge > span { grid-row: 1/3; color: #5b776e; font: .5rem var(--font-mono); padding-top: .15rem; }
.challenge b { font: 500 .88rem var(--font-display); }
.challenge small { color: #667f77; font-size: .59rem; margin-top: .25rem; }
.challenge i { grid-row: 1/3; grid-column: 3; align-self: center; color: #4e675f; font-style: normal; }
.challenge:hover, .challenge.active { background: rgba(157,255,183,.055); box-shadow: inset 3px 0 var(--accent); }
.challenge.active b, .challenge.active i { color: var(--accent); }
.challenge-brief { padding: 2.3rem; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.challenge-brief > span { color: var(--accent); font-size: .5rem; letter-spacing: .1em; }
.challenge-brief h3 { font-size: clamp(2rem, 3vw, 3.3rem); line-height: 1; letter-spacing: -.05em; margin: .8rem 0 1rem; }
.challenge-brief p { color: var(--muted); font-size: .78rem; line-height: 1.75; min-height: 70px; max-width: 480px; }
.target-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 1rem; }
.target-grid > div { padding: 1rem .6rem; border-right: 1px solid var(--line); }
.target-grid > div:last-child { border-right: 0; }
.target-value { display: block; color: var(--accent); font: 500 1.15rem var(--font-display); }
.target-grid small { display: block; color: #60766e; font: .4rem var(--font-mono); margin-top: .35rem; }

.timeline { min-height: 110vh; background: #06100e; }
.timeline-atmosphere { position: absolute; width: 900px; height: 900px; border-radius: 50%; right: -200px; top: 15%; background: radial-gradient(circle, rgba(97,231,223,.1), transparent 60%); filter: blur(10px); }
.timeline-head { max-width: 1260px; margin: 2rem auto 5rem; display: flex; justify-content: space-between; gap: 4rem; align-items: flex-end; }
.timeline-head > p { width: min(380px,100%); color: var(--muted); font-size: .82rem; line-height: 1.75; }
.time-console { max-width: 1260px; margin: auto; min-height: 490px; position: relative; display: grid; grid-template-columns: .75fr 1.25fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.year-display { padding: 2.7rem 2rem 5rem 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.year-display > span { color: #668078; font-size: .48rem; letter-spacing: .1em; }
.year-display b { font: 500 clamp(6rem, 12vw, 12rem) var(--font-display); line-height: .8; letter-spacing: -.1em; color: transparent; -webkit-text-stroke: 1px rgba(157,255,183,.5); margin: 2rem 0 1rem; }
.year-display small { color: var(--accent); font: 500 .7rem var(--font-mono); letter-spacing: .15em; }
.time-story { padding: 4rem 0 5rem 4rem; display: flex; flex-direction: column; justify-content: center; }
.time-story > span { color: #668078; font-size: .48rem; }
.time-story h3 { font-size: clamp(2.3rem,4vw,4.6rem); line-height: 1; letter-spacing: -.055em; margin: 1rem 0; }
.time-story > p { color: var(--muted); font-size: .82rem; line-height: 1.75; max-width: 620px; min-height: 60px; }
.progress-metrics { display: grid; gap: .8rem; margin-top: 1.3rem; max-width: 580px; }
.progress-metrics > div { display: grid; grid-template-columns: 150px 1fr 35px; align-items: center; gap: .8rem; }
.progress-metrics span, .progress-metrics em { font: .43rem var(--font-mono); color: #698078; font-style: normal; }
.progress-metrics i { height: 2px; background: rgba(157,255,183,.08); }
.progress-metrics i b { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--cyan)); box-shadow: 0 0 8px var(--accent); transition: width .8s ease; }
.progress-metrics em { color: var(--accent); }
.range-shell { position: absolute; left: 0; right: 0; bottom: 1.7rem; }
#yearRange { width: 100%; height: 2px; appearance: none; background: linear-gradient(90deg, var(--accent) 0%, rgba(157,255,183,.14) 0%); outline: none; }
#yearRange::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--void); border: 2px solid var(--accent); box-shadow: 0 0 20px rgba(157,255,183,.4); cursor: grab; }
#yearRange::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--void); border: 2px solid var(--accent); cursor: grab; }
.range-years { display: flex; justify-content: space-between; color: #62796f; font-size: .5rem; margin-top: .8rem; }

.generation { background: #dfe9df; color: #07100d; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem,7vw,8rem); align-items: center; }
.generation-visual { position: relative; min-height: 780px; overflow: hidden; }
.generation-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(1.06); }
.generation-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3,8,7,.78), transparent 50%); }
.image-scan { position: absolute; z-index: 2; left: 0; right: 0; height: 1px; top: 0; background: var(--emerald); box-shadow: 0 0 16px var(--emerald); animation: scan 5s ease-in-out infinite; }
.image-caption { position: absolute; z-index: 3; left: 1.5rem; bottom: 1.5rem; display: grid; gap: .5rem; color: white; font-size: .48rem; }
.image-caption span { color: var(--emerald); }
.image-caption b { font-size: .62rem; line-height: 1.5; letter-spacing: .1em; }
.generation-copy .section-kicker { color: #567068; }
.generation-copy .section-kicker span { border-color: rgba(7,16,13,.17); color: #166e4d; }
.generation-copy h2 { margin: 2rem 0; }
.generation-copy h2 em { color: #11825b; }
.generation-copy > p { color: #52645e; line-height: 1.8; font-size: .88rem; max-width: 550px; }
blockquote { margin: 2.2rem 0; border-left: 2px solid #15865f; padding: .5rem 0 .5rem 1.3rem; font: 500 1.05rem/1.6 var(--font-display); color: #1c2d27; max-width: 620px; }
.generation-principles { display: flex; flex-wrap: wrap; gap: .5rem; }
.generation-principles span { padding: .7rem .8rem; border: 1px solid rgba(7,16,13,.15); font-size: .6rem; }
.generation-principles i { color: #17835f; font: .48rem var(--font-mono); margin-right: .5rem; font-style: normal; }

.continent { min-height: 100vh; background: radial-gradient(circle at 67% 62%, rgba(35,118,88,.14), transparent 28%), var(--void); }
.continent-head { max-width: 1260px; margin: 0 auto 4rem; }
.continent-head h2 { margin-top: 2rem; }
.scale-switch { max-width: 1260px; margin: auto; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); }
.scale { min-height: 64px; border: 0; border-right: 1px solid var(--line); background: transparent; color: #789087; font: .6rem var(--font-mono); letter-spacing: .08em; cursor: pointer; display: flex; justify-content: center; gap: .8rem; align-items: center; }
.scale:last-child { border-right: 0; }
.scale span { color: #526c63; }
.scale.active { background: rgba(157,255,183,.08); color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.impact-stage { max-width: 1260px; margin: 4rem auto 0; min-height: 540px; display: grid; grid-template-columns: 1fr .85fr; align-items: center; }
.impact-rings { width: min(520px,90vw); aspect-ratio: 1; position: relative; display: grid; place-items: center; margin: auto; }
.impact-rings i { position: absolute; border: 1px solid rgba(157,255,183,.13); border-radius: 50%; transition: .8s; }
.impact-rings i:nth-child(1) { inset: 3%; animation: spin 22s linear infinite; border-style: dashed; }
.impact-rings i:nth-child(2) { inset: 16%; }
.impact-rings i:nth-child(3) { inset: 29%; border-color: rgba(97,231,223,.22); }
.impact-rings i:nth-child(4) { inset: 41%; background: radial-gradient(circle, rgba(157,255,183,.22), rgba(157,255,183,.04)); box-shadow: 0 0 70px rgba(157,255,183,.12); }
.impact-rings b { z-index: 2; font: 600 2.2rem var(--font-display); color: var(--accent); }
.impact-rings.wave-east i:nth-child(2), .impact-rings.wave-africa i:nth-child(2) { box-shadow: 0 0 55px rgba(97,231,223,.2); border-color: var(--cyan); }
.impact-rings.wave-africa i:nth-child(1) { box-shadow: 0 0 70px rgba(255,196,107,.16); border-color: var(--gold); }
.impact-copy > span { color: var(--accent); font-size: .5rem; }
.impact-copy h3 { font-size: clamp(2.7rem,5vw,5.2rem); line-height: .95; letter-spacing: -.06em; margin: 1rem 0; }
.impact-copy p { color: var(--muted); line-height: 1.8; font-size: .83rem; max-width: 520px; min-height: 80px; }
.impact-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.impact-tags span { border: 1px solid var(--line); padding: .55rem .7rem; color: #7e978e; font: .48rem var(--font-mono); }

.compiler { background: #07110f; }
.compiler-head { max-width: 1260px; margin: auto; text-align: center; }
.compiler-head .section-kicker { justify-content: center; }
.compiler-head h2 { margin: 2rem 0 1rem; }
.compiler-head > p { color: var(--muted); font-size: .83rem; }
.compiler-grid { max-width: 1260px; margin: 5rem auto 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.compiler-controls { padding: 2rem; border-right: 1px solid var(--line); }
fieldset { margin: 0 0 2rem; padding: 0; border: 0; }
legend { color: #6e867d; font-size: .49rem; letter-spacing: .1em; margin-bottom: .8rem; }
.option-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.option { min-height: 38px; padding: 0 .8rem; border: 1px solid var(--line); background: transparent; color: #789087; font: .49rem var(--font-mono); cursor: pointer; }
.option.active { color: #06100d; background: var(--accent); border-color: var(--accent); }
.compile-button { width: 100%; height: 58px; border: 1px solid var(--accent); background: transparent; color: var(--accent); display: flex; justify-content: space-between; align-items: center; padding: 0 1.1rem; font: .58rem var(--font-mono); letter-spacing: .08em; cursor: pointer; transition: .3s; }
.compile-button:hover { background: var(--accent); color: #06100d; box-shadow: 0 0 30px rgba(157,255,183,.15); }
.compile-button b { font-size: 1.2rem; }
.mission-terminal { min-height: 490px; background: #030807; display: flex; flex-direction: column; }
.terminal-bar { min-height: 48px; border-bottom: 1px solid var(--line); padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; font-size: .47rem; color: #789087; }
.terminal-bar span { display: flex; align-items: center; gap: .38rem; }
.terminal-bar i { width: 6px; height: 6px; border-radius: 50%; background: #31443e; }
.terminal-bar i:first-child { background: var(--gold); }
.terminal-bar b { color: var(--accent); font-weight: 400; }
.terminal-body { padding: 2rem; color: #80988f; font-size: .62rem; line-height: 1.9; overflow: hidden; }
.terminal-body p { margin: 0 0 .45rem; }
.terminal-body p span { color: #425a51; margin-right: 1rem; }
.terminal-body p b { color: var(--accent); font-weight: 400; }
.terminal-body .mission-result { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; color: var(--paper); margin: 1.5rem 0; letter-spacing: -.02em; }
.terminal-body .system-line { color: var(--cyan); }
.terminal-cursor { color: var(--accent); animation: blink .7s step-end infinite; }

.finale { min-height: 100svh; position: relative; isolation: isolate; display: grid; place-items: center; text-align: center; padding: 8rem 6vw; overflow: hidden; }
.finale-bg { position: absolute; inset: 0; z-index: -2; background: linear-gradient(0deg, rgba(3,8,7,.9), rgba(3,8,7,.42)), url('/assets/tanzania-2045-hero.png') 70% center/cover no-repeat; filter: saturate(.7); }
.finale::before { content: ""; position: absolute; z-index: -1; width: min(75vw,850px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(157,255,183,.15), transparent 65%); }
.finale-content > span { color: var(--accent); font-size: .5rem; letter-spacing: .13em; }
.finale-content h2 { font-size: clamp(3.2rem,7vw,8rem); line-height: .9; letter-spacing: -.07em; margin: 1.5rem 0; }
.finale-content p { color: #b5c5be; font-size: 1rem; margin-bottom: 2rem; }
.finale-signature { position: absolute; left: 3vw; bottom: 2.5rem; text-align: left; color: #789087; font-size: .45rem; line-height: 1.8; }
footer { min-height: 115px; padding: 2rem 4vw; display: flex; align-items: center; justify-content: space-between; gap: 2rem; background: #020504; border-top: 1px solid var(--line); }
footer p, footer > span { color: #647b72; font: .48rem var(--font-mono); letter-spacing: .07em; }

.simulation-overlay { position: fixed; z-index: 200; inset: 0; background: #020605; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s; overflow: hidden; }
.simulation-overlay.open { opacity: 1; visibility: visible; }
#launchCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#closeSimulation { position: absolute; z-index: 3; right: 2.5rem; top: 2rem; border: 1px solid var(--line); background: rgba(3,8,7,.5); width: 42px; height: 42px; font-size: 1.3rem; cursor: pointer; }
.launch-center { position: relative; z-index: 2; width: min(850px,85vw); text-align: center; }
.launch-center > span { color: var(--accent); font-size: .53rem; letter-spacing: .14em; }
.launch-year { font: 500 clamp(8rem,24vw,22rem)/.8 var(--font-display); letter-spacing: -.12em; color: transparent; -webkit-text-stroke: 1px rgba(157,255,183,.55); margin: 2rem 0; }
.launch-center p { color: #b3c5bc; font: 500 clamp(1.2rem,2.2vw,2rem) var(--font-display); }
.launch-progress { width: min(600px,80vw); height: 2px; background: rgba(157,255,183,.12); margin: 2rem auto; }
.launch-progress i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 15px var(--accent); }
.simulation-overlay.open .launch-progress i { animation: launchProgress 10s linear forwards; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } }
@keyframes sound { to { height: 15px; } }
@keyframes heroDrift { to { transform: scale(1.07) translateX(-1%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes dash { to { stroke-dashoffset: -200; } }
@keyframes mapPulse { 70% { stroke-width: 8; stroke-opacity: 0; } }
@keyframes scan { 0%,100% { top: 0; opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 95% { top: 100%; opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes launchProgress { to { width: 100%; } }

@media (max-width: 1050px) {
  nav { display: none; }
  .hero-content { width: 88vw; }
  .future-orbit { right: 6vw; top: 20%; width: 120px; }
  .hero-data { right: 3vw; }
  .nation-console { grid-template-columns: 1fr; }
  .map-shell { border-right: 0; border-bottom: 1px solid var(--line); }
  .generation { grid-template-columns: 1fr; }
  .generation-visual { min-height: 700px; }
  .impact-stage { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .cursor { display: none; }
  .nav-shell { height: 66px; padding: 0 5vw; }
  .system-status { display: none; }
  .hero { padding: 8rem 6vw 9rem; align-items: flex-start; }
  .hero-bg { background-position: 65% center; }
  .hero-vignette { background: linear-gradient(90deg, rgba(3,8,7,.96), rgba(3,8,7,.48)), linear-gradient(0deg, var(--void), transparent 50%); }
  h1 { font-size: clamp(3.7rem,18vw,6rem); line-height: .83; }
  .hero-content { width: 100%; }
  .hero-thesis { margin-top: 1.6rem; }
  .hero-description, .hero-actions { margin-left: 0; }
  .future-orbit, .hero-side, .scroll-indicator { display: none; }
  .hero-data { left: 6vw; right: 6vw; bottom: 2rem; }
  .hero-data div { flex: 1; min-width: 0; padding: .65rem; }
  .hero-data div:last-child { display: none; }
  .section { padding: 7rem 5vw; }
  .nation-intro, .timeline-head { display: block; }
  .nation-intro > p, .timeline-head > p { margin-top: 2rem; }
  .nation-console, .map-shell { min-height: 650px; }
  .tz-map { height: 520px; margin-top: 45px; }
  .challenge-list { grid-template-columns: 1fr; }
  .challenge { border-right: 0; min-height: 84px; }
  .challenge-brief { padding: 1.5rem; }
  .target-grid { grid-template-columns: 1fr; }
  .target-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .time-console { grid-template-columns: 1fr; padding-bottom: 4rem; }
  .year-display { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); padding: 2rem 0; }
  .time-story { padding: 3rem 0 4rem; }
  .progress-metrics > div { grid-template-columns: 115px 1fr 32px; }
  .generation-visual { min-height: 620px; }
  .impact-stage { grid-template-columns: 1fr; }
  .impact-rings { width: min(430px,90vw); }
  .scale { font-size: .48rem; }
  .compiler-grid { grid-template-columns: 1fr; }
  .compiler-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .mission-terminal { min-height: 420px; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .identity span:last-child { font-size: .63rem; }
  .transmission { font-size: .43rem; }
  .hero-thesis p { font-size: 1.25rem; }
  .hero-actions > * { width: 100%; }
  .map-readout span:nth-child(2) { display: none; }
  .section h2 { font-size: 3.3rem; }
  .generation-visual { min-height: 540px; }
  .option { flex: 1; padding: 0 .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
