:root {
  --ff-ink: #121714;
  --ff-ink-soft: #1e2620;
  --ff-paper: #e8ebe4;
  --ff-paper-lift: #f2f4ef;
  --ff-field: #1f3d2e;
  --ff-field-mid: #2d5640;
  --ff-straw: #f3c23a;
  --ff-straw-soft: #ffd95a;
  --ff-straw-deep: #8f6a0f;
  --ff-straw-ink: #121714;
  --ff-mist: #d5dbd2;
  --ff-text: #1a211c;
  --ff-muted: #5c665e;
  --ff-line: rgba(18, 23, 20, 0.14);
  --ff-white: #f7f8f5;
  --ff-shadow: 0 20px 48px rgba(18, 23, 20, 0.18);
  --ff-radius: 4px;
  --ff-radius-sm: 3px;
  --ff-max: 1140px;
  --ff-font-display: "Bricolage Grotesque", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --ff-font-body: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", serif;
  --ff-header-h: 68px;
  --ff-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.ff-body {
  margin: 0;
  min-height: 100vh;
  color: var(--ff-text);
  font-family: var(--ff-font-body);
  font-optical-sizing: auto;
  background-color: var(--ff-paper);
  background-image:
    linear-gradient(180deg, #f1f3ed 0%, var(--ff-paper) 42%, #dde3d6 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ff-straw);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ff-skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: var(--ff-radius-sm);
  background: var(--ff-ink);
  color: var(--ff-white);
  font-family: var(--ff-font-display);
  font-weight: 650;
  transition: top 0.2s var(--ff-ease);
}

.ff-skip:focus {
  top: 0.75rem;
}

/* Header — ink bar for logo contrast */
.ff-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ff-ink);
  border-bottom: 1px solid rgba(247, 248, 245, 0.1);
  color: var(--ff-white);
  transition: background 0.3s var(--ff-ease), border-color 0.3s ease;
}

.ff-header--over-hero {
  position: absolute;
  left: 0;
  right: 0;
  /* Solid-enough bar so the brand mark stays readable over busy hero art */
  background: rgba(12, 17, 14, 0.92);
  border-bottom-color: rgba(247, 248, 245, 0.08);
  backdrop-filter: blur(8px);
}

.ff-header--over-hero.is-scrolled,
.ff-header--over-hero.is-open {
  position: sticky;
  background: var(--ff-ink);
  border-bottom-color: rgba(247, 248, 245, 0.1);
}

.ff-header__bar {
  max-width: var(--ff-max);
  margin: 0 auto;
  min-height: var(--ff-header-h);
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.ff-brand {
  flex: 0 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
  color: var(--ff-white);
}

.ff-brand img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
  transition: transform 0.25s var(--ff-ease);
}

.ff-brand:hover img {
  transform: translateY(-1px);
}

.ff-nav {
  display: none;
  gap: 0.15rem;
  margin-left: 0.35rem;
  font-family: var(--ff-font-display);
  font-weight: 650;
  font-size: 0.95rem;
  color: rgba(247, 248, 245, 0.78);
}

.ff-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: var(--ff-radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.ff-nav a:hover,
.ff-nav a[aria-current="page"] {
  color: var(--ff-white);
  background: rgba(247, 248, 245, 0.12);
}

.ff-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
}

.ff-game-menu {
  position: relative;
}

.ff-game-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--ff-radius-sm);
  border: 1px solid rgba(247, 248, 245, 0.55);
  background: rgba(247, 248, 245, 0.12);
  color: var(--ff-white);
  font-family: var(--ff-font-display);
  font-weight: 650;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ff-game-menu summary:hover,
.ff-game-menu[open] summary {
  border-color: rgba(247, 248, 245, 0.5);
  background: rgba(247, 248, 245, 0.14);
}

.ff-game-menu summary::-webkit-details-marker {
  display: none;
}

.ff-game-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(300px, 84vw);
  padding: 0.4rem;
  border-radius: var(--ff-radius);
  background: var(--ff-paper-lift);
  box-shadow: 0 12px 28px rgba(18, 23, 20, 0.12);
  border: 1px solid var(--ff-line);
  display: grid;
  gap: 0.1rem;
  color: var(--ff-text);
  z-index: 60;
}

.ff-game-menu__panel a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--ff-radius-sm);
  font-family: var(--ff-font-display);
  font-weight: 650;
}

