:root {
  color-scheme: dark;
  --ink: #ecf1f2;
  --muted: #9ca8ae;
  --faint: #68757c;
  --void: #080c0f;
  --ground: #0d1215;
  --surface: #131a1e;
  --surface-raised: #192126;
  --steel: #2b373d;
  --steel-bright: #435158;
  --signal: #73d7e5;
  --signal-hot: #a5edf3;
  --signal-dim: rgba(115, 215, 229, 0.14);
  --warning: #e5b973;
  --danger: #ee8b82;
  --moss: #b8c979;
  --moss-hot: #d3dfa7;
  --paper: #f0eee6;
  --display: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-height: 76px;
}

* { box-sizing: border-box; }

html { background: var(--void); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--signal);
  color: var(--void);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header,
.editor-header {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid rgba(236, 241, 242, 0.12);
}

.site-header.compact,
.editor-header {
  position: relative;
  background: rgba(8, 12, 15, 0.96);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 740;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(115, 215, 229, 0.72);
  color: var(--signal-hot);
  font-size: 10px;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.wordmark-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(184, 201, 121, 0.52);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.site-header nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.site-header nav a {
  position: relative;
  color: #c2cacc;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.site-header nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.site-header nav a:hover::after,
.site-header nav a:focus-visible::after,
.site-header nav a.active::after { transform: scaleX(1); }
.site-header nav .quiet-link { color: var(--muted); }

.nav-login {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(240, 238, 230, 0.36);
  border-radius: 2px;
  background: rgba(8, 12, 10, 0.32);
  color: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.nav-login:hover,
.nav-login:focus-visible { border-color: var(--moss); background: rgba(184, 201, 121, 0.12); }

.hero {
  position: relative;
  min-height: min(920px, 100svh);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero-art {
  position: absolute;
  z-index: -3;
  inset: 0;
  background: #1a2326 url("/assets/world-hero.webp") center 45% / cover no-repeat;
  transform: scale(1.025);
  animation: hero-breathe 16s ease-out both;
}
.hero-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 10, 0.94) 0%, rgba(5, 8, 10, 0.67) 42%, rgba(5, 8, 10, 0.17) 78%),
    linear-gradient(0deg, rgba(5, 8, 10, 0.94) 0%, transparent 48%, rgba(5, 8, 10, 0.44) 100%);
}
.hero-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #070a0c 4px);
  pointer-events: none;
}
.hero-content {
  width: min(760px, calc(100% - 40px));
  margin: 0 0 clamp(74px, 12vh, 132px) clamp(20px, 9vw, 144px);
}
.overline {
  margin: 0 0 15px;
  color: var(--signal-hot);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero h1,
.landing-note h2,
.rail-heading h1,
.empty-record h2,
.auth-intro h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.hero h1 { max-width: 720px; font-size: clamp(54px, 7.2vw, 104px); text-wrap: balance; }
.hero-copy {
  max-width: 570px;
  margin: 28px 0 0;
  color: #c5ced1;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.55;
}
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 38px; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.42; }
.button-primary { background: var(--signal); color: #071013; }
.button-primary:hover:not(:disabled) { background: var(--signal-hot); }
.button-secondary { border-color: var(--steel-bright); background: var(--surface-raised); color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: var(--signal); }
.button-google { width: 100%; background: #f0f2f3; color: #151a1d; }
.button-google span { color: #4285f4; font-size: 19px; font-weight: 800; }
.signal-line { width: 34px; height: 1px; background: var(--signal); box-shadow: 0 0 9px var(--signal); }
.signal-copy { color: #a9b5b9; font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; }
.hero-index {
  position: absolute;
  right: clamp(20px, 5vw, 76px);
  bottom: 55px;
  display: flex;
  align-items: baseline;
  gap: 13px;
  color: rgba(236, 241, 242, 0.52);
  font-size: 9px;
  letter-spacing: 0.2em;
}
.hero-index strong { color: rgba(236, 241, 242, 0.78); font-size: 26px; font-weight: 300; letter-spacing: 0.05em; }

.landing-note {
  display: grid;
  grid-template-columns: 0.7fr 1.2fr auto;
  align-items: end;
  gap: clamp(28px, 6vw, 90px);
  padding: clamp(70px, 9vw, 128px) clamp(20px, 9vw, 144px);
  border-bottom: 1px solid var(--steel);
  background: var(--ground);
}
.landing-note h2 { max-width: 430px; font-size: clamp(36px, 4vw, 58px); }
.landing-note > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; }
.text-link { color: var(--signal-hot); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link span { display: inline-block; margin-left: 8px; transition: transform 160ms ease; }
.text-link:hover span { transform: translateX(4px); }
.site-footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 76px);
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Game landing */
.game-landing { background: #0b100d; color: var(--paper); caret-color: transparent; }
.game-header { transition: background-color 180ms ease, backdrop-filter 180ms ease; }
.game-header.settled { position: fixed; background: rgba(8, 12, 10, 0.92); backdrop-filter: blur(14px); }
.game-header nav a { color: rgba(240, 238, 230, 0.75); }

.game-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.game-hero-art {
  --hero-shift: 0px;
  position: absolute;
  z-index: -3;
  inset: -3%;
  background: #1b211a url("/assets/media/landing-hero.webp?v=20260728-refresh") center 48% / cover no-repeat;
  filter: saturate(0.72) contrast(1.06);
  transform: translateY(var(--hero-shift)) scale(1.045);
  transition: transform 80ms linear;
  animation: game-hero-enter 1400ms cubic-bezier(.16,.7,.26,1) both;
}
.game-hero-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 10, 8, 0.95) 0%, rgba(7, 10, 8, 0.68) 43%, rgba(7, 10, 8, 0.1) 78%),
    linear-gradient(0deg, rgba(7, 10, 8, 0.95) 0%, transparent 44%, rgba(7, 10, 8, 0.38) 100%);
}
.game-hero-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: repeating-linear-gradient(0deg, transparent 0 4px, #050806 5px);
}
.game-hero-content {
  width: min(690px, calc(100% - 40px));
  margin: 0 0 clamp(128px, 17vh, 180px) clamp(20px, 8vw, 130px);
}
.game-hero .overline,
.game-news .overline,
.game-overview .overline,
.game-final .overline { color: var(--moss-hot); }
.game-hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--paper);
  font-family: var(--sans);
  font-size: clamp(65px, 10.5vw, 156px);
  font-weight: 820;
  letter-spacing: -0.085em;
  line-height: 0.78;
  text-wrap: balance;
}
.game-hero-copy {
  max-width: 580px;
  margin: 31px 0 0;
  color: rgba(240, 238, 230, 0.82);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.55;
}
.game-hero-actions,
.final-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 34px; }
.store-link {
  min-width: 150px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7px 17px;
  border: 1px solid rgba(240, 238, 230, 0.31);
  background: rgba(7, 10, 8, 0.48);
  color: var(--paper);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.store-link:hover { border-color: var(--moss); background: rgba(7, 10, 8, 0.68); transform: translateY(-2px); }
.store-link span { color: rgba(240, 238, 230, 0.58); font-size: 9px; line-height: 1.2; }
.store-link strong { font-size: 15px; letter-spacing: -0.02em; }
.web-access-button { min-height: 52px; border-color: rgba(184, 201, 121, 0.58); background: rgba(184, 201, 121, 0.09); }
.latest-signal {
  position: absolute;
  right: clamp(20px, 5vw, 78px);
  bottom: 40px;
  max-width: min(430px, calc(100% - 40px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid rgba(240, 238, 230, 0.34);
  border-bottom: 1px solid rgba(240, 238, 230, 0.16);
  color: var(--paper);
  text-decoration: none;
}
.latest-signal > span:first-child { color: var(--moss-hot); font-size: 9px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.latest-signal strong { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.latest-signal > span:last-child { color: var(--moss); transition: transform 160ms ease; }
.latest-signal:hover > span:last-child { transform: translateY(3px); }

.game-news,
.game-overview {
  padding: clamp(86px, 11vw, 155px) clamp(20px, 8vw, 130px);
  background: #0b100d;
}
.section-heading {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 0 clamp(35px, 7vw, 110px);
  margin-bottom: clamp(55px, 8vw, 100px);
}
.section-heading .overline { grid-row: 1 / 3; }
.section-heading h2,
.overview-copy h2,
.game-final h2,
.site-dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.88;
}
.section-heading > p:last-child { max-width: 560px; margin: 24px 0 0; color: rgba(240, 238, 230, 0.6); font-size: 17px; }
.news-list { border-top: 1px solid rgba(240, 238, 230, 0.28); }
.news-item,
.news-loading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(45px, 0.16fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 4vw, 60px);
  padding: clamp(28px, 4vw, 52px) 0;
  border-bottom: 1px solid rgba(240, 238, 230, 0.16);
  transition: padding-left 180ms ease, border-color 180ms ease;
}
.news-item { cursor: pointer; user-select: none; }
.news-item:hover,
.news-item:has(.news-item-trigger:focus-visible) { padding-left: 12px; border-color: rgba(184, 201, 121, 0.58); }
.news-item-trigger {
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}
.news-item-trigger:focus-visible { outline: 2px solid var(--moss); outline-offset: 5px; }
.news-number { align-self: start; padding-top: 7px; color: var(--moss); font-size: 10px; letter-spacing: .12em; }
.news-meta { margin: 0 0 10px; color: var(--moss-hot); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.news-item h3,
.news-loading h3 { margin: 0; font-family: var(--display); font-size: clamp(29px, 4vw, 55px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.news-item:not(.news-item-latest) h3 { font-size: clamp(26px, 3vw, 39px); }
.news-excerpt { max-width: 760px; margin: 15px 0 0; color: rgba(240, 238, 230, 0.6); font-size: 14px; }
.news-read {
  padding: 11px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--moss);
  background: none;
  color: var(--paper);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.news-loading { grid-template-columns: .16fr 1fr; color: rgba(240, 238, 230, 0.65); }
.news-loading span { color: var(--moss); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.game-overview { padding-top: 35px; }
.overview-copy { max-width: 920px; margin: 0 0 clamp(56px, 8vw, 104px) auto; }
.overview-copy h2 { max-width: 820px; }
.overview-copy > p:last-child { max-width: 620px; margin: 30px 0 0; color: rgba(240, 238, 230, 0.62); font-size: 18px; }
.game-showcase { width: min(1500px, 100%); margin: 0 auto; overflow: hidden; }
.game-showcase img { width: 100%; height: auto; display: block; filter: saturate(.88) contrast(1.02); }
.game-pillars { margin: clamp(62px, 9vw, 120px) 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(240, 238, 230, 0.24); }
.game-pillars li { display: grid; grid-template-columns: .18fr 1fr; gap: 24px; padding: 31px 0 38px; border-bottom: 1px solid rgba(240, 238, 230, 0.16); }
.game-pillars li > span { color: var(--moss); font-size: 10px; letter-spacing: .12em; }
.game-pillars h3 { margin: 0 0 11px; font-family: var(--display); font-size: clamp(30px, 4vw, 50px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.game-pillars p { max-width: 650px; margin: 0; color: rgba(240, 238, 230, 0.58); }

.game-final {
  position: relative;
  min-height: min(820px, 92svh);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.final-art { position: absolute; z-index: -2; inset: 0; background: url("/assets/media/landing-final.webp?v=20260728-refresh") center 62% / cover; filter: saturate(.68) contrast(1.08); transform: scale(1.03); }
.game-final::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(5,8,6,.94), rgba(5,8,6,.55) 56%, rgba(5,8,6,.22)), linear-gradient(0deg, rgba(5,8,6,.95), transparent 55%); }
.final-copy { width: min(720px, calc(100% - 40px)); margin: 0 0 clamp(72px, 10vw, 120px) clamp(20px, 8vw, 130px); }
.final-copy > img { width: 68px; height: 68px; margin-bottom: 27px; border-radius: 15px; box-shadow: 0 18px 45px rgba(0,0,0,.34); }
.game-final h2 { max-width: 690px; }
.final-copy > p:not(.overline) { max-width: 560px; margin: 25px 0 0; color: rgba(240,238,230,.7); font-size: 17px; }
.game-footer { min-height: 100px; background: #070a08; }
.game-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.game-footer a { color: rgba(240,238,230,.58); text-decoration: none; }
.game-footer a:hover { color: var(--moss-hot); }

.site-dialog {
  width: min(650px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 1px solid #3b4740;
  border-radius: 3px;
  background: #101612;
  color: var(--paper);
  box-shadow: 0 35px 100px rgba(0,0,0,.58);
}
.site-dialog::backdrop { background: rgba(2,5,3,.78); backdrop-filter: blur(8px); }
.dialog-shell { position: relative; margin: 0; padding: clamp(27px, 6vw, 56px); }
.dialog-close { position: absolute; top: 17px; right: 19px; width: 38px; height: 38px; border: 1px solid rgba(240,238,230,.24); background: transparent; color: var(--paper); cursor: pointer; font-size: 24px; line-height: 1; }
.site-dialog h2 { padding-right: 38px; font-size: clamp(42px, 7vw, 70px); }
.dialog-intro { max-width: 520px; margin: 24px 0 0; color: rgba(240,238,230,.66); }
.access-preview { display: grid; gap: 15px; margin-top: 31px; padding: 23px; border: 1px solid rgba(240,238,230,.16); background: #0b100d; }
.access-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 4px; border-bottom: 1px solid rgba(240,238,230,.16); }
.access-tabs span { padding: 8px 0; color: rgba(240,238,230,.42); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.access-tabs .active { border-bottom: 1px solid var(--moss); color: var(--moss-hot); }
.access-preview label { display: grid; gap: 6px; color: rgba(240,238,230,.5); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.access-preview input { min-height: 43px; padding: 0 12px; border: 1px solid rgba(240,238,230,.15); background: #080c0a; color: rgba(240,238,230,.4); }
.dialog-note { margin: 17px 0 0; color: rgba(240,238,230,.42); font-size: 12px; }
.news-dialog { width: min(860px, calc(100% - 28px)); }
.news-dialog .dialog-shell { max-height: calc(100svh - 28px); overflow: auto; }
.news-dialog #news-dialog-body .markdown-body { max-width: none; }

.reveal-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.75,.25,1); }
.reveal-on-scroll.visible { opacity: 1; transform: translateY(0); }
@keyframes game-hero-enter { from { opacity: .45; transform: translateY(0) scale(1.11); } to { opacity: 1; transform: translateY(var(--hero-shift)) scale(1.045); } }

/* Public wiki */
.wiki-page { height: 100vh; overflow: hidden; }
.wiki-shell { height: calc(100vh - var(--header-height)); display: grid; grid-template-columns: minmax(280px, 390px) 1fr; }
.wiki-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--steel);
  background: #0b1013;
}
.rail-heading { padding: 42px 32px 24px; }
.rail-heading h1 { font-size: 53px; }
.search-form { padding: 0 24px 22px; border-bottom: 1px solid var(--steel); }
.search-form > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.search-control { position: relative; }
.search-control svg { position: absolute; top: 13px; left: 13px; width: 18px; fill: none; stroke: var(--faint); stroke-width: 1.7; }
.search-control input,
.auth-form input,
.document-fields input,
.document-fields textarea,
.permission-tool input {
  width: 100%;
  border: 1px solid var(--steel);
  border-radius: 2px;
  outline: none;
  background: #0b1114;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.search-control input { min-height: 45px; padding: 0 13px 0 42px; }
input:focus, textarea:focus { border-color: var(--signal) !important; box-shadow: 0 0 0 2px var(--signal-dim); }
.rail-status { min-height: 39px; padding: 13px 25px 9px; color: var(--faint); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.record-list { min-height: 0; overflow: auto; padding-bottom: 40px; }
.record-category { border-top: 1px solid rgba(43, 55, 61, 0.7); }
.record-category:first-child { border-top: 0; }
.record-category-heading { margin: 0; padding: 13px 25px 7px; color: #8d9a9f; font-family: inherit; font-size: 10px; font-weight: 750; letter-spacing: 0.14em; line-height: 1.3; text-transform: uppercase; }
.record-link {
  display: block;
  padding: 17px 25px 19px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid rgba(43, 55, 61, 0.48);
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.record-link:hover, .record-link.active { border-color: var(--steel); background: var(--surface); }
.record-link.active { box-shadow: inset 2px 0 var(--signal); }
.record-section { display: none; }
.record-title { display: block; font-family: var(--display); font-size: 21px; font-weight: 500; line-height: 1.25; }
.record-summary { display: -webkit-box; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.record-view { min-width: 0; overflow: auto; padding: clamp(44px, 7vw, 108px) clamp(28px, 9vw, 150px) 110px; background: radial-gradient(circle at 100% 0, rgba(115, 215, 229, 0.05), transparent 27%), var(--ground); }
.empty-record { max-width: 640px; margin-top: 13vh; }
.empty-record h2 { margin-bottom: 20px; font-size: clamp(40px, 5vw, 69px); }
.empty-record > p:last-child { color: var(--muted); }
.record-header { max-width: 880px; padding-bottom: 33px; border-bottom: 1px solid var(--steel); }
.record-header h1 { margin: 0; font-family: var(--display); font-size: clamp(46px, 6vw, 80px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; }
.record-deck { max-width: 700px; margin: 22px 0 0; color: #b7c1c5; font-size: 18px; }
.record-meta { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 24px; color: var(--faint); font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; }
.markdown-body { max-width: 820px; padding-top: 31px; color: #cbd2d4; font-size: 17px; }
.markdown-body h2, .markdown-body h3 { color: var(--ink); font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; }
.markdown-body h2 { margin: 51px 0 15px; font-size: 36px; line-height: 1.15; }
.markdown-body h3 { margin: 35px 0 11px; font-size: 26px; }
.markdown-body p { margin: 0 0 18px; }
.markdown-body ul, .markdown-body ol { padding-left: 24px; }
.markdown-body li { margin: 7px 0; }
.markdown-body blockquote { margin: 25px 0; padding: 2px 0 2px 22px; border-left: 2px solid var(--signal); color: var(--muted); }
.markdown-body code { padding: 2px 5px; background: #070b0d; color: var(--signal-hot); font-size: 0.9em; }
.markdown-body pre { overflow: auto; padding: 19px; border: 1px solid var(--steel); background: #070b0d; }
.markdown-body pre code { padding: 0; }
.markdown-body a { color: var(--signal-hot); }

/* Editor */
.editor-page { height: 100vh; overflow: hidden; background: #090e11; }
.editor-header { padding-right: 28px; padding-left: 28px; }
.account-strip { min-width: 0; display: flex; gap: 17px; align-items: center; color: var(--muted); font-size: 13px; }
.editor-identity { max-width: 180px; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.editor-header-link { color: var(--muted); font-size: 12px; text-decoration: none; }
.editor-header-link:hover, .editor-header-link:focus-visible { color: var(--signal-hot); }
.editor-header-button { padding: 0; border: 0; background: none; cursor: pointer; }
.text-button { padding: 0; border: 0; background: none; color: var(--signal-hot); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.editor-shell { height: calc(100vh - var(--header-height)); }
.auth-stage { width: min(1050px, calc(100% - 40px)); display: grid; grid-template-columns: 1.1fr 0.8fr; gap: clamp(50px, 10vw, 150px); margin: 0 auto; padding: clamp(70px, 11vh, 130px) 0; }
.auth-stage[hidden] { display: none; }
.auth-intro h1 { max-width: 640px; font-size: clamp(50px, 6vw, 82px); }
.auth-intro > p:last-child { max-width: 590px; margin-top: 28px; color: var(--muted); font-size: 18px; }
.auth-actions { align-self: center; padding: 28px; border: 1px solid var(--steel); background: var(--surface); box-shadow: 0 25px 70px rgba(0,0,0,.28); }
.auth-divider { display: flex; align-items: center; gap: 11px; margin: 26px 0 19px; color: var(--faint); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--steel); }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.auth-form input { height: 44px; padding: 0 12px; }
.link-google { margin-top: 20px; }
.form-status { min-height: 22px; margin: 20px 0 0; color: var(--muted); font-size: 13px; }
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--signal-hot); }

.editor-workspace { height: 100%; display: grid; grid-template-columns: 292px minmax(0, 1fr); }
.editor-workspace[hidden] { display: none; }
.editor-sidebar { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--steel); background: #0c1215; }
.editor-sidebar-head { min-height: 97px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-bottom: 1px solid var(--steel); }
.editor-sidebar-head .overline { margin: 0 0 2px; }
.editor-sidebar-head h1 { margin: 0; font-family: var(--display); font-size: 29px; font-weight: 500; }
.sidebar-new-page { min-height: 39px; padding: 0 13px; white-space: nowrap; }
.editor-library-search { display: grid; gap: 6px; padding: 15px 16px; border-bottom: 1px solid var(--steel); color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.editor-library-search input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid var(--steel); outline: none; background: #090e11; color: var(--ink); font-size: 13px; letter-spacing: 0; text-transform: none; }
.editor-page-list { min-height: 0; flex: 1; overflow: auto; padding-bottom: 35px; }
.editor-empty-list { margin: 0; padding: 24px 18px; color: var(--faint); font-size: 13px; }
.editor-category { border-bottom: 1px solid rgba(43,55,61,.74); }
.editor-category-head { min-height: 43px; display: grid; grid-template-columns: 1fr 34px; align-items: center; padding: 0 9px 0 4px; background: #0a1013; }
.editor-category-toggle { min-width: 0; display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 9px 7px; border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; }
.editor-category-toggle > span:first-child { color: var(--signal); font-size: 17px; line-height: 1; }
.editor-category-toggle strong { overflow: hidden; font-size: 11px; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.editor-category-toggle > span:last-child { color: var(--faint); font-size: 10px; }
.editor-category-add { width: 30px; height: 30px; border: 1px solid transparent; background: none; color: var(--signal-hot); cursor: pointer; font-size: 19px; }
.editor-category-add:hover, .editor-category-add:focus-visible { border-color: var(--steel-bright); background: var(--surface); }
.editor-page-button { width: 100%; display: grid; gap: 4px; padding: 13px 18px 14px 29px; border: 0; border-top: 1px solid rgba(43,55,61,.45); background: none; color: var(--ink); cursor: pointer; text-align: left; transition: background-color 140ms ease, box-shadow 140ms ease, padding-left 140ms ease; }
.editor-page-button:hover { padding-left: 33px; background: var(--surface); }
.editor-page-button.active { background: var(--surface); box-shadow: inset 2px 0 var(--signal); }
.editor-page-button strong { overflow: hidden; font-family: var(--display); font-size: 17px; font-weight: 500; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.editor-page-button span { color: var(--faint); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }

.editor-document { min-width: 0; height: 100%; overflow: auto; background: radial-gradient(circle at 100% 0, rgba(115,215,229,.035), transparent 30%), var(--ground); }
.document-toolbar { position: sticky; z-index: 8; top: 0; min-height: 97px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px clamp(18px, 3.2vw, 48px); border-bottom: 1px solid var(--steel); background: rgba(13,18,21,.96); backdrop-filter: blur(13px); }
.document-state { display: block; color: var(--signal); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.document-revision { display: block; margin-top: 4px; color: var(--faint); font-size: 12px; }
.toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.toolbar-actions .button { min-height: 42px; padding: 0 15px; }
.document-fields { width: min(1420px, calc(100% - 44px)); display: grid; gap: 27px; margin: 0 auto; padding: clamp(37px, 5vw, 64px) 0 90px; }
.document-fields input, .document-fields textarea, .document-fields select { padding: 10px 12px; resize: vertical; }
.document-fields input, .document-fields textarea, .document-fields select { border: 1px solid var(--steel); border-radius: 2px; outline: none; background: #0b1114; color: var(--ink); }
.document-fields input, .document-fields select { min-height: 43px; }
.document-fields label, .category-field > label, .composer-label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.document-fields .field-title { display: grid; gap: 8px; }
.document-fields .field-title input { padding: 4px 0 16px; border: 0; border-bottom: 1px solid var(--steel); background: transparent; font-family: var(--display); font-size: clamp(40px, 5vw, 68px); letter-spacing: -.035em; line-height: 1; }
.document-fields .field-title input:focus { box-shadow: none; border-bottom-color: var(--signal); }
.article-details { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.category-field, .summary-field { display: grid; gap: 7px; }
.category-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.category-control select { width: 100%; cursor: pointer; }
.new-category-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 9px; align-items: center; margin-top: 6px; }
.new-category-row[hidden] { display: none; }
.new-category-row .button { min-height: 43px; }
.field-help { margin: 0; color: var(--faint); font-size: 11px; line-height: 1.45; }
.summary-field textarea { min-height: 89px; font-size: 14px; line-height: 1.5; text-transform: none; }

.article-composer { min-width: 0; border: 1px solid var(--steel); background: #090e11; }
.composer-head { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 13px 10px 17px; border-bottom: 1px solid var(--steel); background: #0d1417; }
.composer-head > div:first-child { display: grid; gap: 2px; }
.composer-hint { color: var(--faint); font-size: 11px; }
.composer-views { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--steel); background: #090e11; }
.composer-views button { min-height: 29px; padding: 0 11px; border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.composer-views button.active { background: var(--surface-raised); color: var(--signal-hot); }
.markdown-toolbar { min-height: 45px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 9px; border-bottom: 1px solid var(--steel); background: #0a1013; }
.markdown-toolbar button { min-width: 34px; min-height: 31px; padding: 0 8px; border: 1px solid transparent; background: transparent; color: #b9c3c6; cursor: pointer; font-size: 11px; }
.markdown-toolbar button:hover, .markdown-toolbar button:focus-visible { border-color: var(--steel-bright); background: var(--surface); color: var(--signal-hot); }
.markdown-divider { width: 1px; height: 20px; margin: 0 3px; background: var(--steel); }
.composer-workspace { min-width: 0; min-height: 570px; display: grid; }
.composer-workspace[data-view="split"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.composer-workspace[data-view="write"] { grid-template-columns: 1fr; }
.composer-workspace[data-view="preview"] { grid-template-columns: 1fr; }
.composer-pane { min-width: 0; min-height: 570px; }
.editor-pane { display: block; }
.composer-workspace[data-view="preview"] .editor-pane { display: none; }
.body-editor { width: 100%; height: 100%; min-height: 570px; display: block; padding: 22px !important; border: 0 !important; background: #090e11 !important; color: #d4dcde !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 14px !important; line-height: 1.72; resize: vertical !important; }
.body-editor:focus { box-shadow: inset 0 0 0 1px var(--signal) !important; }
.preview-pane { overflow: auto; border-left: 1px solid var(--steel); background: #0d1215; }
.composer-workspace[data-view="write"] .preview-pane { display: none; }
.composer-workspace[data-view="preview"] .preview-pane { border-left: 0; }
.preview-pane-head { min-height: 39px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px; border-bottom: 1px solid var(--steel); color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.preview-pane-head span:last-child { color: var(--warning); }
.article-preview { min-width: 0; padding: clamp(29px, 4vw, 58px); }
.article-preview .record-header h1 { font-size: clamp(38px, 4.5vw, 64px); }
.article-preview .record-deck { font-size: 16px; }
.article-preview .markdown-body { max-width: none; font-size: 16px; }
.article-preview .markdown-body h2 { font-size: 31px; }
.article-preview .markdown-body h3 { font-size: 23px; }
.preview-empty { padding: 31px 0; color: var(--faint); font-size: 14px; }
.revision-note { display: grid; gap: 7px; }
.revision-note > span { margin-left: 5px; color: var(--faint); font-size: 9px; font-weight: 500; }
.editor-status { position: sticky; z-index: 7; bottom: 0; margin: 0; padding: 11px clamp(18px, 3.2vw, 48px); border-top: 1px solid var(--steel); background: #0a0f12; }

.editor-preview-dialog { width: min(1180px, calc(100% - 28px)); }
.preview-dialog-shell { max-height: calc(100svh - 28px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.preview-dialog-header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 24px clamp(25px, 5vw, 54px); border-bottom: 1px solid var(--steel); }
.preview-dialog-header .overline { margin-bottom: 4px; }
.preview-dialog-header h2 { margin: 0; padding: 0; font-size: clamp(34px, 5vw, 52px); }
.preview-dialog-header .dialog-close { position: static; flex: 0 0 auto; }
.preview-dialog-content { min-height: 0; overflow: auto; padding: clamp(34px, 6vw, 78px); }
.preview-dialog-content .record-header h1 { font-size: clamp(50px, 7vw, 82px); }
.preview-dialog-actions { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(20px, 4vw, 45px); border-top: 1px solid var(--steel); background: #0b1114; color: var(--faint); font-size: 12px; }
.preview-dialog-actions > div { display: flex; gap: 8px; }
.editor-history-dialog { width: min(720px, calc(100% - 28px)); }
.history-list { max-height: 55vh; overflow: auto; margin-top: 28px; border-top: 1px solid var(--steel); }
.history-row { display: grid; grid-template-columns: auto 1fr; gap: 3px 18px; padding: 17px 0; border-bottom: 1px solid var(--steel); }
.history-row strong { color: var(--signal-hot); font-size: 12px; }
.history-row time { justify-self: end; color: var(--faint); font-size: 11px; }
.history-row > span { grid-column: 1 / -1; color: var(--ink); font-family: var(--display); font-size: 19px; }
.history-row p { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.history-empty { color: var(--muted); }
.editor-admin-dialog { width: min(620px, calc(100% - 28px)); }
.permission-tool { margin-top: 28px; padding: 0; }
.permission-tool[hidden] { display: none; }
.permission-tool input { height: 43px; padding: 0 11px; }
.permission-tool form div { display: flex; gap: 8px; margin-top: 8px; }
.permission-tool form button { flex: 1; padding: 10px; border: 1px solid var(--steel); background: var(--surface-raised); color: var(--ink); cursor: pointer; }
.permission-tool form button:hover { border-color: var(--signal); }
.permission-list { max-height: 270px; overflow: auto; margin-top: 18px; color: var(--faint); font-size: 12px; }
.permission-list div { padding: 9px 0; border-bottom: 1px solid rgba(43,55,61,.5); }

.reveal { animation: reveal-up 700ms 120ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes reveal-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-breathe { from { transform: scale(1.07); } to { transform: scale(1.025); } }

@media (max-width: 900px) {
  .landing-note { grid-template-columns: 1fr; align-items: start; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading .overline { grid-row: auto; }
  .news-item { grid-template-columns: 44px minmax(0, 1fr); }
  .news-read { grid-column: 2; justify-self: start; }
  .game-overview { overflow: hidden; }
  .wiki-page { height: auto; overflow: auto; }
  .wiki-shell { height: auto; min-height: calc(100vh - var(--header-height)); grid-template-columns: 1fr; }
  .wiki-rail { max-height: 55vh; border-right: 0; border-bottom: 1px solid var(--steel); }
  .record-view { min-height: 60vh; overflow: visible; }
  .auth-stage { grid-template-columns: 1fr; gap: 45px; }
  .editor-workspace { grid-template-columns: 238px minmax(0, 1fr); }
  .article-details { grid-template-columns: 1fr; }
  .composer-views button[data-composer-view="split"] { display: none; }
  .composer-workspace[data-view="split"] { grid-template-columns: 1fr; }
  .composer-workspace[data-view="split"] .preview-pane { display: none; }
}

@media (max-width: 680px) {
  :root { --header-height: 68px; }
  .site-header { padding: 0 18px; }
  .site-header .wordmark > span:last-child { display: none; }
  .site-header nav { gap: 17px; }
  .site-header nav a { font-size: 12px; }
  .site-header nav .quiet-link { display: none; }
  .game-header nav { gap: 10px; }
  .game-header nav a[href^="#"] { display: none; }
  .game-header .nav-login { min-height: 35px; padding: 0 10px; font-size: 10px; }
  .game-hero-art { background-position: 57% 48%; }
  .game-hero-content { margin: 0 20px 164px; }
  .game-hero h1 { font-size: clamp(58px, 20vw, 84px); }
  .game-hero-copy { margin-top: 25px; font-size: 16px; }
  .game-hero-actions { gap: 8px; }
  .store-link { min-width: calc(50% - 4px); }
  .web-access-button { width: 100%; }
  .latest-signal { right: 20px; bottom: 24px; left: 20px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .game-news, .game-overview { padding: 78px 20px; }
  .section-heading { margin-bottom: 45px; }
  .section-heading h2, .overview-copy h2, .game-final h2 { font-size: clamp(45px, 15vw, 67px); }
  .section-heading > p:last-child { margin-top: 19px; font-size: 15px; }
  .news-item, .news-loading { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 26px 0; }
  .news-item:hover, .news-item:has(.news-item-trigger:focus-visible) { padding-left: 0; }
  .news-item h3, .news-item:not(.news-item-latest) h3 { font-size: 30px; }
  .news-excerpt { font-size: 13px; }
  .news-read { grid-column: 2; }
  .overview-copy { margin-bottom: 52px; }
  .overview-copy > p:last-child { font-size: 16px; }
  .game-showcase { width: 122%; margin-left: -11%; }
  .game-pillars { margin-top: 58px; }
  .game-pillars li { grid-template-columns: 32px 1fr; gap: 12px; }
  .game-pillars h3 { font-size: 32px; }
  .final-copy { margin: 0 20px 66px; }
  .game-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 13px; padding-top: 24px; padding-bottom: 24px; }
  .game-footer nav { justify-content: flex-start; gap: 11px 16px; }
  .dialog-shell { padding: 52px 21px 24px; }
  .access-preview { padding: 17px; }
  .hero-content { margin-left: 20px; }
  .hero h1 { font-size: clamp(48px, 15vw, 68px); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .signal-line, .signal-copy, .hero-index { display: none; }
  .wiki-rail { max-height: none; }
  .rail-heading { padding: 31px 22px 18px; }
  .search-form { padding: 0 18px 18px; }
  .record-list { max-height: 42vh; }
  .record-view { padding: 42px 22px 80px; }
  .auth-stage { width: min(100% - 30px, 600px); padding-top: 52px; }
  .auth-actions { padding: 20px; }
  .editor-header { padding: 0 16px; }
  .editor-header .wordmark > span:last-child, .editor-identity, .editor-header-link[href="/"] { display: none; }
  .account-strip { gap: 12px; }
  .editor-workspace { display: grid; grid-template: minmax(230px, 34vh) minmax(0, 1fr) / 1fr; }
  .editor-sidebar { border-right: 0; border-bottom: 1px solid var(--steel); }
  .editor-sidebar-head { min-height: 70px; padding: 10px 14px; }
  .editor-sidebar-head h1 { font-size: 24px; }
  .editor-library-search { padding: 9px 13px; }
  .editor-library-search > span { display: none; }
  .editor-library-search input { height: 35px; }
  .editor-page-list { max-height: none; }
  .editor-document { height: auto; }
  .document-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .button { min-width: calc(50% - 4px); flex: 1; padding: 0 8px; }
  .document-fields { width: calc(100% - 28px); padding-top: 31px; }
  .document-fields .field-title input { font-size: 42px; }
  .category-control { grid-template-columns: 1fr; align-items: start; }
  .category-control .text-button { justify-self: start; }
  .new-category-row { grid-template-columns: 1fr; align-items: stretch; }
  .new-category-row .text-button { justify-self: start; }
  .composer-head { align-items: flex-start; flex-direction: column; }
  .composer-views { width: 100%; }
  .composer-views button { flex: 1; }
  .markdown-toolbar { gap: 2px; }
  .markdown-toolbar button { padding: 0 6px; }
  .composer-workspace, .composer-pane, .body-editor { min-height: 470px; }
  .article-preview { padding: 27px 19px; }
  .preview-dialog-actions { align-items: stretch; flex-direction: column; }
  .preview-dialog-actions > div { width: 100%; }
  .preview-dialog-actions .button { flex: 1; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .reveal-on-scroll { opacity: 1; transform: none; }
}
