@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Palette and type match the loading screen and the in-game panels */
:root {
  --ink: #12100E;
  --ink-raised: #191613;
  --ink-deep: #0E0C0B;
  --ember: #A35926;
  --ember-hover: #B4652E;
  --ember-text: #C7783F;           /* ember lifted for small text on ink (AA contrast) */
  --ember-soft: rgba(163, 89, 38, 0.14);
  --bone: #EDE7DF;
  --on-ember: #FBF7F2;
  --body: rgba(237, 231, 223, 0.78);
  --muted: rgba(237, 231, 223, 0.6);
  --ash: rgba(237, 231, 223, 0.46);
  --faint: rgba(237, 231, 223, 0.28);
  --rail: rgba(237, 231, 223, 0.09);
  --rail-strong: rgba(237, 231, 223, 0.16);
  --live: #6BBF6A;

  /* Team colours, as core/teams.lua */
  --team-law: #3A66C4;
  --team-emergency: #2BB5AE;
  --team-civilian: #8E6FC4;
  --team-criminal: #E05A52;
  --team-military: #6E9E45;
  --team-altruist: #A88B5E;

  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 68px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

/* Column layout so the footer sits at the bottom on short pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--bone);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-synthesis: none;      /* one weight only, so never fake a bold */
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
strong, b { font-weight: 500; color: var(--bone); }
i { font-style: normal; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--rail-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.8em;
  line-height: 1.5;
  text-align: center;
  color: var(--bone);
  vertical-align: 0.08em;
}

:focus-visible {
  outline: 2px solid var(--ember-text);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ember);
  color: var(--on-ember);
  border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 200ms var(--ease);
}

/* Green "live" dot */
.live {
  position: relative;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--live);
}
.live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0%   { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }

.btn-solid { background: var(--ember); color: var(--on-ember); }
.btn-solid:hover { background: var(--ember-hover); }

.btn-outline { border-color: var(--ember); color: var(--bone); }
.btn-outline:hover { background: var(--ember-soft); border-color: var(--ember-hover); }

.btn:hover .icon, .text-link:hover .icon, .board-more:hover .icon { transform: translateX(3px); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(18, 16, 14, 0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--rail);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  height: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--ember);
  stroke-width: 7;
}
.brand-word {
  font-size: 15px;
  letter-spacing: 0.42em;
  margin-right: -0.42em;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 14px;
  color: var(--muted);
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color 160ms ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--bone); }
/* Current page: an ember rule along the bottom of the header */
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc((var(--nav-h) - 100%) / -2);
  height: 2px;
  background: var(--ember);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rail-strong);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--bone);
  transition: transform 200ms var(--ease), top 200ms var(--ease);
}
.menu-toggle span:first-child { top: 14px; }
.menu-toggle span:last-child { top: 21px; }
.menu-open .menu-toggle span:first-child { top: 17.5px; transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { top: 17.5px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  overflow: hidden;
  background:
    radial-gradient(ellipse 60vmin 50vmin at 50% 42%, rgba(163, 89, 38, 0.10), transparent 70%),
    var(--ink);
}

/* Oversized ghost star, cropped off the bottom right (as the loading screen) */
.ghost {
  position: absolute;
  width: 120vmin;
  height: 120vmin;
  right: -50vmin;
  bottom: -50vmin;
  color: var(--ember);
  stroke-width: 6;
  opacity: 0.05;
  pointer-events: none;
  animation: drift 240s linear infinite;
}
@keyframes drift { to { transform: rotate(360deg); } }

.hero-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px var(--gutter) 48px;
  text-align: center;
}