.ff-game-menu__panel a:hover {
  background: rgba(31, 61, 46, 0.08);
}

.ff-nav-toggle {
  flex: 0 0 auto;
  min-width: 44px;
  height: 44px;
  padding: 0 0.7rem;
  border: 1px solid rgba(247, 248, 245, 0.72);
  border-radius: var(--ff-radius-sm);
  background: rgba(247, 248, 245, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--ff-white);
  z-index: 2;
  font-family: var(--ff-font-display);
  font-weight: 700;
  font-size: 0.88rem;
}

.ff-nav-toggle__label {
  display: none;
}

@media (max-width: 899px) {
  .ff-nav-toggle__label {
    display: inline;
  }
}

.ff-nav-toggle__bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
  transition: background 0.2s ease;
}

.ff-nav-toggle__bars::before,
.ff-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease;
}

.ff-nav-toggle__bars::before {
  top: -6px;
}

.ff-nav-toggle__bars::after {
  top: 6px;
}

.ff-header.is-open .ff-nav-toggle__bars {
  background: transparent;
}

.ff-header.is-open .ff-nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.ff-header.is-open .ff-nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.ff-mobile-nav {
  display: grid;
  gap: 0.35rem;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid rgba(247, 248, 245, 0.12);
  background: var(--ff-ink);
  color: var(--ff-white);
  font-family: var(--ff-font-display);
  font-weight: 650;
}

.ff-mobile-nav[hidden] {
  display: none;
}

.ff-mobile-nav > a,
.ff-mobile-nav__games a {
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid rgba(247, 248, 245, 0.12);
  color: rgba(247, 248, 245, 0.92);
}

.ff-mobile-nav > a:hover,
.ff-mobile-nav__games a:hover {
  color: var(--ff-white);
}

.ff-mobile-nav__games {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.5rem;
}

.ff-mobile-nav__games a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 0;
}

@media (max-width: 899px) {
  /* Mobile nav already lists titles — hide desktop dropdown so the menu control isn't clipped */
  .ff-game-menu {
    display: none !important;
  }

  .ff-header__bar {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    gap: 0.5rem;
  }

  .ff-brand {
    max-width: calc(100% - 5.5rem);
  }

  .ff-brand__wordmark {
    font-size: 1.02rem;
  }

  .ff-nav-toggle {
    display: inline-flex !important;
    padding: 0 0.55rem;
    font-size: 0.82rem;
  }
}

@media (min-width: 900px) {
  .ff-nav {
    display: flex;
  }

  .ff-nav-toggle {
    display: none !important;
  }

  .ff-mobile-nav {
    display: none !important;
  }
}

/* Shared sprout-and-field-guide identity. */
.ff-brand { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
.ff-brand img.ff-brand__mark { width: 46px; height: 46px; aspect-ratio: 1; flex: 0 0 46px; margin: 0; filter: none; }
.ff-brand__wordmark { font: 800 1.15rem/1.04 var(--ff-font-display); letter-spacing: -0.035em; min-width: 0; }
.ff-brand__wordmark > span { display: block; color: var(--ff-straw); font-size: 0.83rem; letter-spacing: 0.09em; margin-top: 0.22rem; }
.page-home .ff-header--over-hero { position: sticky; background: #14271f; backdrop-filter: none; }

/* Main */
.ff-main {
  min-height: 0;
}

.page-home .ff-main {
  padding-top: 0;
}

/* Hero — atmospheric color plane + separate foreground media (no text-over-art) */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ff-white);
  background: #14261c;
}

.hero__plane {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 12% 18%, rgba(224, 179, 58, 0.16), transparent 58%),
    radial-gradient(720px 380px at 88% 72%, rgba(45, 86, 64, 0.55), transparent 60%),
    linear-gradient(145deg, #0f1c15 0%, #1a3326 48%, #243f31 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--ff-max);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--ff-header-h) + 1.35rem) 1.25rem 2.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(140px, 0.75fr);
  gap: 1.5rem 2rem;
  align-items: center;
}

@media (max-width: 700px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: calc(var(--ff-header-h) + 1.1rem);
    padding-bottom: 1.75rem;
  }
}

