@font-face {
  font-family: "VT323";
  src: url("assets/vt323.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #e8e3d3;
  --bg-deep: #d9d2bf;
  --surface: #f0ebdc;
  --surface-raised: #f6f1e4;
  --ink: #20251f;
  --ink-soft: #4d554b;
  --ink-faint: #5c645a;
  --accent: #48634a;
  --accent-strong: #2e4934;
  --accent-ink: #f0f4e9;
  --line: #aaa896;
  --line-strong: #7e8375;
  --shadow: rgba(50, 54, 45, 0.22);
  --header-bg: rgba(232, 227, 211, 0.92);
  --danger: #7c3d36;
  --header-height: 72px;
  --shell: min(1240px, calc(100% - 48px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111612;
    --bg-deep: #0c100d;
    --surface: #182019;
    --surface-raised: #202922;
    --ink: #e9e5d7;
    --ink-soft: #bec5b8;
    --ink-faint: #919a8e;
    --accent: #9db879;
    --accent-strong: #b6ce91;
    --accent-ink: #132016;
    --line: #3d493e;
    --line-strong: #697568;
    --shadow: rgba(3, 7, 4, 0.52);
    --header-bg: rgba(17, 22, 18, 0.92);
    --danger: #d58a7d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 92% 7%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 32rem),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(84, 91, 77, 0.12) 3px 4px);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

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

h1,
h2,
h3,
p,
blockquote,
figure,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 11ch;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 5.2vw, 4.6rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 4.7vw, 4.8rem);
  line-height: 1;
}

h3 {
  font-size: 1.65rem;
  line-height: 1.1;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell {
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(88px, 11vw, 156px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--shell);
  min-height: var(--header-height);
  margin-inline: auto;
}

.wordmark {
  display: grid;
  gap: 1px;
  flex: 0 0 auto;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
}

.wordmark span,
.footer-mark {
  font: 2rem/0.8 "VT323", monospace;
  letter-spacing: 0.08em;
}

.wordmark small {
  color: var(--ink-faint);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  white-space: nowrap;
}

.site-menu > a {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.site-menu > a:hover {
  color: var(--accent-strong);
}

.site-menu .nav-cta {
  padding: 9px 13px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.site-menu .nav-cta:hover {
  background: var(--accent-strong);
  color: var(--accent-ink);
}

.menu-toggle {
  display: none;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 1.1rem/1 "VT323", monospace;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 4vw, 64px);
  align-items: center;
  width: min(1380px, calc(100% - 48px));
  min-height: calc(100dvh - var(--header-height));
  margin-inline: auto;
  padding-block: clamp(30px, 4vw, 52px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-left: max(0px, calc((100vw - 1240px) / 2));
  animation: hero-copy-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--accent-strong);
  font: 1.15rem/1 "VT323", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 36ch;
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.52;
}

.hero-actions,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 19px;
  border: 2px solid transparent;
  border-radius: 0;
  font: 1.12rem/1 "VT323", monospace;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.button:active,
.trail-links a:active,
.story-result:active {
  transform: translateY(1px);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.text-link {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

.hero-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  box-shadow: 14px 18px 0 color-mix(in srgb, var(--accent) 26%, var(--shadow));
  animation: hero-visual-in 850ms 90ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 71% 28%, rgba(166, 207, 105, 0.18), transparent 21%);
  opacity: 0.35;
  animation: drawer-breath 4.8s ease-in-out infinite;
}

.game-hero-visual::after {
  display: none;
}

.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  image-rendering: pixelated;
}

.opened-file {
  display: grid;
  grid-template-columns: 0.38fr minmax(0, 1.25fr) minmax(260px, 0.72fr);
  gap: clamp(26px, 4vw, 72px);
  align-items: start;
  border-top: 2px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
}

.file-label {
  color: color-mix(in srgb, var(--accent) 74%, var(--ink));
  font: clamp(4.6rem, 9vw, 9rem)/0.8 "VT323", monospace;
  letter-spacing: -0.06em;
}

.file-meta,
.story-result-meta,
.story-result-location {
  color: var(--accent-strong);
  font: 1.08rem/1.2 "VT323", monospace;
}

.file-copy h2 {
  max-width: 13ch;
  margin-bottom: 28px;
}

.file-copy blockquote {
  max-width: 28ch;
  margin-bottom: 34px;
  color: var(--ink-soft);
  font: 1.35rem/1.58 Georgia, "Times New Roman", serif;
}

.file-aside {
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

.file-aside p {
  color: var(--ink-soft);
}

.file-aside span {
  display: block;
  color: var(--ink-faint);
  font: 1.02rem/1.3 "VT323", monospace;
}

.case-file .file-copy > p:not(.file-meta) {
  max-width: 46ch;
  margin-bottom: 28px;
  color: var(--ink-soft);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
}

.file-quote {
  max-width: 29ch;
  margin: 52px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font: 1.25rem/1.58 Georgia, "Times New Roman", serif;
}

.characters {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}

.characters-visual,
.archive-gateway-visual {
  margin: 0;
  overflow: hidden;
}

.characters-visual img,
.archive-gateway-visual img {
  width: 100%;
  height: auto;
  object-fit: cover;
  image-rendering: pixelated;
}

.characters-visual img {
  aspect-ratio: 16 / 10;
}

.characters-copy h2 {
  max-width: 13ch;
}

.character-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 50px);
}

.character-notes article {
  padding-top: 22px;
  border-top: 2px solid var(--line-strong);
}

.character-notes h3 {
  margin-bottom: 13px;
  font: 1.45rem/1 "VT323", monospace;
  letter-spacing: 0;
}

.character-notes p {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.character-notes blockquote {
  margin: 20px 0 0;
  color: var(--accent-strong);
  font-weight: 700;
}

.archive-gateway {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(46px, 8vw, 118px);
  align-items: center;
  border-top: 2px solid var(--line-strong);
}

.archive-gateway-copy h2 {
  max-width: 10ch;
}

.archive-gateway-copy > p:not(.eyebrow) {
  max-width: 38ch;
  margin-bottom: 30px;
  color: var(--ink-soft);
}

.archive-gateway-visual img {
  aspect-ratio: 3 / 2;
}

.category-section {
  padding-top: 0;
}

.category-index {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  column-gap: clamp(44px, 8vw, 120px);
  border-top: 2px solid var(--line-strong);
}

.category-index a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: color 150ms ease, transform 150ms ease;
}

.category-index a:hover {
  color: var(--accent-strong);
}

.category-index a:active {
  transform: translateY(1px);
}

.category-index strong {
  font: clamp(1.55rem, 2.6vw, 2.35rem)/1 "VT323", monospace;
}

.category-index span {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font: 1.05rem/1 "VT323", monospace;
}

.section-heading,
.archive-heading {
  max-width: 760px;
  margin-bottom: clamp(44px, 7vw, 82px);
}

.section-heading p,
.archive-heading > p:last-child,
.trail-intro p,
.about-copy p {
  max-width: 57ch;
  color: var(--ink-soft);
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(270px, 34vw);
  gap: 18px;
}

.path-card {
  position: relative;
  isolation: isolate;
  min-height: 300px;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  color: #eff1e8;
  text-decoration: none;
}

.path-myth,
.path-nature {
  grid-column: span 7;
}

.path-ghost,
.path-magic {
  grid-column: span 5;
}

.path-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.path-myth img {
  object-position: 64% 38%;
}

.path-ghost img {
  object-position: 62% 70%;
}

.path-magic img {
  object-position: 38% 44%;
}

.path-nature img {
  object-position: 52% 54%;
}

.path-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 10, 8, 0.02) 20%, rgba(7, 10, 8, 0.9) 100%);
}

