@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700;800&family=Caveat:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #08090d;
  --bg-soft: #10131a;
  --panel: rgba(18, 22, 30, 0.86);
  --panel-solid: #151922;
  --paper: #f1efe8;
  --ink: #16181d;
  --text: #edf0f2;
  --muted: #aeb6bf;
  --dim: #68717c;
  --line: rgba(255, 255, 255, 0.13);
  --green: #5bff9a;
  --pink: #ff4fd8;
  --yellow: #ffd84d;
  --blue: #56b8ff;
  --red: #ff4f5f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --radius: 10px;
  --title: 'Barlow Condensed', Arial, sans-serif;
  --body: 'Inter', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body);
  line-height: 1.7;
  background:
    linear-gradient(180deg, rgba(8, 9, 13, 0.18), #08090d 48rem),
    radial-gradient(circle at 12% 12%, rgba(255, 79, 216, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 16%, rgba(86, 184, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 50% 80%, rgba(91, 255, 154, 0.1), transparent 32rem),
    #08090d;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0, rgba(0,0,0,0.25) 100%);
}

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: var(--read-progress, 0%);
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--pink));
  box-shadow: 0 0 18px rgba(91, 255, 154, 0.5);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

p {
  margin: 0 0 1.2rem;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 66px;
  padding: 0 2rem;
  background: rgba(8, 9, 13, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  line-height: 0.9;
  font-family: var(--title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand strong {
  font-size: 1.55rem;
  color: var(--text);
}

.brand span {
  font-size: 0.72rem;
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-links a,
.return-link,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--title);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}

.nav-links a:hover,
.nav-links a.active,
.return-link:hover,
.btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
}

.return-link {
  color: var(--green);
  border-color: rgba(91, 255, 154, 0.28);
}

.hero {
  min-height: calc(100vh - 66px);
  display: grid;
  align-items: end;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  --hero-drift-x: 0px;
  --hero-drift-y: 0px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -18px;
  background:
    linear-gradient(90deg, rgba(8,9,13,0.95) 0%, rgba(8,9,13,0.68) 42%, rgba(8,9,13,0.1) 100%),
    linear-gradient(0deg, #08090d 0%, rgba(8,9,13,0.2) 45%),
    url('https://images.unsplash.com/photo-1519501025264-65ba15a82390?auto=format&fit=crop&w=1800&q=80') center/cover;
  filter: saturate(1.12) contrast(1.02);
  transform: translate3d(var(--hero-drift-x), var(--hero-drift-y), 0) scale(1.02);
  transition: transform 0.18s ease-out;
  z-index: -1;
}

.hero-inner,
.section,
.chapter-shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--green);
  font-family: var(--title);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--title);
  line-height: 0.94;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  font-size: clamp(4rem, 13vw, 10.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2.2rem, 6vw, 5rem);
}

h3 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.hero-lead {
  max-width: 650px;
  margin: 1.4rem 0 0;
  color: #dce3e8;
  font-size: clamp(1.04rem, 2vw, 1.22rem);
}

.hero-actions,
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.7rem;
}

.btn {
  min-height: 44px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}

