@font-face {
  font-family: "Medieval Sharp";
  src: url("../assets/MedievalSharp-Book.ttf?v=1788769281") format("truetype");
  font-display: swap;
}

:root {
  --bg: #080b0b;
  --bg-2: #0d1111;
  --panel: #111716;
  --panel-2: #18201e;
  --line: #423b26;
  --ink: #eee5cf;
  --ink-dim: #b9ad91;
  --ink-faint: #7f7767;
  --gold: #d5ae57;
  --gold-dim: #a68440;
  --accent: #d5ae57;
  --frost: #76c7ca;
  --poison: #89aa67;
  --fire: #d86d46;
  --physical: #d7c9a8;
  --danger: #d85b50;
  --oxblood: #77282c;
  --oxblood-bright: #a63e40;
  --green: #8faa73;
  --paper: #d5c69e;
  --radius: 0;
  --maxw: 1240px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Medieval Sharp", "Palatino Linotype", Palatino, Georgia, serif;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  --shadow-tight: 0 12px 34px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

html,
body {
  background:
    radial-gradient(circle at 12% 4%, rgba(118, 45, 38, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 30%, rgba(79, 112, 86, 0.13), transparent 38rem),
    linear-gradient(180deg, #0d1110 0%, #070909 58%, #0b0e0d 100%) fixed;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: 1000;
  inset: 0;
  opacity: 0.075;
  pointer-events: none;
  content: "";
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.04) 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(0, 0, 0, 0.1) 6px);
  mix-blend-mode: overlay;
}

body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(213, 174, 87, 0.025) 1px, transparent 1px) 50% 0 / 64px 64px,
    linear-gradient(rgba(213, 174, 87, 0.018) 1px, transparent 1px) 50% 0 / 64px 64px;
  mask-image: linear-gradient(180deg, black, transparent 70%);
}

