/* layout lives in site.css */

@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-400.woff2?v=1") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-700.woff2?v=1") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url("/fonts/figtree-400.woff2?v=1") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url("/fonts/figtree-700.woff2?v=1") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --pitch: #070c16;
  --turf: #10182a;
  --leaf: #182238;
  --rule: #2c3d5c;
  --wick: #5eb4ff;
  --wick-press: #1470d4;
  --signal: #e4453a;
  --signal-press: #b52e26;
  --ember: #ffc44d;
  --ember-ink: #1a1408;
  --cream: #f4f7fc;
  --mute: #9aabc4;
  --ink: #05080f;
  --space: 1.25rem;
  --wrap: 76rem;
  --radius: 0.5rem;
  --mast-h: 4.25rem;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--pitch);
  color: var(--cream);
  font-family: Figtree, system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cream); text-underline-offset: 0.18em; }
a:hover { color: var(--wick); }
h1, h2, h3, .mast, .deck__h, .btn {
  font-family: Outfit, system-ui, sans-serif;
}
h1 { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.15; margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.3rem, 2vw, 1.75rem); margin: 0 0 0.7rem; }
h2[id] { scroll-margin-top: 5.5rem; }
h2::after {
  content: "";
  display: block;
  width: 1.6rem;
  height: 2px;
  background: var(--wick);
  margin-top: 0.4rem;
}
.sr-only::after,
.deck h2::after { display: none; }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
p { margin: 0 0 0.9rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.focus\:not-sr-only:focus {
  position: absolute;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  padding: 0.5rem;
}
.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--wick);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  z-index: 100;
}
.skip:focus { top: 0.5rem; }

.mast {
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 95;
  transition: box-shadow 0.34s ease;
}
/* At the top of the page the bar carries no plate at all: the hero picture runs up behind it
   and the hero's own top gradient darkens it, so there is no edge to see. The frosted plate
   appears once the bar is pinned over page copy. With JS off the plate stays on, which is the
   readable fallback. */
.mast::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--turf);
  -webkit-backdrop-filter: blur(16px) saturate(132%);
  backdrop-filter: blur(16px) saturate(132%);
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.34s ease;
}
.mast::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  opacity: 1;
  transition: opacity 0.34s ease;
  background: linear-gradient(90deg, rgba(44, 61, 92, 0) 0%, rgba(44, 61, 92, 0.72) 22%, rgba(44, 61, 92, 0.72) 78%, rgba(44, 61, 92, 0) 100%);
}
.mast.is-floating::before,
.mast.is-floating::after { opacity: 0; }
.mast.is-stuck { box-shadow: 0 14px 36px -22px rgba(0, 0, 0, 0.95); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mast::before { background: var(--turf); }
}
.mast__bar {
  position: relative;
  z-index: 1;
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
}
.site-logo { height: 2.6rem; width: auto; }
.mast__brand {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  flex: 0 0 auto;
}
.mast__brand .site-logo { height: 2.6rem; width: auto; }
.mast__nav { display: none; flex: 1; align-items: center; justify-content: center; }
.mast__links, .drawer__links {
  list-style: none;
  display: flex;
  gap: 0.15rem;
  padding: 0;
  margin: 0;
}
.mast__links a, .drawer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.7rem;
  text-decoration: none;
  position: relative;
  color: var(--cream);
  font-size: 0.95rem;
  /* The bar sits on the hero picture now, so every label carries its own small scrim. */
  text-shadow: 0 1px 2px rgba(5, 8, 15, 0.85);
}
.mast__links a[aria-current="page"] {
  color: var(--cream);
}
.mast__links a[aria-current="page"]::after,
.mast__links a:hover::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.3rem;
  height: 2px;
  background: var(--wick);
}
.nav-cat { position: relative; display: flex; align-items: center; flex-wrap: wrap; }
.nav-cat > a {
  color: var(--cream);
  text-decoration: none;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.4rem;
}
.nav-cat__chev {
  min-height: 2.5rem;
  min-width: 2.5rem;
  background: transparent;
  border: 0;
  color: var(--cream);
  cursor: pointer;
}
.nav-cat__list {
  position: static;
  background: var(--leaf);
  border: 1px solid var(--rule);
  list-style: none;
  margin: 0.2rem 0 0.6rem;
  padding: 0.4rem 0;
  width: 100%;
  border-radius: var(--radius);
}
.nav-cat__list a {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0 0.8rem;
  text-decoration: none;
}
.mast__actions { display: none; gap: 0.5rem; flex: 0 0 auto; }
.mast__menu {
  margin-left: auto;
  min-height: 2.75rem;
  min-width: 2.75rem;
  background: var(--leaf);
  color: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.28rem;
  padding: 0;
}
.mast__menu span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--cream);
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 20, 0.72);
  /* Inside the mast's stacking context, so it dims the page while leaving the menu button
     itself clickable — the same button has to close the panel it opened. */
  z-index: 0;
}
.drawer {
  position: fixed;
  inset: var(--mast-h) 0 auto 0;
  background: var(--turf);
  z-index: 3;
  padding: 1rem;
  max-height: calc(100vh - var(--mast-h));
  overflow: auto;
}
.drawer__links { flex-direction: column; }

