:root {
  color-scheme: dark;
  --bg: #0a0b0b;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --text: #edf1f4;
  --muted: #a8b0ba;
  --faint: #707984;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #b8c9d8;
  --accent-strong: #f2f6fa;
  --red: #d35e5e;
  --green: #8ebd93;
  --gold: #d0b66f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(211, 94, 94, 0.07), transparent 26%),
    linear-gradient(225deg, rgba(142, 189, 147, 0.06), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(10, 11, 11, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
}

.brand-mark,
.brand-mark::before,
.brand-mark::after {
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 7px 7px,
    linear-gradient(var(--red), var(--red)) 50% 50% / 7px 7px,
    linear-gradient(var(--green), var(--green)) 100% 100% / 7px 7px;
  background-repeat: no-repeat;
}

.site-nav {
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--panel-strong);
}

.hero {
  position: relative;
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.mission-layer {
  position: absolute;
  inset: 0;
  opacity: 0.62;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 48% 44%, black, transparent 74%);
}

.route,
.node {
  position: absolute;
  display: block;
}

.route {
  height: 2px;
  width: 260px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform-origin: center;
  animation: pulse 5s ease-in-out infinite;
}

.route-one {
  top: 35%;
  left: 18%;
  transform: rotate(24deg);
}

.route-two {
  right: 16%;
  bottom: 32%;
  transform: rotate(-18deg);
  animation-delay: 1.8s;
}

.node {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  background: var(--bg);
}

.node-a { left: 18%; top: 32%; }
.node-b { left: 41%; top: 47%; border-color: var(--red); }
.node-c { right: 24%; bottom: 29%; border-color: var(--green); }
.node-d { right: 39%; top: 22%; border-color: var(--gold); }

.hero-content,
.quote-panel,
.overview,
.feature-grid,
.page-shell {
  position: relative;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(64px, 12vw, 150px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 800;
}

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

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.quote-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.quote-panel p {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.42;
}

.quote-panel span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 32px;
  padding: 48px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.overview h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.02;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-self: end;
}

.stats div,
.feature-grid article,
.roadmap-grid article,
.text-page section,
.battle-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stats div {
  min-height: 112px;
  padding: 18px;
}

.stats strong {
  display: block;
  font-size: 34px;
}

.stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.feature-grid {
  padding: 48px clamp(18px, 5vw, 64px) 76px;
}

.feature-grid article,
.roadmap-grid article {
  padding: 22px;
}

.icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid rgba(184, 201, 216, 0.28);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 900;
}

h3,
.feature-grid h3,
.roadmap-grid h2,
.text-page h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.feature-grid p,
.page-header p,
.battle-card p,
.text-page p,
.text-page li,
.roadmap-grid li {
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}

.site-footer a {
  color: var(--accent);
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 58px 0 76px;
}

.page-header {
  max-width: 880px;
  margin-bottom: 30px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1;
}

.page-header p {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 18px;
}

.archive-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.search-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
}

