/* Tidy Wilds website, dressed like the game: painted world scenes behind
   everything, parchment cards in the carved wood-and-gold frame, wooden sign
   boards for titles, glossy enamel buttons with brass rivets.

   Art: website/src/assets/img/ui/* are small WebP copies of the game's own
   cozy art (assets/cozy/panel, parchment, sign_plain, sprig, plank,
   wood_walnut, btn_*, tag, pill, plate). Nine-slice insets follow
   lib/ui/cozy/cozy_art.dart (CozySlice), scaled to the copies' sizes.
   Palette and type from lib/ui/theme.dart (EcoColors, EcoFonts) and
   lib/ui/cozy/cozy_widgets.dart (CozyColors). */

/* ---------- Fonts ----------
   Anton (headline lettering, in capitals) and Barlow (all running text), as in
   the game. Anton has one weight: the range stops browsers faking a bold. It is
   set at 84% (EcoFonts.displayScale) because its capitals are so tall. Barlow's
   lightest bundled weight is Medium, which also serves normal (400) text. */
@font-face {
  font-family: "Anton";
  src: url("/fonts/Anton-Regular.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  size-adjust: 84%;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/Barlow-Medium.ttf") format("truetype");
  font-weight: 100 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/Barlow-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/Barlow-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/Barlow-ExtraBold.ttf") format("truetype");
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* EcoColors */
  --leaf: #3dbe5a;
  --leaf-dark: #1e8c3a;
  --sun: #ffc93c;
  --berry: #ff4d6d;
  --sky: #3faef0;
  /* CozyColors */
  --cream: #fff1cf;
  --cream-deep: #ebc98a;
  --walnut: #261307;
  --ink: #3b2414;
  --ink-soft: #5a3b20; /* CozyColors.inkMuted, deepened to keep AA on the parchment's darker mottling */
  --leaf-rim: #173f14;
  --honey-rim: #5e340a;
  --sky-rim: #0d2e47;
  --berry-rim: #4a120d;
  --brass-dark: #3a2507;
  --brass: #f3d98b;
  --gold-rim: #e6b95a;
  /* Logo */
  --outline: #0e3b22;
  --rim: #e8c46a;
  --gold-1: #fffbe6;
  --gold-2: #ffe08a;
  --gold-3: #f2b233;
  --green-1: #e9ffc4;
  --green-2: #8be05a;
  --green-3: #2e9e43;

  /* Parchment (paintParchment in lib/ui/frames.dart) */
  --paper-1: #fffbee;
  --paper-2: #fef2d8;
  --paper-3: #f9e6c0;
  --panel-line: rgba(184, 134, 74, 0.45);
  --link: #155420;
  --link-hover: #0e3b22;

  /* The carved frame's width (CozySlice.panel at the game's 2.9 px scale is
     36 px); the parchment starts 58/104 of the way in. */
  --fw: 26px;
  --fpad: calc(var(--fw) * 0.56 + 12px);

  --focus: #ffc93c;
  --display: "Anton", Impact, "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* The game is warm and light; cards stay parchment whatever the system theme. */
  color-scheme: light;
}
@media (min-width: 720px) {
  :root {
    --fw: 34px;
    --fpad: calc(var(--fw) * 0.56 + 22px);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: #2c4a26;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #2c4a26;
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.0625rem; /* 17 px: EcoFonts.bodyL */
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.025em; /* EcoFonts.displayTracking */
  margin: 0 0 0.5em;
  text-transform: uppercase;
  font-feature-settings: "case" 1;
}
h1 {
  font-size: clamp(2rem, 6.4vw, 3rem);
}
h2 {
  font-size: clamp(1.65rem, 4.6vw, 2.3rem);
}
h3 {
  font-size: 1.35rem;
}
p {
  margin: 0 0 1em;
}
strong {
  font-weight: 800;
}
a {
  color: var(--link);
  font-weight: 700;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--link-hover);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 6px var(--walnut);
}
main:focus {
  outline: none;
}
.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap {
    padding: 0 28px;
  }
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--sun);
  color: var(--walnut);
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* Placeholders the owner must fill in before launch */
.ph {
  background: #fff1a8;
  color: #4a3a00;
  border: 1px dashed #b48a00;
  border-radius: 6px;
  padding: 0 0.25em;
  font-weight: 700;
  text-shadow: none;
  -webkit-text-stroke: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- The world behind the page ----------
   A painted scene from the game, fixed behind everything (a pseudo-element,
   so it also stays put on phones). Legal pages get it softly blurred and
   dimmed so the parchment in front reads cleanly. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #2c4a26 url("/assets/img/scenes/forest.jpg") center 30% / cover no-repeat;
}
body::after {
  /* A soft shade so cream lettering and frames stand out from the scene. */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 30, 12, 0.25) 0%, rgba(20, 30, 12, 0.05) 30%, rgba(20, 24, 10, 0.4) 100%);
}
.page-about::before {
  background-image: url("/assets/img/scenes/city.jpg");
}
.page-report::before {
  background-image: url("/assets/img/scenes/rainforest.jpg");
}
.page-support::before {
  background-image: url("/assets/img/scenes/river.jpg");
}
.page-404::before {
  background-image: url("/assets/img/scenes/forest_polluted.jpg");
}
.page-privacy::before,
.page-terms::before,
.page-cookies::before,
.page-copyright::before {
  inset: -24px;
  filter: blur(7px) saturate(0.85);
}
.page-privacy::before {
  background-image: url("/assets/img/scenes/reef.jpg");
}
.page-terms::before {
  background-image: url("/assets/img/scenes/beach.jpg");
}
.page-cookies::before {
  background-image: url("/assets/img/scenes/forest.jpg");
}
.page-copyright::before {
  background-image: url("/assets/img/scenes/city.jpg");
}
.page-privacy::after,
.page-terms::after,
.page-cookies::after,
.page-copyright::after {
  background: rgba(24, 20, 10, 0.42);
}

/* ---------- Painted lettering ----------
   Like the game's PaintedText / OutlinedText: Anton capitals in sign-painter's
   cream, a dark outline (stroke painted under the fill, so the letters keep
   their shape), and a cut "depth" edge with a soft shadow below. */
