@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@500;700;800&family=Press+Start+2P&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --night: #06111e;
  --night-2: #0a1c2e;
  --panel: #071a2c;
  --panel-soft: #0d2740;
  --ink: #f4ebcf;
  --muted: #b8b39f;
  --gold: #d9a640;
  --gold-bright: #ffd66b;
  --line: #6d5427;
  --danger: #db5b4e;
  --good: #79c98c;
  --domain-color: #a83e52;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --body: Georgia, 'Times New Roman', serif;
  --ui: 'Source Sans 3', sans-serif;
  --small-caps: 'Alegreya Sans SC', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--night); scroll-behavior: smooth; }
body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgb(255 255 255 / .018) 1px, transparent 1px) 0 0 / 100% 4px,
    var(--night);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
}
body::after {
  content: '';
  position: fixed;
  z-index: 50;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 58%, rgb(0 0 0 / .24));
}
button, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .5rem;
  left: .5rem;
  padding: .8rem 1rem;
  color: var(--night);
  background: var(--gold-bright);
  font-family: var(--pixel);
  font-size: .65rem;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header, .site-footer, .screen {
  width: min(calc(100% - 2rem), 94rem);
  margin-inline: auto;
}
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 4.1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--gold);
  font-family: var(--pixel);
}
.wordmark {
  color: var(--ink);
  font-size: clamp(.9rem, 1.5vw, 1.25rem);
  letter-spacing: .08em;
  text-decoration: none;
  text-shadow: 3px 3px 0 #000;
}
.site-header p {
  display: flex;
  gap: .65rem;
  margin: 0;
  color: var(--gold-bright);
  font-size: .55rem;
  line-height: 1.6;
  text-transform: uppercase;
}
.screen { animation: screen-in 520ms var(--ease) both; }
body:has(#result-screen:not([hidden])) .site-header,
body:has(#result-screen:not([hidden])) .site-footer { display: none; }

.edition-line {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border-bottom: 2px solid var(--gold);
  color: var(--gold-bright);
  background: rgb(4 14 26 / .9);
  font-family: var(--pixel);
  font-size: .56rem;
  letter-spacing: .04em;
  line-height: 1.5;
  text-transform: uppercase;
}
.section-label {
  margin: 0 0 .7rem;
  color: var(--gold-bright);
  font-family: var(--pixel);
  font-size: .56rem;
  letter-spacing: .04em;
  line-height: 1.6;
  text-transform: uppercase;
}
.notice {
  position: relative;
  z-index: 5;
  margin: 1rem;
  padding: .9rem 1rem;
  border: 2px solid var(--danger);
  background: rgb(20 14 22 / .94);
  color: #ffc3ba;
  font-family: var(--pixel);
  font-size: .58rem;
  line-height: 1.7;
}

.opening {
  position: relative;
  min-height: min(52rem, calc(100svh - 6rem));
  overflow: hidden;
  border: 2px solid var(--line);
  background-image:
    linear-gradient(90deg, rgb(2 9 17 / .93) 0%, rgb(2 9 17 / .7) 43%, rgb(2 9 17 / .1) 75%),
    linear-gradient(0deg, rgb(2 9 17 / .98) 0%, transparent 58%),
    url('./assets/scenes/finance-tax-ledger.webp');
  background-position: center;
  background-size: cover;
}
.opening::after, .governing::after, .result-wrap::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / .025) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}
.opening-grid {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: 45rem;
  grid-template-columns: minmax(0, 1.55fr) minmax(16rem, .65fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 7rem);
  padding: clamp(3rem, 8vw, 7rem) clamp(1.25rem, 5vw, 5rem);
}
.opening-story h1 {
  max-width: 15ch;
  margin: 0 0 1.5rem;
  font-family: var(--pixel);
  font-size: clamp(1.9rem, 4.4vw, 4rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.42;
  text-shadow: 5px 5px 0 #000;
}
.opening-story h1 em { color: var(--gold-bright); font-style: normal; }
.standfirst { max-width: 38rem; margin: 0; color: #eee6d0; font-size: clamp(1.1rem, 2vw, 1.4rem); }
.opening-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 2rem; }
.save-note { color: var(--muted); font-family: var(--pixel); font-size: .5rem; line-height: 1.7; }
.opening-brief {
  padding: 1.3rem;
  border: 2px solid var(--gold);
  background: rgb(4 17 29 / .9);
  box-shadow: 6px 6px 0 rgb(0 0 0 / .65);
}
.opening-brief h2 { margin: 0 0 1rem; font-family: var(--pixel); font-size: 1rem; font-weight: 400; line-height: 1.7; }
.opening-brief p:not(.section-label) { color: #ddd6c2; }
.opening-brief blockquote { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--gold-bright); font-family: var(--pixel); font-size: .52rem; font-style: normal; line-height: 1.8; }

.action {
  position: relative;
  min-height: 3rem;
  border: 2px solid var(--gold);
  border-radius: 0;
  padding: .85rem 1.1rem;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 4px 4px 0 #000;
  font-family: var(--pixel);
  font-size: .6rem;
  line-height: 1.5;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.action-primary { color: var(--night); background: var(--gold-bright); }
.action-with-arrow { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; }
.pixel-arrow { position: relative; display: inline-block; width: 1rem; height: 1rem; flex: 0 0 1rem; }
.pixel-arrow::before {
  content: '';
  position: absolute;
  top: .18rem;
  left: .05rem;
  width: .5rem;
  height: .5rem;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform 120ms var(--ease);
}
.action:hover .pixel-arrow::before { transform: translateX(3px) rotate(45deg); }
.action-secondary { background: transparent; }
.action-text { border-color: transparent; background: rgb(5 17 29 / .75); box-shadow: none; }
.action:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .45; }
.action:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
.action::after { content: ''; position: absolute; inset: 3px; border: 1px solid transparent; pointer-events: none; }
.action:focus-visible::after { border-color: rgb(6 17 30 / .35); }
:focus-visible { outline: 3px solid #fff0a5; outline-offset: 4px; }

.governing {
  --scene-image: url('./assets/scenes/finance-tax-ledger.webp');
  --scene-image-mobile: var(--scene-image);
  position: relative;
  min-height: 0;
  overflow: visible;
  border-inline: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--night);
  isolation: isolate;
}
.governing::before {
  content: none;
}
.governing-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 1rem;
}
.governing-header > div { display: flex; align-items: center; gap: .8rem; }
.governing-header .section-label { margin: 0; }
.governing-header h1 { margin: 0; color: var(--muted); font-family: var(--pixel); font-size: .55rem; font-weight: 400; line-height: 1.5; }
.governing-layout { position: relative; }
.scene-stage {
  min-height: clamp(20rem, 48svh, 34rem);
  border-block: 2px solid var(--line);
  background-image:
    linear-gradient(90deg, rgb(1 8 15 / .08), transparent 38%, rgb(1 8 15 / .08)),
    var(--scene-image);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}