.search-field input:focus {
  border-color: rgba(184, 201, 216, 0.62);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.filter.is-active {
  color: #090a0b;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

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

.battle-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.battle-card h2 {
  margin: 0;
  font-size: 22px;
}

.battle-card p {
  margin: 12px 0;
}

.battle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.battle-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.roadmap-grid {
  margin-top: 24px;
}

.roadmap-grid ul,
.text-page ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.text-page {
  max-width: 900px;
}

.text-page section {
  padding: 22px;
  margin-top: 14px;
}

.text-page a {
  color: var(--accent);
  border-bottom: 1px dotted rgba(184, 201, 216, 0.55);
}

@keyframes pulse {
  0%,
  100% { opacity: 0.28; }
  50% { opacity: 0.95; }
}

@media (max-width: 920px) {
  .hero,
  .overview,
  .archive-toolbar {
    grid-template-columns: 1fr;
  }

  .quote-panel {
    max-width: 560px;
  }

  .feature-grid,
  .roadmap-grid,
  .battle-list {
    grid-template-columns: 1fr 1fr;
  }

  .filter-group {
    justify-content: flex-start;
  }
}

@media (max-width: 660px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .stats,
  .feature-grid,
  .roadmap-grid,
  .battle-list {
    grid-template-columns: 1fr;
  }

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

/* Full-screen homepage */
.home-page {
  min-height: 100vh;
  min-height: 560px;
  overflow-x: hidden;
  background: #07090a;
}

.home-page .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 80px;
  padding: 0 clamp(24px, 4vw, 64px);
  background: linear-gradient(180deg, rgba(4, 6, 7, 0.92), rgba(4, 6, 7, 0.48) 70%, transparent);
  border-bottom: 0;
  backdrop-filter: none;
}

.home-page .brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.home-page .brand-mark {
  filter: grayscale(1);
  opacity: 0.88;
}

.home-page .site-nav {
  gap: 16px;
}

.home-page .site-nav a {
  min-height: 40px;
  padding: 0;
  border-radius: 0;
  color: rgba(235, 239, 240, 0.66);
  font-size: 12px;
  text-transform: uppercase;
}

.home-page .site-nav a:hover,
.home-page .site-nav a[aria-current="page"] {
  color: #fff;
  background: transparent;
}

.home-main {
  min-height: 100%;
}

.home-page .hero {
  isolation: isolate;
  min-height: 680px;
  height: 100vh;
  height: 100svh;
  display: block;
  padding: 0;
  border: 0;
  background-image: url("./assets/battlefield-hero.png");
  background-position: 58% center;
  background-size: cover;
}

.home-page #animated-logo-container {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: visible;
}

.home-page .animated-logo {
  width: 28px;
  height: 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 2px;
  transform: rotate(45deg);
}

.home-page .logo-square {
  border-radius: 1px;
  background: #d8dde0;
  animation: home-logo-shimmer 4s infinite ease-in-out alternate;
  transition: background-color 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.home-page .logo-square.red-spark {
  background: rgba(190, 49, 43, 0.92);
  opacity: 0.9 !important;
  box-shadow: 0 0 10px rgba(190, 49, 43, 0.8), inset 0 0 5px rgba(255, 188, 170, 0.6) !important;
  animation: home-red-spark 0.9s ease-in-out;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 6, 7, 0.96) 0%, rgba(4, 6, 7, 0.82) 34%, rgba(4, 6, 7, 0.28) 66%, rgba(4, 6, 7, 0.14) 100%),
    linear-gradient(0deg, rgba(3, 5, 6, 0.74) 0%, transparent 45%, rgba(3, 5, 6, 0.3) 100%);
}

.home-page .hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 112px);
  top: 50%;
  width: min(680px, calc(100% - 48px));
  transform: translateY(-45%);
}

.home-page .eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: #c7a56c;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.home-page .eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: #c7a56c;
}

.home-page .hero h1 {
  max-width: none;
  color: #f3f1eb;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 92px;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.home-page .hero-copy {
  max-width: 560px;
  margin-top: 28px;
  color: rgba(231, 235, 235, 0.76);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.55;
}

.home-page .actions {
  align-items: center;
  gap: 24px;
  margin-top: 38px;
}

.home-page .button.primary {
  min-height: 50px;
  gap: 16px;
  padding: 0 21px;
  border-color: #e8e4dc;
  border-radius: 3px;
  color: #0a0c0d;
  background: #e8e4dc;
  font-size: 13px;
  text-transform: uppercase;
}

.home-page .button.primary:hover {
  color: #fff;
  background: transparent;
}