.painted,
.page-hero h1,
.sign,
.section-head h2,
.lost h1,
.btn,
.store-badge,
.site-nav a,
.nav-toggle,
.counter,
.tree-report .report-stats strong {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--cream);
  -webkit-text-stroke: 0.1em var(--walnut);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 #140902, 0 0.12em 0.16em rgba(0, 0, 0, 0.45);
  font-feature-settings: "case" 1;
}

/* ---------- Wooden sign board (CozySignBoard) ----------
   The game's sign_plain art nine-sliced round the title, with a leaf sprig
   tucked behind each end. */
.page-hero h1,
.sign,
.section-head h2,
.lost h1 {
  position: relative;
  display: inline-block;
  /* Room for the sprigs, which reach past the ends of the board. */
  max-width: calc(100% - 48px);
  margin: 0 auto;
  text-align: center;
  line-height: 1.08;
  /* sign.webp is 640x200: ends 125 px, boards from 44 to 189 px down. */
  border-style: solid;
  border-width: 22px 44px 15px;
  border-image: url("/assets/img/ui/sign.webp") 69 125 44 125 fill / 22px 44px 15px stretch;
  padding: 6px 4px 8px;
  overflow-wrap: break-word;
  hyphens: manual;
  z-index: 1;
}
.page-hero h1::before,
.page-hero h1::after,
.sign::before,
.sign::after,
.section-head h2::before,
.section-head h2::after,
.lost h1::before,
.lost h1::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 64px;
  height: 48px;
  background: url("/assets/img/ui/sprig.webp") center / contain no-repeat;
  z-index: -1;
  pointer-events: none;
}
.page-hero h1::before,
.sign::before,
.section-head h2::before,
.lost h1::before {
  left: -66px;
}
.page-hero h1::after,
.sign::after,
.section-head h2::after,
.lost h1::after {
  right: -66px;
  transform: scaleX(-1);
}
@media (min-width: 720px) {
  .page-hero h1,
  .sign,
  .section-head h2,
  .lost h1 {
    border-width: 30px 58px 20px;
    border-image-width: 30px 58px 20px;
    padding: 8px 10px 10px;
  }
  .page-hero h1::before,
  .page-hero h1::after,
  .sign::before,
  .sign::after,
  .section-head h2::before,
  .section-head h2::after,
  .lost h1::before,
  .lost h1::after {
    top: -14px;
    width: 86px;
    height: 64px;
  }
  .page-hero h1::before,
  .sign::before,
  .section-head h2::before,
  .lost h1::before {
    left: -84px;
  }
  .page-hero h1::after,
  .sign::after,
  .section-head h2::after,
  .lost h1::after {
    right: -84px;
  }
}

/* ---------- Parchment board in the carved wood-and-gold frame ----------
   (GameDialog / ParchmentCard): the game's panel art as a nine-slice border
   image on ::after, parchment (paintParchment) on ::before. */
.board {
  position: relative;
  isolation: isolate;
  padding: var(--fpad);
  color: var(--ink);
}
.wrap.board {
  --bw: 1100px;
  width: auto;
  max-width: var(--bw);
  margin-left: max(16px, calc((100% - var(--bw)) / 2));
  margin-right: max(16px, calc((100% - var(--bw)) / 2));
  padding: var(--fpad);
}
/* A board holding one column of reading text is sized to it. */
.content.board:not(.layout-2) {
  --bw: 900px;
}
.board::before {
  content: "";
  position: absolute;
  inset: calc(var(--fw) * 0.56 - 1px);
  z-index: -1;
  border-radius: 6px;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse at 50% 45%, rgba(154, 94, 30, 0) 60%, rgba(154, 94, 30, 0.1) 100%),
    url("/assets/img/ui/parchment.webp") 0 0 / 266px 266px repeat,
    linear-gradient(180deg, var(--paper-1) 0%, var(--paper-2) 45%, var(--paper-3) 100%);
  background-blend-mode: normal, normal, multiply, normal;
  box-shadow: 0 10px 30px rgba(10, 8, 0, 0.45);
}
.board::after {
  /* frame.webp is 320x320; CozySlice.panel scaled: 65 65 76 65. */
  content: "";
  position: absolute;
  inset: -3px;
  z-index: 0;
  pointer-events: none;
  border-style: solid;
  border-width: var(--fw);
  border-image: url("/assets/img/ui/frame.webp") 65 65 76 65 / var(--fw) var(--fw) calc(var(--fw) * 1.17) var(--fw) stretch;
}
.board > * {
  position: relative;
  z-index: 1;
}
.board > :last-child {
  margin-bottom: 0;
}

/* Smaller cards inside a board: cream panels with a soft gold line (EcoPanel). */
.card {
  position: relative;
  background: linear-gradient(180deg, #fffef8 0%, #fff4dc 55%, #f7e3be 100%);
  border: 2px solid var(--panel-line);
  border-radius: 18px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 3px 0 rgba(122, 78, 34, 0.18), 0 8px 18px rgba(80, 50, 10, 0.12);
  padding: 18px;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35em;
  color: var(--ink);
}
.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}
/* A card can itself be a framed board (support page). */
.card.board {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: var(--fpad);
}