.path-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 8px;
  padding: clamp(24px, 4vw, 44px);
}

.path-copy strong {
  font: clamp(2rem, 4vw, 4rem)/0.9 "VT323", monospace;
}

.path-copy small {
  max-width: 42ch;
  color: #d7dacd;
  font-size: 0.9rem;
  line-height: 1.45;
}

.path-card:hover img {
  transform: scale(1.025);
}

.path-card:hover {
  border-color: var(--accent);
}

.reading-trails {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(50px, 9vw, 140px);
  align-items: start;
}

.trail-intro {
  position: sticky;
  top: calc(var(--header-height) + 42px);
}

.trail-intro h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
}

.trail-links {
  display: grid;
}

.trail-links a {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(210px, 1.1fr);
  gap: 26px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: color 150ms ease, transform 150ms ease;
}

.trail-links a:last-child {
  border-bottom: 1px solid var(--line);
}

.trail-links a:hover {
  color: var(--accent-strong);
}

.trail-links strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.25;
}

.trail-links span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.archive {
  border-top: 2px solid var(--line-strong);
}

.archive-heading h2 {
  max-width: 14ch;
}

.archive-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.3fr);
  gap: 18px;
  margin-bottom: 20px;
}

.archive-field {
  display: grid;
  gap: 9px;
}