.btn.primary {
  color: #06100b;
  background: linear-gradient(135deg, var(--green), #caffdf);
  border-color: transparent;
}

.btn.pink {
  background: linear-gradient(135deg, var(--pink), #ff9be9);
  color: #180014;
  border-color: transparent;
}

.section {
  padding: 4.5rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.story-card,
.character-card,
.intel-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease, border-color .55s ease;
}

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

.panel {
  padding: clamp(1rem, 3vw, 1.6rem);
}

.map-strip {
  min-height: 280px;
  display: grid;
  align-items: end;
  padding: clamp(1.2rem, 4vw, 2rem);
  overflow: hidden;
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(0deg, rgba(8,9,13,0.95), rgba(8,9,13,0.2)),
    url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?auto=format&fit=crop&w=1500&q=80') center/cover;
}

.stat-line {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.055);
  font-family: var(--title);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag.green { color: var(--green); border-color: rgba(91,255,154,0.28); }
.tag.yellow { color: var(--yellow); border-color: rgba(255,216,77,0.3); }
.tag.pink { color: var(--pink); border-color: rgba(255,79,216,0.3); }
.tag.blue { color: var(--blue); border-color: rgba(86,184,255,0.3); }
.tag.red { color: var(--red); border-color: rgba(255,79,95,0.3); }

.classified {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: transparent;
  text-shadow: none;
  user-select: none;
}

.classified::before {
  content: attr(data-mask);
  color: rgba(255,255,255,0.92);
  text-shadow:
    0 0 0 rgba(255,255,255,0.92),
    0 0 10px rgba(86,184,255,0.24);
  letter-spacing: 0.20em;
}

.story-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.story-poster,
.character-photo {
  min-height: 210px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,79,216,0.28), rgba(86,184,255,0.18)),
    linear-gradient(45deg, #141922, #242b36);
}

.story-poster::after,
.character-photo::after,
.placeholder-image::after {
  content: attr(data-label);
  max-width: 80%;
  color: rgba(255,255,255,0.42);
  font-family: var(--title);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.story-body,
.character-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.2rem;
}

.story-body p,
.character-body p,
.intel-card p {
  color: var(--muted);
}

.story-body .btn,
.character-body .btn {
  align-self: flex-start;
  margin-top: auto;
}

.chapter-list {
  display: grid;
  gap: 0.75rem;
}

.chapter-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.045);
  transition: border-color .2s, background .2s, transform .2s;
}

.chapter-link:hover {
  transform: translateY(-2px);
  border-color: rgba(91,255,154,0.32);
  background: rgba(91,255,154,0.07);
}

.chapter-num {
  color: var(--green);
  font-family: var(--title);
  font-size: 2rem;
  font-weight: 800;
}

.chapter-title {
  display: block;
  font-family: var(--title);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chapter-meta {
  color: var(--dim);
  font-size: 0.92rem;
}

.character-card {
  overflow: hidden;
}

.character-card .character-photo {
  min-height: 260px;
}

.character-photo img,
.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-photo.has-portrait,
.profile-photo.has-portrait {
  overflow: hidden;
  background: #111720;
}

.profile-photo img {
  min-height: 520px;
}

.character-body h3 {
  font-size: 2rem;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 1rem;
  align-items: start;
}

.profile-photo {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(0deg, rgba(8,9,13,0.92), rgba(8,9,13,0.12)),
    linear-gradient(135deg, rgba(91,255,154,0.22), rgba(255,79,216,0.18)),
    #171d27;
  display: grid;
  place-items: center;
}

.state-switch {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 9, 13, 0.78);
  backdrop-filter: blur(12px);
}

.state-btn {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  color: var(--muted);
  background: transparent;
  font-family: var(--title);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.state-btn.active {
  color: #05100b;
  background: var(--green);
}

.state-panel {
  display: none;
}

.state-panel.active {
  display: block;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.fact {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.045);
}

.fact span {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--dim);
  font-family: var(--title);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact a {
  color: var(--blue);
  border-bottom: 1px solid rgba(86,184,255,0.36);
  transition: color .2s, border-color .2s;
}

.fact a:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.5);
}

.profile-side-panel {
  margin-top: 1rem;
}

.profile-side-panel .eyebrow {
  display: flex;
}

.profile-side-panel .btn {
  width: 100%;
  margin-top: 0.25rem;
}

.link-list {
  display: grid;
  gap: 0.55rem;
}

.relation-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.045);
}

.relation-row span {
  color: var(--dim);
  font-family: var(--title);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.relation-row a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0.12rem 0.15rem 0.12rem 0;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(86,184,255,0.28);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(86,184,255,0.08);
  font-family: var(--title);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}

.relation-row a:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.08);
}

.chapter-hero {
  padding: 4rem 0 2rem;
}

.chapter-shell {
  max-width: 1080px;
}

.chapter-frame {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8,9,13,0.52);
}

.reader {
  max-width: none;
  margin: 0 auto;
  color: #f3f2ec;
  font-size: clamp(1.02rem, 1.8vw, 1.16rem);
  line-height: 1.9;
}

.reader p {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.35rem;
}