/* ---------- Header: a walnut plank bar with a brass rim ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(180deg, rgba(60, 30, 10, 0.2), rgba(20, 8, 2, 0.55)),
    url("/assets/img/ui/wood.webp") 0 0 / 200px 200px repeat,
    #4a2a14;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(180deg, #fff1cc 0%, #e6b95a 40%, #9c6f24 100%) 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 6px 0;
}
/* The app icon in a brass rim, then the game's logo art. */
.brand-icon,
.footer-icon {
  flex: none;
  border-radius: 22%;
  box-shadow: 0 0 0 2px #e6b95a, 0 0 0 4px #3a1f0c, 0 4px 8px rgba(0, 0, 0, 0.5);
}
.brand-icon {
  width: 42px;
  height: 42px;
}
.brand-logo {
  width: auto;
  height: 56px;
  margin: -6px 0 -8px;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.45));
}
@media (min-width: 720px) {
  .brand {
    gap: 12px;
  }
  .brand-icon {
    width: 46px;
    height: 46px;
  }
  .brand-logo {
    height: 60px;
  }
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  display: block;
  text-decoration: none;
  font-size: 1.12rem;
  line-height: 1.2;
  padding: 8px 12px;
  border: 0 solid transparent;
}
.site-nav a:hover {
  color: #fff;
  filter: brightness(1.08);
}
/* The page you're on: a glossy leaf-green enamel button. */
.site-nav a[aria-current="page"] {
  border-width: 9px 18px;
  padding: 0 0 3px;
  border-image: url("/assets/img/ui/btn_leaf.webp") 24 48 24 48 fill / 9px 18px stretch;
  -webkit-text-stroke-color: var(--leaf-rim);
}
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  font-size: 1.1rem;
  line-height: 1.2;
  border-style: solid;
  border-width: 11px 22px;
  border-image: url("/assets/img/ui/btn_honey.webp") 24 48 24 48 fill / 11px 22px stretch;
  padding: 0 2px 4px;
  -webkit-text-stroke-color: var(--honey-rim);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 3px;
  background: var(--cream);
  border-radius: 2px;
  position: relative;
  box-shadow: 0 0 0 1.5px var(--honey-rim);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before {
  top: -6px;
}
.nav-toggle-bars::after {
  top: 6px;
}
@media (max-width: 719px) {
  .js .nav-toggle:not([hidden]) {
    display: inline-flex;
  }
  .js .site-nav {
    display: none;
    width: 100%;
    padding: 4px 0 14px;
  }
  .js .site-nav.is-open {
    display: block;
  }
  /* The menu drawer: one wooden plank per link. */
  .js .site-nav ul {
    flex-direction: column;
    gap: 6px;
  }
  .js .site-nav a,
  .js .site-nav a[aria-current="page"] {
    border-style: solid;
    border-width: 0 34px;
    border-image: url("/assets/img/ui/plank.webp") 0 69 0 69 fill / 0 34px stretch;
    padding: 12px 0 14px;
    font-size: 1.3rem;
    text-align: center;
    -webkit-text-stroke-color: var(--walnut);
  }
  .js .site-nav a[aria-current="page"] {
    border-image-source: url("/assets/img/ui/btn_leaf.webp");
    border-image-slice: 24 48 24 48 fill;
    border-image-width: 12px 34px;
    border-width: 12px 34px;
    padding: 0 0 2px;
    -webkit-text-stroke-color: var(--leaf-rim);
  }
  .site-nav ul {
    padding-bottom: 8px;
  }
}

/* ---------- Enamel buttons (CandyButton on the game's btn_* art) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  font-size: 1.25rem;
  line-height: 1.15;
  text-decoration: none;
  text-align: center;
  border-style: solid;
  border-width: 14px 28px;
  border-image: url("/assets/img/ui/btn_leaf.webp") 24 48 24 48 fill / 14px 28px stretch;
  padding: 0 4px 5px; /* the face sits above the art's bottom lip */
  -webkit-text-stroke-color: var(--leaf-rim);
  transition: transform 0.09s ease, filter 0.15s ease;
}
.btn:hover {
  color: #fff;
  filter: brightness(1.07) saturate(1.05);
}
.btn:active {
  transform: translateY(2px) scale(0.97);
}
.btn-gold {
  border-image-source: url("/assets/img/ui/btn_honey.webp");
  -webkit-text-stroke-color: var(--honey-rim);
}
.btn-sky {
  border-image-source: url("/assets/img/ui/btn_sky.webp");
  -webkit-text-stroke-color: var(--sky-rim);
}

/* Store badges: walnut tags with painted lettering (neutral, not Apple's or
   Google's badge art). */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 10px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  font-size: 1.25rem;
  line-height: 1.05;
  text-decoration: none;
  border-style: solid;
  border-width: 14px 26px;
  border-image: url("/assets/img/ui/tag.webp") 20 40 20 40 fill / 14px 26px stretch;
  padding: 0 0 3px;
}
a.store-badge:hover {
  color: #fff;
  filter: brightness(1.1);
}
.store-badge small {
  display: block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--brass);
  -webkit-text-stroke: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
  margin-bottom: 2px;
}
.store-badge.is-soon {
  cursor: default;
}
.badge-icon {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--brass);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7));
}

/* Small engraved brass plate ("GOAL", "LEVEL 100" labels). */
.eyebrow,
.pill {
  display: inline-block;
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-dark);
  text-shadow: 0 1px 0 rgba(255, 241, 204, 0.7);
  border-style: solid;
  border-width: 9px 20px;
  border-image: url("/assets/img/ui/plate.webp") 30 48 30 48 fill / 9px 20px stretch;
  padding: 1px 4px 2px;
}

/* ---------- Home: hero ---------- */
.hero {
  position: relative;
  padding: 26px 0 40px;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }
}
.hero-copy {
  min-width: 0;
}
.hero-board {
  margin-top: 4px;
}
.hero-copy .lede {
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: 34em;
}
.hero .dev-note {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* The game's own logo art (assets/brand/logo_home.webp). */
.logo {
  margin: 0 0 6px -1.5%;
  line-height: 0;
  width: min(100%, 600px);
}
.logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(10, 20, 4, 0.45));
}
/* Green ribbon banner with painted lettering. */
.ribbon {
  display: inline-block;
  position: relative;
  margin: 2px 0 14px;
  padding: 8px 36px 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 3.8vw, 1.45rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cream);
  -webkit-text-stroke: 0.1em var(--leaf-rim);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 #071c06;
  background: linear-gradient(180deg, #7ad66f 0%, #3fae4b 45%, #23843a 100%);
  border-top: 3px solid var(--rim);
  border-bottom: 3px solid var(--rim);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 50%, 100% 100%, 0 100%, 16px 50%);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 360px;
}
.phone {
  position: relative;
  width: min(290px, 72vw);
  margin: 0;
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(145deg, #7a4a22, #3a1f0c);
  box-shadow: 0 0 0 3px #e6b95a, 0 0 0 5px #5e340a, 0 24px 50px rgba(0, 0, 0, 0.45);
}
.phone img {
  border-radius: 26px;
  width: 100%;
  aspect-ratio: 585 / 1266;
  object-fit: cover;
  background: #1d3a40;
}
.hero-nutmeg {
  position: absolute;
  left: max(-8px, calc(50% - 250px));
  bottom: -18px;
  width: 170px;
  height: 170px;
  z-index: 2;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.4));
}
.nutmeg-anim {
  background-image: url("/assets/img/nutmeg/happy_sheet.webp");
  background-size: 1200% 100%;
  background-repeat: no-repeat;
  animation: nutmeg-frames 2.6s steps(12, jump-none) infinite, bob 3.2s ease-in-out infinite;
}
@keyframes nutmeg-frames {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 100% 0;
  }
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
.float-piece {
  position: absolute;
  width: 64px;
  height: 64px;
  z-index: 2;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.35));
  animation: bob 4s ease-in-out infinite;
}
.float-1 {
  right: max(0px, calc(50% - 215px));
  top: 10px;
}
.float-2 {
  right: max(4px, calc(50% - 230px));
  bottom: 70px;
  animation-delay: -1.3s;
}
.float-3 {
  left: max(4px, calc(50% - 215px));
  top: 30px;
  animation-delay: -2.1s;
}

