@charset "utf-8";
/* ==========================================================================
   Colony Flow Field Guide — fresh wiki theme
   Light mint / teal / sun. Soft depth, rounded cards, pixel accents.
   No web fonts, no framework.
   ========================================================================== */

:root {
  --bg: #f4f9f6;
  --bg-deep: #e9f4ee;
  --surface: #ffffff;
  --surface-2: #f0f8f3;
  --surface-3: #e3f2ea;
  --ink: #14312b;
  --ink-2: #1d4a40;
  --muted: #5b736c;
  --muted-2: #7d938c;
  --line: #dcebe3;
  --line-strong: #c2d9cf;
  --teal: #0f8f74;
  --teal-dark: #0a6d58;
  --teal-deep: #084c3e;
  --teal-soft: #d9f1e9;
  --sun: #ffc247;
  --sun-deep: #b4760a;
  --sun-soft: #fff3d6;
  --coral: #ef6a53;
  --coral-deep: #a83a28;
  --coral-soft: #fde5e0;
  --sky: #2f9fc4;
  --sky-deep: #1d6b85;
  --sky-soft: #ddeff6;
  --violet: #7c6bd6;
  --violet-soft: #ece8fb;

  --font-display: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --shadow-xs: 0 1px 2px rgba(20, 49, 43, 0.05);
  --shadow-sm: 0 1px 2px rgba(20, 49, 43, 0.04), 0 10px 24px -18px rgba(20, 49, 43, 0.35);
  --shadow-md: 0 2px 6px rgba(20, 49, 43, 0.05), 0 22px 44px -28px rgba(20, 49, 43, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --wrap: 1160px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(3rem, 5.5vw, 5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

a {
  color: var(--teal-dark);
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1.5px;
}

a:hover {
  color: var(--teal);
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

p,
ul,
ol,
dl,
table,
figure,
blockquote {
  margin: 0 0 1.05em;
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.38em;
}

strong,
b {
  font-weight: 700;
  color: var(--ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4rem 0;
}

/* ---------- Type ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.022em;
  margin: 0 0 0.55em;
  text-wrap: balance;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 2.9vw, 2.25rem);
}

h3 {
  font-size: clamp(1.18rem, 1.7vw, 1.4rem);
  margin-top: 1.9em;
}

h4 {
  font-size: 1.04rem;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-top: 1.6em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.kicker::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  border-radius: 2px;
  background: var(--sun);
}

.lede {
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  line-height: 1.62;
  color: #38564d;
  max-width: 64ch;
}

.section-head {
  max-width: 70ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.3rem);
}

.section-head p:last-child {
  margin-bottom: 0;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--teal-deep);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 800px;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--white {
  background: var(--surface);
}

.section--paper {
  background: var(--bg);
}

.section--paper2 {
  background: var(--surface-2);
}

.section--mint {
  background: linear-gradient(180deg, #eef9f3 0%, #f7fcf9 100%);
}

.section--ink {
  background:
    radial-gradient(90% 120% at 85% 0%, rgba(255, 194, 71, 0.16), transparent 60%),
    linear-gradient(160deg, #0d3b32 0%, #0a2c26 100%);
  color: #e6f2ed;
}

.section--ink h2,
.section--ink h3,
.section--ink h4 {
  color: #ffffff;
}

.section--ink p,
.section--ink .lede {
  color: #cfe4dc;
}

.section--ink .kicker {
  color: var(--sun);
}

.section--ink a {
  color: #ffd98a;
}

.section + .section {
  border-top: 1px solid rgba(20, 49, 43, 0.06);
}

.section--ink + .section,
.section + .section--ink {
  border-top: 0;
}

.split {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.8rem);
  align-items: start;
}

@media (min-width: 960px) {
  .split--toc {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: clamp(2rem, 3.6vw, 3.2rem);
  }

  .split--feature {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
  }
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 680px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-right: auto;
  white-space: nowrap;
}

.brand:hover {
  color: var(--teal-dark);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  background: var(--teal-soft);
  border: 1px solid #bfe3d6;
  border-radius: 10px;
}

.brand-mark i {
  display: block;
  border-radius: 2px;
  background: var(--teal);
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(4) {
  background: var(--sun);
}

.brand-mark i:nth-child(5) {
  background: #0b5c4b;
}

.brand-mark i:nth-child(6) {
  background: var(--coral);
}

.brand-mark i:nth-child(8) {
  background: #63b8a2;
}

.brand-text small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav a {
  display: inline-block;
  padding: 0.48rem 0.66rem;
  color: #33544b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.nav a[aria-current="page"] {
  background: var(--teal);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-bars {
  display: grid;
  gap: 3px;
  width: 15px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--teal-dark);
  border-radius: 2px;
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.5rem var(--gutter) 1rem;
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.8rem 0.4rem;
    border-radius: 8px;
    font-size: 1rem;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 6px 16px -8px rgba(15, 143, 116, 0.8);
}

.btn--primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}

.btn--sun {
  background: var(--sun);
  color: #4a3000;
  border-color: #f0b02f;
}

.btn--sun:hover {
  background: #ffd06f;
  color: #4a3000;
}

.btn--ghost {
  background: var(--surface);
  color: var(--teal-dark);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.btn--line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--line:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.btn--soil {
  background: var(--teal-deep);
  color: #ffffff;
  border-color: var(--teal-deep);
}

.btn--soil:hover {
  background: #063a2f;
  color: #ffffff;
}

.btn--sm {
  padding: 0.48rem 0.9rem;
  font-size: 0.83rem;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 85% 5%, rgba(255, 194, 71, 0.28) 0%, rgba(255, 194, 71, 0) 60%),
    radial-gradient(60% 80% at 8% 100%, rgba(47, 159, 196, 0.16) 0%, rgba(47, 159, 196, 0) 62%),
    linear-gradient(180deg, #eef9f3 0%, #f7fcf9 62%, #ffffff 100%);
  padding-block: clamp(2.2rem, 4.4vw, 4rem) clamp(2.4rem, 4.6vw, 3.8rem);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(15, 143, 116, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 143, 116, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(75% 70% at 50% 30%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(75% 70% at 50% 30%, #000 0%, transparent 100%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--teal) 0 16px,
    #8fd3c1 16px 24px,
    var(--sun) 24px 34px,
    #ffe4a8 34px 42px
  );
  opacity: 0.55;
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.4rem);
  align-items: center;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

.hero h1 {
  margin-bottom: 0.4em;
  letter-spacing: -0.03em;
}

.hero-copy {
  min-width: 0;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal-dark);
  background: linear-gradient(180deg, transparent 62%, rgba(255, 194, 71, 0.55) 62%);
  padding: 0 0.06em;
}

.hero .lede {
  max-width: 56ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.2rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.hero-meta li {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2f5a4f;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #cfe8de;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* ---------- Level search ---------- */

.search {
  margin: 1.4rem 0 0.6rem;
  max-width: 460px;
}

.search__form {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
  background: var(--surface);
  border: 2px solid #cfe8de;
  border-radius: 999px;
  padding: 0.28rem 0.28rem 0.28rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search__form:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 143, 116, 0.14);
}

.search__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.search__form .search__input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.45rem 0;
}

.search__form .search__input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.search__input::placeholder {
  color: #93a9a2;
}

.search__note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.45rem 0 0;
  min-height: 1.2em;
}

.search__note[data-state="error"] {
  color: var(--coral-deep);
}

/* ---------- Hero board panel ---------- */

.board-mini {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem;
  box-shadow: var(--shadow-md);
  max-width: 430px;
  margin-inline: auto;
  transform: rotate(-1.2deg);
}

.board-mini__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.board-mini__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal-dark);
  font-weight: 700;
}