.home-page .text-link {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  color: rgba(241, 243, 241, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.home-page .quote-panel {
  position: absolute;
  right: clamp(24px, 5vw, 80px);
  bottom: 64px;
  width: min(370px, 31vw);
  padding: 0 0 0 20px;
  border: 0;
  border-left: 1px solid rgba(199, 165, 108, 0.56);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-page .quote-panel p {
  margin-bottom: 10px;
  color: rgba(246, 245, 239, 0.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-style: italic;
}

.home-page .quote-panel span {
  color: rgba(227, 229, 228, 0.6);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-index {
  position: absolute;
  left: clamp(24px, 4vw, 64px);
  bottom: 28px;
  margin: 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 17px;
  transform: translateX(-50%);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.scroll-cue:hover {
  border-color: #c7a56c;
  color: #c7a56c;
  transform: translate(-50%, 3px);
}

.featured-battles,
.featured-commanders {
  position: relative;
  min-height: 68vh;
  padding: 92px clamp(24px, 7vw, 112px) 82px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(5, 8, 9, 0.2), #080b0d 18%),
    #080b0d;
}

.featured-battles::before,
.featured-commanders::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}

.featured-commanders {
  background:
    linear-gradient(180deg, rgba(8, 11, 13, 0.2), #060809 18%),
    #060809;
}

.featured-heading,
.featured-grid,
.archive-link {
  position: relative;
  z-index: 1;
}

.featured-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 42px;
}

.featured-heading .eyebrow {
  margin-bottom: 14px;
}

.preview-rule {
  display: block;
  width: 38px;
  height: 1px;
  margin-bottom: 14px;
  background: #c7a56c;
}

.featured-heading h2 {
  margin: 0;
  color: #eeece6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.refresh-battles {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.35s ease;
}

.refresh-battles:hover {
  border-color: #c7a56c;
  color: #c7a56c;
  transform: rotate(90deg);
}

.refresh-battles:disabled {
  cursor: wait;
  opacity: 0.5;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.12);
}

.featured-card {
  width: 100%;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 0;
  border-radius: 0;
  color: #e8e9e7;
  background: #0d1113;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background-color 0.25s ease;
}

.featured-card:hover,
.featured-card:focus-visible {
  background: #13181a;
  outline: 1px solid #c7a56c;
  outline-offset: -1px;
}

.featured-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 52px;
  color: #c7a56c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.featured-card h3 {
  margin: 0 0 18px;
  color: #f0eee8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.featured-belligerents {
  margin: 0 0 16px;
  color: rgba(234, 236, 234, 0.72);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.featured-et-al {
  color: rgba(215, 220, 220, 0.58);
  font-size: 10px;
  font-style: italic;
  font-weight: 500;
}

.featured-summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(215, 220, 220, 0.58);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.featured-result {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(235, 237, 234, 0.68);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.featured-loading {
  grid-column: 1 / -1;
  margin: 0;
  padding: 72px 30px;
  color: rgba(255, 255, 255, 0.54);
  background: #0d1113;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  text-align: center;
}

.archive-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(199, 165, 108, 0.5);
  color: #d7c298;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-modal-open {
  overflow: hidden;
}

.home-record-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
}

.home-record-overlay[hidden] {
  display: none;
}

.home-record-dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: min(82vh, 820px);
  overflow-y: auto;
  border: 1px solid rgba(199, 165, 108, 0.38);
  border-radius: 4px;
  color: #e8e9e7;
  background: #0b0f11;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
}

.home-record-close {
  position: sticky;
  z-index: 2;
  top: 18px;
  float: right;
  width: 42px;
  height: 42px;
  margin: 18px 18px -60px 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.78);
  background: #14191b;
  cursor: pointer;
  font: 26px/1 Arial, sans-serif;
}

.home-record-close:hover,
.home-record-close:focus-visible {
  border-color: #c7a56c;
  color: #c7a56c;
  outline: none;
}

.home-record-content {
  padding: 58px clamp(28px, 6vw, 72px) 64px;
}

.home-record-meta {
  margin: 0 58px 20px 0;
  color: #c7a56c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-record-content h2 {
  margin: 0 58px 24px 0;
  color: #f0eee8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.home-record-summary {
  margin: 0 0 38px;
  color: rgba(224, 227, 224, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.75;
}

.home-record-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 44px;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.home-record-field {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-record-field dt {
  margin-bottom: 8px;
  color: #c7a56c;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-record-field dd {
  margin: 0;
  color: rgba(232, 234, 231, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

.home-wiki-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 34px;
  padding: 8px 13px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  color: rgba(235, 237, 234, 0.82);
  background: #111;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-wiki-button:hover,
.home-wiki-button:focus-visible {
  border-color: #c7a56c;
  color: #d7c298;
  outline: none;
}

.home-wiki-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 3px;
  color: #fff;
  background: #111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.home-wiki-overlay {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.home-wiki-overlay[hidden] {
  display: none;
}

.home-wiki-header {
  min-height: 54px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid #d9dde1;
  color: #111;
  background: #fff;
}

.home-wiki-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.home-wiki-heading > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-wiki-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: #111;
  background: #e5e7eb;
  cursor: pointer;
  font: 24px/1 Arial, sans-serif;
}

.home-wiki-close:hover,
.home-wiki-close:focus-visible {
  background: #d1d5db;
  outline: 2px solid #8a6b3f;
  outline-offset: 2px;
}

.home-wiki-frame {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  border: 0;
  background: #fff;
}

.home-wiki-warning {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 16px;
  border-top: 1px solid #fde68a;
  color: #854d0e;
  background: #fefce8;
  font-size: 11px;
  text-align: center;
}

.home-wiki-warning a {
  color: #075985;
  font-weight: 800;
}

.home-record-status {
  margin: 42px 0;
  color: rgba(255, 255, 255, 0.62);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  text-align: center;
}

.war-reflection {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #e7e8e5;
  background: #060809;
}

.war-reflection-image {
  position: relative;
  min-height: min(760px, 78vh);
  display: flex;
  align-items: end;
  padding: clamp(64px, 9vh, 108px) clamp(24px, 7vw, 112px);
  background-image: url("./assets/war-aftermath.png");
  background-position: center;
  background-size: cover;
}

.war-reflection-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.war-reflection-statement {
  position: relative;
  z-index: 1;
  width: min(690px, 100%);
}

.war-reflection-statement .preview-rule {
  width: 46px;
  margin-bottom: 22px;
}

.war-reflection-kicker,
.war-reflection-label {
  margin: 0 0 18px;
  color: #d0ab6c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.war-reflection-statement h2 {
  margin: 0;
  color: #f1efe9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 82px;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.8);
}

.war-reflection-statement > p:last-child {
  max-width: 620px;
  margin: 28px 0 0;
  color: rgba(237, 238, 234, 0.76);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.65;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

.war-reflection-body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(48px, 8vw, 130px);
  padding: 108px clamp(24px, 7vw, 112px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.war-reflection-intro h3 {
  max-width: 620px;
  margin: 0;
  color: #eeece6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.war-reflection-intro > p:last-child {
  max-width: 650px;
  margin: 30px 0 0;
  color: rgba(220, 224, 221, 0.62);
  font-size: 14px;
  line-height: 1.8;
}

.war-reflection-lead {
  align-self: center;
  margin: 0;
  padding: 10px 0 10px clamp(28px, 4vw, 64px);
  border-left: 1px solid rgba(199, 165, 108, 0.55);
}

.war-reflection-lead p {
  margin: 0;
  color: #e8e5dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1.38;
}

.war-reflection-lead footer {
  margin-top: 30px;
  color: #d0ab6c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.war-reflection-lead footer span,
.war-witness cite span {
  display: block;
  margin-top: 6px;
  color: rgba(218, 222, 219, 0.44);
  font-weight: 600;
}

.war-witnesses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 clamp(24px, 7vw, 112px) 104px;
}

.war-witness {
  min-width: 0;
  padding: 42px clamp(24px, 3.2vw, 54px) 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.war-witness + .war-witness {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.war-witness-number {
  margin: 0 0 42px;
  color: #d0ab6c;
  font-size: 10px;
  font-weight: 900;
}

.war-witness h3 {
  margin: 0 0 26px;
  color: #eceae4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
}

.war-witness blockquote {
  min-height: 112px;
  margin: 0 0 28px;
  color: rgba(232, 231, 225, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
}

.war-witness > p:not(.war-witness-number) {
  margin: 0;
  color: rgba(214, 219, 216, 0.56);
  font-size: 13px;
  line-height: 1.75;
}

.war-witness cite {
  display: block;
  margin-top: 32px;
  color: #d0ab6c;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

@keyframes home-logo-shimmer {
  0%, 100% {
    opacity: 0.18;
    box-shadow: 0 0 4px rgba(224, 230, 233, 0.6), inset 0 0 4px rgba(224, 230, 233, 0.42);
  }
  50% {
    opacity: 0.72;
    box-shadow: 0 0 12px rgba(224, 230, 233, 0.72), inset 0 0 7px rgba(224, 230, 233, 0.58);
  }
}

@keyframes home-red-spark {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.18); }
}

@media (max-width: 980px) {
  .home-page .hero {
    background-position: 68% center;
  }

  .home-page .hero h1 {
    font-size: 70px;
  }

  .home-page .quote-panel {
    display: none;
  }

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

  .featured-card {
    min-height: 290px;
  }

  .featured-card-meta {
    margin-bottom: 32px;
  }
}

@media (max-width: 660px) {
  .home-page {
    min-height: 520px;
  }

  .home-page .site-header {
    height: 68px;
    align-items: center;
    flex-direction: row;
    padding: 0 18px;
  }

  .home-page .brand-mark {
    width: 24px;
    height: 24px;
  }

  .home-page #animated-logo-container {
    width: 32px;
    height: 32px;
  }

  .home-page .animated-logo {
    width: 22px;
    height: 22px;
    gap: 1.5px;
  }

  .home-page .brand {
    gap: 8px;
    font-size: 15px;
  }

  .home-page .site-nav {
    gap: 14px;
  }

  .home-page .site-nav a {
    display: none;
  }

  .home-page .site-nav a[href="./battles.html"] {
    display: inline-flex;
  }

  .home-page .hero {
    background-position: 72% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(4, 6, 7, 0.9), rgba(4, 6, 7, 0.26)),
      linear-gradient(0deg, rgba(3, 5, 6, 0.88) 0%, rgba(3, 5, 6, 0.18) 72%);
  }

  .home-page .hero-content {
    left: 22px;
    top: auto;
    bottom: 92px;
    width: calc(100% - 44px);
    transform: none;
  }

  .home-page .eyebrow {
    margin-bottom: 16px;
  }

  .home-page .hero h1 {
    font-size: 52px;
  }

  .home-page .hero-copy {
    max-width: 420px;
    margin-top: 20px;
    font-size: 18px;
  }

  .home-page .actions {
    margin-top: 28px;
  }

  .home-page .text-link,
  .hero-index {
    display: none;
  }

  .scroll-cue {
    right: 18px;
    bottom: 22px;
    left: auto;
    transform: none;
  }

  .scroll-cue:hover {
    transform: translateY(3px);
  }

  .featured-battles,
  .featured-commanders {
    min-height: 0;
    padding: 68px 20px 64px;
  }

  .featured-heading {
    align-items: center;
    margin-bottom: 30px;
  }

  .featured-heading h2 {
    font-size: 34px;
  }

  .featured-card {
    min-height: 320px;
    padding: 24px;
  }

  .featured-card h3 {
    font-size: 28px;
  }

  .home-record-overlay {
    align-items: end;
    padding: 0;
  }

  .home-record-dialog {
    width: 100%;
    max-height: 92vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .home-record-content {
    padding: 48px 22px 44px;
  }

  .home-record-content h2 {
    font-size: 34px;
  }

  .home-record-fields {
    grid-template-columns: 1fr;
  }

  .war-reflection-image {
    min-height: 68vh;
    padding: 64px 20px;
    background-position: 58% center;
  }

  .war-reflection-statement h2 {
    font-size: 50px;
  }

  .war-reflection-statement > p:last-child {
    font-size: 17px;
  }

  .war-reflection-body {
    grid-template-columns: 1fr;
    gap: 58px;
    padding: 72px 20px;
  }

  .war-reflection-intro h3 {
    font-size: 36px;
  }

  .war-reflection-lead {
    padding-left: 22px;
  }

  .war-reflection-lead p {
    font-size: 26px;
  }

  .war-witnesses {
    grid-template-columns: 1fr;
    padding: 0 20px 72px;
  }

  .war-witness {
    padding: 38px 4px 44px;
  }

  .war-witness + .war-witness {
    border-left: 0;
    border-top: 0;
  }

  .war-witness blockquote {
    min-height: 0;
  }

  .home-wiki-warning {
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
  }
}

@media (max-width: 380px) {
  .home-page .hero h1 {
    font-size: 46px;
  }

  .home-page .hero-copy {
    font-size: 16px;
  }
}

/* Themed editorial pages */
.themed-page {
  min-height: 100vh;
  background: #080b0d;
  color: #e8e9e7;
}

.themed-page .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  padding: 0 clamp(24px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 8, 9, 0.92);
  backdrop-filter: blur(16px);
}

.themed-page .brand {
  gap: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.themed-page #animated-logo-container {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: visible;
}

.themed-page .animated-logo {
  width: 28px;
  height: 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 2px;
  transform: rotate(45deg);
}

.themed-page .logo-square {
  border-radius: 1px;
  background: #d8dde0;
  animation: home-logo-shimmer 4s infinite ease-in-out alternate;
  transition: background-color 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.themed-page .logo-square.red-spark {
  background: rgba(190, 49, 43, 0.92);
  opacity: 0.9 !important;
  box-shadow: 0 0 10px rgba(190, 49, 43, 0.8), inset 0 0 5px rgba(255, 188, 170, 0.6) !important;
  animation: home-red-spark 0.9s ease-in-out;
}

.themed-page .site-nav {
  gap: 18px;
}

.themed-page .site-nav a {
  min-height: 42px;
  padding: 0;
  border-radius: 0;
  color: rgba(235, 239, 240, 0.58);
  font-size: 11px;
  text-transform: uppercase;
}

.themed-page .site-nav a:hover,
.themed-page .site-nav a[aria-current="page"] {
  color: #f2f1ed;
  background: transparent;
}

.themed-page .site-nav a[aria-current="page"] {
  border-bottom: 1px solid #c7a56c;
}

.themed-masthead {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: end;
  overflow: hidden;
  padding: 86px clamp(24px, 7vw, 112px) 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-image: url("./assets/battlefield-hero.png");
  background-position: 64% 48%;
  background-size: cover;
}

.masthead-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 6, 7, 0.97), rgba(4, 6, 7, 0.78) 48%, rgba(4, 6, 7, 0.32)),
    linear-gradient(0deg, rgba(4, 6, 7, 0.86), transparent 62%);
}

.masthead-inner {
  position: relative;
  z-index: 1;
  width: min(840px, 100%);
}

.themed-page .masthead-inner .eyebrow,
.themed-page .section-intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #c7a56c;
  font-size: 10px;
}

.themed-page .masthead-inner .eyebrow::before,
.themed-page .section-intro .eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: #c7a56c;
}

.masthead-inner h1 {
  margin: 0;
  color: #f0eee8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 68px;
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: 0;
}

.masthead-inner > p:not(.eyebrow) {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(228, 231, 229, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.6;
}

.about-body {
  padding: 92px clamp(24px, 7vw, 112px) 88px;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1.1fr) minmax(260px, 0.7fr);
  gap: 42px;
  align-items: start;
  padding-bottom: 72px;
}

.section-intro h2 {
  margin: 0;
  color: #efede7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
}

.section-intro > p:last-child {
  margin: 2px 0 0;
  color: rgba(215, 220, 220, 0.6);
  font-size: 14px;
  line-height: 1.8;
}

.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.about-pillars article {
  min-height: 330px;
  padding: 34px 32px 40px;
}

.about-pillars article + article {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.pillar-index,
.policy-index {
  display: block;
  margin-bottom: 56px;
  color: #c7a56c;
  font-size: 10px;
  font-weight: 800;
}

.about-pillars h3 {
  margin: 0 0 24px;
  color: #eeece6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
}

.about-pillars ul,
.policy-copy ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(214, 219, 219, 0.6);
  font-size: 13px;
  line-height: 1.8;
}

.page-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 42px;
}