.hero-mark {
  width: clamp(88px, 13vh, 150px);
  height: clamp(88px, 13vh, 150px);
  color: var(--ember);
}
.hero-mark .chev {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  opacity: 0;
  animation: type-in 420ms cubic-bezier(.6, 0, .2, 1) forwards;
}
.hero-mark .chev:nth-child(1) { animation-delay: 200ms; }
.hero-mark .chev:nth-child(2) { animation-delay: 340ms; }
.hero-mark .chev:nth-child(3) { animation-delay: 480ms; }
.hero-mark .chev:nth-child(4) { animation-delay: 620ms; }
.hero-mark .chev:nth-child(5) { animation-delay: 760ms; }
@keyframes type-in {
  from { stroke-dashoffset: 1; opacity: 1; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}

.hero-word {
  margin-top: clamp(22px, 3.4vh, 40px);
  font-size: clamp(26px, 4.2vh, 52px);
  font-weight: 500;
  letter-spacing: 0.42em;
  margin-right: -0.42em;
  line-height: 1;
  opacity: 0;
  animation: settle 700ms ease-out 1150ms forwards;
}
@keyframes settle {
  from { opacity: 0; letter-spacing: 0.6em; margin-right: -0.6em; }
  to   { opacity: 1; letter-spacing: 0.42em; margin-right: -0.42em; }
}

.hero-after {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(28px, 4.6vh, 52px);
  opacity: 0;
  animation: rise 700ms var(--ease) 1500ms forwards;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.hero-tagline {
  max-width: 34em;
  font-size: clamp(16px, 1.9vh, 19px);
  line-height: 1.55;
  color: var(--body);
}
.hl { color: var(--bone); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* Live strip along the bottom of the hero */
.status {
  position: relative;
  border-top: 1px solid var(--rail);
  background: rgba(14, 12, 11, 0.55);
  opacity: 0;
  animation: rise 700ms var(--ease) 1750ms forwards;
}
.status-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.status-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-left: 1px solid var(--rail);
  font-family: var(--mono);
  font-size: 13px;
}
.status-item:first-child { border-left: 0; padding-left: 0; }
.status-item:last-child { padding-right: 0; }
.status-online { justify-content: flex-start; align-items: center; }
.status-online .status-value { margin-left: auto; }
.status-label { color: var(--muted); }
.status-value { color: var(--bone); font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 8vw, 112px) 0; }
main { flex: 1; }

/* A page with one short section: centre it between the header and footer */
.page-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember-text);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-lede {
  max-width: 36em;
  margin-top: 16px;
  font-size: 17px;
  color: var(--body);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 14px;
  color: var(--ember-text);
}
.text-link:hover { color: var(--bone); }

/* ---------- The game ---------- */

.game {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border: 1px solid var(--rail);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 70% 90% at 0% 0%, rgba(163, 89, 38, 0.10), transparent 70%),
    var(--ink-raised);
  overflow: hidden;
}

.game-copy { padding: clamp(28px, 4.4vw, 64px); }

.game-title {
  font-size: clamp(48px, 6.2vw, 88px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.game-meta {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.game-meta i, .side-jobs i { color: var(--faint); padding: 0 0.35em; }

.lede {
  max-width: 34em;
  margin-top: 24px;
  font-size: 17px;
  color: var(--body);
}

.join {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rail);
}
.join-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember-text);
}
.steps {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 20px 0 28px;
  color: var(--body);
}
.steps li { display: flex; gap: 16px; align-items: baseline; }
.step-n {
  flex: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ash);
}
.steps a {
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-underline-offset: 3px;
}

.sides {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4.4vw, 64px);
  border-left: 1px solid var(--rail);
  background: rgba(14, 12, 11, 0.35);
}
.sides-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember-text);
}
.side-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-top: 20px;
}
.side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 0 18px 22px;
  border-top: 1px solid var(--rail);
}
.side:last-child { border-bottom: 1px solid var(--rail); }
.side::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--team);
}
.side-name { font-size: 17px; line-height: 1.3; }
.side-jobs { font-size: 14px; line-height: 1.55; color: var(--muted); }

.side-versus::before {
  background: linear-gradient(var(--team-military) 50%, var(--team-altruist) 50%);
}
.versus {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ash);
}
.versus b { font-weight: 400; color: var(--team); }

/* ---------- Casual RPG Stats ---------- */

.stats {
  position: relative;
  padding: clamp(64px, 8vw, 112px) 0;
  background: radial-gradient(ellipse 50% 70% at 100% 0%, rgba(163, 89, 38, 0.12), transparent 70%);
}