.hero__media {
  position: relative;
  justify-self: end;
  width: min(100%, 260px);
  min-width: 140px;
  flex-shrink: 0;
  animation: brand-rise 0.75s var(--ff-ease) both;
  animation-delay: 0.08s;
}

@media (max-width: 700px) {
  .hero__media {
    justify-self: start;
    width: min(180px, 46vw);
    min-width: 0;
    order: -1;
  }
}

.hero__poster {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 320 / 427;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 1px solid rgba(247, 248, 245, 0.14);
}

.hero__content {
  position: relative;
  z-index: 1;
  min-width: 0;
  animation: brand-rise 0.7s var(--ff-ease) both;
}

.hero__logo {
  display: block;
  width: min(380px, 82vw);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1672 / 354;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.35));
}

.hero h1,
.page-hero h1,
.hub-hero h1,
.content-hero h1,
.error-hero h1 {
  font-family: var(--ff-font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-size: clamp(1.18rem, 2.1vw, 1.6rem);
  max-width: 24ch;
  font-weight: 650;
  color: rgba(247, 248, 245, 0.9);
  margin-bottom: 0.45rem;
}

.hero p {
  max-width: 34ch;
  font-size: 1.02rem;
  color: rgba(247, 248, 245, 0.9);
  margin: 0 0 1.25rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  border-radius: var(--ff-radius-sm);
  font-family: var(--ff-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: transform 0.2s var(--ff-ease), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--ff-field);
  color: #fff;
  border-color: #163225;
  -webkit-text-fill-color: #fff;
}

.btn--primary:hover {
  background: var(--ff-field-mid);
  color: #fff;
  border-color: #163225;
  -webkit-text-fill-color: #fff;
}

/* Dark atmospheric heroes need a bright CTA that doesn't melt into the plane */
.hero .btn--primary,
.hub-hero .btn--primary {
  background-color: #ffe566;
  background-image: none;
  color: #0e120f;
  border-color: #0e120f;
  -webkit-text-fill-color: #0e120f;
  box-shadow: none;
  text-shadow: none;
  font-weight: 800;
}

.hero .btn--primary:hover,
.hub-hero .btn--primary:hover {
  background-color: #fff0a0;
  background-image: none;
  color: #0e120f;
  border-color: #0e120f;
  -webkit-text-fill-color: #0e120f;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(247, 248, 245, 0.72);
  color: var(--ff-white);
}

.btn--ghost:hover {
  border-color: var(--ff-white);
  background: rgba(247, 248, 245, 0.12);
  color: var(--ff-white);
}

.btn--soft {
  background: var(--ff-paper-lift);
  border-color: var(--ff-line);
  color: var(--ff-ink);
}

.btn--soft:hover {
  background: var(--ff-white);
}

/* Sections */
.section {
  max-width: var(--ff-max);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 1.1rem;
}

.section--lead {
  padding-top: 2rem;
  padding-bottom: 1.25rem;
}

.section--narrow {
  max-width: 640px;
}

.section__intro {
  margin-bottom: 1.75rem;
  max-width: 46ch;
}

.section__intro--row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.section__intro h2,
.article-row h2,
.article-row h3,
.empty-panel h2,
.related-links h2,
.game-card__name {
  font-family: var(--ff-font-display);
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
  line-height: 1.12;
}

.section__intro h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.55rem);
  font-weight: 800;
}

.section__intro p,
.article-row p,
.empty-panel p {
  margin: 0;
  color: var(--ff-muted);
}

.text-link {
  font-family: var(--ff-font-display);
  font-weight: 700;
  color: var(--ff-field);
  border-bottom: 1px solid rgba(31, 61, 46, 0.28);
}

.text-link:hover {
  border-bottom-color: var(--ff-field);
}

/* Poster grid — portrait covers (~320×427), object-fit cover frames */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 0.9rem;
  width: 100%;
  margin: 0;
}

@media (min-width: 640px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem 1.1rem;
  }
}

@media (min-width: 960px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
  }
}

.game-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.7rem;
  color: inherit;
  min-width: 0;
  /* Visible by default — never hide when IO/JS is slow */
  opacity: 1;
  transform: none;
  transition: transform 0.25s var(--ff-ease), opacity 0.45s var(--ff-ease);
  transition-delay: var(--delay, 0ms);
}

.game-card:hover {
  transform: translateY(-3px);
}