.board-mini__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 143, 116, 0.18);
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  padding: 10px;
  background: #f2f8f5;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mosaic i {
  display: block;
  aspect-ratio: 1;
  border-radius: 2px;
  background: #e2efe9;
}

.mosaic .t-amber { background: var(--sun); }
.mosaic .t-deep { background: #e6a41f; }
.mosaic .t-leaf { background: #62b98f; }
.mosaic .t-sky { background: #79c3da; }
.mosaic .t-cream { background: #fff6e2; }
.mosaic .t-clay { background: var(--coral); }

.slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 0.65rem;
}

.slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.06;
  border-radius: 9px;
  border: 1px solid rgba(20, 49, 43, 0.08);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #1c3a33;
}

.slot--amber { background: var(--sun); }
.slot--leaf { background: #9ad9b8; }
.slot--sky { background: #a9dcee; }
.slot--cream { background: #fff3d8; }
.slot--clay { background: #f6b3a6; }

.slot--empty {
  background: repeating-linear-gradient(45deg, #eef7f2 0 6px, #e2f0e9 6px 12px);
  border-style: dashed;
  border-color: #b9d8cb;
  color: #6c8d82;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.board-mini__foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.board-mini__foot b {
  color: var(--teal-dark);
}

/* ---------- Breadcrumbs ---------- */

.crumbs {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0.65rem 0;
}

.crumbs li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "/";
  color: #a9c1b8;
}

.crumbs a {
  color: #46685e;
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* ---------- Page head ---------- */

.page-head {
  background:
    radial-gradient(70% 90% at 90% 0%, rgba(255, 194, 71, 0.2) 0%, rgba(255, 194, 71, 0) 60%),
    linear-gradient(180deg, #f0faf5 0%, #ffffff 100%);
  padding-block: clamp(1.8rem, 3.6vw, 3rem) clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 24ch;
}

.page-head .lede {
  color: #3d5c53;
}

.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.page-head__meta b {
  color: #2c4d44;
  font-weight: 700;
}

/* ---------- Prose ---------- */

.prose > p:first-of-type {
  font-size: 1.08rem;
}

.prose > p,
.prose > ul,
.prose > ol,
.prose > blockquote,
.prose > .answer,
.prose > .callout {
  max-width: 70ch;
}

.prose h2 {
  margin-top: 2.5rem;
}

.prose h2:first-child {
  margin-top: 0;
}

/* ---------- Answer capsule ---------- */

.answer {
  position: relative;
  background: linear-gradient(180deg, #eefaf4 0%, #f6fdf9 100%);
  border: 1px solid #cfeade;
  border-left: 5px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.05rem 1.2rem 1.1rem;
  margin: 0 0 1.5rem;
}

.answer p {
  margin-bottom: 0.5rem;
}

.answer p:last-child {
  margin-bottom: 0;
}

.answer strong:first-child {
  color: var(--teal-deep);
}

.answer .answer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* ---------- Callouts ---------- */

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.05rem 1.2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-xs);
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
  background: var(--sun-soft);
  color: var(--sun-deep);
}

.callout--tip {
  border-left: 4px solid var(--teal);
}

.callout--tip .callout__label {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.callout--warn {
  border-left: 4px solid var(--coral);
}

.callout--warn .callout__label {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.callout--note {
  border-left: 4px solid var(--sky);
}

.callout--note .callout__label {
  background: var(--sky-soft);
  color: var(--sky-deep);
}

/* ---------- Cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card h3,
.card h4 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.card p {
  color: #43625a;
  font-size: 0.96rem;
  margin-bottom: 0.8rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card__link {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--teal-dark);
}

.card__link::after {
  content: "\2192";
  transition: transform 0.16s ease;
}

.card__link:hover::after {
  transform: translateX(3px);
}

.card--link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #b6dccb;
}

.card__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #3f7a68;
  background: var(--surface-2);
  border: 1px solid #d5e9df;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  margin-bottom: 0.65rem;
}

.card--flat {
  box-shadow: none;
  background: var(--surface-2);
  border-color: #d6eae0;
}

/* ---------- Level cards ---------- */

.level-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.level-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.level-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #a9d7c5;
  color: var(--ink);
}

.level-thumb {
  position: relative;
  aspect-ratio: 16 / 8.5;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, 0.85), transparent 55%),
    linear-gradient(135deg, hsl(var(--h, 160) 72% 90%), hsl(var(--h, 160) 62% 80%));
  border-bottom: 1px solid rgba(20, 49, 43, 0.06);
}

.level-thumb::before,
.level-thumb::after {
  content: "";
  position: absolute;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
}

.level-thumb::before {
  width: 26%;
  height: 26%;
  top: 14%;
  left: 12%;
}

.level-thumb::after {
  width: 18%;
  height: 18%;
  bottom: 16%;
  right: 16%;
}

.level-number {
  position: relative;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #1b4438;
  letter-spacing: -0.03em;
}

.level-card__body {
  padding: 0.8rem 0.95rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.level-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.level-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-top: auto;
}

/* ---------- Badges and chips ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: #3f6b5e;
  border: 1px solid #d5e9df;
  white-space: nowrap;
}

.badge--normal {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: #b9e2d4;
}

.badge--hard {
  background: var(--sun-soft);
  color: #8a5900;
  border-color: #f4dca8;
}

.badge--super {
  background: var(--coral-soft);
  color: var(--coral-deep);
  border-color: #f4c4b9;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chips li {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: #3f6258;
  background: var(--surface);
  border: 1px solid #d9ece3;
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
}

.chips li.chip--none {
  color: var(--muted);
  font-style: italic;
}

/* ---------- Level page ---------- */

.level-head {
  background:
    radial-gradient(60% 100% at 95% 0%, rgba(255, 194, 71, 0.22), transparent 60%),
    linear-gradient(180deg, #f0faf5 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.4rem, 3vw, 2.4rem);
}

.level-head h1 {
  max-width: 24ch;
}

.level-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.9rem;
}

.level-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1.3rem;
}

@media (min-width: 760px) {
  .level-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
}

.fact dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.15rem;
}

.fact dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--ink);
}

.level-pager {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr 1fr;
  margin: 1.6rem 0;
}

.level-pager a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.level-pager a:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.level-pager span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.level-pager strong {
  font-size: 1rem;
}

.level-pager .is-next {
  text-align: right;
  align-items: flex-end;
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  counter-reset: step;
}

.steps > li {
  position: relative;
  margin: 0;
  padding: 0 0 1.4rem 3rem;
  border-left: 2px solid var(--line);
}

.steps > li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -1px;
  top: -0.1rem;
  transform: translateX(-50%);
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px #cfe9df;
}

.steps > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps h3,
.steps h4 {
  margin-top: 0.1rem;
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
}

.steps p:last-child {
  margin-bottom: 0;
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: 1.4rem 0;
  box-shadow: var(--shadow-xs);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 520px;
}

caption {
  caption-side: top;
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.7rem 0.9rem 0;
}

th,
td {
  padding: 0.68rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #ecf4f0;
}

thead th {
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3f6157;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

tbody tr:nth-child(even) {
  background: #fafdfb;
}

tbody tr:hover {
  background: #f2fbf6;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong {
  white-space: nowrap;
}

.table--compact td,
.table--compact th {
  padding: 0.52rem 0.7rem;
}

.table--levels td:first-child {
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Figures ---------- */

.figure {
  margin: 1.7rem 0;
}

.figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- TOC ---------- */

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  font-size: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.95rem 0.95rem 0.35rem;
  box-shadow: var(--shadow-xs);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.toc h2 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.55rem;
  font-weight: 700;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.toc li {
  margin: 0;
  counter-increment: toc;
}

.toc a {
  position: relative;
  display: block;
  padding: 0.32rem 0 0.32rem 1.8rem;
  color: #436257;
  text-decoration: none;
  border-left: 2px solid transparent;
  line-height: 1.35;
  border-radius: 0 6px 6px 0;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  margin-left: -1.8rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #9db8ae;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--teal-dark);
  border-left-color: var(--teal);
  background: #f4fbf7;
}

@media (max-width: 959px) {
  .toc {
    position: static;
    margin-bottom: 1.8rem;
  }
}

/* ---------- Video ---------- */

.video-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  margin: 0;
  background: #dfeee7;
  cursor: pointer;
  overflow: hidden;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
  transition: opacity 0.2s ease, transform 0.4s ease;
}

.video-facade:hover img {
  transform: scale(1.02);
}

.video-facade__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.video-facade__play span {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(9, 45, 38, 0.28);
}

.video-facade__play span::after {
  content: "";
  margin-left: 5px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--teal-dark);
}

.video-facade__label {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #244a40;
  font-size: 0.76rem;
  font-weight: 600;
}

.video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.95rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-2);
}

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