.btn, .cta-link.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--wick);
  cursor: pointer;
  font-weight: 700;
}
.btn--fill {
  background: var(--wick-press);
  color: var(--cream);
  border-color: var(--wick-press);
}
.btn--fill:hover { filter: brightness(1.08); color: var(--cream); }
.btn--signal {
  background: var(--signal);
  color: var(--cream);
  border-color: var(--signal-press);
}
.btn--signal:hover { filter: brightness(1.08); background: var(--signal-press); color: var(--cream); }
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--wick);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--wick); color: var(--cream); }
.btn--ember {
  background: var(--ember);
  color: var(--ember-ink);
  border-color: var(--ember);
}
.btn--ember:hover { filter: brightness(1.06); color: var(--ember-ink); }
button.game-demo-btn { font: inherit; }

.hero {
  position: relative;
  overflow: clip;
  margin-top: calc(var(--mast-h) * -1);
  padding-top: var(--mast-h);
  min-height: calc(28rem + var(--mast-h));
  background: var(--pitch);
}
/* The hero starts under the sticky mast, so the frosted bar has real artwork to sample and
   the seam between chrome and picture disappears. The extra padding keeps the copy where it
   was when the bar was an opaque slab in the flow. */
.hero .page-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
  animation: pitIn 1.1s ease both;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 12, 22, 0.9) 0%, rgba(7, 12, 22, 0.6) 34%, rgba(7, 12, 22, 0.16) 64%, rgba(7, 12, 22, 0.06) 100%),
    linear-gradient(0deg, rgba(7, 12, 22, 0.35) 0%, transparent 38%),
    linear-gradient(180deg, rgba(7, 12, 22, 0.88) 0%, rgba(7, 12, 22, 0.34) calc(var(--mast-h) + 1rem), rgba(7, 12, 22, 0) 14rem);
}
.hero__stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.4rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2.1rem 1rem 2rem;
}
.hero__copy { max-width: 38rem; }
.hero h1 { font-size: clamp(1.85rem, 4.2vw, 3.05rem); letter-spacing: -0.03em; }
.page-hero-shade { display: none; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--mute);
  margin-bottom: 0.7rem;
}
.kicker__live {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--wick);
  box-shadow: 0 0 0 0 rgba(94, 180, 255, 0.55);
  animation: livePulse 1.8s ease-out infinite;
}
.lede { font-size: 1.08rem; max-width: 38rem; color: var(--cream); }
.hero__pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 1rem 0 0;
}
.hero__pills li {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(16, 24, 42, 0.72);
  color: var(--cream);
  font-size: 0.86rem;
}
.hero__act, .flag__act { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.15rem; }
.hero--inner { min-height: calc(22rem + var(--mast-h)); }
.hero--inner .page-hero-media { object-position: 72% center; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.wrap > section,
.board {
  background: var(--turf);
  border: 1px solid var(--rule);
  border-radius: 0.85rem;
  padding: 1.35rem 1.25rem 1.45rem;
  margin: 0 0 1.1rem;
}
.wrap > section.writer { margin-top: 1.4rem; }
.bento {
  display: grid;
  gap: 1rem;
  align-items: start;
}
.bento__main { display: grid; gap: 0.85rem; }
.bento .card-grid {
  grid-template-columns: 1fr 1fr;
  margin: 0;
  gap: 0.55rem;
}
.bento .feat {
  padding: 0.8rem 0.85rem;
  gap: 0.2rem 0.65rem;
}
.bento .ico { width: 2.2rem; height: 2.2rem; padding: 0.35rem; }
.bento .feat p { font-size: 0.9rem; }
.room-board {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.1rem;
}
.room-board .board { margin: 0; }
.byline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.85rem;
  margin: 0 0 1.1rem;
  background: var(--turf);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--mute);
  font-size: 0.92rem;
  gap: 0.35rem;
}
.byline__stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-right: 0.65rem;
  margin-right: 0.2rem;
  border-right: 1px solid var(--rule);
  font-size: 0.84rem;
  color: var(--mute);
}
.byline__stamp::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--wick);
}
.toc { margin: 0 0 1.1rem; background: var(--turf); border: 1px solid var(--rule); border-radius: 0.85rem; padding: 1rem 1.15rem; }
.toc summary {
  cursor: pointer;
  font-family: Outfit, sans-serif;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--wick);
  transition: transform 0.18s ease;
}
.toc details[open] summary::after { transform: rotate(180deg); }
/* Padding only exists while the list is open, so a closed TOC is a single row. */
.toc details[open] summary { margin-bottom: 0.85rem; }
@media (min-width: 800px) {
  .toc details > ol { display: grid; }
}
.toc ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.toc a {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  text-decoration: none;
  padding: 0.2rem 0.75rem 0.2rem 1.55rem;
  position: relative;
  background: var(--leaf);
  border: 1px solid var(--rule);
  border-radius: 0.55rem;
}
.toc a:hover { border-color: var(--wick); color: var(--cream); }
.toc a::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  background: var(--wick);
  position: absolute;
  left: 0.55rem;
  border-radius: 1px;
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0.8rem 0 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--mute); }