.game-card__media {
  display: block;
  aspect-ratio: 320 / 427;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 20%, color-mix(in srgb, var(--accent, #5aa86a) 45%, transparent), transparent 70%),
    var(--ff-ink-soft);
  border: 1px solid rgba(18, 23, 20, 0.14);
  box-shadow: 0 10px 24px rgba(18, 23, 20, 0.08);
}

.game-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.45s var(--ff-ease);
}

.game-card:hover .game-card__media img {
  transform: scale(1.045);
}

.game-card__body {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  align-content: start;
}

.game-card__name {
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.game-card__blurb {
  color: var(--ff-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Soft rise — transform only so delayed cards never look washed out mid-paint */
html.js-reveal .game-grid.is-in .game-card {
  animation: card-rise 0.45s var(--ff-ease) both;
  animation-delay: var(--delay, 0ms);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.feature-list li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--ff-line);
}

.feature-list li:last-child {
  border-bottom: 1px solid var(--ff-line);
}

.feature-list strong {
  display: block;
  font-family: var(--ff-font-display);
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.feature-list span {
  color: var(--ff-muted);
}

.article-list {
  display: grid;
  gap: 0;
}

.article-row {
  display: block;
  padding: 1.25rem 0;
  border-top: 1px solid var(--ff-line);
  transition: padding-left 0.25s var(--ff-ease), color 0.2s ease;
}

.article-row:last-child {
  border-bottom: 1px solid var(--ff-line);
}

.article-row:hover {
  padding-left: 0.4rem;
  color: var(--ff-field);
}

.article-list--full .article-row h2 {
  font-size: 1.5rem;
}

/* Page / hub heroes */
.page-hero {
  padding: 2.25rem 1.25rem 1.25rem;
  background: rgba(31, 61, 46, 0.05);
  border-bottom: 1px solid var(--ff-line);
}

.page-hero--compact {
  padding-top: 1.75rem;
}

.page-hero__inner {
  max-width: var(--ff-max);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  font-weight: 800;
}

.page-hero p {
  margin: 0;
  max-width: 42ch;
  color: var(--ff-muted);
  font-size: 1.02rem;
}

.hub-hero {
  position: relative;
  color: var(--ff-white);
  overflow: hidden;
  background: #14261c;
}

.hub-hero__plane {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 320px at 8% 20%, color-mix(in srgb, var(--accent, #b8922a) 28%, transparent), transparent 58%),
    linear-gradient(135deg, #101c15 0%, #1a3024 52%, #243a2c 100%);
  pointer-events: none;
}

.hub-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--ff-max);
  width: 100%;
  margin: 0 auto;
  padding: 1.65rem 1.25rem 1.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(140px, 200px);
  gap: 1.25rem 1.75rem;
  align-items: center;
}

@media (max-width: 700px) {
  .hub-hero__inner {
    grid-template-columns: 1fr;
  }
}

.hub-hero__media {
  position: relative;
  justify-self: end;
  width: min(100%, 200px);
  min-width: 140px;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .hub-hero__media {
    justify-self: start;
    width: min(160px, 44vw);
    min-width: 0;
    order: -1;
  }
}

.hub-hero__media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 320 / 427;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 1px solid rgba(247, 248, 245, 0.14);
}

.hub-hero__content {
  position: relative;
  z-index: 1;
  min-width: 0;
  animation: brand-rise 0.65s var(--ff-ease) both;
}

.hub-hero__brand {
  display: none;
}

.hub-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
}

.hub-hero p {
  max-width: 40ch;
  color: rgba(247, 248, 245, 0.9);
  margin: 0;
}

.hub-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.hub-tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  padding-top: 1.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ff-line);
}

.hub-tool-nav__link {
  font-family: var(--ff-font-display);
  font-weight: 700;
  color: var(--ff-field);
  border-bottom: 1px solid transparent;
}

.hub-tool-nav__link:hover {
  border-bottom-color: rgba(31, 61, 46, 0.35);
}

/* Entity lists — interaction rows, not chips/cards */
.entity-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ff-line);
}

.entity-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 58px;
  padding: 0.75rem 0.15rem;
  border-bottom: 1px solid var(--ff-line);
  font-family: var(--ff-font-display);
  font-weight: 650;
  transition: padding-left 0.22s var(--ff-ease), color 0.2s ease;
}