.stats-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.eyebrow-live { color: var(--bone); }

.totals {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--rail-strong);
}
.total {
  padding: 24px 24px 0 0;
}
.total + .total { padding-left: 24px; border-left: 1px solid var(--rail); }
.total dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.total dd {
  margin-top: 10px;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.boards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 64px;
}
.board {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rail);
  border-radius: var(--radius);
  background: var(--ink-raised);
}
.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--rail);
}
.board-head h3 { font-size: 16px; font-weight: 500; }
.board-period {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ash);
}
.board-list { list-style: none; flex: 1; padding: 6px 0; }
.board-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding: 10px 22px;
}
.board-list li:first-child {
  background: linear-gradient(90deg, var(--ember-soft), transparent 80%);
}
.rank {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ash);
}
.board-list li:first-child .rank { color: var(--ember-text); }
.who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.val {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--body);
  font-variant-numeric: tabular-nums;
}
.board-more {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--rail);
  font-size: 13px;
  color: var(--ember-text);
  transition: color 160ms ease;
}
.board-more:hover { color: var(--bone); }

.records {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 24px 32px;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 13px;
}
.record { display: flex; align-items: baseline; gap: 12px; }
.record dt { color: var(--muted); }
.record dd { color: var(--bone); font-variant-numeric: tabular-nums; }
.rare-note {
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--ember);
  border-radius: 3px;
  font-size: 11px;
  color: var(--ember-text);
}

/* ---------- News ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 32px 20px;
}
.post-featured { grid-column: span 2; grid-row: span 2; }

.post-link { display: flex; flex-direction: column; height: 100%; }

/* Art: a close crop of the star in the post's colour. An <img> placed inside covers it. */
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--rail);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 90% at 70% 40%, color-mix(in srgb, var(--tint) 20%, transparent), transparent 70%),
    var(--ink-raised);
}
.post-featured .thumb { aspect-ratio: auto; flex: 1; min-height: 320px; }
.thumb-art, .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 600ms var(--ease);
}
.thumb-art { color: var(--tint); stroke-width: 6; opacity: 0.8; }
.thumb img { object-fit: cover; }
.post-link:hover .thumb-art, .post-link:hover .thumb img { transform: scale(1.04); }

.tag {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 9px;
  border-radius: 3px;
  background: rgba(14, 12, 11, 0.78);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone);
}

.post-body { padding-top: 16px; }
.post-body time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ash);
}
.post-body h3 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  transition: color 160ms ease;
}
.post-featured h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.post-body p {
  max-width: 36em;
  margin-top: 10px;
  color: var(--body);
}
.post-link:hover h3 { color: var(--ember-text); }

/* ---------- Community ---------- */

.community {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 4.4vw, 56px);
  border: 1px solid var(--rail);
  border-radius: var(--radius);
  overflow: hidden;
  /* The in-game panel banner: the star cropped off the right, under a fade */
  background:
    linear-gradient(90deg, var(--ink-raised) 45%, rgba(25, 22, 19, 0.72)),
    url("../img/logo.svg") no-repeat right -60px center / 360px,
    radial-gradient(ellipse 50% 120% at 100% 50%, rgba(163, 89, 38, 0.18), transparent 70%),
    var(--ink-raised);
}
.community-copy { position: relative; }
.community-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: none;
}

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

.footer {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
  border-top: 1px solid var(--rail);
  background: var(--ink-deep);
}
.ghost-footer {
  width: 640px;
  height: 640px;
  right: -260px;
  bottom: -300px;
  opacity: 0.045;
}

.footer-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 48px;
}
.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, auto));
  gap: 48px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
}
.footer-col a {
  font-size: 14px;
  color: var(--body);
  transition: color 160ms ease;
}
.footer-col a:hover { color: var(--bone); }

.footer-bottom {
  position: relative;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rail);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ash);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal a:hover { color: var(--bone); }
.footer-disclaimer { max-width: 60em; margin-top: 12px; color: var(--faint); line-height: 1.6; }

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