.community {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

@media (min-width: 980px) {
  .community {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: start;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.2vw, 1.55rem);
  box-shadow: var(--shadow-sm);
}

.panel--soil {
  background: linear-gradient(160deg, #0e3d33 0%, #0a2c26 100%);
  border-color: #0f4a3d;
  color: #e7f3ee;
  box-shadow: none;
}

.panel--soil h2,
.panel--soil h3 {
  color: #ffffff;
}

.panel--soil p {
  color: #cfe4dc;
}

.panel--soil a {
  color: #ffd98a;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.panel-head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.ugc-feed {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.log-entry {
  margin: 0;
  background: #fbfefc;
  border: 1px solid #e4f0ea;
  border-left: 3px solid var(--teal);
  border-radius: 0 12px 12px 0;
  padding: 0.9rem 1rem;
}

.log-entry--pinned {
  background: #fffdf4;
  border-left-color: var(--sun);
}

.log-entry__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  margin-bottom: 0.3rem;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
}

.avatar--leaf {
  background: #dff2e5;
  color: #2f6b45;
}

.avatar--sky {
  background: var(--sky-soft);
  color: var(--sky-deep);
}

.avatar--clay {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.log-entry__who {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.log-entry__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.log-entry__role {
  font-size: 0.7rem;
  color: var(--muted);
}

.log-entry__stars {
  margin-left: auto;
  color: #d59a19;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.log-entry__body {
  font-size: 0.93rem;
  line-height: 1.55;
  color: #37564c;
  margin: 0;
  overflow-wrap: anywhere;
}

.log-entry__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  align-items: center;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #8aa398;
}

.ugc-status {
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2em;
  margin: 0 0 0.75rem;
}

.ugc-status[data-state="error"] {
  color: var(--coral-deep);
}

.ugc-status[data-state="ok"] {
  color: var(--teal-dark);
}

.ugc-empty {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

.vote {
  border: 1px dashed #bfe0d3;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  margin-bottom: 1.1rem;
  background: #f7fdfa;
}

.vote p {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #34574c;
}

.vote__options {
  display: grid;
  gap: 0.45rem;
}

@media (min-width: 520px) {
  .vote__options {
    grid-template-columns: 1fr 1fr;
  }
}

.vote-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.52rem 0.7rem;
  border: 1px solid #d3e8dd;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: #33564b;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vote-btn:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.vote-btn b {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal-dark);
}

/* ---------- Forms ---------- */

.ugc-form {
  display: grid;
  gap: 0.8rem;
}

.field {
  display: grid;
  gap: 0.28rem;
}

.field > label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #3c5f54;
}

.field-row {
  display: grid;
  gap: 0.8rem;
}

@media (min-width: 620px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 0.94rem;
  padding: 0.6rem 0.7rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfe4da;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 143, 116, 0.16);
  outline: none;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.captcha__question {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.42rem 0.6rem;
  color: #34574c;
  white-space: nowrap;
}

.captcha input {
  max-width: 110px;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}

.form-foot p {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  max-width: 36ch;
}

/* ---------- Author card ---------- */

.author-card {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 620px) {
  .author-card {
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: start;
  }
}

.author-card__avatar {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 194, 71, 0.35) 0 7px, transparent 7px 14px),
    var(--teal-soft);
  border: 1px solid #bfe3d6;
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
}