.entity-row:hover {
  padding-left: 0.45rem;
  color: var(--ff-field);
}

.entity-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
}

.entity-list--rich {
  max-width: 760px;
}

.entity-row--rich {
  align-items: flex-start;
  min-height: 76px;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}

.entity-row__art {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(31, 61, 46, 0.06);
}

.entity-row__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-row__text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.entity-row__title {
  font-weight: 750;
  letter-spacing: -0.02em;
}

.entity-row__desc {
  color: var(--ff-muted);
  font-family: var(--ff-font-body);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
}

.content-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

.content-shell--article,
.content-shell--legal {
  max-width: 760px;
}

.content-shell__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1.1rem;
  color: var(--ff-muted);
  font-size: 0.92rem;
  font-family: var(--ff-font-display);
}

.content-shell__crumb a {
  color: var(--ff-field);
  font-weight: 650;
}

.content-hero {
  margin-bottom: 1.2rem;
}

.content-hero--text {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ff-line);
}

.content-hero__media {
  margin: 0 0 1rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 220px;
  background: var(--ff-ink);
}

.content-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.content-hero h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.content-hero__lead {
  margin: 0;
  color: var(--ff-muted);
  font-size: 1.02rem;
  max-width: 62ch;
  line-height: 1.55;
}

.related-links {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ff-line);
}

.related-links ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.related-links a {
  color: var(--ff-field);
  font-family: var(--ff-font-display);
  font-weight: 650;
}

.related-links a:hover {
  text-decoration: underline;
}

.ff-form {
  display: grid;
  gap: 1.1rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--ff-line);
  align-content: start;
}

.ff-form .btn {
  justify-self: start;
  margin-top: 0.35rem;
}

.ff-form label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--ff-font-display);
  font-weight: 650;
}

.ff-form input,
.ff-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ff-line);
  border-radius: 0;
  padding: 0.85rem 0.1rem;
  font: inherit;
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ff-form input:hover,
.ff-form textarea:hover {
  border-bottom-color: rgba(31, 61, 46, 0.4);
}

.ff-form input:focus,
.ff-form textarea:focus {
  outline: none;
  border-bottom-color: var(--ff-straw);
  background: rgba(242, 244, 239, 0.55);
}

.notice {
  padding: 1rem 0;
  border-top: 1px solid var(--ff-line);
  border-bottom: 1px solid var(--ff-line);
  margin-bottom: 1rem;
}

.notice--ok {
  border-color: rgba(31, 61, 46, 0.28);
  color: var(--ff-field);
}

.empty-state,
.empty-panel {
  color: var(--ff-muted);
}

.empty-panel {
  padding: 2rem 0;
  border-top: 1px dashed rgba(31, 61, 46, 0.3);
  border-bottom: 1px dashed rgba(31, 61, 46, 0.3);
  text-align: left;
}

.empty-panel .btn {
  margin-top: 1rem;
}

.empty-panel--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.empty-panel--inline .btn {
  margin-top: 0;
}

.error-hero {
  min-height: clamp(320px, 42vh, 480px);
  display: grid;
  align-items: center;
  padding: 2.5rem 1.25rem;
  background: rgba(31, 61, 46, 0.05);
}

.error-hero__inner {
  max-width: 640px;
  margin: 0 auto;
}

.error-hero__mark {
  margin: 0 0 0.5rem;
  font-family: var(--ff-font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ff-field);
}

.error-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
}

.error-hero p {
  color: var(--ff-muted);
  max-width: 40ch;
}

/* Footer — single shell chrome block */
.ff-main footer,
.legacy-content footer,
.legacy-content .footer {
  display: none !important;
}

.ff-footer {
  margin-top: 3rem;
  background: var(--ff-ink);
  color: rgba(247, 248, 245, 0.8);
}