a {
  color: var(--gold);
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

a:hover {
  color: #f1ce7d;
}

button,
input,
select {
  font: inherit;
}

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

:focus-visible {
  outline: 3px solid #f1ce7d;
  outline-offset: 4px;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* ---------- Navigation ---------- */

.topbar {
  top: 0;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  height: 156px;
  padding: 0 max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid rgba(213, 174, 87, 0.34);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.98), rgba(8, 11, 10, 0.96)),
    var(--bg);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.topbar::before,
.topbar::after {
  display: none;
  content: none;
}

.brand {
  position: relative;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 410px;
  min-height: 156px;
  padding-left: 176px;
  color: var(--ink);
  letter-spacing: normal;
  z-index: 3;
}

.brand:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.brand-seal {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: -12px;
  display: grid;
  flex: 0 0 186px;
  place-items: center;
  width: 186px;
  height: 186px;
  transform: translateY(-50%);
}

.brand-seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.75));
  transform: rotate(-2deg) scale(1.08);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 6px;
  color: var(--gold-dim);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.mainnav {
  position: relative;
  z-index: 3;
  gap: 0;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.mainnav a {
  position: relative;
  padding: 12px 9px;
  border-radius: 0;
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.mainnav a::after {
  position: absolute;
  right: 10px;
  bottom: 7px;
  left: 10px;
  height: 1px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 150ms ease;
}

.mainnav a:hover {
  color: var(--ink);
  background: rgba(213, 174, 87, 0.055);
}

.mainnav a:hover::after,
.mainnav a.active::after {
  transform: scaleX(1);
}

.mainnav a.active {
  color: var(--gold);
  background: transparent;
}

.navtoggle {
  position: relative;
  z-index: 3;
  border-radius: 0;
  border-color: var(--gold-dim);
  background: var(--panel);
}

/* ---------- Shared page shell ---------- */

.app {
  padding: 20px 20px 84px;
}

.loading {
  color: var(--ink-faint);
}

.page-head {
  position: relative;
  min-height: 220px;
  margin: -20px calc(50% - 50vw) 38px;
  padding: 46px max(20px, calc((100vw - var(--maxw)) / 2)) 42px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(8, 11, 10, 0.95), rgba(8, 11, 10, 0.72) 62%, rgba(8, 11, 10, 0.86)),
    radial-gradient(circle at 78% 16%, rgba(119, 40, 44, 0.26), transparent 25rem),
    repeating-linear-gradient(-45deg, rgba(213, 174, 87, 0.025) 0 2px, transparent 2px 13px),
    #0d1211;
}

.page-head::before {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  content: "AUTHORIZED FIELD REFERENCE";
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.page-head::after {
  position: absolute;
  top: 38px;
  right: max(30px, calc((100vw - var(--maxw)) / 2));
  width: 176px;
  height: 92px;
  opacity: 0.35;
  content: "";
  border: 3px double var(--oxblood-bright);
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 5px #0d1211, inset 0 0 0 6px var(--oxblood-bright);
}

.page-head h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1;
}

.page-head p {
  position: relative;
  z-index: 1;
  max-width: 78ch;
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 16px;
}

.section-title {
  margin-top: 46px;
  padding-bottom: 10px;
  color: var(--gold);
  border-color: var(--line);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.toolbar {
  position: relative;
  margin-bottom: 24px;
  padding: 13px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(26, 34, 31, 0.94), rgba(14, 19, 18, 0.96)),
    var(--panel);
  box-shadow: var(--shadow-tight);
}

.toolbar::before {
  position: absolute;
  top: -5px;
  left: 18px;
  width: 70px;
  height: 8px;
  content: "";
  border-top: 1px solid var(--gold-dim);
  border-left: 1px solid var(--gold-dim);
  transform: skewX(45deg);
}

.toolbar input[type="search"] {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 0;
  border-color: #4a432e;
  background: rgba(5, 8, 7, 0.7);
  color: var(--ink);
}

.toolbar input[type="search"]::placeholder {
  color: var(--ink-faint);
}

.chip {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 0;
  border-color: #3c3828;
  color: var(--ink-dim);
  background: #101513;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--gold-dim);
}

.chip.active {
  color: #181306;
  border-color: #e0bc69;
  background: linear-gradient(180deg, #d8b45c, #a98135);
}

.btn {
  position: relative;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 0;
  border-color: #4a432e;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(35, 43, 39, 0.98), rgba(18, 23, 21, 0.98)),
    var(--panel-2);
  box-shadow: inset 0 0 0 2px rgba(3, 6, 5, 0.54);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.btn:hover {
  color: #f1ce7d;
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

.btn.primary {
  color: #181204;
  border-color: #f1ce7d;
  background: linear-gradient(180deg, #e2bd63, #b38938);
  box-shadow: inset 0 0 0 2px rgba(52, 37, 7, 0.28);
}

.btn.primary:hover {
  color: #100c03;
  background: linear-gradient(180deg, #f0cc75, #c49a43);
}

.pill {
  border-radius: 0;
  color: var(--paper);
  border-color: #49422c;
  background: #171d1a;
  font-size: 10px;
  letter-spacing: 0.035em;
}

.tag {
  border-radius: 0;
  color: var(--ink-dim);
  border-color: #3c3828;
  background: #171c1a;
}

.empty {
  color: var(--ink-faint);
  font-family: Georgia, serif;
  font-style: italic;
}

/* ---------- Complete-site home ---------- */

.lore-hero {
  min-height: 590px;
  margin: -20px calc(50% - 50vw) 0;
  padding: 62px max(20px, calc((100vw - var(--maxw)) / 2)) 64px;
  border: 0;
  border-bottom: 1px solid var(--gold-dim);
  border-radius: 0;
  background-position: center 38%;
  background-size: cover;
}

.lore-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 8, 7, 0.98) 2%, rgba(5, 8, 7, 0.88) 37%, rgba(5, 8, 7, 0.28) 72%, rgba(5, 8, 7, 0.72)),
    linear-gradient(180deg, rgba(5, 7, 7, 0.28), rgba(5, 7, 7, 0.12) 48%, rgba(5, 7, 7, 0.97));
}

.lore-hero::after {
  display: none;
  content: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 65%);
  padding: 12px 40px 40px 0;
}

.hero-eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-eyebrow span {
  width: 54px;
  height: 1px;
  background: var(--gold);
}

.lore-hero h1 {
  margin: 0;
  max-width: 760px;
  color: #f3ead6;
  font-family: var(--display);
  font-size: clamp(62px, 8vw, 108px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-shadow: 0 10px 38px rgba(0, 0, 0, 0.72);
}

.lore-hero h1 i {
  color: var(--gold);
  font-weight: 400;
  font-style: normal;
}

.hero-lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d2c6ab;
  font-family: Georgia, serif;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
  text-shadow: 0 2px 12px #000;
}

.hero-facts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-facts span {
  padding: 5px 10px;
  color: #d9cdaF;
  border: 1px solid rgba(213, 174, 87, 0.36);
  background: rgba(8, 11, 10, 0.64);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lore-hero .cta {
  margin-top: 30px;
}

.hero-order {
  position: absolute;
  z-index: 2;
  right: max(20px, calc((100vw - var(--maxw)) / 2));
  bottom: 58px;
  width: 300px;
  padding: 28px 26px;
  color: #2b2419;
  border: 1px solid #aa9565;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(70, 55, 30, 0.07) 28px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 30%),
    #cdbf99;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.hero-order::before,
.hero-order::after {
  position: absolute;
  width: 22px;
  height: 22px;
  content: "";
  border-color: #6d5b38;
}

.hero-order::before {
  top: 8px;
  left: 8px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.hero-order::after {
  right: 8px;
  bottom: 8px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.order-number {
  color: #77282c;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.hero-order strong {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-size: 25px;
  line-height: 1.15;
}

.hero-order p {
  color: #453b2a;
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
}

.order-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(71, 56, 29, 0.35);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rubber-stamp {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 10px;
  color: var(--oxblood-bright);
  border: 2px solid currentColor;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.purpose-section,
.office-break {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  margin: 78px 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(25, 33, 30, 0.98), rgba(11, 15, 14, 0.98)),
    var(--panel);
  box-shadow: var(--shadow);
}

.purpose-art,
.office-break > img {
  position: relative;
  min-height: 540px;
  overflow: hidden;
}

.purpose-art img,
.office-break > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.purpose-art::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.46);
}

.image-caption {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 10px 12px;
  color: var(--paper);
  border: 1px solid rgba(213, 174, 87, 0.4);
  background: rgba(7, 10, 9, 0.8);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.purpose-copy,
.office-copy {
  position: relative;
  padding: 54px 48px;
}

.purpose-copy::before,
.office-copy::before {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  content: "";
  border-top: 1px solid var(--gold-dim);
  border-right: 1px solid var(--gold-dim);
}

.purpose-copy h2,
.section-heading h2,
.field-manual-copy h2,
.office-copy h2,
.final-order h2 {
  margin: 10px 0 16px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 500;
  line-height: 1.1;
}

.purpose-copy > p,
.office-copy > p,
.field-manual-copy > p,
.section-intro {
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.75;
}

.expedition-steps {
  display: grid;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.expedition-steps li {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #343526;
  background: rgba(5, 8, 7, 0.36);
}

.expedition-steps li > span {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  font-family: var(--display);
  font-size: 18px;
}

.expedition-steps b {
  display: block;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.expedition-steps small {
  display: block;
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 12px;
}

.home-risk-band {
  display: grid;
  gap: 7px;
  margin-top: 22px;
}

.home-risk {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 1px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: rgba(5, 8, 7, 0.42);
}

.home-risk strong {
  grid-row: span 2;
  align-self: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
}

.home-risk span {
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-risk small {
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 11px;
}

.home-risk.tier-safe {
  border-left-color: #698c69;
}

.home-risk.tier-caution {
  border-left-color: var(--gold);
}

.home-risk.tier-danger {
  border-left-color: var(--oxblood-bright);
}

.purpose-risk-link {
  display: inline-block;
  margin-top: 16px;
}

.build-explainer,
.personnel-section,
.field-manual,
.app > section:not(.hero):not(.purpose-section):not(.office-break):not(.final-order) {
  margin-top: 78px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin-bottom: 0;
}

.text-link,
.heading-note {
  flex: 0 0 auto;
  padding-bottom: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.heading-note {
  color: var(--ink-faint);
}

.section-intro {
  max-width: 85ch;
  margin: -6px 0 22px;
}

.build-layer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-tight);
}

.build-layer {
  position: relative;
  min-height: 300px;
  padding: 30px 26px 26px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(27, 35, 32, 0.98), rgba(13, 17, 16, 0.98)),
    var(--panel);
}

.build-layer:last-child {
  border-right: 0;
}

.build-layer::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 22px;
  height: 22px;
  content: "";
  border-right: 1px solid #51492f;
  border-bottom: 1px solid #51492f;
}

.layer-number {
  display: block;
  margin-bottom: 54px;
  color: var(--oxblood-bright);
  font-family: var(--display);
  font-size: 24px;
}

.build-layer h3 {
  margin: 0 0 11px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.build-layer p {
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 13px;
}

.build-layer > a {
  position: absolute;
  bottom: 24px;
  left: 26px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field-manual {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 34px;
  padding: 38px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 8% 16%, rgba(119, 40, 44, 0.15), transparent 20rem),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(213, 174, 87, 0.018) 14px 15px),
    #0e1311;
  box-shadow: var(--shadow-tight);
}

.field-manual-copy h2 {
  font-size: clamp(34px, 4vw, 46px);
}

.field-manual-copy .btn {
  margin-top: 12px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.system-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 22px 20px;
  color: var(--ink);
  border: 1px solid #3e3a28;
  background: linear-gradient(145deg, #19201d, #111614);
}

.system-card:hover {
  color: var(--ink);
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.system-title {
  align-self: flex-start;
  max-width: calc(100% - 68px);
  margin: 0 68px 20px 0;
  padding: 4px 9px;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.system-count {
  position: absolute;
  top: 16px;
  right: 17px;
  color: rgba(213, 174, 87, 0.27);
  font-family: var(--display);
  font-size: 44px;
  line-height: 1;
}

.system-card p {
  flex: 1 1 auto;
  margin: 0 0 18px;
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 12px;
  line-height: 1.55;
}

.system-link {
  position: static;
  align-self: flex-start;
  margin-top: auto;
  color: var(--gold-dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.npc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.npc-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(29, 37, 34, 0.98), rgba(12, 16, 15, 0.98)),
    var(--panel);
  box-shadow: var(--shadow-tight);
}

.npc-art {
  position: relative;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 40%, rgba(213, 174, 87, 0.2), transparent 55%),
    linear-gradient(180deg, #222b27, #0b0e0d);
}

.npc-art::before {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(213, 174, 87, 0.22);
}

.npc-art img {
  position: relative;
  z-index: 1;
  width: 145px;
  max-height: 300px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.7));
  transform: scale(2.2);
  transform-origin: center 78%;
}

.npc-index {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 17px;
  color: rgba(213, 174, 87, 0.7);
  font-family: var(--display);
  font-size: 24px;
}

.npc-file {
  position: relative;
  padding: 32px 28px;
}

.file-tab {
  color: var(--gold-dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.npc-file h3 {
  margin: 12px 0 2px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.12;
}

.npc-role {
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.npc-file p {
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.65;
}

.npc-file .rubber-stamp {
  position: absolute;
  right: 22px;
  bottom: 24px;
  opacity: 0.72;
}

.office-break {
  grid-template-columns: 1.15fr 0.85fr;
}

.office-break > img {
  min-height: 460px;
}

.office-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.office-copy .rubber-stamp {
  align-self: flex-start;
}

.art-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.art-grid.small {
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
}

.preview-rail {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.preview-rail.small {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.art-tile {
  position: relative;
  min-height: 138px;
  justify-content: center;
  padding: 18px 10px 12px;
  border-radius: 0;
  border-color: #3b3929;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 28%, rgba(213, 174, 87, 0.1), transparent 50%),
    linear-gradient(180deg, #19201d, #0e1311);
}

.art-tile::before {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 11px;
  height: 11px;
  content: "";
  border-top: 1px solid #51492f;
  border-right: 1px solid #51492f;
}

.art-tile:hover {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, #202923, #111815);
  transform: translateY(-2px);
}

.art-tile img {
  width: 76px;
  height: 76px;
}

.art-grid.small .art-tile {
  min-height: 112px;
}

.art-grid.small .art-tile img {
  width: 58px;
  height: 58px;
}

.art-tile .art-name {
  color: var(--ink-dim);
  font-size: 10px;
  line-height: 1.25;
}

.art-see-all {
  gap: 6px;
  border-color: #6f5627;
  color: var(--gold);
  background:
    radial-gradient(circle at 50% 34%, rgba(119, 40, 44, 0.34), transparent 52%),
    repeating-linear-gradient(-45deg, transparent 0 9px, rgba(213, 174, 87, 0.035) 9px 10px),
    linear-gradient(180deg, #201715, #100d0c);
}

.art-see-all::after {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: 11px;
  height: 11px;
  content: "";
  border-bottom: 1px solid #8d6a2d;
  border-left: 1px solid #8d6a2d;
}

.art-see-all:hover {
  border-color: var(--gold);
  background:
    radial-gradient(circle at 50% 34%, rgba(166, 62, 64, 0.42), transparent 54%),
    linear-gradient(180deg, #291b18, #14100e);
}

.see-all-seal {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #ebcf88;
  border: 2px solid #a33d3f;
  outline: 1px solid #6e4f23;
  outline-offset: 4px;
  background: rgba(119, 40, 44, 0.22);
  transform: rotate(-4deg);
}

.see-all-seal b {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  transform: rotate(4deg);
}

.art-see-all .art-name {
  color: #e3ca8c;
  font-weight: 800;
}

.art-see-all small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.feature-grid {
  gap: 14px;
}

.room-type-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature {
  position: relative;
  padding: 24px;
  border-radius: 0;
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(28, 36, 33, 0.98), rgba(12, 16, 15, 0.98)),
    var(--panel);
  box-shadow: var(--shadow-tight);
}

.feature::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  content: "";
  border-right: 1px solid #51492f;
  border-bottom: 1px solid #51492f;
}

.feature h3 {
  margin-top: 13px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
}

.feature p {
  color: var(--ink-dim);
  font-family: Georgia, serif;
}

.feature .room-warning {
  margin: 18px 0;
  padding: 12px 14px;
  color: var(--ink);
  border-left: 3px solid var(--gold-dim);
  background: rgba(213, 174, 87, 0.06);
  font-size: 13px;
  line-height: 1.55;
}

.room-warning strong {
  display: block;
  margin-bottom: 2px;
  color: var(--gold);
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.destination-list {
  border-color: var(--line);
}

.destination-list li {
  border-color: #383727;
}

.final-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 78px;
  padding: 34px 38px;
  border: 1px solid var(--gold-dim);
  background:
    radial-gradient(circle at 16% 50%, rgba(119, 40, 44, 0.22), transparent 20rem),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(213, 174, 87, 0.02) 12px 13px),
    #111714;
  box-shadow: var(--shadow);
}

.final-order > .order-number {
  align-self: stretch;
  display: grid;
  place-items: center;
  width: 68px;
  padding: 6px;
  border: 2px solid var(--oxblood-bright);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.final-order h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 42px);
}

.final-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- Real compendium cards ---------- */

.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}

.card,
.resource-card,
.recipe-card,
.calc-panel,
.detail-panel,
.adversary-card,
.adversary-hero,
.encounter-card {
  border-radius: 0;
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(27, 35, 32, 0.98), rgba(12, 16, 15, 0.98)),
    var(--panel);
  box-shadow: var(--shadow-tight);
}

.card {
  position: relative;
}

.card::after,
.calc-panel::after,
.detail-panel::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  content: "";
  border-right: 1px solid #51492f;
  border-bottom: 1px solid #51492f;
}

.card-head {
  min-height: 86px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
}

.card-head:hover {
  background: rgba(213, 174, 87, 0.055);
}

.card-head .icon,
.choice .icon,
.ability .icon,
.resource-card .icon,
.recipe-head .icon,
.requirement .icon,
.enchantment-preview .icon,
.tb-item .icon {
  border-radius: 0;
  border-color: #4a432e;
  background: #080b0a;
  box-shadow: inset 0 0 0 2px #151a17;
}

.card-title {
  color: var(--ink);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
}

.card-sub {
  color: var(--ink-faint);
}

.card-body {
  border-color: var(--line);
}

.card-body p {
  color: var(--ink-dim);
  font-family: Georgia, serif;
}

.tier {
  border-color: #383727;
}

.tier .tier-badge {
  border-radius: 0;
  color: var(--gold);
  border-color: var(--gold-dim);
  background: #090d0b;
}

.tier-name {
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
}

.tier-desc {
  color: var(--ink-dim);
}

.choice {
  border-radius: 0;
  border-color: #3b3929;
  background: #151b18;
}

.choice .c-name {
  color: var(--gold);
}

.ability {
  border-radius: 0;
  border-color: #3d3a2a;
  border-left-color: var(--gold);
  background: #101714;
}

.status-detail {
  border-left-color: var(--oxblood-bright);
}

table.data {
  border-radius: 0;
  border-color: var(--line);
  background: #101513;
  box-shadow: var(--shadow-tight);
}

table.data th,
table.data td {
  border-color: #343426;
}

table.data th {
  color: var(--gold);
  background: #171d1a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

table.data tbody tr:hover td {
  background: rgba(213, 174, 87, 0.035);
}

.resource-grid,
.recipe-grid {
  gap: 12px;
}

.resource-card,
.recipe-card {
  border-left-color: var(--gold-dim);
}

.requirement,
.enchantment-preview {
  border-radius: 0;
  border-color: #3b3929;
  background: #141a17;
}

/* ---------- Real Bestiary list and detail ---------- */

.adversary-grid {
  gap: 10px;
}

.adversary-card {
  min-height: 94px;
  padding: 14px;
  color: var(--ink);
}

.adversary-card:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.adversary-thumb,
.adversary-portrait {
  border-radius: 0;
  border-color: #4a432e;
  background:
    radial-gradient(circle, rgba(213, 174, 87, 0.12), transparent 65%),
    #090c0b;
}

.adversary-card strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
}

.back-link {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.adversary-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at 88% 40%, rgba(119, 40, 44, 0.18), transparent 24rem),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(213, 174, 87, 0.018) 14px 15px),
    #111714;
}

.adversary-hero::after {
  position: absolute;
  right: 22px;
  bottom: 18px;
  padding: 5px 10px;
  color: var(--oxblood-bright);
  content: "THREAT AUTHORIZED";
  border: 2px solid var(--oxblood-bright);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  transform: rotate(-4deg);
}

.adversary-hero h1 {
  color: var(--ink);
  font-family: var(--display);
  font-size: 46px;
  font-weight: 500;
}

.eyebrow {
  color: var(--gold);
}

.detail-panel {
  position: relative;
  padding: 22px;
}

.detail-panel h2 {
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
}

.stat-grid {
  background: var(--line);
}

.stat-grid div {
  background: #171d1a;
}

.stat-grid dt {
  color: var(--ink-faint);
}

.encounter-card {
  box-shadow: none;
}

/* ---------- Real calculator ---------- */

.calc-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.calc-grid > * {
  min-width: 0;
}

@media (max-width: 820px) {
  .calc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .slot-row select {
    min-width: 0;
    max-width: 100%;
    flex-basis: 100%;
  }

  .perk-picker {
    margin-left: 0;
  }
}

.calc-panel {
  position: relative;
  padding: 22px;
  overflow: hidden;
}

.calc-panel > h2 {
  margin: -22px -22px 18px;
  padding: 14px 20px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(119, 40, 44, 0.18), transparent 55%),
    #171d1a;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.slot-block {
  margin-bottom: 9px;
  padding: 10px;
  border: 1px solid #343426;
  background: rgba(4, 7, 6, 0.28);
}

.slot-row {
  margin-bottom: 0;
  padding: 2px 0;
}

.slot-row .slot-label {
  color: var(--ink-dim);
}

.slot-row select,
.slot-row input[type="number"] {
  min-height: 38px;
  border-radius: 0;
  border-color: #4a432e;
  color: var(--ink);
  background: #0c110f;
}

.perk-picker {
  margin-bottom: 5px;
  padding-top: 8px;
  border-top: 1px dashed #343426;
}

.perk-opt {
  color: var(--ink-dim);
}

.perk-opt .p-name {
  color: var(--gold);
}

.summary {
  top: 106px;
  border-color: var(--gold-dim);
  background:
    radial-gradient(circle at 100% 0, rgba(119, 40, 44, 0.2), transparent 16rem),
    linear-gradient(145deg, #19201d, #0c100f);
}

.summary::before {
  display: block;
  margin-bottom: 10px;
  color: var(--oxblood-bright);
  content: "CALCULATED FIELD CONDITION";
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.summary .stat-line {
  min-height: 36px;
  align-items: center;
  border-color: #383727;
}

.summary .over {
  color: var(--danger);
  font-weight: 800;
}

.summary h3 {
  color: var(--gold);
}

.summary .mod-line {
  color: var(--ink-dim);
}

.toolbelt-pick {
  gap: 6px;
}

.tb-item {
  border-radius: 0;
  border-color: #3b3929;
  background: #141a17;
}

.tb-item:hover {
  border-color: var(--gold-dim);
}

.tb-item.selected {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(213, 174, 87, 0.08);
}

/* ---------- Updates, speech, and current field guidance ---------- */

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 1px 6px;
  color: var(--ink);
  border: 1px solid var(--gold-dim);
  background: #0c100f;
  box-shadow: inset 0 -2px rgba(213, 174, 87, 0.12);
  font: 700 0.85em/1.5 var(--font);
  text-align: center;
}

.dispatch-archive {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 920px;
  margin-inline: auto;
}

.dispatch-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(29, 37, 34, 0.98), rgba(12, 16, 15, 0.98)),
    var(--panel);
  box-shadow: var(--shadow-tight);
}

.dispatch-card time,
.dispatch-detail time {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-dim);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dispatch-card h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
}

.dispatch-card ul,
.dispatch-lede {
  margin: 0 0 22px;
  padding-left: 20px;
  color: var(--ink-dim);
  font-family: Georgia, serif;
}

.dispatch-card li + li,
.dispatch-lede li + li {
  margin-top: 7px;
}

.dispatch-card .text-link {
  display: inline-block;
  font-size: 9px;
}

.dispatch-page-head .section-kicker,
.dispatch-detail .page-head time,
.dispatch-detail .page-head .eyebrow-link {
  position: relative;
  z-index: 1;
}

.dispatch-detail {
  max-width: 980px;
  margin: 0 auto;
}

.dispatch-detail .page-head {
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
}

.eyebrow-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dispatch-lede {
  position: relative;
  z-index: 1;
  max-width: 78ch;
}

.dispatch-body {
  display: grid;
  gap: 18px;
}

.dispatch-body section {
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.dispatch-body h2 {
  margin-top: 0;
}

.dispatch-body p:last-child {
  margin-bottom: 0;
}

.dispatch-footer {
  margin-top: 24px;
}

.split-feature {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.split-feature h2 {
  font-size: clamp(32px, 4vw, 48px);
}

.office-note {
  align-self: stretch;
  padding: 26px;
  color: #403622;
  border: 1px solid #8a7140;
  background: linear-gradient(145deg, #ddd0aa, #b9a576);
  box-shadow: var(--shadow-tight);
  transform: rotate(0.7deg);
}

.office-note strong,
.office-note span {
  display: block;
}

.office-note strong {
  font-family: var(--display);
  font-size: 27px;
}

.office-note span {
  margin: 3px 0 20px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.office-note p {
  font-family: Georgia, serif;
}

.loadout-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.loadout-slot {
  padding: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #19201d, #101513);
}

.loadout-slot .slot-number {
  color: var(--gold-dim);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loadout-slot h3 {
  margin: 22px 0 5px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
}

.loadout-slot p,
.loadout-slot small {
  color: var(--ink-dim);
}

.loadout-slot p {
  margin: 0 0 8px;
  font-size: 11px;
}

.loadout-slot small {
  font-size: 9px;
}

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

.phrase-table-wrap:focus-visible {
  outline: 3px solid #f1ce7d;
  outline-offset: 4px;
}

.phrase-table {
  min-width: 820px;
}

.zone-rule-grid,
.zone-grid {
  display: grid;
  gap: 14px;
}

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

.zone-rule-grid article,
.zone-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #19201d, #111614);
}

.zone-rule-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zone-rule-grid p,
.zone-family-head p,
.zone-card p,
.zone-facts,
.zone-attunement p {
  color: var(--ink-dim);
  font-family: Georgia, serif;
  line-height: 1.65;
}

.zone-scaling,
.zone-attunement,
.zone-family {
  margin-bottom: 34px;
}

.zone-attunement {
  padding: 30px;
  border: 1px solid var(--gold-dim);
  border-left: 5px solid var(--gold);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(213, 174, 87, 0.018) 14px 15px),
    #111613;
}

.zone-attunement h2 {
  margin: 8px 0 14px;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 500;
}

.zone-attunement p:last-child {
  margin-bottom: 0;
}

.zone-family {
  border: 1px solid var(--line);
  background: rgba(12, 17, 15, 0.76);
}

.zone-family-head {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 30px;
  align-items: end;
  padding: 30px;
  border-bottom: 1px solid var(--line);
}

.zone-family-head h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 500;
}

.zone-family-head p {
  margin: 0;
}

.zone-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.zone-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.zone-card-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.zone-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
}

.zone-card-head span {
  flex: 0 0 auto;
  color: var(--gold-dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zone-facts {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
  padding: 18px 0 0 18px;
  border-top: 1px solid rgba(213, 174, 87, 0.18);
  font-size: 13px;
}

.zone-actions {
  margin-top: 44px;
}

.bestiary-briefing,
.economy-briefing {
  margin-bottom: 30px;
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.economy-briefing h2 {
  margin: 8px 0 14px;
}

.economy-briefing p {
  max-width: 86ch;
  color: var(--ink-dim);
  font-family: Georgia, serif;
}

.economy-briefing p:last-child {
  margin-bottom: 0;
}

.affix-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.affix-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--affix);
  background: #111715;
}

.affix-card h3 {
  margin: 0 0 12px;
  color: var(--affix);
  font-family: var(--display);
  font-size: 23px;
}

.affix-card p {
  min-height: 58px;
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 12px;
}

.affix-card strong {
  font-size: 11px;
}

.affix-colossal { --affix: #b88ad9; }
.affix-brutal { --affix: #d85b50; }
.affix-swift { --affix: #76c7ca; }
.affix-farshot { --affix: #d5ae57; }
.affix-frenzied { --affix: #e58b43; }

.enrage-notice {
  margin-top: 16px;
  padding: 22px;
  border-left: 4px solid var(--danger);
  background: rgba(119, 40, 44, 0.15);
}

.enrage-notice h2 {
  margin-top: 0;
  font-size: 25px;
}

/* ---------- Field footage and studio About ---------- */

.field-footage,
.item-footage,
.about-ledger,
.developer-section {
  margin-top: 52px;
}

.motion-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(213, 174, 87, 0.018) 14px 15px),
    #0e1311;
  box-shadow: var(--shadow-tight);
}

.footage-frame {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #070a09;
}

.footage-frame img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  image-rendering: auto;
}

.footage-frame picture {
  display: block;
}

.footage-frame figcaption {
  padding: 10px 13px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 9, 0.96);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.45;
  text-transform: uppercase;
}

.motion-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.motion-caption span {
  min-width: 0;
}

.footage-control {
  flex: 0 0 auto;
  white-space: nowrap;
}

.motion-frame {
  border: 0;
  border-right: 1px solid var(--line);
}

.motion-copy {
  align-self: center;
  padding: 34px 36px;
}

.motion-copy h2,
.about-copy h2 {
  margin: 9px 0 14px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 500;
  line-height: 1.08;
}

.motion-copy p,
.about-copy p {
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.72;
}

.footage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.footage-lead,
.footage-category {
  margin-top: 52px;
}

.archive-frame figcaption {
  display: grid;
  gap: 5px;
  min-height: 70px;
}

.archive-frame figcaption strong {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
}

.archive-frame figcaption span {
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.item-footage {
  margin-bottom: 34px;
}

.zone-footage {
  margin-top: 22px;
}

.about-page-head .section-kicker {
  margin-bottom: 9px;
}

.about-ledger {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1.5fr);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 8% 18%, rgba(119, 40, 44, 0.18), transparent 18rem),
    #101613;
  box-shadow: var(--shadow-tight);
}

.about-file-mark {
  display: flex;
  min-height: 440px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 36px 24px;
  color: var(--gold-dim);
  border-right: 1px solid var(--line);
  text-align: center;
}

.about-file-mark span,
.about-file-mark small {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about-file-mark strong {
  max-width: 100%;
  margin: 22px 0 8px;
  color: rgba(213, 174, 87, 0.52);
  font-family: var(--display);
  font-size: clamp(44px, 4.5vw, 72px);
  font-weight: 500;
  line-height: 0.78;
}

.about-copy {
  padding: 48px clamp(28px, 5vw, 72px);
}

.studio-notice {
  display: grid;
  gap: 5px;
  margin-top: 28px;
  padding: 16px 18px;
  color: var(--ink-dim);
  border-left: 4px solid var(--oxblood-bright);
  background: rgba(119, 40, 44, 0.13);
  font-family: Georgia, serif;
  font-size: 12px;
}

.studio-notice strong {
  color: var(--oxblood-bright);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.developer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.developer-card {
  position: relative;
  min-width: 0;
  padding: 16px 16px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(29, 38, 34, 0.95), rgba(12, 16, 15, 0.98)),
    var(--panel);
  text-align: center;
}

.developer-card img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.52));
}

.developer-card h3 {
  margin: 3px 0 6px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 500;
}

.developer-card span {
  color: var(--gold-dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.developer-bio {
  max-width: 34ch;
  margin: 14px auto 0;
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 12px;
  line-height: 1.58;
}

/* ---------- Footer ---------- */

.sitefoot {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 28px max(20px, calc((100vw - var(--maxw)) / 2)) 48px;
  color: var(--ink-faint);
  border: 0;
  border-top: 1px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(213, 174, 87, 0.018) 14px 15px),
    #0a0d0c;
}

.sitefoot::before {
  display: none;
  content: none;
}

.foot-brand {
  color: var(--paper);
  font-family: var(--display);
  font-size: 16px;
}

.foot-link {
  color: var(--gold-dim);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.foot-link:hover {
  color: var(--gold);
}

.foot-button {
  padding: 0;
  color: var(--gold-dim);
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* ---------- Optional analytics consent ---------- */

body.analytics-consent-visible {
  padding-bottom: 240px;
}

.analytics-consent {
  position: fixed;
  z-index: 1200;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 24px;
  border: 1px solid var(--gold-dim);
  border-top: 4px solid var(--gold);
  background:
    linear-gradient(135deg, rgba(118, 45, 38, 0.16), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
}

.analytics-consent[hidden] {
  display: none;
}

.analytics-consent-copy {
  min-width: 0;
}

.analytics-consent-kicker {
  margin: 0 0 3px;
  color: var(--gold-dim);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.analytics-consent h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.analytics-consent-copy > p:not(.analytics-consent-kicker) {
  max-width: 72ch;
  margin: 8px 0 0;
  color: var(--ink-dim);
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
}

.analytics-consent-status:not(:empty) {
  color: var(--paper) !important;
  font-weight: 700;
}

.analytics-consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  min-width: 330px;
}

.analytics-consent-action,
.analytics-consent-close {
  min-height: 46px;
  padding: 10px 14px;
  color: var(--paper);
  border: 1px solid var(--gold-dim);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.analytics-consent-action:hover,
.analytics-consent-close:hover {
  color: #fff4d6;
  border-color: var(--gold);
  background: #222b27;
}

.analytics-consent-close {
  grid-column: 1 / -1;
  min-height: 36px;
  color: var(--ink-dim);
  border-color: var(--line);
  background: transparent;
}

@media (max-width: 720px) {
  body.analytics-consent-visible {
    padding-bottom: 390px;
  }

  .analytics-consent {
    right: 8px;
    bottom: 8px;
    left: 8px;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    padding: 18px;
    overflow-y: auto;
  }

  .analytics-consent-actions {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .analytics-consent-close {
    grid-column: auto;
  }
}

/* ---------- Public legal, support, and licensing records ---------- */

.legal-topbar {
  justify-content: space-between;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  margin-left: auto;
}

.legal-nav a {
  color: var(--gold-dim);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-page {
  max-width: 1040px;
}

.legal-head {
  min-height: 250px;
}

.legal-head::before {
  content: "PUBLIC RECORD";
}

.legal-head h1 {
  max-width: 23ch;
}

.legal-date {
  margin-top: 18px !important;
  color: var(--gold-dim) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-document {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.legal-document > section,
.legal-summary,
.legal-note,
.legal-warning {
  margin: 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, transparent 0 18px, rgba(213, 174, 87, 0.018) 18px 19px),
    var(--panel);
  box-shadow: var(--shadow-tight);
}

.legal-summary {
  color: var(--paper);
  border-left: 4px solid var(--gold-dim);
  font-family: Georgia, serif;
  font-size: clamp(17px, 2.5vw, 21px);
}

.legal-document h2 {
  margin: 0 0 14px;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 500;
}

.legal-document h3 {
  margin: 24px 0 8px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-document p,
.legal-document li {
  color: var(--ink-dim);
}

.legal-document .legal-conspicuous {
  color: var(--paper);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.legal-document p:last-child,
.legal-document ul:last-child,
.legal-document ol:last-child {
  margin-bottom: 0;
}

.legal-document li + li {
  margin-top: 8px;
}

.legal-note,
.legal-warning {
  color: var(--ink-dim);
  border-left: 4px solid var(--gold-dim);
}

.legal-warning {
  margin-top: 22px;
  border-left-color: var(--danger);
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.notice-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #343426;
  background: #101513;
}

.notice-card h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.notice-card p {
  margin: 8px 0;
  font-size: 13px;
}

.notice-card .restriction {
  padding: 10px;
  color: #f0c7bd;
  border-left: 3px solid var(--danger);
  background: rgba(119, 40, 44, 0.16);
}

.notice-card details {
  margin-top: 14px;
}

.notice-card summary {
  color: var(--gold);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.asset-key-list {
  max-height: 320px;
  margin-bottom: 0;
  padding: 12px 12px 12px 30px;
  overflow: auto;
  background: #090c0b;
}

.asset-key-list code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.legal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #343426;
}

.legal-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  background: #101513;
}

.legal-table th,
.legal-table td {
  padding: 12px;
  border-bottom: 1px solid #343426;
  text-align: left;
  vertical-align: top;
}

.legal-table thead th {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-table tbody th {
  font-weight: 700;
}

.legal-footer {
  justify-content: flex-start;
}

.legal-footer .foot-note {
  flex-basis: 100%;
}

/* ---------- Responsive ---------- */

@media (max-width: 1160px) {
  .brand {
    min-width: 340px;
    padding-left: 158px;
  }

  .brand-copy strong {
    font-size: 26px;
  }

  .mainnav a {
    padding-inline: 7px;
    font-size: 11px;
  }

  .build-layer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .build-layer:nth-child(2) {
    border-right: 0;
  }

  .build-layer:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .motion-teaser,
  .about-ledger {
    grid-template-columns: minmax(0, 1fr);
  }

  .motion-frame,
  .about-file-mark {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .about-file-mark {
    min-height: 250px;
  }

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

@media (max-width: 1480px) {
  .topbar {
    padding-inline: 20px;
  }

  .mainnav {
    display: none;
    position: absolute;
    top: 156px;
    right: 0;
    left: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 12px;
    max-height: calc(100vh - 156px);
    overflow-y: auto;
    padding: 10px 20px 18px;
    border-color: var(--gold-dim);
    background: #0c100f;
    box-shadow: var(--shadow);
  }

  .mainnav.open {
    display: grid;
  }

  .navtoggle {
    display: block;
  }

  .mainnav a {
    padding: 14px 16px;
    font-size: 13px;
  }

  .hero-copy {
    width: 100%;
    padding-right: 0;
  }

  .lore-hero {
    min-height: 780px;
    padding-top: 54px;
  }

  .hero-order {
    right: max(20px, calc((100vw - var(--maxw)) / 2));
    bottom: 52px;
    left: max(20px, calc((100vw - var(--maxw)) / 2));
    width: auto;
    max-width: 560px;
  }

  .preview-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .purpose-section,
  .office-break,
  .field-manual {
    grid-template-columns: 1fr;
  }

  .purpose-art,
  .office-break > img {
    min-height: 400px;
    max-height: 520px;
  }

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

  .room-type-grid {
    grid-template-columns: 1fr;
  }

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

  .speech-use-grid,
  .zone-rule-grid,
  .zone-grid {
    grid-template-columns: 1fr;
  }

  .zone-family-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .final-order {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .final-actions {
    width: 100%;
    justify-content: flex-start;
    padding-left: 90px;
  }

  .page-head::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 6px;
    height: 84px;
    padding-inline: 12px;
  }

  .brand-seal {
    left: -4px;
    flex-basis: 104px;
    width: 104px;
    height: 104px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 84px;
    padding-left: 96px;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong {
    font-size: clamp(16px, 5.2vw, 20px);
    letter-spacing: 0.01em;
  }

  .brand-copy small {
    display: none;
  }

  .navtoggle {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .mainnav {
    top: 84px;
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100vh - 84px);
  }

  .app {
    padding-inline: 14px;
  }

  .lore-hero {
    min-height: 870px;
    padding-top: 48px;
    padding-inline: 18px;
    background-position: 62% 30%;
  }

  .lore-hero::before {
    background:
      linear-gradient(180deg, rgba(5, 8, 7, 0.78), rgba(5, 8, 7, 0.87) 58%, rgba(5, 8, 7, 0.98)),
      linear-gradient(90deg, rgba(5, 8, 7, 0.74), rgba(5, 8, 7, 0.34));
  }

  .lore-hero h1 {
    font-size: clamp(54px, 18vw, 76px);
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-lede {
    font-size: 16px;
  }

  .hero-order {
    right: 18px;
    left: 18px;
    padding: 22px;
  }

  .purpose-section,
  .office-break {
    margin-top: 52px;
    margin-bottom: 52px;
  }

  .purpose-art,
  .office-break > img {
    min-height: 290px;
  }

  .purpose-copy,
  .office-copy {
    padding: 36px 24px;
  }

  .purpose-copy h2,
  .section-heading h2,
  .field-manual-copy h2,
  .office-copy h2 {
    font-size: 34px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .build-layer-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .dispatch-archive,
  .split-feature,
  .loadout-grid,
  .affix-grid {
    grid-template-columns: 1fr;
  }

  .dispatch-card,
  .dispatch-body section,
  .split-feature,
  .zone-attunement,
  .zone-family-head,
  .bestiary-briefing,
  .economy-briefing {
    padding: 22px 18px;
  }

  .zone-grid {
    padding: 10px;
  }

  .footage-grid,
  .footage-grid.three-up,
  .developer-grid {
    grid-template-columns: 1fr;
  }

  .motion-copy,
  .about-copy {
    padding: 30px 22px;
  }

  .motion-caption {
    align-items: stretch;
    flex-direction: column;
  }

  .footage-control {
    width: 100%;
  }

  .zone-card-head {
    flex-direction: column;
    gap: 8px;
  }

  .build-layer {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .build-layer:nth-child(3) {
    border-bottom: 1px solid var(--line);
  }

  .field-manual {
    padding: 26px 18px;
  }

  .npc-card {
    grid-template-columns: 118px 1fr;
    min-height: 390px;
  }

  .npc-art img {
    width: 105px;
    transform: scale(2.25);
  }

  .npc-file {
    padding: 25px 18px;
  }

  .npc-file h3 {
    font-size: 22px;
  }

  .npc-file .rubber-stamp {
    right: 14px;
    bottom: 18px;
  }

  .art-grid,
  .art-grid.small {
    grid-template-columns: repeat(3, 1fr);
  }

  .preview-rail,
  .preview-rail.small {
    grid-template-columns: repeat(2, 1fr);
  }

  .art-tile,
  .art-grid.small .art-tile {
    min-height: 110px;
    padding-inline: 5px;
  }

  .art-tile img,
  .art-grid.small .art-tile img {
    width: 52px;
    height: 52px;
  }

  .page-head {
    min-height: 190px;
    padding-top: 56px;
  }

  .page-head h1 {
    font-size: 46px;
  }

  .page-head p {
    font-size: 14px;
  }

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

  table.data {
    min-width: 620px;
  }

  .app > .toolbar + table.data {
    display: block;
    overflow-x: auto;
  }

  .final-order {
    padding: 26px 20px;
  }

  .final-order > .order-number {
    width: 50px;
  }

  .final-order > div:nth-child(2) {
    flex: 1;
  }

  .final-actions {
    padding-left: 0;
  }

  .final-actions .btn {
    width: 100%;
    text-align: center;
  }

  .sitefoot {
    flex-direction: column;
  }

  .legal-topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 84px;
    padding-bottom: 12px;
  }

  .legal-topbar .brand {
    flex-basis: calc(100% - 110px);
  }

  .legal-nav {
    flex: 1 0 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    border: 1px solid var(--line);
  }

  .legal-nav a {
    padding: 9px;
    text-align: center;
    background: var(--panel);
  }

  .legal-document > section,
  .legal-summary,
  .legal-note,
  .legal-warning {
    padding: 20px;
  }

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

}

@media print {
  html,
  body {
    color-scheme: light;
    color: #111;
    background: #fff !important;
  }

  body::before,
  body::after,
  .topbar,
  .sitefoot,
  .analytics-consent {
    display: none !important;
  }

  body.analytics-consent-visible {
    padding-bottom: 0;
  }

  .legal-page {
    max-width: none;
    padding: 0;
  }

  .legal-head {
    min-height: 0;
    margin: 0 0 24px;
    padding: 0 0 18px;
    color: #111;
    border-bottom: 2px solid #333;
    background: none !important;
  }

  .legal-head::before,
  .legal-head h1,
  .legal-head p,
  .legal-date,
  .legal-document h2,
  .legal-document h3,
  .legal-document p,
  .legal-document li,
  .notice-card .restriction {
    color: #111 !important;
  }

  .legal-document > section,
  .legal-summary,
  .legal-note,
  .legal-warning,
  .notice-card {
    break-inside: avoid;
    color: #111;
    border-color: #777;
    background: #fff !important;
    box-shadow: none;
  }

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

  .asset-key-list {
    max-height: none;
    overflow: visible;
    background: #fff;
  }

  a {
    color: #111;
    text-decoration: underline;
  }
}

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

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