/* ---------- Sections (home) ---------- */
.section {
  padding: 48px 0 8px;
}
.section:last-child {
  padding-bottom: 56px;
}
.section > .board {
  margin-top: 40px;
}
.section-head {
  max-width: 760px;
  margin: 0 auto 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-head h2 {
  order: 1;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  margin-bottom: 10px;
}
.section-head .eyebrow {
  order: 2;
  margin-bottom: 12px;
}
.section-head p {
  order: 3;
  font-size: 1.1rem;
  margin-bottom: 0;
}
/* A board's title sign straddles the top of its frame, as on the game's cards. */
.board > .section-head:first-child {
  margin-top: calc(-1 * var(--fpad) - 34px);
}
@media (min-width: 720px) {
  .board > .section-head:first-child {
    margin-top: calc(-1 * var(--fpad) - 44px);
  }
}
h3.section-head {
  display: block;
  margin-top: 40px;
  font-size: 1.55rem;
  color: var(--ink);
}
p.section-head {
  display: block;
  font-family: var(--body);
}

.grid {
  display: grid;
  gap: 16px;
}
.grid-2,
.grid-3,
.grid-4 {
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* How to play: piece strip, each piece in a board cell */
.piece-strip {
  list-style: none;
  padding: 0;
  margin: 0 auto 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.piece-strip li {
  width: 78px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}
.piece-strip img {
  width: 68px;
  height: 68px;
  margin: 0 auto 4px;
  padding: 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, #2f6e78, #1b4d57);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 0 0 2px #e6b95a, 0 3px 0 2px #8a5a1e;
}
.icon-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.icon-card img {
  width: 64px;
  height: 64px;
  flex: none;
  filter: drop-shadow(0 3px 3px rgba(80, 50, 10, 0.3));
}

/* Worlds */
.worlds {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .worlds {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .worlds {
    grid-template-columns: repeat(3, 1fr);
  }
}
.world {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #fffef8, #f7e3be);
  border: 3px solid #b8864a;
  box-shadow: inset 0 0 0 2px #f3d98b, 0 6px 14px rgba(60, 35, 10, 0.25);
  display: flex;
  flex-direction: column;
}
.world img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center 30%;
  border-bottom: 3px solid #e6b95a;
}
.world-body {
  padding: 12px 16px 16px;
}
.world h3 {
  margin-bottom: 4px;
  color: var(--ink);
}
.world .levels {
  display: inline-block;
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 rgba(0, 0, 0, 0.2);
}
.world p {
  font-size: 1rem;
  margin: 0;
}
/* Deepened biome accents so white labels pass WCAG AA. */
.w-forest {
  --accent: #1f7a37;
}
.w-city {
  --accent: #6b3fae;
}
.w-beach {
  --accent: #a3560a;
}
.w-river {
  --accent: #135f8a;
}
.w-reef {
  --accent: #0c5a88;
}
.w-rainforest {
  --accent: #0a6b59;
}

/* Gallery */
.gallery {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 760px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1060px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.gallery figure {
  margin: 0;
}
.gallery .frame {
  border-radius: 22px;
  padding: 6px;
  background: linear-gradient(145deg, #7a4a22, #3a1f0c);
  box-shadow: 0 0 0 2px #e6b95a, 0 8px 18px rgba(60, 35, 10, 0.3);
}
.gallery img {
  border-radius: 17px;
  width: 100%;
  aspect-ratio: 585 / 1266;
  object-fit: cover;
}
.gallery figcaption {
  font-size: 0.95rem;
  line-height: 1.35;
  margin-top: 10px;
  text-align: center;
  font-weight: 700;
}
.gallery-note {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 20px;
}

/* Power-ups */
.powers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 14px 8px;
}
.powers li {
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}
.powers img {
  width: 76px;
  height: 76px;
  margin: 0 auto 6px;
  filter: drop-shadow(0 3px 3px rgba(80, 50, 10, 0.3));
}
.powers .eco img {
  filter: drop-shadow(0 0 10px rgba(255, 190, 40, 0.8));
}

/* Wildlife */
.critters {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px 8px;
}
.critters li {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}
.critters img {
  width: 96px;
  height: 96px;
  margin: 0 auto 4px;
}

/* Real trees */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1060px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 18px 18px 70px;
}
.steps li::before {
  /* A brass coin with the step number. */
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--cream);
  -webkit-text-stroke: 0.1em var(--honey-rim);
  paint-order: stroke fill;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2b233 55%, #b9771a);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4), 0 0 0 2px #8a5a12, 0 3px 0 2px #5e340a;
}
.steps h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.steps p {
  margin: 0;
  font-size: 1rem;
}
.tree-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  list-style: none;
  padding: 0;
  margin: 8px 0 20px;
}
.tree-row li {
  text-align: center;
  width: 120px;
  font-size: 0.92rem;
  line-height: 1.3;
}
.tree-row img {
  width: 108px;
  height: 108px;
  margin: 0 auto;
}
.tree-row strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 1.1rem;
}
.notice {
  margin-top: 24px;
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #fff8dd, #ffedb5);
  color: #3f2f08;
  border: 2px solid #d9a93a;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7);
}
.notice a {
  color: #4f3300;
}
.notice > :last-child {
  margin-bottom: 0;
}

/* Nutmeg callout */
.nutmeg-callout {
  display: grid;
  gap: 18px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .nutmeg-callout {
    grid-template-columns: 220px 1fr;
  }
}
.nutmeg-callout > img {
  width: 200px;
  margin: 0 auto;
}
.nutmeg-callout h2 {
  color: var(--ink);
}
.speech {
  position: relative;
  background: #fffdf6;
  color: var(--ink);
  border: 3px solid #e08a2c;
  border-radius: 22px;
  padding: 16px 20px;
  margin-bottom: 8px;
  box-shadow: 0 4px 0 rgba(150, 80, 20, 0.25);
}
.speech p {
  margin: 0;
}
.speech .who {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.1rem;
  color: #8f3f10;
  display: block;
}
.cta {
  text-align: center;
}
.cta .store-badges {
  justify-content: center;
}