.table-scroll {
  overflow-x: auto;
  margin: 0.4rem 0 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}
table { width: 100%; border-collapse: collapse; background: var(--leaf); }
caption { text-align: left; padding: 0.5rem 0; color: var(--mute); }
th, td {
  border: 1px solid var(--rule);
  padding: 0.7rem 0.8rem;
  text-align: left;
  hyphens: auto;
}
th { background: var(--wick); color: var(--ink); }
.field-strips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin: 0; }
.bento .field-strips { grid-template-columns: 1fr; }
.field-strips div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--leaf);
  border: 1px solid var(--rule);
  border-radius: 0.65rem;
  padding: 0.7rem 0.8rem;
  min-height: 3.6rem;
}
.field-strips dt, .field-strips .k {
  background: none;
  color: var(--mute);
  padding: 0;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field-strips dd, .field-strips .v { padding: 0; margin: 0; color: var(--cream); }

.lobby-spines {
  display: grid;
  gap: 1rem;
}
.spine-col {
  background: linear-gradient(180deg, var(--leaf), rgba(16, 24, 42, 0.72));
  padding: 0.75rem 0.7rem 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid var(--rule);
}
.spine-col__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  margin-bottom: 0.55rem;
}
.spine-col__bar h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.02rem;
}
.spine-col__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.3rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(94, 180, 255, 0.14);
  border: 1px solid rgba(94, 180, 255, 0.4);
  color: var(--wick);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.spine-col__bar a {
  color: var(--wick);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
}
.spine {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0 0 0.7rem;
  background: var(--turf);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.spine:last-child { margin-bottom: 0; }
.spine:hover,
.spine:focus-within {
  transform: translateY(-2px);
  border-color: rgba(94, 180, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}
.spine__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--pitch);
}
.spine__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}
.spine:hover .spine__img,
.spine:focus-within .spine__img { transform: scale(1.05); }
.spine__glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 12, 22, 0) 30%, rgba(7, 12, 22, 0.35) 58%, rgba(7, 12, 22, 0.94) 100%);
  pointer-events: none;
}
.spine__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(20, 112, 212, 0.92);
  color: var(--cream);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.spine:hover .spine__play,
.spine:focus-within .spine__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.spine__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem 0.6rem;
  pointer-events: none;
}
.spine__cap strong {
  color: var(--cream);
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}
.spine__cap em {
  color: rgba(244, 247, 252, 0.78);
  font-style: normal;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}
.spine:hover .spine__cap strong { color: var(--wick); }
.spine__act {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.55rem 0.6rem 0.6rem;
  margin-top: auto;
}
.spine__act .btn {
  width: 100%;
  min-height: 2.5rem;
  padding: 0 0.3rem;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-radius: 0.45rem;
}

