:root {
  --ink: #e8eee9;
  --muted: #9ca8a0;
  --dim: #63706a;
  --night: #07110f;
  --panel: #0d1916;
  --line: rgba(202, 220, 209, .17);
  --acid: #d9ff5a;
  --ember: #ff7849;
  --ice: #bce9e2;
  --display: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 12%, rgba(63, 108, 93, .18), transparent 30rem),
    linear-gradient(145deg, #091511 0%, var(--night) 50%, #040a09 100%);
  font-family: var(--display);
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.grain {
  position: fixed;
  inset: 0;
  opacity: .045;
  pointer-events: none;
  z-index: 20;
  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='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.weather {
  position: fixed;
  inset: -100px;
  pointer-events: none;
  z-index: 1;
  opacity: .1;
  background-image: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255,255,255,.42) 23px, transparent 24px 58px);
  animation: snow 9s linear infinite;
}

@keyframes snow { to { transform: translate3d(-140px, 160px, 0); } }

.site-header, footer {
  position: relative;
  z-index: 5;
  height: 78px;
  padding: 0 clamp(22px, 5vw, 74px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .21em;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark { width: 23px; height: 23px; display: grid; place-content: center; position: relative; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 1px 10px; background: var(--acid); }
.brand-mark::after { transform: rotate(90deg); }
.brand-mark i { width: 3px; height: 3px; margin: 2px; display: block; background: var(--acid); transform: rotate(45deg); }

.header-meta { display: flex; align-items: center; gap: clamp(16px, 3vw, 44px); font-family: var(--mono); text-transform: uppercase; font-size: 10px; letter-spacing: .1em; }
.signal { color: var(--muted); }
.signal i { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px var(--acid); }
.sound-toggle { color: var(--muted); border: 0; background: none; display: flex; align-items: center; gap: 10px; cursor: pointer; text-transform: uppercase; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.sound-bars { display: flex; gap: 2px; align-items: center; height: 12px; }
.sound-bars i { display: block; width: 2px; height: 4px; background: currentColor; }
.sound-bars i:nth-child(2) { height: 9px; }
.sound-bars i:nth-child(3) { height: 6px; }
.sound-toggle[aria-pressed="true"] .sound-bars i { animation: sound 1s ease-in-out infinite alternate; color: var(--acid); }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(2) { animation-delay: -.3s; }
@keyframes sound { to { height: 11px; } }

main { position: relative; z-index: 2; min-height: calc(100vh - 134px); }
.screen { display: none; animation: reveal .55s ease both; }
.screen.active { display: grid; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

.intro-screen {
  width: min(1450px, 100%);
  min-height: calc(100vh - 134px);
  margin: 0 auto;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(40px, 7vw, 120px);
  padding: 70px clamp(24px, 7vw, 108px) 90px;
}

.eyebrow { font: 500 10px/1 var(--mono); color: var(--muted); letter-spacing: .18em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.eyebrow span { width: 32px; height: 1px; background: var(--acid); }
.intro-copy h1, .result-hero h1 {
  margin: 28px 0 24px;
  max-width: 720px;
  font-size: clamp(56px, 7.5vw, 112px);
  letter-spacing: -.07em;
  line-height: .86;
  font-weight: 800;
}
.intro-copy h1 em, .result-hero h1 em, .section-heading em { color: var(--acid); font-style: normal; font-weight: 500; }
.lede { max-width: 570px; color: #b5c0b9; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.7; }
.intro-actions { margin-top: 46px; display: flex; align-items: center; gap: 26px; }
.intro-actions p { margin: 0; font: 10px/1.5 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.intro-actions p strong, .intro-actions p span { display: block; }
.intro-actions p strong { color: var(--ink); }

.primary-button {
  min-width: 210px;
  min-height: 58px;
  padding: 0 18px 0 24px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: #0a110d;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 35px rgba(217,255,90,.14); background: #e5ff87; }
.primary-button span { font-size: 22px; font-weight: 400; }

.scenario-card {
  min-height: 570px;
  max-width: 520px;
  justify-self: end;
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background-image: linear-gradient(155deg, rgba(7,17,15,.12), rgba(5,13,11,.94)), url("assets/hero-whiteout.jpg");
  background-size: cover;
  background-position: 63% center;
  clip-path: polygon(0 0, calc(100% - 42px) 0, 100% 42px, 100% 100%, 0 100%);
}
.scenario-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,10,8,.08), rgba(3,10,8,.28) 45%, rgba(3,10,8,.95)); }
.coordinates { position: absolute; top: 26px; left: 26px; font: 9px/1.7 var(--mono); color: var(--dim); letter-spacing: .08em; }
.scenario-number { position: absolute; right: 18px; top: 36px; font-size: 170px; line-height: 1; font-weight: 800; letter-spacing: -.11em; color: transparent; -webkit-text-stroke: 1px rgba(217,255,90,.13); }
.topo-lines { position: absolute; inset: 50px -70px 110px 50px; border: 1px solid rgba(217,255,90,.14); border-radius: 49% 51% 44% 56%; transform: rotate(-18deg); }
.topo-lines::before, .topo-lines::after { content: ""; position: absolute; border: 1px solid rgba(217,255,90,.11); border-radius: 47%; }
.topo-lines::before { inset: 35px; }.topo-lines::after { inset: 80px 55px; }
.scenario-details { position: absolute; inset: auto 34px 36px; }
.scenario-details > span { font: 9px var(--mono); color: var(--acid); text-transform: uppercase; letter-spacing: .16em; }
.scenario-details h2 { margin: 12px 0 26px; font-size: clamp(36px, 4.3vw, 61px); line-height: .94; letter-spacing: -.05em; }
.scenario-details dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding-top: 20px; border-top: 1px solid var(--line); gap: 12px; }
.scenario-details dt { color: var(--dim); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.scenario-details dd { margin: 7px 0 0; font-size: 11px; color: var(--muted); }

.game-screen { min-height: calc(100vh - 134px); grid-template-columns: minmax(220px, 29%) 1fr; }
.status-panel { padding: 58px clamp(24px, 4vw, 62px) 36px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: rgba(3, 10, 8, .32); }
.clock { margin-top: 32px; display: flex; align-items: flex-start; gap: 8px; }
.clock span { font: 500 clamp(40px, 5vw, 68px)/1 var(--mono); letter-spacing: -.08em; }
.clock small { margin-top: 5px; color: var(--acid); font: 9px var(--mono); }
.location { color: var(--dim); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.meters { margin-top: 60px; display: grid; gap: 24px; }
.meter > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.meter strong { color: var(--ink); font-weight: 400; }
.meter-track { height: 2px; background: #26312d; margin-top: 10px; }
.meter-track i { display: block; width: 50%; height: 100%; background: var(--acid); transition: width .65s ease, background .3s; }
.inventory { margin-top: 55px; padding-top: 20px; border-top: 1px solid var(--line); }
.inventory > span { color: var(--dim); font: 8px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.inventory ul { margin: 15px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.inventory li { padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font: 9px var(--mono); }
.restart-link { margin-top: auto; align-self: flex-start; color: var(--dim); background: none; border: 0; border-bottom: 1px solid currentColor; padding: 2px 0; font: 9px var(--mono); text-transform: uppercase; cursor: pointer; }

.story-panel { padding: clamp(42px, 5vw, 72px) clamp(26px, 8vw, 125px) 70px; max-width: 1120px; }
.chapter-line { display: flex; align-items: center; gap: 15px; color: var(--dim); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .15em; }
.chapter-line i { width: 70px; height: 1px; background: var(--line); }
.scene-visual { margin: 28px 0 0; position: relative; height: clamp(180px, 25vw, 285px); overflow: hidden; border: 1px solid var(--line); background: #0a1311; }
.scene-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 50%, rgba(4,10,8,.44)), linear-gradient(0deg, rgba(4,10,8,.55), transparent 45%); pointer-events: none; }
.scene-visual img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.8) contrast(1.05); transition: opacity .28s ease, transform 6s ease; }
.scene-visual:hover img { transform: scale(1.025); }
.scene-visual figcaption { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 13px; display: flex; align-items: center; gap: 12px; color: rgba(232,238,233,.68); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .13em; }
.scene-visual figcaption i { height: 1px; flex: 1; background: rgba(232,238,233,.22); }
.story-copy { min-height: 285px; padding-top: clamp(32px, 4vw, 50px); }
.story-kicker { color: var(--acid); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.story-copy h2 { margin: 14px 0 28px; font-size: clamp(37px, 5vw, 69px); line-height: .98; letter-spacing: -.055em; max-width: 780px; }
.story-copy #story-body { max-width: 680px; color: #afbab3; font-size: 15px; line-height: 1.75; }
.story-copy #story-body p { margin: 0 0 14px; }
.story-copy #story-body strong { color: var(--ink); font-weight: 600; }
.choices { margin-top: 30px; display: grid; gap: 11px; }
.choice-button { width: 100%; padding: 18px 20px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 18px; text-align: left; color: var(--ink); border: 1px solid var(--line); background: rgba(12,25,21,.56); cursor: pointer; transition: border .2s, background .2s, transform .2s; }
.choice-button:hover, .choice-button:focus-visible { border-color: rgba(217,255,90,.7); background: rgba(35,50,38,.7); transform: translateX(4px); outline: none; }
.choice-index { color: var(--acid); font: 10px var(--mono); }
.choice-text strong { display: block; margin-bottom: 5px; font-size: 13px; letter-spacing: -.01em; }
.choice-text small { color: var(--dim); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.choice-risk { padding-left: 18px; border-left: 1px solid var(--line); color: var(--muted); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.choice-note { color: var(--dim); font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.result-screen { min-height: calc(100vh - 134px); }
.result-hero { min-height: 540px; position: relative; overflow: hidden; padding: 70px clamp(25px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--line); background-size: cover; background-position: center; }
.result-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,10,8,.96) 0%, rgba(4,10,8,.79) 44%, rgba(4,10,8,.18) 78%), linear-gradient(0deg, rgba(4,10,8,.62), transparent 55%); }
.result-hero > * { position: relative; z-index: 1; }
.result-hero h1 { margin: 20px 0; font-size: clamp(58px, 9vw, 132px); }
.result-hero > p:not(.eyebrow) { max-width: 620px; color: var(--muted); line-height: 1.7; }
.result-hero.loss::before { background: linear-gradient(90deg, rgba(10,6,5,.97) 0%, rgba(10,6,5,.82) 48%, rgba(10,6,5,.24) 80%), linear-gradient(0deg, rgba(10,6,5,.7), transparent 55%); }
.result-hero.loss .eyebrow span { background: var(--ember); }
.result-hero.loss h1 em { color: var(--ember); }
.result-hero .eyebrow small { margin-left: 8px; color: var(--dim); font: inherit; }
.result-stamp { position: absolute; right: clamp(20px, 9vw, 130px); top: 50%; width: clamp(150px, 22vw, 310px); aspect-ratio: 1; transform: translateY(-50%) rotate(-8deg); border: 1px solid rgba(217,255,90,.19); border-radius: 50%; }
.result-stamp::before, .result-stamp::after { content: ""; position: absolute; inset: 12%; border: 1px dashed rgba(217,255,90,.16); border-radius: 50%; }
.result-stamp::after { inset: 36%; background: var(--acid); border: 0; opacity: .06; }
.loss .result-stamp { border-color: rgba(255,120,73,.2); }
.result-content { padding: 80px clamp(24px, 8vw, 120px); max-width: 1500px; margin: auto; width: 100%; }
.section-heading > p { color: var(--acid); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .16em; }
.section-heading h2 { margin: 13px 0 40px; font-size: clamp(31px, 4vw, 52px); line-height: 1.04; letter-spacing: -.04em; }
.debrief { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; padding-bottom: 90px; }
.debrief ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.debrief li { display: grid; grid-template-columns: 36px 1fr auto; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.debrief li > span { color: var(--dim); font: 9px var(--mono); }
.debrief li p { margin: 0; font-size: 13px; }.debrief li small { color: var(--dim); font: 8px var(--mono); text-transform: uppercase; }
.gear-section { padding: 80px 0 50px; border-top: 1px solid var(--line); }
.gear-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.gear-intro { width: min(410px, 100%); color: var(--muted); font-size: 13px; line-height: 1.7; }
.gear-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.gear-card { min-height: 315px; padding: 22px; color: inherit; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; transition: background .2s, transform .2s; }
.gear-card:hover { background: rgba(217,255,90,.05); transform: translateY(-4px); }
.gear-image { height: 120px; margin: 10px -6px 2px; display: block; background-image: url("assets/gear-atlas.jpg"); background-size: 400% 300%; background-position: var(--x) var(--y); border: 1px solid rgba(202,220,209,.1); filter: saturate(.85); }
.gear-pos-0-0 { --x: 0%; --y: 0%; }.gear-pos-1-0 { --x: 33.333%; --y: 0%; }.gear-pos-2-0 { --x: 66.667%; --y: 0%; }.gear-pos-3-0 { --x: 100%; --y: 0%; }
.gear-pos-0-1 { --x: 0%; --y: 50%; }.gear-pos-1-1 { --x: 33.333%; --y: 50%; }.gear-pos-2-1 { --x: 66.667%; --y: 50%; }.gear-pos-3-1 { --x: 100%; --y: 50%; }
.gear-pos-0-2 { --x: 0%; --y: 100%; }.gear-pos-1-2 { --x: 33.333%; --y: 100%; }.gear-pos-2-2 { --x: 66.667%; --y: 100%; }.gear-pos-3-2 { --x: 100%; --y: 100%; }
.gear-number { color: var(--dim); font: 8px var(--mono); }.gear-card h3 { margin: 12px 0 8px; font-size: 15px; }.gear-card p { margin: 0; color: var(--dim); font-size: 10px; line-height: 1.55; }
.gear-link { margin-top: auto; padding-top: 18px; color: var(--acid); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.affiliate-note { max-width: 760px; color: #53605a; font: 8px/1.7 var(--mono); margin-top: 22px; }
.result-actions { padding-top: 36px; display: flex; align-items: center; gap: 14px; }
.share-button { padding: 0 28px; color: var(--muted); border: 1px solid var(--line); background: none; font: 10px var(--mono); text-transform: uppercase; cursor: pointer; }
.ending-progress { margin-left: auto; color: var(--dim); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }

footer { height: 56px; border-top: 1px solid var(--line); border-bottom: 0; color: var(--dim); font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* Deep-game runtime controls */
.deep-resume { margin-left: 10px; background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 16px 22px; cursor: pointer; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.inventory button { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); color: var(--muted); background: transparent; font: 10px var(--mono); cursor: pointer; text-align: left; }
.inventory button:hover, .inventory button:focus-visible { border-color: var(--acid); color: var(--ink); outline: none; }
.inventory button:disabled { opacity: .38; cursor: not-allowed; }
.inventory button small { display: block; color: var(--dim); margin-top: 4px; }
.deep-conditions { margin-top: 22px; font: 9px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.deep-conditions b { color: var(--ember); font-weight: 500; }
.deep-conditions .clear { color: var(--acid); }
.mara-status { margin-top: 18px; padding: 12px; border: 1px solid var(--line); font: 9px var(--mono); color: var(--muted); line-height: 1.6; }
.mara-status strong { display: block; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.consequence-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 22px; background: rgba(3,8,7,.82); backdrop-filter: blur(9px); }
.consequence-layer[hidden] { display: none; }
.consequence-card { width: min(620px,100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 34px; background: #0b1713; border: 1px solid rgba(217,255,90,.32); box-shadow: 0 30px 90px #000; }
.consequence-card .eyebrow { margin: 0 0 15px; }
.consequence-card h2 { font-size: clamp(28px,6vw,48px); margin: 0 0 15px; }
.consequence-card p { color: var(--muted); line-height: 1.7; }
.effect-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0; }
.effect-chip { padding: 7px 9px; border: 1px solid var(--line); font: 9px var(--mono); color: var(--muted); }
.effect-chip.good { color: var(--acid); }.effect-chip.bad { color: var(--ember); }
.callback { border-left: 2px solid var(--acid); padding-left: 14px; color: var(--muted); }

@media (max-width: 980px) {
  .intro-screen { grid-template-columns: 1fr; padding-top: 55px; }
  .scenario-card { justify-self: stretch; max-width: none; min-height: 420px; }
  .game-screen { grid-template-columns: 1fr; }
  .status-panel { padding: 24px; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; }
  .meters { margin: 0; }
  .inventory { display: block; margin-top: 0; padding-top: 16px; grid-column: 1 / -1; }
  .restart-link { display: block; grid-column: 1 / -1; margin-top: 0; }
  .story-panel { padding-top: 55px; }
  .gear-grid { grid-template-columns: repeat(2, 1fr); }
  .debrief { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .site-header { height: 64px; }.signal { display: none; }
  .intro-screen { padding: 42px 20px 60px; min-height: calc(100vh - 120px); }
  .intro-copy h1 { font-size: 57px; }
  .intro-actions { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }
  .scenario-card { min-height: 390px; }
  .scenario-number { font-size: 125px; }
  .scenario-details { inset: auto 22px 25px; }
  .scenario-details dl { grid-template-columns: 1fr 1fr; }.scenario-details dl div:last-child { display: none; }
  .status-panel { grid-template-columns: 1fr; }.clock { margin-top: 20px; }.meters { grid-template-columns: repeat(4,1fr); gap: 10px; }
  .meter-track { margin-top: 8px; }.meter > div:first-child { display: grid; gap: 4px; }
  .story-panel { padding: 38px 20px 54px; }
  .scene-visual { height: 185px; margin-top: 24px; }
  .story-copy { min-height: 350px; padding-top: 38px; }.story-copy h2 { font-size: 42px; }
  .choice-button { grid-template-columns: 28px 1fr; }.choice-risk { display: none; }
  .result-hero { min-height: 430px; padding: 45px 22px; }.result-hero h1 { font-size: 64px; position: relative; z-index: 1; }
  .result-stamp { opacity: .5; }
  .result-content { padding: 55px 20px; }
  .gear-heading { display: block; }.gear-grid { grid-template-columns: 1fr; }
  .gear-card { min-height: 230px; }.gear-icon { height: 70px; }
  .result-actions { flex-direction: column; align-items: stretch; }.share-button { min-height: 50px; }.ending-progress { margin: 8px 0 0; text-align: center; }
  footer span:last-child { display: none; }
}

@media (max-width: 760px) {
  .deep-resume { margin: 10px 0 0; width: 100%; }
  .mara-status, .deep-conditions { display: block; }
  .consequence-card { padding: 24px; }
  .inventory { display: block !important; margin-top: 18px !important; }
  .inventory ul { max-height: 138px; overflow: auto; }
}

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