@media (max-width: 1100px) {
  .status-inner { grid-template-columns: repeat(3, 1fr); }
  .status-item:nth-child(n+4) { display: none; }

  .totals { grid-template-columns: repeat(3, 1fr); }
  .total:nth-child(n+4) { border-top: 1px solid var(--rail); padding-bottom: 0; margin-top: 24px; }
  .total:nth-child(4) { padding-left: 0; border-left: 0; }

  .records { grid-template-columns: repeat(2, auto); justify-content: start; gap: 16px 48px; }
}

@media (max-width: 960px) {
  :root { --nav-h: 60px; }

  .menu-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--ink);
    border-bottom: 1px solid var(--rail);
    font-size: 17px;
    color: var(--bone);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, transform 220ms var(--ease), visibility 0s linear 220ms;
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--rail); }
  .nav-links a[aria-current="page"] { color: var(--ember-text); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .menu-open .nav-links {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 180ms ease, transform 220ms var(--ease), visibility 0s;
  }

  .game { grid-template-columns: 1fr; }
  .sides { border-left: 0; border-top: 1px solid var(--rail); }

  .stats-head { flex-direction: column; align-items: flex-start; }
  .boards { grid-template-columns: 1fr 1fr; }
  .boards .board:last-child { grid-column: span 2; }

  .news-grid { grid-template-columns: 1fr 1fr; }
  .post-featured { grid-column: span 2; grid-row: auto; }
  .post-featured .thumb { aspect-ratio: 16 / 9; min-height: 0; flex: none; }

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

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

@media (max-width: 640px) {
  .nav-inner { gap: 12px; }
  .brand { gap: 10px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-word { font-size: 13px; letter-spacing: 0.36em; margin-right: -0.36em; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn { height: 36px; padding: 0 11px; gap: 8px; }
  .menu-toggle { width: 36px; height: 36px; }
  .menu-toggle span { left: 10px; right: 10px; }
  .menu-toggle span:first-child { top: 13px; }
  .menu-toggle span:last-child { top: 20px; }
  .menu-open .menu-toggle span:first-child,
  .menu-open .menu-toggle span:last-child { top: 16.5px; }

  .hero-cta { flex-direction: column; align-self: stretch; }
  .hero-cta .btn { width: 100%; }

  .status-inner { grid-template-columns: 1fr 1fr; }
  .status-item { padding: 14px 0; border-left: 0; }
  .status-item:nth-child(n+3) { display: none; }
  .status-online { padding-right: 16px; border-right: 1px solid var(--rail); }
  .status-item:nth-child(2) { padding-left: 16px; }
  .status-online .status-label { display: none; }
  .status-online .status-value::after { content: " online"; color: var(--muted); }

  .section-head { align-items: baseline; }

  .totals { grid-template-columns: 1fr 1fr; column-gap: 24px; margin-top: 40px; border-top: 0; }
  .total, .total + .total, .total:nth-child(n+4) {
    margin-top: 0;
    padding: 18px 0 20px;
    border-left: 0;
    border-top: 1px solid var(--rail);
  }
  .total:first-child { grid-column: span 2; border-top-color: var(--rail-strong); }

  .boards { grid-template-columns: 1fr; gap: 12px; margin-top: 48px; }
  .boards .board:last-child { grid-column: auto; }

  .records { grid-template-columns: 1fr; gap: 12px; }
  .record { justify-content: space-between; }

  .news-grid { grid-template-columns: 1fr; gap: 28px; }
  .post-featured { grid-column: auto; }

  .community-actions { flex-direction: column; align-self: stretch; }
  .community-actions .btn { width: 100%; }
  .community {
    background:
      radial-gradient(ellipse 80% 60% at 100% 0%, rgba(163, 89, 38, 0.16), transparent 70%),
      var(--ink-raised);
  }

  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ghost, .live::after, .hero-mark .chev, .hero-word, .hero-after, .status { animation: none; }
  .hero-mark .chev { stroke-dashoffset: 0; opacity: 1; }
  .hero-word, .hero-after, .status { opacity: 1; }
  .icon, .thumb-art, .thumb img { transition: none; }
}
