@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   colonysimgames.com — site styles
   Three switchable aesthetic directions via [data-theme]:
   command (default) · almanac · frontier
   ============================================================ */

/* ---------- THEME: command (dark warm, RimWorld command-console) ---------- */
:root,
:root[data-theme="command"] {
  --bg:        oklch(0.175 0.012 62);
  --bg-2:      oklch(0.215 0.014 60);
  --bg-3:      oklch(0.255 0.015 58);
  --fg:        oklch(0.925 0.010 82);
  --muted:     oklch(0.660 0.012 72);
  --faint:     oklch(0.520 0.012 68);
  --line:      oklch(0.320 0.012 62);
  --line-soft: oklch(0.265 0.012 60);
  --accent:    oklch(0.760 0.140 62);   /* amber */
  --accent-fg: oklch(0.205 0.030 62);
  --good:      oklch(0.720 0.110 150);  /* colonist green */
  --warn:      oklch(0.680 0.150 28);   /* raid red */
  --font-head: "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --head-weight: 700;
  --head-spacing: -0.02em;
  --head-transform: none;
  --radius: 4px;
  --shot-a: oklch(0.300 0.018 60);
  --shot-b: oklch(0.255 0.016 60);
}

/* ---------- THEME: almanac (light warm parchment survival guide) ---------- */
:root[data-theme="almanac"] {
  --bg:        oklch(0.958 0.012 86);
  --bg-2:      oklch(0.930 0.016 84);
  --bg-3:      oklch(0.900 0.018 82);
  --fg:        oklch(0.255 0.022 58);
  --muted:     oklch(0.470 0.022 60);
  --faint:     oklch(0.600 0.020 64);
  --line:      oklch(0.840 0.020 78);
  --line-soft: oklch(0.890 0.016 80);
  --accent:    oklch(0.560 0.135 38);   /* rust */
  --accent-fg: oklch(0.975 0.012 86);
  --good:      oklch(0.500 0.110 150);
  --warn:      oklch(0.560 0.160 28);
  --font-head: "Newsreader", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --head-weight: 600;
  --head-spacing: -0.01em;
  --head-transform: none;
  --radius: 3px;
  --shot-a: oklch(0.880 0.022 80);
  --shot-b: oklch(0.915 0.018 82);
}

/* ---------- THEME: frontier (dark cool steel sci-fi) ---------- */
:root[data-theme="frontier"] {
  --bg:        oklch(0.165 0.016 252);
  --bg-2:      oklch(0.205 0.018 250);
  --bg-3:      oklch(0.245 0.020 248);
  --fg:        oklch(0.935 0.008 240);
  --muted:     oklch(0.650 0.020 246);
  --faint:     oklch(0.520 0.020 248);
  --line:      oklch(0.310 0.022 250);
  --line-soft: oklch(0.255 0.020 250);
  --accent:    oklch(0.770 0.130 205);  /* cyan */
  --accent-fg: oklch(0.180 0.040 250);
  --good:      oklch(0.760 0.120 165);
  --warn:      oklch(0.700 0.150 18);
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --head-weight: 600;
  --head-spacing: -0.02em;
  --head-transform: none;
  --radius: 6px;
  --shot-a: oklch(0.290 0.024 250);
  --shot-b: oklch(0.240 0.022 250);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-spacing);
  line-height: 1.08;
  margin: 0;
}

/* ---------- layout primitives ---------- */
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head p { margin: 10px 0 0; color: var(--muted); max-width: 46ch; }
.text-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  padding-bottom: 2px;
  transition: gap .2s ease, border-color .2s ease;
}
.text-link:hover { gap: 12px; border-color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .12s ease, background-color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 88%, white); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); background: var(--bg-2); }

/* ---------- chips / tags ---------- */
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 10px;
  white-space: nowrap;
}
.score {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--good);
  border: 1px solid color-mix(in oklch, var(--good) 45%, transparent);
  background: color-mix(in oklch, var(--good) 12%, transparent);
  border-radius: var(--radius);
  padding: 3px 8px;
}

