:root {
  color-scheme: dark;
  --ink: #eff8f3;
  --muted: #a5b8ad;
  --faint: #71867a;
  --water: #020906;
  --water-raised: #07130d;
  --panel: rgba(8, 23, 15, 0.9);
  --panel-strong: #0a1d13;
  --line: rgba(111, 236, 175, 0.18);
  --line-bright: rgba(111, 236, 175, 0.5);
  --mint: #6fefb1;
  --mint-soft: #b9f9d7;
  --cyan: #58dcf4;
  --gold: #ffc757;
  --red: #ff6d67;
  --violet: #b992ff;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(35, 139, 91, 0.2), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(45, 169, 190, 0.11), transparent 27rem),
    linear-gradient(180deg, #03100a 0, var(--water) 38rem, #010604 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(111, 236, 175, 0.08) 49%, rgba(111, 236, 175, 0.08) 51%, transparent 52%),
    linear-gradient(150deg, transparent 48%, rgba(111, 236, 175, 0.06) 49%, rgba(111, 236, 175, 0.06) 51%, transparent 52%);
  background-size: 74px 128px;
}

a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
.kb-shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.kb-skip { position: fixed; top: 12px; left: 12px; z-index: 20; transform: translateY(-180%); padding: 10px 15px; border-radius: 999px; background: var(--ink); color: #03100a; font-weight: 800; }
.kb-skip:focus { transform: none; }

.kb-site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 9, 6, 0.86);
  backdrop-filter: blur(16px);
}
.kb-site-header__row { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kb-brand { text-decoration: none; color: var(--mint); font-size: 1.05rem; font-weight: 950; letter-spacing: 0.16em; }
.kb-primary-nav { display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
.kb-primary-nav a { padding: 8px 11px; border-radius: 999px; color: var(--muted); font-size: 0.84rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.kb-primary-nav a:hover, .kb-primary-nav a[aria-current="page"] { background: rgba(111, 239, 177, 0.1); color: var(--mint-soft); }
.kb-play { flex: 0 0 auto; padding: 10px 17px; border: 1px solid var(--line-bright); border-radius: 999px; background: rgba(24, 84, 55, 0.42); color: #f5fff9; font-weight: 850; text-decoration: none; }
.kb-play:hover { background: rgba(37, 115, 77, 0.56); }

.kb-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 28px; color: var(--faint); font-size: 0.82rem; }
.kb-breadcrumbs a { color: var(--muted); text-decoration: none; }
.kb-breadcrumbs a:hover { color: var(--mint); }
.kb-hero { padding: 66px 0 74px; }
.kb-hero__copy { max-width: 900px; }
.kb-eyebrow, .kb-kicker { margin: 0 0 11px; color: var(--mint); font-size: 0.75rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.kb-hero h1 { max-width: 960px; margin: 0; font-size: clamp(2.7rem, 7.5vw, 6.5rem); line-height: 0.97; letter-spacing: -0.055em; text-wrap: balance; }
.kb-hero__intro { max-width: 820px; margin: 25px 0 18px; color: var(--muted); font-size: clamp(1.07rem, 2vw, 1.34rem); }
.kb-reviewed { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 0.82rem; }
.kb-reviewed::before { width: 7px; height: 7px; content: ""; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.kb-hero-art { position: relative; margin-top: 42px; overflow: hidden; border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); background: #07140e; box-shadow: var(--shadow); }
.kb-hero-art::after { position: absolute; inset: 0; content: ""; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.kb-hero-art img { display: block; width: 100%; height: auto; object-fit: contain; }
.kb-hero-art figcaption { padding: 12px 18px 14px; color: var(--faint); font-size: 0.8rem; }

.kb-main { padding-bottom: 50px; }
.kb-section { padding: 68px 0; border-top: 1px solid var(--line); }
.kb-section h2 { max-width: 850px; margin: 0 0 20px; font-size: clamp(2rem, 4.8vw, 4rem); line-height: 1.05; letter-spacing: -0.045em; text-wrap: balance; }
.kb-section h3 { margin: 0 0 8px; font-size: 1.14rem; line-height: 1.25; }
.kb-section > p, .kb-split > div > p { max-width: 780px; color: var(--muted); font-size: 1.03rem; }
.kb-section p a { color: var(--mint-soft); text-underline-offset: 4px; }
.kb-split { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: clamp(36px, 7vw, 92px); align-items: start; }
.kb-kicker--red { color: var(--red); }
.kb-kicker--gold { color: var(--gold); }
.kb-kicker--cyan { color: var(--cyan); }
.kb-kicker--violet { color: var(--violet); }

.kb-card-grid, .kb-rule-grid, .kb-species-grid, .kb-mutation-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 30px; }
.kb-card, .kb-rule-grid article, .kb-species-grid article, .kb-mutation-list article, .kb-callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12, 34, 23, 0.96), rgba(4, 13, 8, 0.96));
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
}
.kb-card { display: block; min-height: 220px; padding: 24px; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.kb-card:not(.kb-card--static):hover { transform: translateY(-4px); border-color: var(--line-bright); background: linear-gradient(145deg, rgba(16, 48, 31, 0.98), rgba(6, 19, 12, 0.98)); }
.kb-card span { display: block; margin-bottom: 28px; color: var(--mint); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.kb-card p, .kb-rule-grid p, .kb-species-grid p, .kb-mutation-list p { margin: 0; color: var(--muted); }
.kb-card-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kb-rule-grid article, .kb-mutation-list article { padding: 25px; }
.kb-mutation-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kb-mutation-list strong { color: var(--ink); }

.kb-species-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kb-species-grid article { position: relative; min-height: 168px; padding: 25px 25px 25px 76px; }
.kb-swatch { position: absolute; top: 27px; left: 24px; width: 30px; height: 76px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; box-shadow: inset -7px 0 14px rgba(0, 0, 0, 0.28), 0 0 20px rgba(111, 239, 177, 0.08); }
.kb-swatch--gold { background: linear-gradient(#fff0a2, #e8a614 58%, #8e4808); }
.kb-swatch--sprout { background: linear-gradient(#d9e2b9, #4f9a45 58%, #75462d); }
.kb-swatch--scale { background: repeating-linear-gradient(165deg, #e7eef2 0 6px, #687480 6px 13px, #232a32 13px 19px); }
.kb-swatch--electric { background: linear-gradient(90deg, #422f8a, #2ad8ff 48%, #d64cff); box-shadow: 0 0 24px rgba(42, 216, 255, 0.4); }
.kb-swatch--crimson { background: repeating-linear-gradient(#98302a 0 12px, #49241e 12px 19px); }
.kb-swatch--cosmic { background: radial-gradient(circle at 65% 24%, #ffcc00 0 4%, transparent 5%), linear-gradient(#38b6ff, #0b1026 25%, #1c0a42); }
.kb-swatch--noel { background: linear-gradient(#df3035 0 20%, #fff 20% 27%, #0b1026 27% 72%, #ffcc00); }
.kb-swatch--magma { background: repeating-linear-gradient(145deg, #202830 0 12px, #ff6600 12px 16px, #202830 16px 28px); box-shadow: 0 0 22px rgba(255, 102, 0, 0.32); }
.kb-swatch--snow { background: linear-gradient(#f2f9fc, #b0c6d8); }
.kb-swatch--bull { background: linear-gradient(90deg, #911218, #1c1d20 48%, #911218); }

.kb-steps { max-width: 780px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.kb-steps li { position: relative; min-height: 70px; padding: 0 0 24px 58px; color: var(--muted); counter-increment: step; }
.kb-steps li::before { position: absolute; top: 0; left: 0; display: grid; width: 36px; height: 36px; place-items: center; content: counter(step); border: 1px solid var(--line-bright); border-radius: 50%; color: var(--mint); font-weight: 900; }
.kb-steps strong { color: var(--ink); }
.kb-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 30px 0; }
.kb-facts div { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.kb-facts dt { color: var(--mint); font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 950; line-height: 1; letter-spacing: -0.05em; }
.kb-facts dd { margin: 9px 0 0; color: var(--muted); }
.kb-callout { max-width: 780px; margin-top: 28px; padding: 24px; border-left: 4px solid var(--mint); }
.kb-callout p { margin: 6px 0 0; color: var(--muted); }
.kb-faq { max-width: 860px; display: grid; gap: 10px; }
.kb-faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.kb-faq summary { padding: 19px 22px; cursor: pointer; color: var(--ink); font-weight: 800; }
.kb-faq details p { margin: 0; padding: 0 22px 22px; color: var(--muted); }

.kb-related { padding: 56px 0 76px; border-top: 1px solid var(--line); }
.kb-related__links { display: flex; flex-wrap: wrap; gap: 10px; }
.kb-related__links a { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--mint-soft); text-decoration: none; }
.kb-related__links a:hover { border-color: var(--line-bright); background: rgba(111, 239, 177, 0.08); }
.kb-footer { border-top: 1px solid var(--line); background: rgba(1, 6, 4, 0.72); }
.kb-footer__row { min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--faint); font-size: 0.82rem; }
.kb-footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 980px) {
  .kb-primary-nav { display: none; }
  .kb-card-grid, .kb-rule-grid, .kb-mutation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-card-grid--four, .kb-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .kb-shell { width: min(100% - 28px, 1160px); }
  .kb-site-header__row { min-height: 64px; }
  .kb-play { padding: 8px 13px; font-size: 0.84rem; }
  .kb-hero { padding: 44px 0 56px; }
  .kb-hero h1 { font-size: clamp(2.55rem, 14vw, 4.4rem); }
  .kb-section { padding: 52px 0; }
  .kb-split, .kb-card-grid, .kb-rule-grid, .kb-species-grid, .kb-mutation-list, .kb-card-grid--four, .kb-facts { grid-template-columns: 1fr; }
  .kb-card { min-height: 0; }
  .kb-footer__row { padding: 24px 0; flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kb-card { transition: none; }
}