.author-card__avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 19px;
}

.author-card h3 {
  margin: 0 0 0.15rem;
  font-size: 1.18rem;
}

.author-card__role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 0.55rem;
}

.author-card p {
  font-size: 0.93rem;
}

.author-card p:last-child {
  margin-bottom: 0;
}

.author-facts {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.author-facts li {
  margin: 0;
  font-size: 0.72rem;
  background: var(--surface-2);
  border: 1px solid #d7ebe2;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  color: #416458;
}

/* ---------- CTA band ---------- */

.cta-band {
  background:
    radial-gradient(80% 130% at 85% 0%, rgba(255, 194, 71, 0.22), transparent 62%),
    linear-gradient(150deg, #0b7a63 0%, #085a49 55%, #073f32 100%);
  color: #f0fbf7;
  padding-block: clamp(2.1rem, 4vw, 3.2rem);
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band h2 {
  color: #ffffff;
  margin: 0 0 0.3rem;
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
}

.cta-band p {
  margin: 0;
  color: #d5eee5;
  max-width: 54ch;
}

.cta-band .btn--ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.cta-band .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.cta-band .btn--primary {
  background: #ffffff;
  color: var(--teal-deep);
  border-color: #ffffff;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.5);
}

.cta-band .btn--primary:hover {
  background: var(--sun);
  border-color: var(--sun);
  color: #4a3000;
}

/* ---------- FAQ ---------- */

.qa-list {
  border-top: 1px solid var(--line);
  margin-top: 1.3rem;
}

.qa-list details {
  border-bottom: 1px solid var(--line);
}

.qa-list summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.15rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  list-style: none;
}

.qa-list summary::-webkit-details-marker {
  display: none;
}

.qa-list summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--teal-dark);
  margin-top: 0.1rem;
}