.archive-field label {
  color: var(--ink);
  font: 1.1rem/1 "VT323", monospace;
}

.archive-field input,
.archive-field select {
  width: 100%;
  min-height: 56px;
  padding: 11px 15px;
  border: 2px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 700;
}

.archive-field input::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.archive-field input:focus,
.archive-field select:focus {
  border-color: var(--accent);
}

.archive-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.archive-status p {
  margin: 0;
  color: var(--ink-soft);
  font: 1.1rem/1 "VT323", monospace;
}

.archive-status button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: 1.08rem/1 "VT323", monospace;
  text-decoration: underline;
  text-underline-offset: 0.24em;
  cursor: pointer;
}

.archive-loading,
.story-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.archive-loading span {
  min-height: 235px;
  border: 1px solid var(--line);
  background: linear-gradient(105deg, var(--surface) 20%, var(--surface-raised) 38%, var(--surface) 56%);
  background-size: 220% 100%;
  animation: skeleton-shift 1.6s ease-in-out infinite;
}

.story-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-results li {
  min-width: 0;
}

.story-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 245px;
  height: 100%;
  padding: 25px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--line) 44%, transparent);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.story-result:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 5px 7px 0 color-mix(in srgb, var(--accent) 30%, transparent);
}

.story-result-title {
  display: block;
  margin: 13px 0;
  font: 700 clamp(1.35rem, 2vw, 1.72rem)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.story-result-excerpt {
  flex: 1 1 auto;
  margin-bottom: 21px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.story-result-location {
  color: var(--ink-faint);
}

.archive-error,
.archive-empty {
  padding: 50px 0;
  border-top: 1px solid var(--line);
}

.archive-error p,
.archive-empty p {
  max-width: 48ch;
  color: var(--ink-soft);
}

.archive-more {
  display: flex;
  justify-content: center;
  padding-top: 36px;
}

.game-bridge {
  position: relative;
  isolation: isolate;
  min-height: min(720px, 78dvh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #eff1e8;
}

.game-bridge > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.game-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(8, 12, 9, 0.94) 0%, rgba(8, 12, 9, 0.72) 48%, rgba(8, 12, 9, 0.1) 100%);
}

.game-copy {
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(70px, 10vw, 130px);
}

.game-copy h2 {
  max-width: 11ch;
  color: #f0f1e8;
}

.game-copy p {
  max-width: 48ch;
  margin-bottom: 30px;
  color: #d2d7cc;
}

.text-link-light {
  color: #d8e8bd;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(60px, 10vw, 150px);
}

.about-copy h2 {
  max-width: 12ch;
}

.about-facts {
  display: grid;
  align-content: start;
  margin: 0;
  border-top: 2px solid var(--line-strong);
}

.about-facts div {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.about-facts dt {
  color: var(--ink-faint);
  font: 1.06rem/1.2 "VT323", monospace;
}

.about-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.site-footer {
  display: grid;
  grid-template-columns: 0.7fr 1.4fr 0.9fr;
  gap: 32px;
  align-items: start;
  width: var(--shell);
  margin-inline: auto;
  padding-block: 46px;
  border-top: 2px solid var(--line-strong);
  color: var(--ink-soft);
}

.footer-mark {
  color: var(--ink);
  text-decoration: none;
}

.site-footer p {
  max-width: 48ch;
  margin: 0;
  font-size: 0.88rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
}

.site-footer nav a {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1), transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sérsíða hverrar þjóðsögu */
.story-page {
  background: var(--bg);
}

.story-header .nav-shell {
  gap: 30px;
}

.story-header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.story-header-nav a:last-child {
  padding: 8px 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}

.reader-shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: clamp(54px, 8vw, 112px);
}

.reader-back {
  display: inline-block;
  margin-bottom: 54px;
  color: var(--accent-strong);
  font-weight: 700;
  text-underline-offset: 0.26em;
}

.reader-loading {
  display: grid;
  gap: 18px;
  width: min(720px, 100%);
}

.reader-loading span {
  display: block;
  height: 22px;
  background: var(--surface-raised);
  animation: skeleton-shift 1.6s ease-in-out infinite;
}

.reader-loading span:first-child {
  width: 38%;
  height: 64px;
}

.reader-loading span:nth-child(2) {
  width: 84%;
}

.reader-loading span:nth-child(3) {
  width: 72%;
}

.reader-error {
  max-width: 640px;
  padding: 38px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
}

.reader-error p {
  color: var(--ink-soft);
}

.reader-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
  gap: clamp(54px, 9vw, 120px);
  align-items: start;
}