/* Before and after */
.before-after {
  margin-top: 28px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}
.before-after figure {
  margin: 0;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid #b8864a;
  box-shadow: inset 0 0 0 2px #f3d98b, 0 6px 14px rgba(60, 35, 10, 0.25);
}
.before-after figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center 35%;
}
.before-after figcaption {
  position: absolute;
  left: 8px;
  top: 8px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cream);
  -webkit-text-stroke: 0.1em var(--walnut);
  paint-order: stroke fill;
  border-style: solid;
  border-width: 8px 16px;
  border-image: url("/assets/img/ui/tag.webp") 20 40 20 40 fill / 8px 16px stretch;
  padding: 0 0 2px;
}
.before-after-copy {
  grid-column: 1 / -1;
  text-align: center;
}
.before-after-copy .piece-strip {
  margin-bottom: 0;
}
@media (min-width: 900px) {
  .before-after {
    grid-template-columns: 1fr 1fr 1.4fr;
  }
  .before-after-copy {
    grid-column: auto;
    text-align: left;
  }
  .before-after-copy .piece-strip {
    justify-content: flex-start;
  }
}

/* ---------- Inner pages ---------- */
.page-hero {
  padding: 34px 0 6px;
  text-align: center;
}
.page-hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page-hero h1 {
  font-size: clamp(1.75rem, 6.2vw, 2.7rem);
  margin-bottom: 16px;
}
/* The intro line on a deep glass plaque with a gold edge (GlassPlaque). */
.page-hero p {
  max-width: 44em;
  margin: 0;
  color: #fffaf0;
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.5;
  background: rgba(18, 40, 46, 0.86);
  border: 1.5px solid var(--gold-rim);
  border-radius: 16px;
  padding: 10px 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.page-hero p + p {
  margin-top: 8px;
}
.page-hero .meta {
  font-size: 0.95rem;
  color: var(--brass);
  padding: 6px 14px;
}
.page-hero a {
  color: var(--brass);
}
.content {
  margin-top: 30px;
  margin-bottom: 56px;
}
.prose {
  max-width: 780px;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
}
@media (min-width: 720px) {
  .prose {
    font-size: 1.125rem; /* 18 px */
  }
}
.prose strong {
  font-weight: 700;
}
.prose h2 {
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  margin-top: 1.7em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--panel-line);
  scroll-margin-top: 96px;
  color: var(--ink);
}
.prose > h2:first-child,
.prose > :first-child h2:first-child {
  margin-top: 0;
}
/* Sub-headings in Barlow ExtraBold, like the game's strong lines: sentences
   stay in sentence case and easy to read. */
.prose h3 {
  font-family: var(--body);
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-top: 1.4em;
  scroll-margin-top: 96px;
  color: var(--ink);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose li::marker {
  color: #a06a2a;
}
.prose code {
  font-size: 0.92em;
  background: rgba(122, 78, 34, 0.12);
  padding: 0.05em 0.3em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.layout-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
@media (min-width: 1000px) {
  .layout-2 {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .toc {
    position: sticky;
    top: 92px;
    align-self: start;
    max-height: calc(100vh - 112px);
    overflow: auto;
  }
}

/* Table of contents as a game list: numbered brass coins on cream rows. */
.toc {
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(180deg, #fffef8, #f7e3be);
  border: 2px solid var(--panel-line);
  border-radius: 16px;
  padding: 14px 12px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8);
}
.toc h2 {
  font-size: 1.2rem;
  margin: 0 4px 10px;
  color: var(--ink);
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.toc li {
  counter-increment: toc;
  position: relative;
  padding: 5px 8px 5px 38px;
  border-radius: 10px;
  line-height: 1.3;
}
.toc li:nth-child(odd) {
  background: rgba(184, 134, 74, 0.1);
}
.toc li::before {
  content: counter(toc);
  position: absolute;
  left: 6px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 0.75rem/1 var(--body);
  color: var(--brass-dark);
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2c45a 60%, #c48a2a);
  box-shadow: 0 0 0 1.5px #8a5a12;
}
.toc a {
  text-decoration: none;
  font-weight: 700;
}
.toc a:hover {
  text-decoration: underline;
}

.draft-banner,
.owner-note,
.legal-review {
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 1.2em;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid;
}
.draft-banner {
  background: #fff1f0;
  border-color: #cc4436;
  color: #4f120c;
}
.owner-note {
  background: #fff8dd;
  border-color: #c48a1a;
  border-style: dashed;
  color: #3f2f08;
}
.legal-review {
  background: #eef4ff;
  border-color: #4f73c0;
  border-style: dashed;
  color: #1a2950;
}
.draft-banner strong,
.owner-note strong,
.legal-review strong {
  font-weight: 800;
  letter-spacing: 0.02em;
}
.draft-banner a,
.owner-note a,
.legal-review a {
  color: inherit;
}
.owner-note p:last-child,
.legal-review p:last-child,
.draft-banner p:last-child {
  margin-bottom: 0;
}
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.2em;
  border-radius: 14px;
  border: 2px solid #b8864a;
  box-shadow: inset 0 0 0 1px #f3d98b;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.97rem;
  line-height: 1.45;
  background: #fffaf0;
}
caption {
  text-align: left;
  font-weight: 800;
  padding: 10px 12px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-top: 1px solid rgba(184, 134, 74, 0.4);
}
tbody tr:nth-child(even) {
  background: rgba(235, 201, 138, 0.18);
}
thead th {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: linear-gradient(180deg, #6b4223, #4a2a14);
  border-top: 0;
}
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
  display: grid;
  gap: 10px;
}
.summary-list li {
  background: linear-gradient(180deg, #fffef8, #fbedd0);
  border: 2px solid var(--panel-line);
  border-radius: 14px;
  padding: 12px 14px 12px 46px;
  position: relative;
  margin: 0;
}
.summary-list li::before {
  /* A little leaf tick, like the game's ink-stamp ticks. */
  content: "";
  position: absolute;
  left: 13px;
  top: 15px;
  width: 20px;
  height: 20px;
  border-radius: 0 60% 0 60%;
  background: radial-gradient(circle at 30% 30%, #9be27a, #2e9e43 70%);
  box-shadow: 0 0 0 1.5px var(--leaf-rim);
  transform: rotate(-8deg);
}
.prose .summary-list {
  padding-left: 0;
}

/* Decorations: game art sitting ON the top rail of a board's frame, feet on
   the wood (never over the parchment or text). Decorative only (alt="").
   The feet of each sprite are measured from its art: Nutmeg's at 96.6% of
   the image height, the wildlife's at 90.5%; they rest 30% of the way down
   the frame rail (--fw). */
.deco {
  position: absolute;
  z-index: 2 !important;
  pointer-events: none;
  height: auto;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.35));
}
.deco-peek {
  /* Nutmeg, at the right-hand end of the top rail. */
  --dw: 84px;
  width: var(--dw);
  right: calc(var(--fw) + 6px);
  top: calc(var(--fw) * 0.3 - var(--dw) * 0.966);
}
.deco-perch {
  /* Wildlife, at the left-hand end of the top rail. */
  --dw: 76px;
  width: var(--dw);
  left: calc(var(--fw) + 6px);
  top: calc(var(--fw) * 0.3 - var(--dw) * 0.905);
}
.deco-perch.deco-right {
  left: auto;
  right: calc(var(--fw) + 6px);
}
@media (min-width: 720px) {
  .deco-peek {
    --dw: 108px;
    right: calc(var(--fw) + 20px);
  }
  .deco-perch {
    --dw: 92px;
    left: calc(var(--fw) + 20px);
  }
  .deco-perch.deco-right {
    right: calc(var(--fw) + 20px);
  }
}
/* Room above a board for whoever is sitting on it. */
.content.board:has(> .deco:not(.deco-wide-only)),
.card.board:has(> .deco:not(.deco-wide-only)) {
  margin-top: 92px;
}
@media (min-width: 421px) {
  .content.board:has(> .deco),
  .card.board:has(> .deco) {
    margin-top: 92px;
  }
}
@media (min-width: 720px) {
  .content.board:has(> .deco),
  .card.board:has(> .deco) {
    margin-top: 116px;
  }
}
@media (max-width: 420px) {
  /* Keep narrow phones uncluttered: the sign already fills the width. */
  .deco-wide-only {
    display: none;
  }
}

/* Support */
.support-grid {
  display: grid;
  gap: 40px 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .support-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.support-cards {
  margin: 34px 0;
}
.support-card {
  display: flex;
  flex-direction: column;
}
.support-card > header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.support-card > header img {
  width: 56px;
  height: 56px;
  flex: none;
  filter: drop-shadow(0 3px 3px rgba(80, 50, 10, 0.3));
}
.support-card h2 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--ink);
}
.support-card ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}
.support-card li {
  margin-bottom: 0.25em;
}
.support-card .btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: 1.12rem;
}
.page-support .card.board h2 {
  color: var(--ink);
}
.page-support .card.board h3 {
  font-family: var(--body);
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.15rem;
  margin-top: 1.1em;
}
.email-line {
  overflow-wrap: anywhere;
}