.qa-list details[open] summary::after {
  content: "\2212";
}

.qa-list .qa-answer {
  padding: 0 0.15rem 1.05rem;
  max-width: 72ch;
  color: #3a5b50;
}

.qa-list .qa-answer p:last-child {
  margin-bottom: 0;
}

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

.site-footer {
  background: #0b2f28;
  color: #b9d2c8;
  padding-block: clamp(2.2rem, 4vw, 3.1rem) 1.3rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
  margin-bottom: 1.8rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7fd0b6;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0 0 0.4rem;
}

.site-footer a {
  color: #d3e7df;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffd98a;
  text-decoration: underline;
}

.footer-about p {
  max-width: 42ch;
  color: #9dbcb1;
  font-size: 0.85rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand:hover {
  color: #ffffff;
}

.footer-brand .brand-mark {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.footer-bottom {
  border-top: 1px solid #17453b;
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.3rem;
  justify-content: space-between;
  font-size: 0.77rem;
  color: #8fae9f;
}

.footer-bottom p {
  margin: 0;
  max-width: 76ch;
}

/* ---------- 404 ---------- */

.error-page {
  min-height: 52vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 3.5rem;
}

.error-page__code {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--teal);
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0 0 0.3rem;
  font-weight: 700;
}

/* ---------- Utilities ---------- */

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  padding: 0;
  list-style: none;
}