.decision-column {
  position: relative;
  z-index: 5;
  margin: clamp(.75rem, 2vw, 2rem);
}
.advisor-tag {
  display: inline-flex;
  min-width: min(24rem, 100%);
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1rem;
  border: 2px solid var(--gold);
  border-bottom: 0;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 5px 0 0 #000;
  font-family: var(--pixel);
  font-size: .55rem;
  line-height: 1.5;
  text-transform: uppercase;
}
.advisor-tag span:first-child { color: var(--gold-bright); }
.advisor-tag span:last-child { color: var(--muted); }
.decision-story, .reaction-story {
  max-height: 31rem;
  overflow: auto;
  padding: clamp(1rem, 2.4vw, 2rem);
  border: 3px solid var(--gold);
  background: rgb(4 19 33 / .965);
  box-shadow: 7px 7px 0 #000;
  animation: dialogue-in 320ms var(--ease) both;
  scrollbar-color: var(--gold) var(--panel);
}
.decision-story { display: grid; grid-template-columns: minmax(0, .9fr) minmax(25rem, 1.25fr); gap: 0 clamp(1.5rem, 4vw, 4rem); }
.decision-story > .section-label, .decision-story > h2, .decision-story > .decision-context, .decision-story > .consequence-note { grid-column: 1; }
.decision-story > .choices { grid-column: 2; grid-row: 1 / span 5; align-self: stretch; }
.decision-story h2, .reaction-story h2 {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(.95rem, 1.7vw, 1.45rem);
  font-weight: 400;
  line-height: 1.65;
}
.decision-context, .reaction-text { margin: 1rem 0 0; color: #ded8c6; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.5; }
.choices { display: grid; align-content: center; gap: .8rem; }
.choice {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 8.4rem;
  grid-template-columns: 2.4rem 1fr;
  gap: .35rem .8rem;
  padding: 1rem;
  border: 2px solid #83692f;
  border-radius: 0;
  color: var(--ink);
  text-align: left;
  background: #091f35;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease, transform 120ms ease;
}
.choice-number { grid-row: 1 / span 3; color: var(--gold-bright); font-family: var(--pixel); font-size: .65rem; line-height: 1.8; }
.choice-title { display: block; font-family: var(--pixel); font-size: clamp(.65rem, 1vw, .83rem); line-height: 1.55; }
.choice-description { display: block; color: #c9c2ae; font-size: .95rem; line-height: 1.4; }
.forecast { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: var(--muted); font-family: var(--pixel); font-size: .45rem; line-height: 1.6; }
.forecast b { margin-left: .1rem; font-weight: 400; }
.forecast .up, .reaction-ledger .up { color: var(--good); }
.forecast .down, .reaction-ledger .down { color: #f08072; }
.consequence-note { margin-top: 1rem; padding: .8rem 0 0; border-top: 1px solid var(--line); color: #f0cf90; }
.consequence-note ul { margin: 0; padding-left: 1.2rem; }
.reaction-story { max-width: 62rem; }
.reaction-ledger { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin: 1.2rem 0; font-family: var(--pixel); font-size: .52rem; line-height: 1.6; }

.ledger {
  position: relative;
  z-index: 4;
  width: 100%;
  padding: .65rem clamp(.75rem, 2vw, 2rem);
  border-bottom: 2px solid var(--line);
  background: #03111d;
}
[tabindex='-1']:focus { outline: 0; }
.ledger-heading { display: none; }
.ledger dl, .final-ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.ledger-row {
  --meter-color: var(--good);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'label value' 'meter meter';
  align-items: center;
  gap: .6rem;
  min-height: 2.6rem;
  padding: .35rem .5rem;
  border-left: 4px solid var(--meter-color);
  background: rgb(255 255 255 / .035);
}
.ledger-row[data-state='watch'] { --meter-color: #e4b653; }
.ledger-row[data-state='danger'] { --meter-color: #e66a5c; }
.ledger-row dt { grid-area: label; font-family: var(--pixel); font-size: .45rem; line-height: 1.5; text-transform: uppercase; }
.ledger-row dd { grid-area: value; margin: 0; color: var(--meter-color); font-family: var(--pixel); font-size: .7rem; font-variant-numeric: tabular-nums; }
.ledger-meter { grid-area: meter; height: .32rem; overflow: hidden; border: 1px solid #574725; background: #020912; }
.ledger-meter-fill { display: block; height: 100%; background: var(--meter-color); box-shadow: 0 0 6px color-mix(in srgb, var(--meter-color), transparent 20%); transform-origin: left; animation: meter-reveal 620ms var(--ease) both; transition: width 320ms var(--ease); }
.ledger-note { display: none; }

.result-wrap {
  --scene-image: url('./assets/scenes/culture-monument-march.webp');
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: .5rem;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgb(6 17 30 / .96), rgb(6 17 30 / .88)),
    var(--scene-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.newspaper {
  position: relative;
  z-index: 3;
  display: grid;
  width: min(calc(100vw - 1rem), calc((100svh - 1rem) * 16 / 9), 90rem);
  height: min(calc(100svh - 1rem), calc((100vw - 1rem) * 9 / 16), 50.625rem);
  min-height: 38rem;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  margin: 0;
  padding: clamp(.7rem, 1.25vw, 1.15rem);
  border: 3px solid var(--gold);
  color: var(--ink);
  background: rgb(4 18 31 / .97);
  box-shadow: 8px 8px 0 #000;
}
.newspaper-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: .45rem; border-bottom: 2px solid var(--line); }
.result-quick-share { display: none; }
.newspaper-place, .newspaper-date { font-family: var(--small-caps); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.newspaper-place { margin: 0 0 .12rem; color: var(--gold-bright); font-size: .76rem; line-height: 1; }
.masthead { margin: 0; font-family: var(--pixel); font-size: clamp(.9rem, 1.65vw, 1.35rem); line-height: 1.3; text-shadow: 3px 3px 0 #000; }
.newspaper-date { display: flex; gap: .9rem; color: var(--muted); font-size: .72rem; line-height: 1.2; }
.result-identity { min-width: 0; padding-right: clamp(.6rem, 1.4vw, 1.2rem); }
.result-identity h1 { max-width: 13ch; margin: .25rem 0 0; color: var(--gold-bright); font-family: var(--pixel); font-size: clamp(1rem, 2.2vw, 1.85rem); font-weight: 400; line-height: 1.35; text-shadow: 3px 3px 0 #000; }
.result-verdict { max-width: 34rem; margin: .55rem 0 0; color: var(--ink); font-size: clamp(.9rem, 1.25vw, 1.08rem); line-height: 1.35; }
.result-dek { display: none; }
.result-contradiction { max-width: 36rem; margin: .45rem 0 0; color: #d7d0bc; font-size: .88rem; line-height: 1.35; }
.national-record { margin-top: clamp(.75rem, 2vh, 1.2rem); padding-top: .7rem; border-top: 1px solid var(--line); }
.arms-stage { min-width: 0; padding-inline: clamp(.65rem, 1.5vw, 1.2rem); border-inline: 1px solid var(--line); text-align: center; }
.living-arms {
  --ribbon-color: var(--good);
  position: relative;
  width: min(100%, 19rem);
  aspect-ratio: 1.12;
  margin: .1rem auto .35rem;
  filter: drop-shadow(5px 6px 0 rgb(0 0 0 / .65));
  animation: arms-arrive 520ms var(--ease) both;
}
.living-arms[data-ribbon='collapsed'], .living-arms[data-ribbon='critical'] { --ribbon-color: var(--danger); }
.living-arms[data-ribbon='strained'] { --ribbon-color: #e4b653; }
.living-arms[data-ribbon='steady'] { --ribbon-color: #d9d2ba; }
.arms-crown, .arms-supporter, .arms-emblem { position: absolute; z-index: 3; }
.arms-crown { top: 0; left: 50%; width: 4.5rem; height: 4.5rem; transform: translateX(-50%); }
.arms-supporter { top: 43%; width: 5rem; height: 5rem; transform: translateY(-50%); }
.arms-supporter-left { left: 3%; }
.arms-supporter-right { right: 3%; }
.arms-shield {
  position: absolute;
  z-index: 2;
  top: 17%;
  left: 50%;
  width: 8.3rem;
  height: 9.7rem;
  border: 4px double var(--gold-bright);
  background: linear-gradient(90deg, #133958 0 48%, #efe5c7 48% 52%, #183d31 52%);
  clip-path: polygon(8% 0, 92% 0, 92% 58%, 78% 82%, 50% 100%, 22% 82%, 8% 58%);
  transform: translateX(-50%);
}
.arms-shield[data-shield='market'], .arms-shield[data-shield='immediate'] { background: linear-gradient(90deg, #7a2f27 0 48%, #efe5c7 48% 52%, #664a17 52%); }
.arms-shield[data-shield='open'], .arms-shield[data-shield='liberty'] { background: linear-gradient(90deg, #174b6c 0 48%, #efe5c7 48% 52%, #216649 52%); }
.arms-shield[data-shield='controlled'], .arms-shield[data-shield='order'] { background: linear-gradient(90deg, #222b4c 0 48%, #efe5c7 48% 52%, #733329 52%); }
.arms-shield[data-shield='local'], .arms-shield[data-shield='care'] { background: linear-gradient(90deg, #315d3a 0 48%, #efe5c7 48% 52%, #805522 52%); }
.arms-emblem { top: 50%; left: 50%; width: 5.2rem; height: 5.2rem; transform: translate(-50%, -50%); }
.arms-ribbon {
  position: absolute;
  z-index: 4;
  right: 12%;
  bottom: 4%;
  left: 12%;
  min-height: 2.35rem;
  display: grid;
  place-items: center;
  padding: .35rem 1rem;
  border: 2px solid var(--gold-bright);
  color: var(--night);
  background: var(--ribbon-color);
  box-shadow: 3px 3px 0 #000;
  font-family: var(--small-caps);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.1;
  text-transform: uppercase;
  animation: ribbon-unfurl 480ms 260ms var(--ease) both;
}
.arms-legend { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; margin: 0; text-align: left; }
.arms-legend div { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem; }
.arms-legend dt { color: var(--gold); font-family: var(--small-caps); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.arms-legend dd { margin: 0; overflow: hidden; color: #ded7c2; font-family: var(--ui); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.result-columns { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(14rem, .82fr) minmax(16rem, .9fr); gap: 0; padding-block: clamp(.6rem, 1.4vh, .9rem); }
.result-columns .section-label, .cabinet-record .section-label, .challenge-call .section-label { font-family: var(--small-caps); font-size: .78rem; font-weight: 800; letter-spacing: .07em; line-height: 1.2; }
.result-columns h2, .challenge-call h2 { margin: 0; font-family: var(--ui); font-size: .95rem; font-weight: 700; line-height: 1.3; }
.sprite-label { display: flex; align-items: center; gap: .65rem; }
.sprite-label::before, .civic-icon, .civic-mini {
  content: '';
  display: block;
  flex: 0 0 auto;
  background-image: url('./assets/civic-sprites.webp');
  background-repeat: no-repeat;
  background-size: 400% 400%;
  image-rendering: pixelated;
}
.sprite-label::before { width: 1.7rem; height: 1.7rem; filter: drop-shadow(2px 2px 0 #000); }
.sprite-open-gate::before { background-position: 0 100%; }
.sprite-dove::before { background-position: 33.333% 100%; }
.sprite-archive::before { background-position: 100% 100%; }
.sprite-ballot::before { background-position: 0 33.333%; }
.result-summary, .defining-act p:not(.section-label) { margin: .35rem 0; color: #ddd5bf; font-size: .82rem; line-height: 1.3; }
.result-score { margin: .35rem 0 0; color: var(--muted); font-family: var(--ui); font-size: .75rem; font-weight: 600; line-height: 1.4; }
.result-score strong { color: var(--gold-bright); font-family: var(--pixel); font-size: .82rem; }
.memory-list, .commitments-list { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .78rem; line-height: 1.3; }
.memory-list li, .commitments-list li { padding: .12rem 0; }
.result-aside { min-width: 0; padding-left: clamp(.65rem, 1.5vw, 1.2rem); }
.result-aside > section + section { margin-top: .6rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.final-ledger { grid-template-columns: 1fr; gap: .2rem; }
.final-ledger .ledger-row { grid-template-columns: 1.85rem minmax(0, 1fr) auto; grid-template-areas: 'icon label value' 'icon meter meter'; min-height: 2.55rem; padding: .15rem .25rem; }
.final-ledger .ledger-row dt { font-family: var(--small-caps); font-size: .68rem; font-weight: 700; letter-spacing: .025em; word-spacing: .18em; }
.final-ledger .ledger-row dd { font-family: var(--ui); font-size: .78rem; font-weight: 800; }
.civic-icon { grid-area: icon; width: 1.6rem; height: 1.6rem; filter: drop-shadow(2px 2px 0 #000); animation: civic-idle 3.4s ease-in-out infinite; }
.final-ledger .ledger-row:nth-child(2) .civic-icon { animation-delay: -.7s; }
.final-ledger .ledger-row:nth-child(3) .civic-icon { animation-delay: -1.4s; }
.final-ledger .ledger-row:nth-child(4) .civic-icon { animation-delay: -2.1s; }
.civic-prosperity, .civic-treasury { background-position: 0 0; }
.civic-trust { background-position: 33.333% 0; }
.civic-stability { background-position: 66.667% 0; }
.civic-environment { background-position: 100% 0; }
.civic-ballot { background-position: 0 33.333%; }
.civic-court { background-position: 33.333% 33.333%; }
.civic-health { background-position: 66.667% 33.333%; }
.civic-industry { background-position: 100% 33.333%; }
.civic-rail { background-position: 0 66.667%; }
.civic-school { background-position: 33.333% 66.667%; }
.civic-dove { background-position: 33.333% 100%; }
.civic-archive { background-position: 100% 100%; }
.civic-open-gate { background-position: 0 100%; }
.cabinet-record { position: relative; z-index: 8; border-top: 1px solid var(--line); }
.cabinet-record summary { display: flex; min-height: 2.25rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem .2rem; color: var(--muted); font-family: var(--ui); font-size: .72rem; font-weight: 600; cursor: pointer; list-style: none; }
.cabinet-record summary::-webkit-details-marker { display: none; }
.cabinet-record summary::after { content: '+'; color: var(--gold-bright); font-family: var(--ui); font-size: 1.05rem; }
.cabinet-record[open] summary::after { content: '−'; }
.cabinet-record summary .section-label { margin: 0; }
.cabinet-record-drawer { position: absolute; right: 0; bottom: calc(100% + 1px); left: 0; max-height: min(29rem, calc(100svh - 8rem)); overflow: auto; border: 2px solid var(--gold); background: rgb(4 18 31 / .995); box-shadow: 7px -7px 0 #000; }
.record-commitments { padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.cabinet-record-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; margin: 0; padding: .45rem 1rem .7rem; list-style: none; counter-reset: record; }
.cabinet-record-item { display: grid; grid-template-columns: 1.6rem 1.35rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; min-height: 2.65rem; border-top: 1px solid var(--line); }
.cabinet-record-number, .cabinet-record-branch { color: var(--muted); font-family: var(--ui); font-size: .68rem; font-weight: 700; line-height: 1.4; }
.cabinet-record-symbol { color: transparent; font-size: 0; text-align: center; }
.civic-mini { width: 1.5rem; height: 1.5rem; filter: drop-shadow(2px 2px 0 #000); }
.living-arms .arms-crown { width: 4.5rem; height: 4.5rem; }
.living-arms .arms-supporter { width: 5rem; height: 5rem; }
.living-arms .arms-emblem { width: 5.2rem; height: 5.2rem; }
.cabinet-record-title { overflow: hidden; color: #e7dfc8; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-record-branch { color: var(--gold); }
.challenge-call { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 3.5rem; padding-top: .45rem; border-top: 2px solid var(--gold); }
.challenge-call p { margin: .15rem 0; color: #d2ccb9; font-family: var(--ui); font-size: .72rem; }
.challenge-call > div:first-child > p:not(.section-label, .term-code) { display: none; }
.challenge-call h2 { font-family: var(--small-caps); font-size: .9rem; letter-spacing: .04em; }
.term-code { display: none; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.result-actions .action { min-height: 2.3rem; padding: .35rem .6rem; font-family: var(--small-caps); font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.action-feedback { flex-basis: 100%; margin: .25rem 0 0; color: var(--gold-bright); font-family: var(--ui); font-size: .72rem; line-height: 1.4; }
.manual-copy { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.manual-copy label { display: block; font-family: var(--small-caps); font-size: .78rem; font-weight: 700; }
.manual-copy textarea { width: 100%; margin-top: .7rem; padding: .8rem; border: 2px solid var(--line); border-radius: 0; color: var(--ink); background: var(--night); }
.capability-note { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.2rem max(1.2rem, env(safe-area-inset-bottom)); color: var(--muted); font-family: var(--pixel); font-size: .47rem; line-height: 1.6; text-transform: uppercase; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (hover: hover) and (pointer: fine) {
  .action:hover { color: var(--night); background: var(--gold-bright); }
  .choice:hover, .choice:focus-visible { border-color: var(--gold-bright); color: var(--gold-bright); background: #0d2a46; transform: translateX(3px); }
}
@media (pointer: coarse) {
  .action { min-height: 3.2rem; }
  .choice { min-height: 8rem; }
}
@media (min-width: 64.01rem) {
  .governing {
    height: calc(100svh - 5rem);
    min-height: 38rem;
    overflow: hidden;
  }
  .governing-layout {
    display: grid;
    height: calc(100% - 6.1rem);
    min-height: 0;
    grid-template-columns: minmax(24rem, .7fr) minmax(40rem, 1.3fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .scene-stage {
    min-height: 0;
    grid-column: 1;
    grid-row: 2;
  }
  .ledger {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-block: .45rem;
    border-top: 2px solid var(--line);
  }
  .decision-column {
    display: flex;
    min-height: 0;
    flex-direction: column;
    grid-column: 2;
    grid-row: 2;
    justify-content: center;
    margin: clamp(.7rem, 1.2vw, 1.15rem);
  }
  .decision-story {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    grid-template-columns: 1fr;
    padding: clamp(.85rem, 1.25vw, 1.2rem);
  }
  .decision-story > .section-label,
  .decision-story > h2,
  .decision-story > .decision-context,
  .decision-story > .consequence-note,
  .decision-story > .choices { grid-column: 1; }
  .decision-story > .choices { grid-row: auto; margin-top: 1rem; }
  .choices { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .choice { min-height: 7.5rem; padding: .8rem; }
  .choice-title { font-size: clamp(.6rem, .82vw, .75rem); }
  .choice-description { font-size: .88rem; line-height: 1.32; }
}
@media (max-width: 64rem) {
  .decision-story { grid-template-columns: 1fr; }
  .decision-story > .section-label, .decision-story > h2, .decision-story > .decision-context, .decision-story > .consequence-note, .decision-story > .choices { grid-column: 1; }
  .decision-story > .choices { grid-row: auto; margin-top: 1rem; }
  .choices { grid-template-columns: 1fr 1fr; }
  .decision-story, .reaction-story { max-height: 36rem; }
  .result-columns { grid-template-columns: minmax(0, 1fr) minmax(13rem, .78fr) minmax(15rem, .9fr); }
}
@media (max-width: 48rem) {
  .site-header, .site-footer, .screen { width: 100%; }
  .site-header { min-height: 3.05rem; padding-inline: .7rem; }
  .wordmark { font-size: .78rem; }
  .site-header p { font-size: .45rem; }
  .site-header p span:first-child, .site-header p span:nth-child(2), .site-footer span:last-child { display: none; }
  .opening { min-height: 0; border-inline: 0; background-color: var(--night); background-image: linear-gradient(0deg, rgb(2 9 17 / .98) 0%, rgb(2 9 17 / .45) 62%, transparent 90%), url('./assets/scenes-mobile/finance-tax-ledger.webp'); background-position: center top; background-repeat: no-repeat; background-size: 100% min(48svh, 30rem), 100% auto; }
  .opening-grid { min-height: calc(100svh - 7.5rem); grid-template-columns: 1fr; align-content: space-between; gap: 0; padding: min(34svh, 15rem) 1rem max(1rem, env(safe-area-inset-bottom)); }
  .opening-story { padding-top: 1rem; border-top: 2px solid var(--gold); }
  .opening-story h1 { font-size: clamp(1.2rem, 6vw, 1.7rem); }
  .opening-story .standfirst { font-size: 1.05rem; line-height: 1.45; }
  .opening-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1.2rem; }
  .opening-actions .action-primary { grid-column: 1 / -1; }
  .opening-actions .action { width: 100%; }
  .save-note { grid-column: 1 / -1; margin: 0; text-align: center; }
  .opening-brief { display: block; align-self: end; padding: .9rem 0; border: 0; border-block: 1px solid var(--line); background: transparent; box-shadow: none; text-align: center; }
  .opening-brief .section-label, .opening-brief p:not(.section-label), .opening-brief blockquote { display: none; }
  .opening-brief h2 { margin: 0; font-size: .58rem; line-height: 1.7; }
  .governing { min-height: auto; overflow: visible; border-inline: 0; background: var(--night); }
  .edition-line { min-height: 3rem; align-items: center; padding: .55rem 7.25rem .55rem .7rem; }
  .edition-line span:last-child { display: none; }
  .governing-header { position: absolute; z-index: 10; top: 0; right: 0; min-height: 3rem; padding: .12rem .45rem; }
  .governing-header > div { display: none; }
  .governing-header .action { min-height: 2.75rem; padding: .45rem .55rem; font-size: .45rem; }
  .scene-stage { min-height: clamp(8.5rem, 18svh, 10.5rem); background-image: linear-gradient(0deg, rgb(2 9 17 / .08), transparent 24%), var(--scene-image-mobile); background-position: center 16%; background-size: cover; }
  .ledger { width: 100%; padding: .25rem .35rem; }
  .ledger dl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; }
  .ledger-row { min-height: 2.65rem; gap: .25rem; padding: .2rem .28rem; border-left-width: 3px; }
  .ledger-row dt { overflow: hidden; font-size: 0; white-space: nowrap; }
  .ledger-row dt::after { content: attr(data-short-label); font-family: var(--small-caps); font-size: .58rem; font-weight: 800; letter-spacing: .01em; }
  .ledger-row dd { font-size: .58rem; }
  .ledger-meter { height: .25rem; }
  .decision-column { margin: .35rem .35rem .65rem; }
  .advisor-tag { width: 100%; min-width: 0; align-items: baseline; flex-direction: row; gap: .4rem; padding: .5rem .65rem; font-size: .48rem; }
  .decision-story, .reaction-story { max-height: none; padding: .75rem; box-shadow: 4px 4px 0 #000; }
  .decision-story .section-label { margin-bottom: .4rem; }
  .decision-story h2, .reaction-story h2 { font-size: .82rem; line-height: 1.5; }
  .decision-context, .reaction-text { margin-top: .65rem; font-size: .92rem; line-height: 1.38; }
  .decision-story > .choices { margin-top: .75rem; }
  .choices { grid-template-columns: 1fr; }
  .choice { min-height: 5.6rem; padding: .7rem; }
  .choice-title { font-size: .59rem; line-height: 1.45; }
  .choice-description { font-size: .86rem; line-height: 1.32; }
  .forecast { margin-top: .15rem; font-size: .42rem; }
  .result-wrap { display: block; min-height: 100svh; padding: .5rem 0 1rem; overflow: visible; background-size: cover; }
  .newspaper { width: calc(100% - .7rem); height: auto; min-height: 0; padding: .75rem; border-inline-width: 2px; box-shadow: 4px 4px 0 #000; }
  .newspaper-header { position: sticky; z-index: 15; top: 0; align-items: center; margin: -.75rem -.75rem 0; padding: .65rem .75rem; background: rgb(4 18 31 / .985); box-shadow: 0 4px 0 rgb(0 0 0 / .35); }
  .newspaper-place { font-size: .65rem; }
  .masthead { font-size: .8rem; }
  .newspaper-date { display: grid; text-align: right; }
  .newspaper-date span:last-child { display: none; }
  .result-quick-share { display: inline-flex; min-height: 2.6rem; align-items: center; justify-content: center; padding: .55rem .7rem; border: 2px solid var(--gold); color: var(--night); background: var(--gold-bright); box-shadow: 3px 3px 0 #000; font-family: var(--small-caps); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
  .result-columns, .challenge-call { grid-template-columns: 1fr; }
  .result-columns { padding-block: 1rem .7rem; }
  .result-identity { padding-right: 0; text-align: center; }
  .result-identity h1 { max-width: none; font-size: clamp(1.25rem, 8vw, 1.8rem); }
  .result-verdict { font-size: 1rem; }
  .national-record { text-align: left; }
  .arms-stage { margin-top: .8rem; padding: .8rem 0; border-block: 1px solid var(--line); border-inline: 0; }
  .living-arms { width: min(100%, 14rem); }
  .arms-legend { gap: .3rem .55rem; }
  .result-aside { padding: 1rem 0 0; }
  .final-ledger { grid-template-columns: 1fr 1fr; gap: .35rem; }
  .final-ledger .ledger-row { grid-template-columns: 1.6rem minmax(0, 1fr) auto; }
  .cabinet-record-drawer { position: static; max-height: 70svh; box-shadow: none; }
  .cabinet-record-list { grid-template-columns: 1fr; }
  .challenge-call { gap: .65rem; padding: .8rem 0 max(.8rem, env(safe-area-inset-bottom)); }
  .challenge-call > div:first-child { text-align: center; }
  .challenge-call > div:first-child > p:not(.section-label, .term-code) { display: block; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .result-actions .action { width: 100%; min-height: 3rem; }
  .result-actions .action-primary, .result-actions .action-text { grid-column: 1 / -1; }
}
@media (max-width: 25rem) {
  .edition-line { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .choice { grid-template-columns: 1.8rem 1fr; padding: .85rem .7rem; }
  .forecast { gap: .3rem .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialogue-in { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes civic-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes arms-arrive { from { opacity: 0; transform: translateY(.7rem) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ribbon-unfurl { from { opacity: 0; transform: scaleX(.3); } to { opacity: 1; transform: scaleX(1); } }
@keyframes meter-reveal { from { transform: scaleX(0); } to { transform: scaleX(1); } }
