@font-face {
  font-family: Exo;
  src: url('../ui/fonts/field-kit/exo2-ui-400-600.woff2') format('woff2');
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #101b20;
  --surface: #1b2a2f;
  --line: #445c60;
  --text: #f3efdf;
  --muted: #b4c7c8;
  --mint: #8ce2b5;
  --gold: #efbe60;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Exo, system-ui, sans-serif;
  line-height: 1.6;
}
main {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
}
a {
  color: var(--mint);
  text-underline-offset: 4px;
}
a:hover {
  color: var(--text);
}
a:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.14em;
}
select {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px;
  font: inherit;
  margin-left: 8px;
}
.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 65px 0 44px;
}
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 13px;
}
h1 {
  font-size: clamp(38px, 4.8vw, 65px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 18px 0 24px;
}
h2 {
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
h3 {
  font-size: 25px;
  line-height: 1.2;
  margin: 8px 0 14px;
}
p {
  margin: 10px 0 18px;
}
.lede {
  color: var(--muted);
  font-size: 19px;
  max-width: 750px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.actions a {
  text-decoration: none;
  border: 1px solid var(--mint);
  padding: 10px 20px;
  font-weight: 700;
}
.actions a:first-child {
  background: var(--mint);
  color: var(--bg);
}
.subtle,
figcaption {
  color: var(--muted);
  font-size: 14px;
}
.hero-board {
  margin: 0;
}
.hero-board svg {
  display: block;
  width: 100%;
}
figcaption {
  padding: 10px 0;
  text-align: center;
}
.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 24px 0 48px;
  border-bottom: 1px solid var(--line);
}
.rules article {
  border-top: 3px solid var(--gold);
  padding-top: 15px;
}
.rules h3 {
  font-size: 18px;
}
.rules p {
  color: var(--muted);
  margin-bottom: 0;
}
.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 15px;
  justify-content: space-between;
  padding-top: 24px;
}
.section-heading p {
  color: var(--gold);
}
.chapters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.chapter {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 27px;
}
.chapter-number {
  color: var(--gold);
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 0.12em;
}
.chapter > p {
  color: var(--muted);
  min-height: 76px;
}
summary {
  cursor: pointer;
  color: var(--mint);
  padding: 8px 0;
}
ol {
  padding-left: 24px;
}
li {
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
li strong {
  display: block;
}
li p {
  color: var(--muted);
  margin: 3px 0;
  font-size: 14px;
}
.sim-section {
  margin: 45px 0;
  border-top: 1px solid var(--line);
}
.sim-section .chapter > p {
  min-height: 0;
}
footer {
  padding: 24px 0 45px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
@media (max-width: 800px) {
  .hero {
    gap: 30px;
    grid-template-columns: 1fr 0.7fr;
  }
  .hero-board {
    align-self: start;
    padding-top: 45px;
  }
  .rules {
    gap: 18px;
  }
}
@media (max-width: 600px) {
  main {
    width: calc(100% - 32px);
  }
  .topbar {
    align-items: flex-start;
  }
  .topbar label {
    font-size: 12px;
  }
  select {
    margin: 0;
    padding: 6px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }
  .hero-board {
    width: min(340px, 100%);
    padding: 0;
    margin: auto;
  }
  .rules,
  .chapters {
    grid-template-columns: 1fr;
  }
  .chapter > p {
    min-height: 0;
  }
  .section-heading {
    gap: 0;
  }
  .actions a {
    flex: 1;
    text-align: center;
  }
}

/* Follow the same accepted interface family as the game. */
:root {
  --bg: var(--fk-bg, #071527);
  --surface: var(--fk-panel, #10243e);
  --line: var(--fk-line, #647786);
  --text: var(--fk-text, #f6f3e8);
  --muted: var(--fk-muted, #a8b8cc);
  --mint: var(--fk-accent, #67aaff);
  --gold: var(--fk-amber, #ffd64a);
}
body {
  font-family: var(--fk-font-ui, Exo, system-ui, sans-serif);
}
main {
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
button,
select,
summary,
.chapter a {
  min-height: 44px;
}
button {
  font: inherit;
}
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.sim-launch {
  display: inline-block;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--mint);
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
}
.sim-launch:hover {
  background: var(--bg);
}
.chapter a {
  display: inline-flex;
  align-items: center;
}
.campaign-cards {
  margin-bottom: 28px;
}
.campaign-cards .actions {
  gap: 6px;
}
.campaign-cards .actions a {
  padding: 9px 12px;
}
.campaign-cards .chapter > .chapter-number {
  min-height: 0;
  color: var(--gold);
  font-size: 13px;
  margin: 0 0 8px;
}
@media (max-width: 600px) {
  .chapter {
    padding: 20px;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .topbar label {
    display: flex;
    align-items: center;
    gap: 8px;
  }
}