.inline-list li {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border: 1px solid #d5e9df;
  border-radius: 999px;
  color: #46705f;
  background: var(--surface-2);
}

.sources {
  font-size: 0.86rem;
  color: #466156;
}

.sources ol,
.sources ul {
  padding-left: 1.2rem;
}

.sources li {
  margin-bottom: 0.5rem;
}

.sources a {
  overflow-wrap: anywhere;
}

.updated {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

html.no-js .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ---------- Level index / filters ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1.2rem 0 1.4rem;
}

.filter-bar__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-right: 0.2rem;
}

.filter {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #35584d;
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter:hover {
  border-color: var(--teal);
}

.filter[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.level-table td:first-child {
  width: 74px;
}

.level-table .level-link {
  font-weight: 700;
  text-decoration: none;
}

.level-table .level-link:hover {
  text-decoration: underline;
}

.is-hidden {
  display: none !important;
}

/* ---------- Home: coverage stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.5rem;
}

@media (min-width: 760px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  box-shadow: var(--shadow-xs);
}

.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--teal-dark);
}

.stat span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---------- Home: page jump list ---------- */

.jump-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.9rem;
}

.jump-list li {
  margin: 0 0 0.35rem;
  break-inside: avoid;
}

.jump-list a {
  text-decoration: none;
  color: var(--teal-dark);
}

.jump-list a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .jump-list {
    columns: 1;
  }
}

/* ---------- Home: level matrix ---------- */

.matrix-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin: 0.7rem 0 1.7rem;
}

.matrix-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.matrix-link:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  color: var(--ink);
}

.matrix-link b {
  font-size: 0.95rem;
}

.matrix-link span {
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---------- Home: layer order lists ---------- */

.layer-list {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0.8rem;
  display: grid;
  gap: 0.32rem;
}

.layer-list li {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  margin: 0;
  font-size: 0.87rem;
  color: #3e6156;
}

.layer-list span {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
}

/* ---------- Home: video route summary ---------- */

.transcript {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  background: var(--surface);
}

.transcript summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
}

.transcript ol {
  margin: 0.7rem 0 0.5rem;
  padding-left: 1.2rem;
  font-size: 0.87rem;
}

.transcript p:last-child {
  margin-bottom: 0;
}

.card--link {
  text-decoration: none;
  color: var(--ink);
}

/* ---------- Home: slot-state comparison ---------- */

.state-compare {
  display: grid;
  gap: 0.7rem;
  margin: 1.2rem 0 1.5rem;
}

@media (min-width: 620px) {
  .state-compare {
    grid-template-columns: 1fr 1fr;
  }
}

.state-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--surface);
}

.state-card--bad {
  border-color: #f0bdb2;
  background: #fff7f5;
}

.state-card--good {
  border-color: #bfe3d3;
  background: #f6fdf9;
}