.game-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--leaf);
  padding: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--rule);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.game-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--pitch);
  border-radius: 0.75rem;
}
.game-card__img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  width: 100%;
  transition: transform 0.35s ease;
}
.game-card:hover .game-card__img { transform: scale(1.05); }
.game-card:hover .spine__play,
.game-card:focus-within .spine__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.game-card__act {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.55rem 0.6rem 0.65rem;
  margin-top: auto;
}
.game-card__act .btn {
  width: 100%;
  min-height: 2.5rem;
  padding: 0 0.4rem;
  font-size: 0.8rem;
  white-space: nowrap;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 180, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

/* Card actions are revealed, not removed: the row keeps its height so the grid never
   jumps under the cursor. Hover, keyboard focus, and a coarse pointer all open it — on a
   phone there is no hover at all, so hiding the buttons outright would make the card
   impossible to act on. */
@media (hover: hover) and (pointer: fine) {
  .spine__act,
  .game-card__act {
    opacity: 0;
    transform: translateY(0.35rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
  }
  .spine:hover .spine__act,
  .spine:focus-within .spine__act,
  .game-card:hover .game-card__act,
  .game-card:focus-within .game-card__act {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  /* Keyboard users get focus inside the row before it becomes clickable, so the
     hidden-but-focusable trap cannot happen. */
  .spine__act .btn:focus-visible,
  .game-card__act .btn:focus-visible {
    outline: 2px solid var(--wick);
    outline-offset: 2px;
  }
}

.card-grid {
  display: grid;
  gap: 0.75rem;
  margin: 0.2rem 0 1.1rem;
}
.feat {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.35rem 0.85rem;
  background: var(--leaf);
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}
.feat h3 { grid-column: 2; margin: 0; }
.feat p { grid-column: 2; margin: 0; }
.ico {
  grid-row: 1 / span 2;
  color: var(--wick);
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.45rem;
  background: var(--turf);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
}

.step-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.step {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.9rem;
  margin: 0;
  background: var(--leaf);
  padding: 0.95rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--rule);
}
.step__n {
  background: var(--wick-press);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  min-height: 2.6rem;
  border-radius: var(--radius);
}

.content-split {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.1rem;
  align-items: stretch;
}
.split-fig {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
  object-position: center;
  border-radius: 0.75rem;
  background: var(--leaf);
}
.split-copy > :last-child { margin-bottom: 0; }
.split-copy .card-grid {
  grid-template-columns: 1fr;
  margin: 0.65rem 0 0;
  gap: 0.55rem;
}
.note-call {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--wick);
  padding: 0.9rem 1rem;
  margin: 0 0 1.2rem;
  background: var(--leaf);
  border-radius: 0.65rem;
}

/* Login pre-flight. The card is a check, not a cashier: no password field, no submit, and
   the only live control is a sponsored hop. It reads as a form so a reader recognises the
   shape, and it refuses to look like the operator's own sign-in screen. */
.login-panel {
  display: grid;
  gap: 1rem;
  margin: 0.2rem 0 0.4rem;
}
.login-card {
  background: var(--leaf);
  border: 1px solid var(--rule);
  border-radius: 0.85rem;
  padding: 1.1rem 1rem 1.15rem;
  margin: 0;
}
.login-card__title {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}
.login-card__sub {
  color: var(--mute);
  font-size: 0.9rem;
  margin: 0 0 0.95rem;
}
.seg {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.22rem;
  margin: 0 0 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--pitch);
}
.seg__opt {
  position: relative;
  cursor: pointer;
}
.seg__opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.seg__opt span {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--mute);
}
.seg__opt input:checked + span {
  background: var(--wick);
  color: var(--ink);
}
.seg__opt input:focus-visible + span {
  outline: 2px solid var(--wick);
  outline-offset: 2px;
}
.login-field { margin: 0 0 1rem; }
.login-field > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 0.4rem;
}
.input-row {
  display: flex;
  align-items: stretch;
  background: var(--pitch);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: clip;
}
.input-row:focus-within {
  border-color: var(--wick);
  box-shadow: 0 0 0 3px rgba(94, 180, 255, 0.22);
}
.input-row__prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem;
  font-weight: 700;
  color: var(--mute);
  background: var(--turf);
  border-right: 1px solid var(--rule);
}
.input-row__prefix[hidden] { display: none; }
.login-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 3rem;
  padding: 0 0.85rem;
  border: 0;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 1.02rem;
}
.login-input:focus { outline: none; }
.login-input::placeholder { color: #6f819c; }
.login-hint {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  color: var(--mute);
}
.login-hint.is-bad { color: #ff8b7d; }
.login-act { display: grid; gap: 0.6rem; }
.login-act .btn { width: 100%; }
.login-swap {
  margin: 0;
  font-size: 0.84rem;
  color: var(--mute);
  text-align: center;
}
.login-note {
  margin: 0.9rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  font-size: 0.84rem;
  color: var(--mute);
}
.login-side {
  background: var(--turf);
  border: 1px solid var(--rule);
  border-radius: 0.85rem;
  padding: 1rem;
}
.login-side h3 { margin: 0 0 0.5rem; }
.login-side ul { margin: 0 0 0.7rem; padding-left: 1.1rem; }
.login-side li { font-size: 0.92rem; margin: 0 0 0.35rem; }
.login-side__note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--mute);
}
.login-side__fig {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.6rem;
  margin: 0 0 0.85rem;
}
@media (min-width: 800px) {
  .login-panel { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
  .login-act .btn { width: auto; justify-self: start; }
}

.stamps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stamp {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.stamp img { aspect-ratio: 16 / 10; object-fit: cover; }
.stamp span {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  background: var(--wick);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
}

.notes { display: grid; gap: 1rem; }
.note {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  align-items: center;
  gap: 0.35rem 0.9rem;
  background: var(--leaf);
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 0.85rem;
}
.note__photo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 2px solid var(--wick);
  background: var(--turf);
}
.note figcaption {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--cream);
}
.note figcaption strong { font-family: Outfit, sans-serif; }
.note__city { color: var(--mute); font-size: 0.88rem; }
.note blockquote {
  grid-column: 1 / -1;
  margin: 0.55rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}