.chapter-image {
  margin: clamp(1.6rem, 4vw, 2.6rem) auto;
  max-width: 760px;
}

.chapter-image img,
.placeholder-image {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.placeholder-image {
  background:
    linear-gradient(135deg, rgba(86,184,255,0.18), rgba(255,79,216,0.18)),
    #171c26;
}

.chapter-image img {
  height: auto;
  background: transparent;
  cursor: zoom-in;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.chapter-image img:hover,
.chapter-image img:focus-visible {
  border-color: rgba(91, 255, 154, 0.42);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(91, 255, 154, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.placeholder-image {
  display: grid;
  place-items: center;
  min-height: 260px;
}

.chapter-image figcaption {
  margin-top: 0.55rem;
  color: var(--dim);
  font-size: 0.9rem;
}

.chapter-image.wide {
  max-width: min(100%, 980px);
}

.chapter-image-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.45rem, 1.5vw, 1rem);
  width: min(100%, 1100px);
  margin: clamp(1.6rem, 4vw, 2.6rem) auto;
}

.chapter-image-triptych img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: zoom-in;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.chapter-image-triptych img:hover,
.chapter-image-triptych img:focus-visible {
  border-color: rgba(91, 255, 154, 0.42);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(91, 255, 154, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.intel-map-image {
  max-width: min(100%, 1000px);
}

.intel-map-image img {
  border-color: rgba(255,216,77,0.22);
  background: #090b10;
}

.intel-map-image.police-map img {
  border-color: rgba(86,184,255,0.24);
}

.intel-map-image figcaption {
  color: #b7c1ca;
}

.chapter-image.full {
  width: 100%;
  max-width: 100%;
  margin: 2.5rem auto;
}

.chapter-image.full .placeholder-image {
  min-height: min(70vh, 620px);
}

.media-row {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 1.2rem;
  align-items: center;
  max-width: 900px;
  margin: 2rem 0;
  margin-left: auto;
  margin-right: auto;
}

.media-row.right {
  grid-template-columns: 1fr 0.85fr;
}

.note {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  border-left: 3px solid var(--yellow);
  background: rgba(255,216,77,0.08);
  color: #f6e9ba;
}

.note.private-note {
  border-left-color: var(--blue);
  background: rgba(86,184,255,0.08);
  color: #dceeff;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.mission-brief,
.intel-board,
.act-summary {
  max-width: 980px;
  margin: 0 auto clamp(1.7rem, 4vw, 2.6rem);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(91,255,154,0.11), rgba(86,184,255,0.06)),
    rgba(13, 17, 23, 0.86);
  box-shadow: 0 18px 54px rgba(0,0,0,0.34);
}

.mission-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
}

.brief-kicker {
  display: inline-flex;
  margin-bottom: 0.45rem;
  color: var(--green);
  font-family: var(--title);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mission-brief h2,
.intel-board h2,
.act-summary h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.mission-brief p,
.intel-board p,
.act-summary p {
  max-width: none;
  margin: 0;
  color: #dce3e8;
}

.brief-grid {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.brief-grid div {
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.brief-grid dt {
  color: var(--yellow);
  font-family: var(--title);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brief-grid dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.scene-marker {
  max-width: 860px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--dim);
  font-family: var(--title);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scene-marker::before,
.scene-marker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.field-note {
  position: relative;
  width: min(100% - 2rem, 620px);
  margin: clamp(2.4rem, 6vw, 3.8rem) auto;
  padding: clamp(1.3rem, 4vw, 1.8rem) clamp(1.2rem, 4vw, 1.7rem) clamp(1.8rem, 5vw, 2.3rem);
  overflow: visible;
  border: 1px solid rgba(91, 72, 25, 0.3);
  border-radius: 2px 5px 3px 2px;
  color: #292518;
  background:
    linear-gradient(rgba(97, 79, 28, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 18% 14%, rgba(255,255,255,0.48), transparent 38%),
    linear-gradient(145deg, #f2e8ae, #e8d88f);
  background-size: 100% 1.95rem, auto, auto;
  box-shadow: 0 20px 45px rgba(0,0,0,0.38), inset 0 0 28px rgba(110,83,20,0.08);
  transform: rotate(-1.2deg);
}

.field-note::before {
  content: '';
  position: absolute;
  top: -0.65rem;
  left: 50%;
  width: 7.5rem;
  height: 1.6rem;
  border: 1px solid rgba(92, 76, 43, 0.12);
  background: rgba(223, 211, 174, 0.72);
  box-shadow: 0 2px 5px rgba(40, 31, 12, 0.16);
  transform: translateX(-50%) rotate(1.8deg);
}

.field-note header {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid rgba(74, 62, 28, 0.25);
}

.field-note-kicker {
  color: #806622;
  font-family: var(--title);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-note header strong {
  font-family: var(--title);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.1;
  text-transform: uppercase;
}

.field-note ul {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-note li {
  display: grid;
  grid-template-columns: minmax(8rem, 0.75fr) minmax(0, 1.25fr);
  gap: 0.7rem 1rem;
  align-items: baseline;
}

.field-note del {
  color: rgba(51, 45, 27, 0.58);
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration-color: #a53b32;
  text-decoration-thickness: 2px;
  text-transform: uppercase;
}

.field-note li span {
  color: #272216;
  font-family: 'Caveat', 'Segoe Print', cursive;
  font-size: clamp(1.2rem, 3vw, 1.42rem);
  font-weight: 700;
  line-height: 1.05;
  transform: rotate(-0.4deg);
}

.field-note-stamp {
  position: absolute;
  right: 1rem;
  bottom: -1rem;
  padding: 0.15rem 0.6rem 0.25rem;
  border: 3px solid rgba(153, 45, 39, 0.78);
  color: rgba(153, 45, 39, 0.88);
  font-family: 'Caveat', 'Segoe Print', cursive;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-7deg);
}

.intel-board {
  padding: clamp(1rem, 3vw, 1.25rem);
}

.intel-board header {
  margin-bottom: 0.85rem;
}

.mission-map {
  margin: 0 0 1rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
}

.map-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: var(--dim);
  background: rgba(255,255,255,0.045);
  font-family: var(--title);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mission-map img {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.map-stage {
  position: relative;
  overflow: hidden;
  background: #05070a;
}

.mission-map img:hover,
.mission-map img:focus-visible {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.map-hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  padding: 0;
  border: 2px solid rgba(255,255,255,0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,0.025);
  cursor: help;
  font: inherit;
  transform-origin: center;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.map-hotspot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 999px;
  background: var(--spot-color, var(--green));
  box-shadow: 0 0 0 5px rgba(255,255,255,0.12), 0 0 22px var(--spot-glow, rgba(91,255,154,0.55));
  transform: translate(-50%, -50%);
}

.map-hotspot:hover,
.map-hotspot:focus-visible,
.map-hotspot.active {
  z-index: 5;
  outline: none;
  transform: scale(1.08);
  border-color: var(--spot-color, var(--green));
  background: var(--spot-bg, rgba(91,255,154,0.16));
  box-shadow: 0 0 0 999px rgba(0,0,0,0.28), 0 0 32px var(--spot-glow, rgba(91,255,154,0.5));
}

.map-hotspot:hover::before,
.map-hotspot:focus-visible::before,
.map-hotspot.active::before {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 7px rgba(255,255,255,0.14), 0 0 30px var(--spot-glow, rgba(91,255,154,0.65));
}

.spot-label,
.spot-info {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: normal;
}

.spot-label {
  bottom: calc(100% + 0.42rem);
  padding: 0.24rem 0.48rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #06100b;
  background: var(--spot-color, var(--green));
  font-family: var(--title);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.spot-info {
  top: calc(100% + 0.5rem);
  width: min(260px, 86vw);
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #edf0f2;
  background: rgba(8,9,13,0.94);
  box-shadow: 0 16px 38px rgba(0,0,0,0.44);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.map-hotspot:hover .spot-label,
.map-hotspot:focus-visible .spot-label,
.map-hotspot.active .spot-label,
.map-hotspot:hover .spot-info,
.map-hotspot:focus-visible .spot-info,
.map-hotspot.active .spot-info {
  opacity: 1;
}

.map-hotspot.mireya {
  --spot-color: var(--blue);
  --spot-bg: rgba(86,184,255,0.18);
  --spot-glow: rgba(86,184,255,0.6);
}

.map-hotspot.rival {
  --spot-color: var(--yellow);
  --spot-bg: rgba(255,216,77,0.18);
  --spot-glow: rgba(255,216,77,0.58);
}

.map-hotspot.rival .spot-info {
  top: auto;
  bottom: calc(100% + 0.5rem);
}

.map-hotspot.rival-alt {
  --spot-color: var(--pink);
  --spot-bg: rgba(255,79,216,0.18);
  --spot-glow: rgba(255,79,216,0.58);
}

.map-hotspot.lester {
  --spot-color: #9b75ff;
  --spot-bg: rgba(155,117,255,0.18);
  --spot-glow: rgba(155,117,255,0.58);
}

.map-hotspot.neutral {
  --spot-color: #f3f2ec;
  --spot-bg: rgba(243,242,236,0.14);
  --spot-glow: rgba(243,242,236,0.42);
}

.map-hotspot.police {
  --spot-color: #8ec8ff;
  --spot-bg: rgba(142,200,255,0.18);
  --spot-glow: rgba(142,200,255,0.58);
}

.map-hotspot.weapon {
  --spot-color: var(--red);
  --spot-bg: rgba(255,79,95,0.18);
  --spot-glow: rgba(255,79,95,0.58);
}

.map-hotspot.vice {
  --spot-color: #ff9be9;
  --spot-bg: rgba(255,155,233,0.18);
  --spot-glow: rgba(255,155,233,0.56);
}

.map-hotspot.deal {
  --spot-color: #caffdf;
  --spot-bg: rgba(91,255,154,0.16);
  --spot-glow: rgba(91,255,154,0.52);
}

.mission-map figcaption {
  padding: 0.72rem 0.8rem 0.85rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.act-summary {
  padding: clamp(1rem, 3vw, 1.25rem);
  border-color: rgba(91,255,154,0.26);
}

.act-summary ul {
  display: grid;
  gap: 0.65rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.act-summary li {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  color: #dce3e8;
}

.act-summary strong {
  color: var(--green);
}

.stealth-brief {
  border-color: rgba(86,184,255,0.2);
  background:
    linear-gradient(135deg, rgba(86,184,255,0.12), rgba(255,255,255,0.035)),
    rgba(9, 13, 18, 0.9);
}

.stealth-log,
.evidence-strip,
.call-intercept {
  max-width: 960px;
  margin: clamp(1.4rem, 4vw, 2.4rem) auto;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(10, 14, 20, 0.86);
  box-shadow: 0 18px 48px rgba(0,0,0,0.3);
}

.stealth-log,
.call-intercept {
  padding: clamp(0.95rem, 3vw, 1.25rem);
}

.stealth-log ul,
.act-summary ul {
  list-style: none;
}

.stealth-log ul {
  display: grid;
  gap: 0.6rem;
  margin: 0.25rem 0 0;
  padding: 0;
}

.stealth-log li {
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(86,184,255,0.14);
  border-radius: 8px;
  color: #dce3e8;
  background: rgba(86,184,255,0.055);
}

.stealth-log strong {
  color: var(--blue);
}

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.evidence-strip div {
  min-height: 100%;
  padding: 0.75rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.evidence-strip div:last-child {
  border-right: 0;
}

.evidence-strip span,
.call-line span {
  display: block;
  margin: 0.75rem 0 0.45rem;
  color: var(--dim);
  font-family: var(--title);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.evidence-strip strong {
  display: block;
  color: var(--yellow);
  font-family: var(--title);
  font-size: 1.25rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.evidence-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
  background: #0b0f15;
  cursor: zoom-in;
  box-shadow: 0 12px 26px rgba(0,0,0,0.28);
}

.evidence-strip p,
.call-line p {
  max-width: none;
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.computer-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(86,184,255,0.22);
  border-radius: 6px;
  color: var(--blue);
  background: rgba(86,184,255,0.055);
  font-family: var(--title);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  transition: border-color .2s, background .2s, color .2s;
}

.computer-access span {
  margin: 0;
  color: var(--dim);
  font-size: 0.68rem;
}

.computer-access:hover,
.computer-access:focus-visible {
  border-color: rgba(86,184,255,0.65);
  color: var(--text);
  background: rgba(86,184,255,0.12);
}

.call-intercept {
  border-color: rgba(91,255,154,0.2);
}

.call-line {
  margin-top: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-left: 3px solid var(--green);
  background: rgba(91,255,154,0.07);
}

.call-line.muted {
  border-left-color: var(--blue);
  background: rgba(86,184,255,0.07);
}

.street-brief {
  border-color: rgba(255,79,216,0.22);
  background:
    linear-gradient(135deg, rgba(255,79,216,0.12), rgba(255,216,77,0.055)),
    rgba(13, 10, 18, 0.9);
}

.street-read,
.lead-card {
  max-width: 960px;
  margin: clamp(1.4rem, 4vw, 2.4rem) auto;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(13, 12, 18, 0.88);
  box-shadow: 0 18px 48px rgba(0,0,0,0.3);
}

.street-read,
.lead-card {
  padding: clamp(0.95rem, 3vw, 1.25rem);
}

.street-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.street-signals div {
  padding: 0.85rem;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.street-signals strong {
  display: block;
  color: var(--yellow);
  font-family: var(--title);
  font-size: 1.25rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.street-signals p {
  max-width: none;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.lead-card {
  border-color: rgba(255,216,77,0.22);
  max-width: 860px;
  border-left: 3px solid var(--yellow);
  background:
    linear-gradient(135deg, rgba(255,216,77,0.12), rgba(255,255,255,0.035)),
    rgba(13, 12, 18, 0.9);
}

.lead-card strong {
  display: block;
  color: var(--yellow);
  font-family: var(--title);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.lead-card p {
  max-width: none;
  margin: 0.7rem 0 0;
  color: #f6e9ba;
}

.street-summary {
  border-color: rgba(255,79,216,0.26);
  background:
    linear-gradient(135deg, rgba(255,79,216,0.1), rgba(255,216,77,0.06)),
    rgba(13, 12, 18, 0.9);
}

.vectra-brief {
  border-color: rgba(255,216,77,0.22);
  background:
    linear-gradient(135deg, rgba(255,216,77,0.1), rgba(255,79,95,0.055)),
    rgba(15, 13, 10, 0.9);
}

.bag-list,
.memory-flash {
  max-width: 860px;
  margin: clamp(1.4rem, 4vw, 2.4rem) auto;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(14, 12, 10, 0.88);
  box-shadow: 0 18px 48px rgba(0,0,0,0.3);
}

.bag-list {
  padding: clamp(0.95rem, 3vw, 1.2rem);
  border-color: rgba(255,216,77,0.22);
}

.bag-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.bag-list li {
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  color: #f6e9ba;
  background: rgba(255,216,77,0.075);
  font-family: var(--title);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memory-flash {
  padding: clamp(1rem, 3vw, 1.35rem);
  border-color: rgba(255,79,95,0.28);
  border-left: 3px solid var(--red);
  background:
    linear-gradient(135deg, rgba(255,79,95,0.12), rgba(255,255,255,0.03)),
    rgba(16, 10, 11, 0.9);
}

.memory-flash p {
  max-width: none;
  margin: 0;
  color: #ffd7db;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

.vectra-summary {
  border-color: rgba(255,216,77,0.26);
  background:
    linear-gradient(135deg, rgba(255,216,77,0.09), rgba(255,79,95,0.06)),
    rgba(15, 13, 10, 0.9);
}

.convergence-brief {
  border-color: rgba(91,255,154,0.24);
  background:
    linear-gradient(135deg, rgba(91,255,154,0.1), rgba(255,79,216,0.055)),
    rgba(10, 15, 13, 0.9);
}

.shop-loadout,
.intel-merge {
  max-width: 960px;
  margin: clamp(1.4rem, 4vw, 2.4rem) auto;
  padding: clamp(0.95rem, 3vw, 1.25rem);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(11, 14, 15, 0.88);
  box-shadow: 0 18px 48px rgba(0,0,0,0.3);
}

.shop-loadout {
  border-color: rgba(91,255,154,0.22);
}

.intel-merge {
  border-color: rgba(86,184,255,0.22);
}

.shop-loadout > div,
.intel-merge > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.shop-loadout > div:first-of-type,
.intel-merge > div:first-of-type {
  margin-top: 0.25rem;
}

.shop-loadout strong,
.intel-merge strong {
  color: var(--green);
  font-family: var(--title);
  font-size: 1.35rem;
  line-height: 1;
  text-transform: uppercase;
}

.intel-merge strong {
  color: var(--blue);
}

.shop-loadout p,
.intel-merge p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.chapter-close {
  border-color: rgba(91,255,154,0.3);
  background:
    linear-gradient(135deg, rgba(91,255,154,0.11), rgba(86,184,255,0.06)),
    rgba(10, 15, 13, 0.92);
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2.5rem;
}

.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  background: rgba(3, 5, 8, 0.9);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.image-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox-frame {
  width: min(1200px, 100%);
  margin: 0;
}

.image-lightbox-frame img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  background: transparent;
  box-shadow: var(--shadow);
  margin: 0 auto;
}

.image-lightbox-frame figcaption {
  max-width: 900px;
  margin: 0.75rem auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.image-lightbox-action {
  display: block;
  width: fit-content;
  margin: 0.8rem auto 0;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(86,184,255,0.45);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(86,184,255,0.1);
  font-family: var(--title);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: border-color .2s, color .2s, background .2s;
}

.image-lightbox-action[hidden] {
  display: none;
}

.image-lightbox-action:hover,
.image-lightbox-action:focus-visible {
  border-color: var(--blue);
  color: var(--text);
  background: rgba(86,184,255,0.2);
}

.image-lightbox-close {
  position: fixed;
  top: clamp(0.7rem, 2vw, 1.2rem);
  right: clamp(0.7rem, 2vw, 1.2rem);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition: border-color .2s, background .2s, transform .2s;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  border-color: rgba(91,255,154,0.42);
  background: rgba(91,255,154,0.12);
  outline: none;
  transform: scale(1.04);
}

.footer {
  padding: 3rem 2rem;
  color: var(--dim);
  text-align: center;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .site-nav {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .grid.two,
  .grid.three,
  .profile-layout,
  .facts,
  .media-row,
  .media-row.right,
  .mission-brief,
  .evidence-strip,
  .street-signals {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .chapter-link {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    min-height: 360px;
  }

  .state-switch {
    position: static;
    border-radius: var(--radius);
  }

  .chapter-hero {
    padding: 2.6rem 0 1.3rem;
  }

  .chapter-shell {
    width: min(100% - 1rem, 960px);
  }

  .chapter-frame {
    padding: 1rem 0.75rem;
  }

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

  .reader p,
  .chapter-nav {
    max-width: none;
  }

  .chapter-image.wide,
  .chapter-image.full,
  .chapter-image {
    max-width: none;
  }

  .chapter-nav {
    flex-direction: column;
  }

  .chapter-nav .btn {
    width: 100%;
  }

  .scene-marker {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .scene-marker::before,
  .scene-marker::after {
    width: 100%;
    flex: none;
  }

  .field-note {
    width: min(100% - 0.5rem, 620px);
    padding: 1.2rem 1rem 2rem;
    transform: none;
  }

  .field-note li {
    grid-template-columns: 1fr;
    gap: 0.05rem;
  }

  .field-note-stamp {
    right: 0.55rem;
  }

  .map-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .evidence-strip div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .evidence-strip div:last-child {
    border-bottom: 0;
  }

  .shop-loadout > div,
  .intel-merge > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .image-lightbox-frame img {
    max-height: calc(100vh - 7rem);
  }
}

@media (max-width: 520px) {
  .chapter-frame {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .chapter-image {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }

  .chapter-image img,
  .image-lightbox-frame img {
    border-radius: 8px;
  }

  .chapter-image figcaption {
    padding: 0 0.25rem;
    font-size: 0.84rem;
  }

  .image-lightbox {
    padding: 0.65rem;
  }

  .image-lightbox-frame figcaption {
    font-size: 0.86rem;
  }
}