/* ---------- placeholder "screenshot" ---------- */
.shot {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      var(--shot-a) 0 10px,
      var(--shot-b) 10px 20px);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shot.has-media {
  background: var(--bg-2);
}
.shot.has-media::after {
  display: none;
}
.shot-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shot.has-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 56%, color-mix(in oklch, var(--bg) 38%, transparent));
}
.shot::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 3px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 5px;
  background: var(--accent);
  position: relative;
  flex: none;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--accent-fg);
}
.brand-mark::before { left: 6px; right: 6px; top: 11px; height: 2px; }
.brand-mark::after  { top: 6px; bottom: 6px; left: 11px; width: 2px; }
.brand-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.brand-name span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: 14px;
  color: var(--muted);
  transition: color .2s ease;
}
.nav a:hover { color: var(--fg); }
.header-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 880px) {
  .nav { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-block: clamp(48px, 7vw, 92px); border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 52px 52px;
  background-position: center top;
  opacity: .5;
  -webkit-mask-image: radial-gradient(120% 90% at 30% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 30% 0%, #000 30%, transparent 78%);
}
body.no-grid .hero::before { display: none; }
.hero > .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  margin: 18px 0 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero .eyebrow.live::before { width: 0; }
.hero .eyebrow.live { gap: 9px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--good) 70%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklch, var(--good) 60%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero-sub {
  margin: 22px 0 0;
  font-size: 19px;
  color: var(--muted);
  max-width: 52ch;
}
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }

.hero-panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-2);
  overflow: hidden;
}
.hero-panel .shot { aspect-ratio: 16 / 10; }
.hero-panel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.hero-panel-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.hero-panel-bar .dot:nth-child(1) { background: var(--warn); }
.hero-panel-bar .dot:nth-child(2) { background: var(--accent); }
.hero-panel-bar .dot:nth-child(3) { background: var(--good); }
.hero-panel-bar .grow { flex: 1; }
.hero-panel-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.hero-stat { padding: 16px 18px; }
.hero-stat + .hero-stat { border-left: 1px solid var(--line); }
.hero-stat .n {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
}
.hero-stat .l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 3px;
}

/* HUD corner brackets (single element, 8 hairlines) */
.hud-corners {
  position: absolute;
  z-index: 2;
  inset: 9px;
  pointer-events: none;
  --c: var(--accent);
  --s: 15px;
  --t: 1.5px;
  background:
    linear-gradient(var(--c),var(--c)) top left / var(--s) var(--t),
    linear-gradient(var(--c),var(--c)) top left / var(--t) var(--s),
    linear-gradient(var(--c),var(--c)) top right / var(--s) var(--t),
    linear-gradient(var(--c),var(--c)) top right / var(--t) var(--s),
    linear-gradient(var(--c),var(--c)) bottom left / var(--s) var(--t),
    linear-gradient(var(--c),var(--c)) bottom left / var(--t) var(--s),
    linear-gradient(var(--c),var(--c)) bottom right / var(--s) var(--t),
    linear-gradient(var(--c),var(--c)) bottom right / var(--t) var(--s);
  background-repeat: no-repeat;
}