.note blockquote p { margin: 0; }

.faq-list { display: grid; gap: 0.55rem; }
.faq-row {
  background: var(--leaf);
  border: 1px solid var(--rule);
  border-radius: 0.7rem;
  overflow: hidden;
}
.faq-row summary {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}
.faq-row summary h3 { margin: 0; }
.faq-n {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--wick);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--cream);
}
.faq-row[open] .faq-n { background: var(--wick-press); color: var(--cream); border-color: var(--wick-press); }
.faq-row p { padding: 0 0.8rem 0.9rem 3rem; }
summary::-webkit-details-marker { display: none; }

.writer {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem 1.15rem;
  align-items: start;
  margin: 1.4rem 0 0;
  background: var(--turf);
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--rule);
  border-radius: 0.85rem;
}
.writer__photo {
  width: 7rem;
  height: 7rem;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 2px solid var(--wick);
  background: var(--leaf);
}
.writer__copy h2 { margin: 0 0 0.35rem; }
.writer__role {
  margin: 0 0 0.2rem;
  color: var(--mute);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.writer__stance { margin: 0 0 0.6rem; }
.writer__beat { color: var(--mute); margin: 0 0 0.7rem; font-size: 0.92rem; }
.writer__beat strong { color: var(--cream); }
.writer__opens {
  background: var(--leaf);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--wick);
  border-radius: 0.6rem;
  padding: 0.6rem 0.8rem 0.55rem;
  margin: 0 0 0.75rem;
}
.writer__opens-h {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
}
.writer__opens ul { margin: 0; padding-left: 1.05rem; }
.writer__opens li { font-size: 0.9rem; margin: 0 0 0.2rem; }
.writer__opens li:last-child { margin-bottom: 0; }
.writer__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0 0 0.75rem;
}
.writer__tags li {
  background: var(--leaf);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  color: var(--cream);
}
.writer__links { margin: 0; }
.writer__links a { color: var(--wick); }