.state-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5c756c;
  margin: 0 0 0.5rem;
}

.state-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.state-slot {
  aspect-ratio: 1 / 1.1;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #1c3a33;
  border: 1px solid rgba(20, 49, 43, 0.08);
}

.state-slot--a { background: var(--sun); }
.state-slot--b { background: #9ad9b8; }
.state-slot--c { background: #a9dcee; }
.state-slot--d { background: #fff3d8; }
.state-slot--e { background: #f6b3a6; }

.state-slot--free {
  background: repeating-linear-gradient(45deg, #eef7f2 0 6px, #e2f0e9 6px 12px);
  border-style: dashed;
  color: #6c8d82;
  font-size: 0.56rem;
}

.state-note {
  font-size: 0.78rem;
  color: #45665b;
  margin: 0.5rem 0 0;
}

.filter {
  text-decoration: none;
}

/* ---------- Home: byline and grouped navigation ---------- */

.byline {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.15rem 0 1rem;
}

.byline a {
  color: var(--teal-dark);
  text-decoration: none;
}

.byline a:hover {
  text-decoration: underline;
}

.jump-groups {
  display: grid;
  gap: 0.5rem;
  margin: 0.7rem 0 0;
}

@media (min-width: 700px) {
  .jump-groups {
    grid-template-columns: 1fr 1fr;
  }
}

.jump-groups details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.55rem 0.75rem;
}

.jump-groups summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
}

.jump-groups ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}

.jump-groups li {
  margin: 0;
  font-size: 0.84rem;
}

.jump-groups a {
  text-decoration: none;
  color: var(--teal-dark);
}

.jump-groups a:hover {
  text-decoration: underline;
}

/* ---------- Home: orthogonal vs diagonal grid demo ---------- */

.grid-demo {
  display: grid;
  gap: 0.8rem;
  margin: 1.2rem 0 1.4rem;
}

@media (min-width: 560px) {
  .grid-demo {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--surface);
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  max-width: 230px;
}

.grid-5 span {
  aspect-ratio: 1;
  border-radius: 4px;
  display: block;
}

.g-clear { background: #cdeee0; }
.g-block { background: #e4e9e6; }
.g-target { background: var(--sun); }

/* ---------- Home: dataset statistics ---------- */

.stat-pair {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0.8rem;
}

@media (min-width: 700px) {
  .stat-pair {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Download: store listing diagram ---------- */

.store-mock {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.store-mock__head {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.7rem;
}

.store-mock__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-soft), #bfe3d6);
  border: 1px solid #bfe3d6;
}

.store-mock__title {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--ink);
}

.store-mock__title small {
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.store-mock__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.store-mock__rows li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: #3f6156;
  margin: 0;
}

.store-mock__tag {
  flex: 0 0 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  display: grid;
  place-items: center;
}


/* ---------- Guides hub: finder and slot check ---------- */

.finder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0.2rem;
}

.finder-chips button {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.finder-chips button[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.finder-results {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.finder-results li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
}

.finder-results li a:hover {
  border-color: var(--teal);
}

.finder-diff {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.9rem 0;
  font-size: 0.92rem;
}

.slot-result {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0.4rem 0 0.6rem;
}

.slot-result.is-ok {
  border-color: #b9ddcf;
  background: #f2fbf7;
  color: var(--teal-deep);
}

.slot-result.is-warn {
  border-color: #ecd39a;
  background: #fffaf0;
  color: #7a5a12;
}

.slot-result.is-bad {
  border-color: #e5b3a8;
  background: #fff4f1;
  color: #8c3a26;
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .nav,
  .cta-band,
  .site-footer,
  .video-card,
  .ugc-form,
  .vote,
  .search,
  .level-pager {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #444;
  }
}

/* ---------- Colony ranks in player notes ---------- */

.log-entry__role[data-rank] {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.log-entry__role[data-rank="forager"] {
  color: #5f7f6f;
}

.log-entry__role[data-rank="scout"] {
  color: #2f6f5e;
}

.log-entry__role[data-rank="tactician"] {
  color: #0a6d58;
}

.log-entry__role[data-rank="breaker"] {
  color: #a4592a;
}

.log-entry__role[data-rank="architect"] {
  color: #1d5c8a;
}

.log-entry__role[data-rank="legend"] {
  color: #9a6a12;
  font-weight: 700;
}