/* hero command map */
.hero-panel .shot.map {
  aspect-ratio: 16 / 9;
  min-height: 300px;
}
.hero-panel .shot.map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--bg) 12%, transparent), color-mix(in oklch, var(--bg) 28%, transparent) 72%, color-mix(in oklch, var(--bg) 66%, transparent)),
    radial-gradient(circle at 50% 48%, transparent 0 24%, color-mix(in oklch, var(--accent) 16%, transparent) 25%, transparent 26% 100%),
    linear-gradient(color-mix(in oklch, var(--fg) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--fg) 8%, transparent) 1px, transparent 1px);
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: auto, auto, 26px 26px, 26px 26px;
}
.hero-panel .shot.map .shot-img {
  object-position: center 48%;
  filter: saturate(1.08) contrast(1.03);
}
.map-coord {
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: color-mix(in oklch, var(--fg) 76%, transparent);
  z-index: 3;
  text-shadow: 0 1px 12px color-mix(in oklch, var(--bg) 80%, transparent);
}
.hero-map-card {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: grid;
  gap: 3px;
  width: min(260px, calc(100% - 28px));
  padding: 12px 13px;
  border: 1px solid color-mix(in oklch, var(--accent) 34%, var(--line));
  border-radius: 6px;
  background: color-mix(in oklch, var(--bg) 76%, transparent);
  box-shadow: 0 18px 44px color-mix(in oklch, var(--bg) 46%, transparent);
  backdrop-filter: blur(8px);
}
.hero-map-card span,
.hero-map-card small {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.hero-map-card b {
  font-size: 18px;
  line-height: 1.15;
  color: var(--fg);
}

/* vitals readout */
.vitals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 24px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.vital { display: flex; align-items: center; gap: 10px; }
.vk {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--faint);
  width: 40px;
  flex: none;
}
.vbar { flex: 1; height: 5px; border-radius: 100px; background: var(--bg-3); overflow: hidden; }
.vbar i { display: block; height: 100%; border-radius: 100px; }
.vbar.good i { background: var(--good); }
.vbar.acc  i { background: var(--accent); }
.vbar.warn i { background: var(--warn); }
.vbar.cold i { background: oklch(0.72 0.09 232); }
.vv {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  width: 30px;
  text-align: right;
  flex: none;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { order: -1; }
}
@media (max-width: 520px) {
  .hero-panel .shot.map {
    min-height: 240px;
  }
  .hero-map-card {
    right: 10px;
    bottom: 10px;
    width: min(230px, calc(100% - 20px));
    padding: 10px 11px;
  }
  .hero-map-card b {
    font-size: 15px;
  }
  .map-coord {
    left: 10px;
    top: 10px;
    font-size: 9px;
  }
}

/* ============================================================
   TICKER STRIP
   ============================================================ */