.medal {
  position: relative;
  overflow: clip;
  margin: 1.25rem auto 2rem;
  max-width: var(--wrap);
  width: calc(100% - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 1rem;
  border-radius: 0.85rem;
  box-shadow: inset 0 0 0 2px var(--wick);
}
.medal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.medal__veil {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.1rem 1.2rem 1.2rem;
  max-width: 32rem;
  width: 100%;
  background: rgba(7, 12, 22, 0.82);
  border-radius: var(--radius);
}
.medal__veil h2 { font-size: clamp(1.15rem, 2vw, 1.45rem); margin-bottom: 0.45rem; }
.medal__veil p { margin-bottom: 0.75rem; }
.medal__veil p { text-align: center; }

.deck {
  background: var(--turf);
  border-top: 1px solid var(--rule);
  padding: 2rem 1rem 5.5rem;
}
.deck__inner { max-width: var(--wrap); margin: 0 auto; }
.deck__top {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.6rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.deck__brand { display: inline-flex; align-items: center; }
.deck__brand .site-logo { height: 2.4rem; }
.deck__tag {
  margin: 0;
  max-width: 36rem;
  color: var(--mute);
  font-size: 0.95rem;
}
.deck__facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}
.deck__facts li {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--leaf);
  color: var(--cream);
  font-size: 0.82rem;
}
.deck__facts a { min-height: 2.5rem; }
.deck__help, .deck__copy { color: var(--mute); font-size: 0.92rem; margin: 0; }
.deck__cols { display: grid; gap: 1.25rem; }
.deck__h {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 0.35rem;
}
.deck ul { list-style: none; padding: 0; margin: 0; }
.deck a {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  text-decoration: none;
  color: var(--cream);
}
.deck a:hover { color: var(--wick); }
.deck__marks {
  margin-top: 1.6rem;
  padding: 1rem 1rem 0.85rem;
  background: var(--leaf);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}
.deck__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0.55rem 0 0;
  margin: 0;
}
.chip {
  height: 1.85rem;
  width: auto;
  background: #fff;
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
}
.deck__copy {
  margin-top: 1.2rem;
  padding: 1rem 3.2rem 0 0;
  border-top: 1px solid var(--rule);
}

.ticks {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--turf);
  border-top: 1px solid var(--rule);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.ticks a {
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.8rem;
  padding-inline: 0.5rem;
  min-width: 44px;
}
.to-top {
  position: fixed;
  right: 0.8rem;
  bottom: 4.2rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--wick);
  background: var(--leaf);
  color: var(--cream);
  display: none;
  z-index: 60;
  cursor: pointer;
}
.to-top.is-on { display: block; }

.game-page-play {
  position: relative;
  min-height: 14rem;
  margin: 0 0 1.4rem;
  overflow: hidden;
}
.game-page-play__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.game-page-play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 12, 22, 0.78), transparent);
}
.game-page-play__info {
  position: relative;
  z-index: 1;
  padding: 6rem 1rem 1rem;
}

#demo-dialog {
  width: min(96vw, 64rem);
  height: min(90vh, 42rem);
  border: 1px solid var(--wick);
  background: var(--pitch);
  color: var(--cream);
  padding: 0;
}
#demo-dialog iframe { width: 100%; height: calc(100% - 4.5rem); border: 0; }
.demo-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.7rem;
}
.demo-note { padding: 0 0.7rem 0.5rem; color: var(--mute); font-size: 0.85rem; }

.authors-grid { display: grid; gap: 1rem; }
.file-card {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.8rem;
  background: var(--leaf);
  padding: 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}
.file-card h2 { margin: 0 0 0.2rem; }
.file-card p { margin: 0 0 0.55rem; }
.file-card__meta {
  color: var(--mute);
  font-size: 0.82rem;
  margin: 0;
}
.file-card__meta a { color: var(--wick); }

/* Author profile: the brief is a two-column sheet on a wide screen, one column on a phone.
   Tables already scroll inside .table-scroll, so nothing here needs its own overflow. */