.ff-footer__inner {
  max-width: var(--ff-max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 1.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .ff-footer__inner {
    grid-template-columns: 1.2fr 2fr;
  }
}

.ff-footer__brand img {
  display: block;
  width: min(170px, 70vw);
  height: auto;
  aspect-ratio: 1672 / 354;
  object-fit: contain;
  object-position: left center;
  filter: brightness(1.05);
  margin-bottom: 0.85rem;
}

.ff-footer__brand p {
  max-width: 34ch;
  color: rgba(247, 248, 245, 0.62);
  margin: 0;
}

.ff-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ff-footer__cols h2 {
  font-family: var(--ff-font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(247, 248, 245, 0.62);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.ff-footer__cols a {
  display: block;
  padding: 0.28rem 0;
  color: rgba(247, 248, 245, 0.88);
  font-family: var(--ff-font-display);
  font-weight: 600;
}

.ff-footer__cols a:hover {
  color: var(--ff-straw-soft);
}

.ff-footer__bottom {
  border-top: 1px solid rgba(247, 248, 245, 0.08);
  padding: 1rem 1.25rem 1.5rem;
  text-align: center;
  color: rgba(247, 248, 245, 0.55);
  font-size: 0.85rem;
}

@keyframes brand-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-rise {
  from {
    transform: translateY(12px);
  }
  to {
    transform: translateY(0);
  }
}

[data-reveal].is-in .entity-row,
[data-reveal].is-in .article-row,
[data-reveal].is-in .feature-list li,
[data-reveal].is-in .tool-card,
[data-reveal].is-in.ff-form {
  animation: rise-in 0.55s var(--ff-ease) both;
  animation-delay: var(--delay, 0ms);
}

@media (max-width: 700px) {
  .ff-footer__cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .game-card,
  html.js-reveal .game-grid.is-in .game-card {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .hero__content {
    animation: none !important;
  }
}

/* Homepage field guide: readable editorial copy beside original farm artwork. */
.hero--field-guide { background: #193428; }
.hero--field-guide .hero__inner { max-width: 1440px; padding: 0; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; }
.hero--field-guide .hero__content { padding: 36px 40px 32px max(24px, calc((100vw - 1100px) / 2)); align-self: center; }
.hero--field-guide .hero__eyebrow { font: 650 0.72rem/1.5 var(--ff-font-display); text-transform: uppercase; letter-spacing: 0.14em; color: #d9d6ad; max-width: none; margin-bottom: 16px; }
.hero--field-guide h1 { font-size: clamp(2.65rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -0.055em; font-weight: 800; max-width: 13ch; color: #faf5df; margin-bottom: 18px; }
.hero--field-guide h1 span { color: #efc65e; }
.hero--field-guide .hero__description { color: #d4decf; font-size: 1.1rem; line-height: 1.6; max-width: 39ch; margin-bottom: 22px; }
.hero--field-guide .hero__cta { align-items: center; gap: 20px; }
.hero--field-guide .btn--primary { background: #efc65e; border-color: #efc65e; gap: 22px; padding: 13px 20px; }
.hero__secondary { font: 650 0.9rem/1.5 var(--ff-font-display); color: #faf5df; padding: 12px 0; text-decoration: underline; text-decoration-color: #738875; text-underline-offset: 6px; }
.hero__secondary:hover { color: #efc65e; }
.hero__secondary span { margin-left: 6px; }
.hero__footnote { border-top: 1px solid #ffffff24; margin-top: 22px; padding-top: 14px; color: #c1cfbd; font: 500 0.76rem/1.6 var(--ff-font-display); }
.hero__footnote > span { color: #efc65e; margin-right: 7px; }
.hero__landscape { position: relative; min-height: 430px; overflow: hidden; }
.hero__landscape > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 66% center; }
.hero__landscape::after { content: ''; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, #12281c99); pointer-events: none; }
#pick-a-game { scroll-margin-top: 95px; }
@media (min-width: 1440px) { .hero--field-guide .hero__content { padding-left: 170px; } }
@media (max-width: 1050px) and (min-width: 701px) { .hero--field-guide .hero__content { padding: 30px 24px; } .hero--field-guide h1 { font-size: 3rem; } }
@media (max-width: 700px) {
  .hero--field-guide .hero__inner { grid-template-columns: 1fr; }
  .hero--field-guide .hero__content { padding: 26px 24px 24px; }
  .hero--field-guide .hero__eyebrow { font-size: 0.65rem; margin-bottom: 14px; }
  .hero--field-guide h1 { font-size: clamp(2.3rem, 9vw, 3.4rem); max-width: 15ch; margin-bottom: 16px; }
  .hero--field-guide .hero__description { font-size: 1rem; max-width: 40ch; margin-bottom: 20px; }
  .hero--field-guide .hero__cta { gap: 10px 20px; }
  .hero__footnote { margin-top: 16px; padding-top: 12px; }
  .hero__landscape { min-height: 190px; aspect-ratio: 2 / 1; }
  .hero__landscape > img { object-position: center 57%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.tool-detail { display: grid; gap: 1.5rem; }
@media (min-width: 900px) {
  .tool-detail { grid-template-columns: minmax(16rem, 22rem) 1fr; align-items: start; }
}
.tool-detail__cta { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }
.tool-attribution { border: 1px solid var(--ff-line); padding: 1rem 1.1rem; background: var(--ff-paper-lift); }
.tool-attribution h2 { margin: 0 0 0.65rem; font-size: 1.05rem; }
.tool-attribution__list { margin: 0; display: grid; gap: 0.55rem; }
.tool-attribution__list div { display: grid; gap: 0.15rem; }
.tool-attribution__list dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ff-muted); }
.tool-attribution__list dd { margin: 0; }
.tool-attribution__note { color: var(--ff-muted); font-size: 0.9rem; }
.tool-launch-panel { min-height: 12rem; display: grid; align-content: center; }
/* Community tools — readable card grid (must beat game-hub portrait grids) */
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  max-width: none;
  border: 0;
}
@media (min-width: 720px) {
  .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 1100px) {
  .tool-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  min-height: 100%;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--ff-line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(247, 246, 240, 0.96) 100%);
  box-shadow: 0 1px 0 rgba(26, 33, 28, 0.04);
}
.tool-card__top { display: grid; gap: 0.55rem; min-width: 0; }
.tool-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-family: var(--ff-font-display);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1.2;
  border: 1px solid transparent;
}
.tool-badge--hosted {
  color: #143528;
  background: rgba(90, 168, 106, 0.18);
  border-color: rgba(90, 168, 106, 0.28);
}
.tool-badge--link {
  color: #1f3d5c;
  background: rgba(78, 140, 196, 0.14);
  border-color: rgba(78, 140, 196, 0.28);
}
.tool-badge--featured {
  color: #5a4208;
  background: rgba(239, 198, 94, 0.35);
  border-color: rgba(201, 162, 39, 0.35);
}
.tool-badge--license {
  color: var(--ff-muted);
  background: rgba(26, 33, 28, 0.05);
  border-color: var(--ff-line);
  font-weight: 650;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tool-card__title {
  margin: 0;
  font-family: var(--ff-font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.tool-card__title a {
  color: inherit;
  text-decoration: none;
}
.tool-card__title a:hover,
.tool-card__title a:focus-visible {
  color: var(--ff-field);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.tool-card__desc {
  margin: 0;
  color: var(--ff-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
}
.tool-card__actions .btn {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
}
.tool-row { display: flex; text-decoration: none; color: inherit; padding: 0.9rem 0; border-bottom: 1px dashed rgba(31, 61, 46, 0.25); }
.tool-row__title { font-family: var(--ff-font-display); font-weight: 650; }
.tool-row__desc { display: block; color: var(--ff-muted); font-size: 0.95rem; margin-top: 0.2rem; }
.tool-row__meta { display: block; color: var(--ff-muted); font-size: 0.8rem; margin-top: 0.25rem; }
.tool-pill { display: inline-block; margin-left: 0.4rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; color: #0e120f; background: #efc65e; padding: 0.12rem 0.45rem; }
.tool-star { margin-left: 0.35rem; color: #c9a227; font-size: 1rem; }
/* Legacy row tools (if any remain) */
.entity-row--tool { justify-content: space-between; align-items: center; gap: 1rem; }
.entity-row--tool .entity-row__text { flex: 1 1 auto; text-decoration: none; color: inherit; }
.entity-row--tool .entity-row__launch { flex: 0 0 auto; min-height: 40px; padding: 0.4rem 0.95rem; font-size: 0.9rem; }

/* Ensure hub game CSS cannot force tool cards into portrait chips */
body.page-game-hub .tool-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.85rem !important;
  border: 0 !important;
}
@media (min-width: 720px) {
  body.page-game-hub .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }
}
@media (min-width: 1100px) {
  body.page-game-hub .tool-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
body.page-game-hub .tool-card {
  flex-direction: column !important;
  align-items: stretch !important;
  text-align: left !important;
  min-height: 100%;
}
body.page-game-hub .tool-card::before {
  content: none !important;
  display: none !important;
}