.ticker { border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.ticker .wrap { display: flex; flex-wrap: wrap; }
.tick {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 28px;
  border-left: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.tick:first-child { padding-left: 0; border-left: 0; }
.tick b { color: var(--accent); font-weight: 600; }
.tick svg, .tick .glyph { color: var(--accent); }
@media (max-width: 720px) {
  .tick { padding: 12px 16px; }
  .tick:first-child { padding-left: 0; }
}

/* ============================================================
   FEATURED GRID
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 940px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.game-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .16s ease, border-color .2s ease;
}
.game-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: color-mix(in oklch, var(--accent) 55%, var(--line)); }
.game-card:hover::after { transform: scaleX(1); }
.game-card .shot { aspect-ratio: 16 / 9; }
.game-card .shot .hud-corners { opacity: 0; transition: opacity .25s ease; inset: 7px; }
.game-card:hover .shot .hud-corners { opacity: .85; }
.game-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.game-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}
.game-card-meta .cid { color: var(--accent); }
.game-card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.game-card h3 {
  font-size: 21px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.game-card p {
  margin: 9px 0 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}
.game-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.game-card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- spotlight (featured #1) ---- */
.spotlight {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  margin-bottom: 22px;
}
.spotlight .shot { aspect-ratio: auto; min-height: 100%; }
.spotlight-pane { position: relative; }
.spotlight-pane .hud-corners { inset: 12px; opacity: .7; }
.spotlight-flag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-fg);
  background: var(--accent);
  padding: 5px 11px;
  border-radius: 100px;
  font-weight: 600;
}
.spotlight-body { padding: clamp(26px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.spotlight-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 9px;
}
.spotlight-meta .cid { color: var(--accent); }
.spotlight-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.spotlight-body h3 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.spotlight-body > p { margin: 14px 0 0; color: var(--muted); font-size: 16px; max-width: 46ch; }
.spotlight-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.spotlight-foot { display: flex; align-items: center; gap: 22px; margin-top: 26px; }
@media (max-width: 760px) {
  .spotlight { grid-template-columns: 1fr; }
  .spotlight .shot { min-height: 240px; }
}

/* ============================================================
   TOP / RANKING
   ============================================================ */
.rank-section { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.rank-list { display: flex; flex-direction: column; }
.rank-head {
  display: grid;
  grid-template-columns: 52px 88px 1fr 180px;
  gap: 20px;
  padding: 0 4px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.rank-head span:nth-child(1) { text-align: center; }
.rank-head span:nth-child(4) { text-align: right; }
@media (max-width: 760px) { .rank-head { display: none; } }
.rank-row {
  display: grid;
  grid-template-columns: 52px 88px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 4px;
  border-top: 1px solid var(--line-soft);
  transition: background-color .18s ease;
}
.rank-row:hover { background: color-mix(in oklch, var(--accent) 6%, transparent); }
.rank-row:last-child { border-bottom: 1px solid var(--line-soft); }
.rank-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 600;
  color: var(--faint);
  text-align: center;
}
.rank-row:nth-child(1) .rank-num { color: var(--accent); }
.rank-row:nth-child(2) .rank-num { color: color-mix(in oklch, var(--accent) 70%, var(--fg)); }
.rank-row:nth-child(3) .rank-num { color: color-mix(in oklch, var(--accent) 45%, var(--fg)); }
.rank-thumb { aspect-ratio: 16 / 10; border-radius: 3px; }
.rank-info h3 { font-size: 19px; }
.rank-info p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.rank-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; width: 180px; }
.rank-meter .val { font-family: var(--font-mono); font-size: 13px; color: var(--fg); }
.rank-meter .val b { color: var(--accent); font-weight: 600; }
.rank-bar { width: 100%; height: 5px; border-radius: 100px; background: var(--bg-3); overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--accent); border-radius: 100px; }
@media (max-width: 760px) {
  .rank-row { grid-template-columns: 38px 1fr; gap: 14px; }
  .rank-thumb, .rank-meter { display: none; }
}

/* ============================================================
   WHAT IS COLONY SIM
   ============================================================ */
.genre-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.genre-lead p {
  font-size: 19px;
  color: var(--fg);
  margin: 18px 0 0;
}
.genre-lead p.dim { color: var(--muted); font-size: 16px; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--bg); padding: 24px 22px; }
.pillar .pi {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.pillar h3 { font-size: 18px; margin: 12px 0 8px; }
.pillar p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
@media (max-width: 820px) {
  .genre-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ============================================================
   NEWS
   ============================================================ */
.news-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.news-item {
  background: var(--bg);
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  transition: background-color .18s ease;
}
.news-item:hover { background: var(--bg-2); }
.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.04em;
}
.news-meta .pill {
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  border-radius: 100px;
  padding: 2px 9px;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}
.news-item h3 { font-size: 22px; margin: 14px 0 0; }
.news-item p { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
.news-item .more { margin-top: auto; padding-top: 18px; }
@media (max-width: 700px) { .news-list { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-block: 56px 40px;
}
.footer-brand p { color: var(--muted); font-size: 14.5px; margin: 16px 0 0; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14.5px; color: var(--muted); transition: color .2s ease; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 22px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: var(--faint); transition: color .2s ease; }
.footer-legal a:hover { color: var(--accent); }

/* reveal on load */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise .6s ease forwards; }
  .reveal[style*="--d"] { animation-delay: var(--d); }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ============================================================
   SHARED ADDITIONS (multi-page)
   ============================================================ */
.nav a.is-active { color: var(--fg); }
.nav a.is-active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 5px;
  background: var(--accent);
}
.tag-ea { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 45%, transparent); }

/* card foot now holds a status chip */
.game-card-foot .text-link { border-bottom-color: color-mix(in oklch, var(--accent) 40%, transparent); }

/* spotlight dev line */
.dev-line { font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }

/* ranking rows as links + year */
a.rank-row { color: inherit; }
.rank-info h3 { display: flex; align-items: baseline; gap: 11px; }
.rank-year { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--faint); letter-spacing: 0.04em; }

/* ---------- genre loop ---------- */
.loop-wrap { margin-top: clamp(40px, 5vw, 64px); }
.loop-head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.loop-head h3 { font-size: 22px; }
.loop-head span {
  font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: 0.04em;
}
.loop {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.loop-step { position: relative; padding: 22px 20px 24px; background: var(--bg); }
.loop-step + .loop-step { border-left: 1px solid var(--line-soft); }
.loop-step::after {
  content: "▸";
  position: absolute;
  right: -8px; top: 26px;
  z-index: 2;
  color: var(--accent);
  background: var(--bg);
  font-size: 13px;
  line-height: 1;
}
.loop-step:last-child::after { content: none; }
.loop-step .ln {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em;
}
.loop-step h4 { font-size: 18px; margin: 12px 0 7px; }
.loop-step:last-child h4 { color: var(--accent); }
.loop-step p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.loop-note {
  margin: 16px 2px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.03em;
}
.loop-note b { color: var(--accent); font-weight: 500; }
@media (max-width: 820px) {
  .loop { grid-template-columns: 1fr 1fr; }
  .loop-step:nth-child(odd)::after { content: none; }
}
@media (max-width: 460px) {
  .loop { grid-template-columns: 1fr; }
  .loop-step::after { content: none; }
  .loop-step + .loop-step { border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* ---------- news redesign ---------- */
.news-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; }
.news-featured {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease;
}
.news-featured:hover { border-color: color-mix(in oklch, var(--accent) 50%, var(--line)); }
.news-featured .shot { aspect-ratio: 16 / 7; }
.news-featured .nf-body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.news-featured h3 { font-size: 26px; margin: 14px 0 0; }
.news-featured p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.news-featured .more { margin-top: auto; padding-top: 20px; }

.news-aside { display: flex; flex-direction: column; gap: 14px; }
.news-mini-list {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.news-mini {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  transition: background-color .18s ease;
}
.news-mini + .news-mini { border-top: 1px solid var(--line-soft); }
.news-mini:hover { background: var(--bg-3); }
.news-mini .news-mini-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
}
.news-mini .nm-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.04em;
}
.news-mini h4 { font-size: 16px; margin: 8px 0 0; line-height: 1.3; }

.patch-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 18px 18px 8px;
}
.patch-panel .ph {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 6px;
}
.patch-panel .ph .status-dot { width: 6px; height: 6px; }
.patch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.patch-row:first-of-type { border-top: 0; }
.patch-row .pg { font-size: 13.5px; color: var(--fg); }
.patch-row .pv { font-family: var(--font-mono); font-size: 11px; color: var(--accent); align-self: center; }
.patch-row .pn { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; }
@media (max-width: 760px) { .news-wrap { grid-template-columns: 1fr; } }

/* ============================================================
   MOBILE NAV (global)
   ============================================================ */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--fg);
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  content: "";
  display: block;
  width: 17px; height: 1.5px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before { position: absolute; top: -5px; left: 0; }
.nav-toggle .bars::after  { position: absolute; top: 5px; left: 0; }
body.menu-open .nav-toggle .bars { background: transparent; }
body.menu-open .nav-toggle .bars::before { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-toggle .bars::after  { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 63px 0 0;
  z-index: 45;
  background: color-mix(in oklch, var(--bg) 97%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  padding: 18px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: var(--head-weight);
  letter-spacing: var(--head-spacing);
  color: var(--fg);
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-menu a::after { content: "→"; color: var(--accent); font-size: 18px; opacity: .7; }
.mobile-menu a:active { color: var(--accent); }
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
}

/* ============================================================
   SCROLL REVEAL (micro-animation)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  [data-rise] { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1); transition-delay: var(--rd, 0s); }
  [data-rise].shown { opacity: 1; transform: none; }
}