/* Tree report (/trees/): counters like the game's (a walnut pill with a gold
   rim, an icon and painted figures). */
.counter,
.tree-report .report-stats strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 150px;
  font-size: 2.4rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  border-style: solid;
  border-width: 16px 28px;
  border-image: url("/assets/img/ui/pill.webp") 32 44 32 44 fill / 16px 28px stretch;
  padding: 4px 4px 6px;
}
.counter img {
  width: 48px;
  height: 48px;
  margin: -10px 0 -10px -14px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}
.counter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 12px;
}
.counter-row .counter-label {
  font-weight: 800;
  font-size: 1.05rem;
}
.tree-report .report-stats {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .tree-report .report-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}
.tree-report .report-stats li {
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tree-report .report-stats li::before {
  content: none;
}
.tree-report .report-stats strong::before {
  content: "";
  width: 40px;
  height: 40px;
  margin: -8px 0 -8px -12px;
  background: url("/assets/img/ui/icon_trees.png") center / contain no-repeat;
}
.tree-report .report-updated,
.tree-report .report-note {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* 404 */
.lost {
  --bw: 760px;
  text-align: center;
  margin-top: 70px;
  margin-bottom: 70px;
}
.lost img {
  width: 200px;
  margin: 0 auto 14px;
}
.lost h1 {
  font-size: clamp(1.5rem, 5.4vw, 2.3rem);
  margin-bottom: 18px;
}

/* ---------- Footer: dark walnut with a brass rim ---------- */
.site-footer {
  color: #f1e3c4;
  background:
    linear-gradient(180deg, rgba(30, 14, 4, 0.72), rgba(16, 7, 2, 0.86)),
    url("/assets/img/ui/wood.webp") 0 0 / 200px 200px repeat,
    #2a160a;
  border-top: 4px solid transparent;
  border-image: linear-gradient(180deg, #9c6f24 0%, #e6b95a 60%, #fff1cc 100%) 1;
  padding: 38px 0 26px;
  font-size: 1rem;
  font-weight: 600;
}
.site-footer a {
  color: var(--cream);
  font-weight: 700;
}
.site-footer a:hover {
  color: var(--gold-2);
}
.site-footer a[aria-current="page"] {
  color: var(--gold-2);
}
.footer-inner {
  display: grid;
  gap: 26px;
}
@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr 2fr;
  }
}
.footer-logo {
  font-size: 2.2rem;
  margin: 0 0 6px;
}
.footer-tag {
  color: var(--brass);
  font-weight: 700;
}
.footer-nav {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 560px) {
  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.footer-nav h2 {
  font-size: 1.15rem;
  color: var(--brass);
  margin-bottom: 6px;
}
.footer-nav ul,
.footer-social {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin: 6px 0;
}
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.footer-legal {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(230, 185, 90, 0.35);
  font-size: 0.92rem;
  font-weight: 500;
  color: #e4d4b2;
}
.footer-legal p {
  margin: 0 0 6px;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Steps on the home page's real-trees board: cream panels. */
.steps li {
  background: linear-gradient(180deg, #fffef8 0%, #fff4dc 55%, #f7e3be 100%);
  border: 2px solid var(--panel-line);
  border-radius: 18px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 3px 0 rgba(122, 78, 34, 0.18);
}

/* ---------- Press kit (/press/) ---------- */
.page-press::before {
  background-image: url("/assets/img/scenes/beach.jpg");
}
.press-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  margin: 0 auto 14px;
  box-shadow: 0 0 0 3px var(--gold-rim), 0 0 0 6px #4a2a14, 0 10px 22px rgba(0, 0, 0, 0.4);
}
.press-hero .ribbon {
  margin: 0 0 14px;
  /* The hero's plaque style is for the intro line only. */
  max-width: none;
  background: linear-gradient(180deg, #7ad66f 0%, #3fae4b 45%, #23843a 100%);
  border: 0;
  border-top: 3px solid var(--rim);
  border-bottom: 3px solid var(--rim);
  border-radius: 0;
  padding: 8px 36px 10px;
  color: var(--cream);
  font-weight: 400;
}
.press-glance {
  display: grid;
  gap: 20px;
  align-items: start;
}
@media (min-width: 860px) {
  .press-glance {
    grid-template-columns: 1fr 320px;
    gap: 32px;
  }
}
.press-pitch {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
}
.press-contact .btn {
  margin-top: 4px;
}
.fact-sheet {
  margin: 0;
  display: grid;
  gap: 0;
  border: 2px solid #b8864a;
  border-radius: 14px;
  overflow: hidden;
  background: #fffaf0;
  box-shadow: inset 0 0 0 1px #f3d98b;
}
.fact-sheet > div {
  display: grid;
  gap: 2px 18px;
  padding: 11px 14px;
  border-top: 1px solid rgba(184, 134, 74, 0.4);
}
.fact-sheet > div:first-child {
  border-top: 0;
}
.fact-sheet > div:nth-child(even) {
  background: rgba(235, 201, 138, 0.18);
}
@media (min-width: 640px) {
  .fact-sheet > div {
    grid-template-columns: 210px 1fr;
  }
}
.fact-sheet dt {
  font-weight: 800;
  color: #7a4a22;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 2px;
}
.fact-sheet dd {
  margin: 0;
  font-weight: 600;
  line-height: 1.5;
}
.press-prose {
  margin: 0 auto;
}
.press-gallery img {
  aspect-ratio: 540 / 960;
}
.press-gallery a.frame {
  display: block;
}
.press-gallery a.frame:hover {
  filter: brightness(1.05);
}
.press-logos {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 640px) {
  .press-logos {
    grid-template-columns: 240px 1fr;
  }
}
.press-logos figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.press-logos img {
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(60, 35, 10, 0.25);
}
.press-logos figure:first-child img {
  width: 160px;
  border-radius: 34px;
}
.press-logos figcaption {
  font-weight: 800;
}
.asset-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 8px;
}
@media (min-width: 760px) {
  .asset-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
.asset-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #fffef8, #fbedd0);
  border: 2px solid var(--panel-line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.95rem;
  line-height: 1.35;
}
.asset-list strong {
  display: block;
  font-size: 1rem;
}
.asset-list a {
  flex: none;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--cream);
  -webkit-text-stroke: 0.1em var(--leaf-rim);
  paint-order: stroke fill;
  background: linear-gradient(180deg, #7ad66f, #2e9e43);
  border: 2px solid var(--leaf-rim);
  border-radius: 12px;
  padding: 6px 12px 7px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 3px 0 var(--leaf-rim);
}
.asset-list a:hover {
  color: #fff;
  filter: brightness(1.07);
}

/* /invite/<code>: the friend's code, large and easy to type. */
.invite-code {
  font-family: var(--font-display, inherit);
  font-size: clamp(2rem, 8vw, 3rem);
  letter-spacing: 0.12em;
  text-align: center;
  color: #1f6b2e;
  background: #fff8e1;
  border: 2px solid #e0b84a;
  border-radius: 16px;
  padding: 0.3em 0.6em;
  margin: 0.5em auto 1em;
  max-width: 14ch;
}

/* Tree check page (/tree/<code>, js/tree.js) */
.tree-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 1rem; }
.tree-form input { font: inherit; padding: 0.5rem 0.75rem; border-radius: 0.6rem; border: 2px solid #c9a86a; min-width: 10rem; text-transform: uppercase; }
.tree-form .btn { min-height: 48px; font-size: 1.1rem; background: none; cursor: pointer; }
.tree-steps { list-style: none; padding-left: 0; }
.tree-steps li { padding: 0.35rem 0 0.35rem 1.9rem; position: relative; }
.tree-steps li::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid #b59a78; }
.tree-steps li.done::before { content: "\2713"; color: #fff; font-size: 0.8rem; font-weight: 700; line-height: 1.1rem; text-align: center; background: #4f9a3a; border-color: #2f6b2a; }

/* The record as a certificate, like the game's (tree_certificate.dart): a
   cream sheet in a thin double gold rule, the brand, the species in green
   and the steps in their own box. */
.tree-cert {
  margin: 1.25rem 0 0.5rem;
  padding: 1.5rem 1.25rem 1.25rem;
  background: linear-gradient(var(--paper-1), var(--paper-2));
  border: 2px solid var(--gold-rim);
  outline: 1px solid var(--gold-rim);
  outline-offset: -8px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(38, 19, 7, 0.25);
}
.cert-head { text-align: center; margin-bottom: 1rem; }
.cert-head .cert-brand { margin: 0; font-size: 2.2rem; }
.cert-kind {
  margin: 0.2rem 0 0.6rem;
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--walnut);
}
.cert-kind::after {
  content: "";
  display: block;
  width: 60%;
  margin: 0.5rem auto 0;
  border-top: 1px solid var(--gold-rim);
}
.tree-cert .tree-earned { margin: 0; font-weight: 700; color: var(--ink); }
.cert-species { text-align: center; margin: 0 0 1.25rem; }
.cert-species p { margin: 0.2rem 0; }
.cert-common, .cert-latin, .cert-family, .cert-waiting { display: block; }
.cert-common {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--leaf-dark);
}
.cert-latin { font-style: italic; color: var(--ink-soft); }
.cert-family { font-size: 0.9rem; color: var(--ink-soft); }
.cert-waiting { font-weight: 700; color: var(--ink-soft); }
#tree-project { font-weight: 600; color: var(--ink); }
.tree-cert .cert-label { margin: 0 0 0.4rem; }
.tree-cert .tree-steps {
  margin: 0 0 1.25rem;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--cream-deep);
  border-radius: 12px;
}
.tree-cert .tree-steps small { color: var(--ink-soft); }
.tree-cert .cert-code {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  color: var(--walnut);
}
.tree-map { margin: 1rem 0; }
.tree-map svg { width: 100%; max-width: 36rem; height: auto; border-radius: 0.8rem; display: block; }
.tree-map .map-sea { fill: #dceef5; }
.tree-map .map-land { fill: #cfe3b8; stroke: #9cbf83; stroke-width: 0.4; }
.tree-map .map-area { fill: rgba(47, 107, 42, 0.18); stroke: #2f6b2a; stroke-width: 0.6; }
.tree-map .map-pin { fill: #b23a2a; stroke: #fff; stroke-width: 0.6; }
.tree-photos { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.tree-photos img { border-radius: 0.6rem; object-fit: cover; flex: none; max-width: 70vw; height: auto; }
.report-reconcile th, .report-reconcile td { text-align: right; }
.report-reconcile th:first-child { text-align: left; }
@media (prefers-color-scheme: dark) {
  .tree-map .map-sea { fill: #1d3440; }
  .tree-map .map-land { fill: #3c5a33; stroke: #6f9a5e; }
}

/* ---------- Polish pass (Oct 2026) ----------
   Real logo art in the header, hero and footer; the hero lit like the game's
   home screen; steps and the footer re-laid; legal pages roomier on phones. */

/* The home page sits in the new Whispering Woods scene; wide screens get the
   wider, sharper crop. */
@media (min-width: 720px) {
  .page-home::before {
    background-image: url("/assets/img/scenes/forest_wide.webp");
    background-position: center 38%;
  }
}
.hero {
  padding: 30px 0 64px;
}
/* Warm morning light from the top right and a soft vignette, so the hero art
   reads against the scene (like the game's home-screen grade). */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 78% 18%, rgba(255, 232, 160, 0.38), rgba(255, 232, 160, 0) 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, rgba(0, 0, 0, 0) 55%, rgba(12, 24, 6, 0.45) 100%);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-copy .ribbon {
  margin-left: 4px;
}
@media (max-width: 899px) {
  .hero-copy {
    align-items: center;
    text-align: left;
  }
  .logo {
    margin: 0 auto 4px;
  }
  .hero-copy .ribbon {
    margin-left: 0;
  }
  .hero-art {
    margin-top: 8px;
  }
}
@media (min-width: 900px) {
  .hero {
    padding: 44px 0 80px;
  }
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
  }
  .hero-copy .lede {
    font-size: 1.2rem;
  }
  .phone {
    width: 300px;
  }
}

/* Steps flow in columns at their natural height (no tall empty cards). */
@media (min-width: 700px) {
  .steps {
    display: block;
    columns: 2;
    column-gap: 16px;
  }
  .steps li {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 16px;
  }
}

/* Long words or placeholders never push a page sideways. */
.prose {
  overflow-wrap: break-word;
}

/* Legal pages on phones: a little more room for the words, and a contents
   list that folds away (site.js adds the toggle). */
@media (max-width: 719px) {
  .content.board,
  .layout-2.board {
    margin-left: 8px;
    margin-right: 8px;
  }
  .prose .notice {
    padding: 14px 14px 4px;
  }
  .prose h2 {
    font-size: 1.4rem;
  }
}
.toc-toggle {
  display: none;
}
@media (max-width: 999px) {
  .toc.is-foldable h2 {
    margin: 0;
  }
  .toc.is-foldable .toc-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
  }
  .toc-toggle::after {
    content: "";
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background:
      linear-gradient(45deg, transparent 46%, var(--brass-dark) 46% 58%, transparent 58%) 9px 6px / 9px 9px no-repeat,
      linear-gradient(-45deg, transparent 46%, var(--brass-dark) 46% 58%, transparent 58%) 13px 6px / 9px 9px no-repeat,
      radial-gradient(circle at 35% 30%, #fff3c4, #f2c45a 60%, #c48a2a);
    background-position: 7px 11px, 14px 11px, 0 0;
    box-shadow: 0 0 0 1.5px #8a5a12;
    transition: transform 0.2s ease;
  }
  .toc.is-open .toc-toggle::after {
    transform: rotate(180deg);
  }
  .toc.is-foldable:not(.is-open) ol {
    display: none;
  }
  .toc.is-foldable.is-open ol {
    margin-top: 10px;
  }
}

/* ---------- Footer: logo art, clean link columns ---------- */
.site-footer {
  position: relative;
  padding: 44px 0 30px;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.35);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 10px;
}
.footer-icon {
  width: 56px;
  height: 56px;
}
.footer-logo img:not(.footer-icon) {
  width: auto;
  height: 66px;
  margin: -6px 0 -8px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
}
.footer-tag {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0;
}
.footer-nav h2 {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--gold-rim);
  -webkit-text-stroke: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(230, 185, 90, 0.3);
}
.site-footer .footer-nav a {
  text-decoration: none;
  font-weight: 600;
  color: #f4e6c8;
}
.site-footer .footer-nav a:hover,
.site-footer .footer-nav a:focus-visible {
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-nav li {
  margin: 8px 0;
}
.footer-legal {
  margin-top: 34px;
  font-size: 0.88rem;
  color: #cdbb96;
}

/* Store badges share the row evenly (full width each on phones). */
.hero .store-badge {
  flex: 1 1 210px;
  justify-content: center;
  max-width: 300px;
}
@media (max-width: 899px) {
  .hero .store-badge {
    max-width: none;
  }
}
@media (min-width: 900px) {
  .hero-nutmeg {
    left: max(-8px, calc(50% - 300px));
  }
}

/* How-to-play cards: equal height, content centred so no card ends in an
   empty gap. */
.grid-3 > .icon-card {
  align-items: center;
  height: 100%;
}

/* The three ways to earn a real tree (home page, real trees section). */
.tree-ways {
  max-width: 46rem;
  margin: 0 auto 1.5rem;
}
.tree-ways ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.tree-ways li {
  margin-bottom: 0.5rem;
}
.tree-ways p {
  text-align: center;
}