.page-cta p {
  margin: 0;
  color: rgba(232, 234, 231, 0.66);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.page-cta a {
  display: inline-flex;
  gap: 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(199, 165, 108, 0.55);
  color: #d7c298;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.policy-date {
  display: block;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.policy-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: clamp(52px, 8vw, 130px);
  justify-content: center;
  padding: 90px clamp(24px, 7vw, 112px) 100px;
}

.policy-nav {
  position: sticky;
  top: 112px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.policy-nav p {
  margin: 0 0 12px;
  color: #c7a56c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.policy-nav a {
  color: rgba(220, 224, 223, 0.52);
  font-size: 12px;
}

.policy-nav a:hover {
  color: #f0eee8;
}

.policy-copy section {
  scroll-margin-top: 100px;
  padding: 0 0 66px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: transparent;
}

.policy-copy section + section {
  padding-top: 66px;
}

.policy-copy .policy-index {
  margin-bottom: 18px;
}

.policy-copy h2 {
  margin: 0 0 22px;
  color: #efede7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
}

.policy-copy p {
  margin: 0;
  color: rgba(216, 221, 220, 0.68);
  font-size: 14px;
  line-height: 1.85;
}

.policy-copy p + ul,
.policy-copy p + p {
  margin-top: 20px;
}

.policy-copy strong {
  color: rgba(240, 239, 234, 0.9);
}

.policy-copy a,
.themed-footer a {
  color: #d7c298;
}

.themed-footer {
  background: #060809;
  border-top-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
  .section-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .about-pillars article {
    min-height: 0;
  }

  .about-pillars article + article {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .policy-layout {
    grid-template-columns: minmax(0, 760px);
  }

  .policy-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 24px;
  }

  .policy-nav p {
    width: 100%;
  }
}

@media (max-width: 660px) {
  .themed-page .site-header {
    height: 66px;
    align-items: center;
    flex-direction: row;
    padding: 0 18px;
  }

  .themed-page .brand {
    gap: 7px;
    font-size: 15px;
  }

  .themed-page #animated-logo-container {
    width: 31px;
    height: 31px;
  }

  .themed-page .animated-logo {
    width: 21px;
    height: 21px;
    gap: 1.5px;
  }

  .themed-page .site-nav {
    gap: 12px;
  }

  .themed-page .site-nav a {
    display: none;
  }

  .themed-page .site-nav a[href="./battles.html"],
  .themed-page .site-nav a[aria-current="page"] {
    display: inline-flex;
  }

  .themed-masthead {
    min-height: 430px;
    padding: 70px 22px 52px;
    background-position: 70% center;
  }

  .masthead-inner h1 {
    font-size: 46px;
  }

  .masthead-inner > p:not(.eyebrow) {
    font-size: 17px;
  }

  .about-body,
  .policy-layout {
    padding: 64px 20px;
  }

  .section-intro {
    padding-bottom: 50px;
  }

  .section-intro h2 {
    font-size: 34px;
  }

  .about-pillars article {
    padding: 28px 22px 34px;
  }

  .pillar-index {
    margin-bottom: 34px;
  }

  .page-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .policy-copy h2 {
    font-size: 29px;
  }

  .themed-footer {
    padding: 24px 20px;
  }
}