.reader-main {
  min-width: 0;
}

.reader-index {
  margin-bottom: 16px;
  color: var(--accent-strong);
  font: clamp(2rem, 4vw, 3.2rem)/1 "VT323", monospace;
}

.reader-title {
  max-width: 15ch;
  margin-bottom: 16px;
}

.reader-category {
  margin-bottom: 48px;
  color: var(--ink-faint);
  font: 1.16rem/1.3 "VT323", monospace;
}

.reader-case-file {
  display: grid;
  gap: 7px;
  margin: -14px 0 44px;
  padding: 20px 22px;
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  text-decoration: none;
}

.reader-case-file span {
  color: var(--accent-strong);
  font: 1.05rem/1 "VT323", monospace;
}

.reader-case-file strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.35;
}

.reader-case-file:hover {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.reader-case-file:active {
  transform: translateY(1px);
}

.reader-text {
  color: var(--ink);
  font: 1.08rem/1.9 Georgia, "Times New Roman", serif;
}

.reader-text p {
  margin-bottom: 1.45em;
}

.reader-notes {
  position: sticky;
  top: calc(var(--header-height) + 34px);
  display: grid;
  gap: 34px;
}

.reader-note-section {
  padding-top: 20px;
  border-top: 2px solid var(--line-strong);
}

.reader-note-section h2 {
  margin-bottom: 18px;
  font: 1.5rem/1 "VT323", monospace;
  letter-spacing: 0;
}

.reader-locations {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader-locations li {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.reader-footnotes {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader-footnotes li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.reader-footnotes strong {
  color: var(--accent-strong);
  font-family: "VT323", monospace;
  font-size: 1rem;
}

.reader-footnotes p {
  margin: 0;
}

.reader-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 2px solid var(--line-strong);
}

.reader-pagination a {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
}

.reader-pagination a:last-child {
  grid-column: 2;
  text-align: right;
}

.reader-pagination span {
  color: var(--ink-faint);
  font: 1rem/1 "VT323", monospace;
}

.reader-pagination strong {
  font-family: Georgia, "Times New Roman", serif;
}

@keyframes hero-copy-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-visual-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes drawer-breath {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.72; }
}

@keyframes skeleton-shift {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

@media (max-width: 1080px) {
  :root {
    --shell: min(100% - 40px, 1120px);
  }

  .site-menu {
    gap: 16px;
  }

  .site-menu > a {
    font-size: 0.76rem;
  }

  .wordmark small {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
    width: calc(100% - 40px);
  }

  .opened-file {
    grid-template-columns: 0.28fr 1fr 0.55fr;
  }
}

@media (max-width: 900px) {
  :root {
    --shell: calc(100% - 32px);
    --header-height: 66px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-menu {
    position: absolute;
    top: calc(100% + 1px);
    right: 16px;
    left: 16px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line-strong);
    background: var(--surface-raised);
    box-shadow: 8px 10px 0 var(--shadow);
  }

  .site-menu.is-open {
    display: flex;
  }

  .site-menu > a {
    padding: 13px;
    font-size: 0.95rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    width: calc(100% - 32px);
    min-height: auto;
    padding-block: 48px 74px;
  }

  .hero-copy {
    max-width: 700px;
    padding-left: 0;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(3.3rem, 11vw, 5.8rem);
  }

  .hero-visual {
    box-shadow: 9px 11px 0 color-mix(in srgb, var(--accent) 26%, var(--shadow));
  }

  .opened-file {
    grid-template-columns: 0.25fr 1fr;
  }

  .characters,
  .archive-gateway {
    grid-template-columns: 1fr;
  }

  .characters-copy {
    max-width: 760px;
  }

  .archive-gateway-copy {
    max-width: 640px;
  }

  .file-aside {
    grid-column: 2;
    padding-top: 26px;
  }

  .path-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 360px;
  }

  .path-card {
    grid-column: auto;
  }

  .reading-trails {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .trail-intro {
    position: static;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 0.55fr 1.45fr;
  }

  .site-footer nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .reader-article {
    grid-template-columns: 1fr;
  }

  .reader-notes {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .section-shell {
    padding-block: 78px;
  }

  h2 {
    font-size: clamp(2.4rem, 12vw, 3.8rem);
  }

  .hero-actions,
  .game-actions,
  .case-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-first-hero {
    width: 100%;
    padding-top: 42px;
  }

  .game-first-hero .hero-copy {
    width: calc(100% - 32px);
    margin-inline: auto;
  }

  .game-hero-visual {
    width: 100vw;
    border: 0;
    box-shadow: none;
  }

  .characters-visual,
  .archive-gateway-visual {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }

  .characters-visual img {
    aspect-ratio: 16 / 9;
  }

  .archive-gateway-visual img {
    aspect-ratio: 3 / 2;
  }

  .character-notes,
  .category-index {
    grid-template-columns: 1fr;
  }

  .opened-file {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .file-label {
    font-size: 4.8rem;
  }

  .file-aside {
    grid-column: auto;
  }

  .path-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 320px;
  }

  .trail-links a {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .archive-controls,
  .archive-loading,
  .story-results {
    grid-template-columns: 1fr;
  }

  .archive-status {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 16px;
  }

  .game-bridge {
    min-height: 660px;
  }

  .game-bridge > img {
    object-position: 58% 50%;
  }

  .game-scrim {
    background: linear-gradient(180deg, rgba(8, 12, 9, 0.2) 0%, rgba(8, 12, 9, 0.93) 70%);
  }

  .about-facts div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    grid-column: auto;
  }

  .wordmark span {
    font-size: 1.7rem;
  }

  .game-wordmark span {
    font-size: 1.35rem;
    letter-spacing: 0.04em;
  }

  .game-first-hero h1 {
    font-size: 2.75rem;
  }

  .story-header-nav a:first-child {
    display: none;
  }

  .reader-shell {
    width: calc(100% - 32px);
    padding-block: 40px 76px;
  }

  .reader-back {
    margin-bottom: 40px;
  }

  .reader-title {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .reader-text {
    font-size: 1rem;
    line-height: 1.82;
  }

  .reader-notes,
  .reader-pagination {
    grid-template-columns: 1fr;
  }

  .reader-pagination a:last-child {
    grid-column: 1;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
