:root {
  color-scheme: dark;
  --bg: #10131b;
  --bg-2: #171c27;
  --panel: #202738;
  --panel-2: #263044;
  --text: #f5efe5;
  --muted: #b7c0c8;
  --line: rgba(255, 255, 255, 0.14);
  --gold: #f1b84b;
  --ember: #e56a3c;
  --teal: #4db7ad;
  --green: #83b66f;
  --sky: #78a9de;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--gold);
  color: #14120e;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  background: rgba(16, 19, 27, 0.64);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(16, 19, 27, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: #2f3f32;
  color: var(--gold);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  color: rgba(245, 239, 229, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #10131b;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin: 0.24rem auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 19, 27, 0.92) 0%, rgba(16, 19, 27, 0.64) 44%, rgba(16, 19, 27, 0.22) 100%),
    linear-gradient(0deg, rgba(16, 19, 27, 0.94) 0%, rgba(16, 19, 27, 0.04) 45%);
}

.hero-content {
  position: relative;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 9rem 0 7rem;
}

.eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 1rem;
  font-size: clamp(3.2rem, 8vw, 7.6rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.25;
}

.hero-lede {
  max-width: 690px;
  color: rgba(245, 239, 229, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.72rem 1rem;
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--gold);
  color: #14120e;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.signal-strip {
  width: min(var(--max), calc(100% - 2rem));
  margin: -3rem auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(32, 39, 56, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.signal-strip div {
  padding: 1.1rem;
  border-right: 1px solid var(--line);
}

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

.signal-strip strong,
.signal-strip span {
  display: block;
}

.signal-strip strong {
  font-size: 1.45rem;
}

.signal-strip span {
  color: var(--muted);
  font-size: 0.88rem;
}

.section,
.feature-band,
.split-hero {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.intro p,
.section-heading p,
.feature-band p,
.split-hero p {
  color: var(--muted);
  font-size: 1.02rem;
}

.info-panel,
.role-grid article,
.system-grid article,
.goal-columns article,
.steps article,
.command-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info-panel {
  padding: 1.2rem;
}

.spec-list {
  margin: 0;
}

.spec-list div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.spec-list div:last-child {
  border-bottom: 0;
}

.spec-list dt {
  color: var(--muted);
}

.spec-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.steps,
.role-grid,
.system-grid,
.goal-columns {
  display: grid;
  gap: 1rem;
}

.steps {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2rem;
}

.steps article,
.role-grid article,
.system-grid article,
.goal-columns article,
.command-grid article {
  padding: 1.15rem;
}

.step-number {
  display: inline-block;
  color: var(--teal);
  font-weight: 900;
  margin-bottom: 0.8rem;
}

.feature-band,
.split-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.feature-band img,
.split-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.split-hero.reverse img {
  order: 2;
}

.check-list,
.agreement-list,
.goal-columns ul {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.agreement-list li,
.goal-columns li {
  padding: 0.72rem 0 0.72rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.check-list li::before,
.agreement-list li::before,
.goal-columns li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--green);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 2rem;
}

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

.role-grid article:nth-child(2n),
.system-grid article:nth-child(2n) {
  background: var(--panel-2);
}

.role-grid p,
.system-grid p,
.goal-columns p,
.steps p {
  color: var(--muted);
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline article {
  display: grid;
  grid-template-columns: 8rem minmax(12rem, 0.5fr) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline span {
  color: var(--teal);
  font-weight: 850;
}

.timeline h3,
.timeline p {
  margin: 0;
}

.timeline p {
  color: var(--muted);
}

.text-link,
.system-grid a,
.mod-table a,
.site-footer a {
  color: var(--gold);
  font-weight: 800;
  text-decoration-color: rgba(241, 184, 75, 0.45);
  text-underline-offset: 0.2em;
}

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

.search-box {
  display: grid;
  gap: 0.45rem;
  max-width: 520px;
}

.search-box span {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111722;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.mod-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.mod-tabs,
.pill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mod-tabs button,
.pill-filters button {
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 239, 229, 0.86);
  padding: 0.55rem 0.82rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mod-tabs button:hover,
.pill-filters button:hover,
.mod-tabs button.is-active,
.pill-filters button.is-active {
  background: var(--gold);
  border-color: transparent;
  color: #14120e;
}

.mod-tabs span,
.pill-filters span {
  display: inline-grid;
  place-items: center;
  min-width: 1.45rem;
  margin-left: 0.3rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.78rem;
}

.pill-filters {
  margin: 0 0 0.85rem;
}

.mod-results {
  margin: 0 0 1rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.mod-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.mod-table th,
.mod-table td {
  padding: 0.78rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: top;
}

.mod-table th {
  position: sticky;
  top: 0;
  background: #2b3448;
  color: var(--text);
  z-index: 1;
}

.mod-table td:nth-child(2) {
  color: var(--muted);
  white-space: nowrap;
}

.mod-table tr.is-core {
  background: rgba(241, 184, 75, 0.055);
}

.mod-table tr.is-hidden {
  display: none;
}

.mod-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 239, 229, 0.9);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.pill-core {
  border-color: rgba(241, 184, 75, 0.52);
  background: rgba(241, 184, 75, 0.18);
  color: #ffdc8b;
}

.pill-colony {
  border-color: rgba(120, 169, 222, 0.42);
  background: rgba(120, 169, 222, 0.14);
}

.pill-dragon,
.pill-combat {
  border-color: rgba(229, 106, 60, 0.46);
  background: rgba(229, 106, 60, 0.14);
}

.pill-exploration,
.pill-travel {
  border-color: rgba(77, 183, 173, 0.44);
  background: rgba(77, 183, 173, 0.14);
}

.pill-food,
.pill-storage {
  border-color: rgba(131, 182, 111, 0.46);
  background: rgba(131, 182, 111, 0.14);
}

.pill-performance {
  border-color: rgba(180, 150, 230, 0.44);
  background: rgba(180, 150, 230, 0.14);
}

.pill-map-ui {
  border-color: rgba(120, 169, 222, 0.42);
  background: rgba(120, 169, 222, 0.14);
}

.pill-building {
  border-color: rgba(241, 184, 75, 0.34);
  background: rgba(241, 184, 75, 0.11);
}

.pill-utility {
  border-color: rgba(245, 239, 229, 0.2);
  background: rgba(245, 239, 229, 0.08);
}

.pill-dependency {
  color: rgba(245, 239, 229, 0.72);
}

.agreement-list {
  columns: 2;
  column-gap: 2rem;
}

.agreement-list li {
  break-inside: avoid;
}

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 980px) {
  .site-nav {
    position: fixed;
    top: 4.2rem;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(16, 19, 27, 0.98);
  }

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

  .site-nav a {
    border-radius: var(--radius);
  }

  .nav-toggle {
    display: block;
  }

  .signal-strip,
  .steps,
  .role-grid,
  .system-grid,
  .goal-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-grid,
  .mod-controls,
  .feature-band,
  .split-hero {
    grid-template-columns: 1fr;
  }

  .split-hero.reverse img {
    order: 0;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 84svh;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(16, 19, 27, 0.96) 0%, rgba(16, 19, 27, 0.38) 100%),
      linear-gradient(90deg, rgba(16, 19, 27, 0.82) 0%, rgba(16, 19, 27, 0.32) 100%);
  }

  .hero-content {
    padding-bottom: 5rem;
  }

  .signal-strip,
  .steps,
  .role-grid,
  .system-grid,
  .goal-columns {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .agreement-list {
    columns: 1;
  }

  .site-footer {
    flex-direction: column;
  }
}