.profile-split {
  display: grid;
  gap: 1.1rem;
}
.profile-split > section { margin: 0; }
@media (min-width: 800px) {
  .authors-grid { grid-template-columns: 1fr 1fr; }
  /* Three writers on a two-column grid leaves a lone card on the last row.
     Let it run the full width and keep its text at a readable measure. */
  .authors-grid > .file-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    grid-template-columns: 7rem minmax(0, 42rem);
  }
  .profile-split { grid-template-columns: 1fr 1fr; align-items: start; }
  .profile-split > section { break-inside: avoid; }
  /* An odd number of sections would leave the closing block in a half-empty
     row. Let it run full width and read as the closing note it is. */
  .profile-split > section:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 800px) {
  .mast__nav, .mast__actions { display: flex; }
  .mast__menu, .ticks { display: none; }
  .lobby-spines { grid-template-columns: repeat(2, 1fr); }
  .game-wrap { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .notes { grid-template-columns: repeat(2, 1fr); }
  .toc ol { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .room-board { grid-template-columns: 1fr 1fr; }
  .step-list { grid-template-columns: 1fr 1fr; }
  .stamps { grid-template-columns: repeat(4, 1fr); }
  .content-split {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .content-split .split-fig {
    grid-column: 2;
    grid-row: 1;
    min-height: 18rem;
  }
  .content-split .split-copy { grid-column: 1; grid-row: 1; }
  .content-split--reverse .split-fig { grid-column: 1; }
  .content-split--reverse .split-copy { grid-column: 2; }
  .deck__cols { grid-template-columns: repeat(4, 1fr); }
  .deck { padding-bottom: 2rem; }
  .to-top { bottom: 1.2rem; }
  .hero { min-height: calc(36rem + var(--mast-h)); }
  .hero--inner { min-height: calc(28rem + var(--mast-h)); }
  .medal { padding: 2rem 1.25rem; }
  .hero__stage {
    display: flex;
    align-items: center;
    padding: 3.6rem 1rem 3.2rem;
  }
}
@media (min-width: 1100px) {
  .lobby-spines { grid-template-columns: repeat(4, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .toc ol { grid-template-columns: 1fr 1fr 1fr; }
}
.cta-aside { margin: 0 0 1.15rem; }
@media (max-width: 800px) {
  .hero { padding-bottom: 1rem; }
  /* The hero is a tall portrait box while the plates are 16:9, so cover shows about 42%
     of the plate width. At 66% the right side of the device was clipped; 78% frames the
     whole phone and keeps the copy column clear on every inner page. */
  .hero .page-hero-media { object-position: 78% center; }
  table th, table td { padding: 0.5rem; font-size: 0.92rem; }
  .field-strips { grid-template-columns: 1fr 1fr; }
  .medal { padding: 1.35rem 0.85rem; }

  /* Touch targets. A 44px floor on a finger-driven screen: body links sit inside running
     text, so the padding is vertical and negative margins keep the line height intact. */
  .wrap p a,
  .wrap li a,
  .wrap dd a,
  .writer__copy p a,
  .toc a,
  .toc summary,
  .deck a,
  .deck__facts a,
  .spine-col__bar a,
  .cta-link.btn,
  .spine__act .btn,
  .game-card__act .btn,
  .login-act .btn,
  .byline a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .wrap p a,
  .wrap li a,
  .wrap dd a {
    padding-block: 0.55rem;
    margin-block: -0.55rem;
  }
  /* The inline "See all" and similar compact links need a real box, not just text. */
  .spine-col__bar a {
    padding-inline: 0.35rem;
    margin-inline: -0.35rem;
  }
  /* Footer column links sit in a dense two-column list; they need width, not just height. */
  .deck ul a {
    min-height: 44px;
    min-width: 44px;
    padding-block: 0.4rem;
    margin-block: -0.4rem;
    padding-inline: 0.3rem;
    margin-inline: -0.3rem;
  }
  .seg__opt span { min-height: 44px; }
  .to-top { min-width: 44px; min-height: 44px; }
  .skip { min-height: 44px; }
}
@media (max-width: 380px) {
  table th, table td { padding: 0.4rem; font-size: 0.86rem; }
  .bento .card-grid { grid-template-columns: 1fr; }
  .writer { grid-template-columns: 1fr; justify-items: start; }
}
/* Under ~520px the 7rem portrait plus a text column leaves the copy in a narrow well and
   the plate runs a metre tall. Stack it instead: portrait first, text full width. */
@media (max-width: 520px) {
  .writer {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 1.05rem 1rem;
  }
  .writer__photo { width: 5.5rem; height: 5.5rem; }
}

.js-reveal { opacity: 0; transform: translateX(-8px); }
.js-reveal.is-in { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.45s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js-reveal { opacity: 1; transform: none; }
  .page-hero-media { animation: none; }
}

@keyframes pitIn {
  from { transform: scale(1.04); }
  to { transform: scale(1); }
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 180, 255, 0.5); }
  100% { box-shadow: 0 0 0 0.7rem rgba(94, 180, 255, 0); }
}

:focus-visible {
  outline: 2px solid var(--wick);
  outline-offset: 2px;
}
z-index-100 { }
.z-\[100\] { z-index: 100; }
