/* ==========================================================================
   Thongkelode — wild cat comparison library
   Palette: forest canopy, bark, sunlit gold, parchment
   ========================================================================== */

:root {
  --forest-900: #0d1c13;
  --forest-800: #12281a;
  --forest-700: #183424;
  --forest-600: #24503a;
  --moss-500: #3c6b4c;
  --moss-300: #8fae95;

  --bark-800: #3a2c1f;
  --bark-600: #6b543c;
  --bark-400: #a08663;

  --gold-600: #a97722;
  --gold-500: #c8952f;
  --gold-400: #e0b45f;
  --gold-200: #f0dcae;

  --clay-500: #a5542c;

  /* Brand mark. Reserved for the logo, not for interface accents. */
  --brand-600: #553c75;

  --paper-000: #ffffff;
  --paper-050: #fdfaf4;
  --paper-100: #f7f1e5;
  --paper-200: #efe6d5;
  --paper-300: #e2d6c0;

  --ink-900: #1e1a14;
  --ink-700: #3b352c;
  --ink-500: #61594c;
  --ink-400: #7d7466;

  --lc: #3e7d53;
  --nt: #7d8f30;
  --vu: #c08a25;
  --en: #bd6420;
  --cr: #a1302a;
  --dd: #786f62;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(30, 26, 20, .06), 0 2px 8px rgba(30, 26, 20, .05);
  --shadow-md: 0 8px 24px rgba(30, 26, 20, .09), 0 2px 6px rgba(30, 26, 20, .05);
  --shadow-lg: 0 24px 60px rgba(13, 28, 19, .18), 0 6px 18px rgba(13, 28, 19, .09);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shell: 1180px;
  --gutter: 20px;
  --header-h: 68px;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-700);
  background-color: var(--paper-050);
  background-image:
    radial-gradient(1100px 520px at 88% -8%, rgba(200, 149, 47, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 4%, rgba(24, 52, 36, .07), transparent 62%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 5.6vw, 3.15rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }

p { margin: 0 0 1.1em; }

a { color: var(--forest-600); text-decoration-color: rgba(36, 80, 58, .35); text-underline-offset: 3px; }
a:hover { color: var(--gold-600); text-decoration-color: rgba(169, 119, 34, .55); }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest-800);
  color: var(--paper-050);
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .7rem;
  font-weight: 700;
  color: var(--gold-600);
  margin: 0 0 .8em;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 28, 19, .96);
  color: var(--paper-100);
  border-bottom: 1px solid rgba(224, 180, 95, .18);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gold-400);
  text-decoration: none;
  margin-right: auto;
  padding: 10px 0;
}
/* The mark carries the brand's own violet, which has almost the same
   luminance as the header. It sits on a lit plate so it stays legible. */
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--brand-600);
  background: linear-gradient(155deg, #fffefb 0%, var(--paper-100) 78%, var(--paper-200) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -1px 2px rgba(107, 84, 60, .16),
    0 0 0 1px rgba(224, 180, 95, .26),
    0 3px 10px rgba(0, 0, 0, .34);
  transition: transform .25s ease, box-shadow .25s ease;
}

.brand:hover .brand__mark {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 2px rgba(107, 84, 60, .16),
    0 0 0 1px rgba(224, 180, 95, .5),
    0 6px 16px rgba(0, 0, 0, .4),
    0 0 18px rgba(224, 180, 95, .18);
}

@media (prefers-reduced-motion: reduce) {
  .brand__mark, .brand:hover .brand__mark { transition: none; transform: none; }
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: var(--paper-050);
  letter-spacing: .01em;
}
.brand__tagline {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--moss-300);
  margin-top: 3px;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid rgba(224, 180, 95, .3);
  border-radius: var(--radius-sm);
  color: var(--gold-400);
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 4px; }
.nav-toggle__bars i { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

.primary-nav {
  display: none;
  width: 100%;
  padding-bottom: 16px;
}
.primary-nav.is-open { display: block; }
.primary-nav ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.primary-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--paper-100);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: .95rem;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: rgba(224, 180, 95, .12);
  color: var(--gold-400);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    width: auto;
    padding-bottom: 0;
  }
  .primary-nav ul { display: flex; gap: 4px; margin: 0; }
  .primary-nav a { padding: 8px 12px; }
}

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--gold {
  background: linear-gradient(160deg, var(--gold-400), var(--gold-600));
  color: #291d06;
  box-shadow: 0 6px 18px rgba(169, 119, 34, .28);
}
.btn--gold:hover { color: #291d06; box-shadow: 0 10px 26px rgba(169, 119, 34, .38); }

.btn--forest {
  background: var(--forest-700);
  color: var(--paper-050);
}
.btn--forest:hover { background: var(--forest-600); color: var(--paper-050); }

.btn--ghost {
  background: transparent;
  border-color: rgba(107, 84, 60, .35);
  color: var(--ink-700);
}
.btn--ghost:hover { border-color: var(--gold-500); color: var(--gold-600); background: rgba(240, 220, 174, .25); }

.btn--outline-light {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(240, 220, 174, .4);
  color: var(--paper-100);
}
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); color: var(--paper-050); }

.btn--sm { padding: 9px 16px; font-size: .85rem; }

.nav-cta { display: none; }
@media (min-width: 1040px) { .nav-cta { display: inline-flex; } }

/* --------------------------------------------------------------- chips -- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--paper-200);
  color: var(--ink-700);
  white-space: nowrap;
}
.chip--lc { background: rgba(62, 125, 83, .14); color: #2c5d3c; }
.chip--nt { background: rgba(125, 143, 48, .16); color: #5d6b23; }
.chip--vu { background: rgba(192, 138, 37, .18); color: #8a6212; }
.chip--en { background: rgba(189, 100, 32, .16); color: #92491a; }
.chip--cr { background: rgba(161, 48, 42, .14); color: #8a2721; }
.chip--dd { background: rgba(120, 111, 98, .16); color: #5d564c; }
.chip--muted { background: rgba(107, 84, 60, .1); color: var(--ink-500); font-weight: 600; letter-spacing: .04em; }

/* ----------------------------------------------------------- portraits -- */

.portrait {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 12%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 68%),
    linear-gradient(168deg, var(--forest-800), var(--forest-900));
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.portrait__img { width: 100%; height: 100%; object-fit: cover; }

.portrait__plate {
  position: relative;
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
}
.portrait__plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(122deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 9px);
  mix-blend-mode: overlay;
}
.portrait__plate svg {
  width: 58%;
  height: auto;
  fill: color-mix(in srgb, var(--accent) 72%, #ffffff 8%);
  opacity: .85;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
}
.portrait__eye { fill: var(--forest-900); }
.portrait__initials {
  position: absolute;
  bottom: 8px; right: 12px;
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(240, 220, 174, .5);
}
.portrait--thumb { border-radius: 50%; width: 62px; height: 62px; }
.portrait--thumb .portrait__initials { display: none; }
.portrait--hero { border-radius: var(--radius-lg); }

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  color: var(--paper-100);
  background:
    radial-gradient(80% 120% at 78% 10%, rgba(200, 149, 47, .30), transparent 58%),
    radial-gradient(70% 100% at 12% 88%, rgba(60, 107, 76, .38), transparent 62%),
    linear-gradient(165deg, #14301f 0%, #0d1c13 62%, #101f16 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700' viewBox='0 0 700 700'%3E%3Cg fill='none' stroke='%23e0b45f' stroke-width='1' opacity='0.16'%3E%3Cpath d='M-40 120c120-60 240-40 350 20s230 80 350 30'/%3E%3Cpath d='M-40 190c120-60 240-40 350 20s230 80 350 30'/%3E%3Cpath d='M-40 260c120-60 240-40 350 20s230 80 350 30'/%3E%3Cpath d='M-40 330c120-60 240-40 350 20s230 80 350 30'/%3E%3Cpath d='M-40 400c120-60 240-40 350 20s230 80 350 30'/%3E%3Cpath d='M-40 470c120-60 240-40 350 20s230 80 350 30'/%3E%3Cpath d='M-40 540c120-60 240-40 350 20s230 80 350 30'/%3E%3Cpath d='M-40 610c120-60 240-40 350 20s230 80 350 30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 760px 760px;
  opacity: .55;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 90px;
  background: linear-gradient(to top, var(--paper-050), transparent);
  z-index: -1;
}

.hero__inner {
  display: grid;
  gap: 32px;
  padding-block: 56px 72px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-400);
  border: 1px solid rgba(224, 180, 95, .32);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero h1 { color: var(--paper-050); max-width: 15ch; }
.hero h1 em {
  font-style: normal;
  color: var(--gold-400);
  display: block;
}
.hero__lead {
  font-size: 1.08rem;
  color: rgba(247, 241, 229, .82);
  max-width: 54ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(224, 180, 95, .2);
}
.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold-400);
  line-height: 1;
}
.hero__stat span {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(143, 174, 149, .95);
}

.hero__art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
}
.hero__art-main {
  position: relative;
  width: min(100%, 380px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(224, 180, 95, .22);
  transform: rotate(-1.4deg);
}
.hero__art-second {
  position: absolute;
  right: -6px;
  bottom: -18px;
  width: 150px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--forest-900);
  box-shadow: var(--shadow-lg);
  transform: rotate(4deg);
}
.hero__art-badge {
  position: absolute;
  top: -14px;
  left: -10px;
  background: var(--paper-050);
  color: var(--forest-800);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: var(--shadow-md);
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 48px;
    padding-block: 78px 96px;
  }
  .hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero__art-main { width: 100%; }
}

/* ------------------------------------------------------------ sections -- */

.section { padding-block: 56px; }
.section--tight { padding-block: 40px; }
.section--paper { background: var(--paper-100); border-block: 1px solid var(--paper-300); }
.section--forest {
  background:
    radial-gradient(70% 120% at 85% 0%, rgba(200, 149, 47, .16), transparent 60%),
    linear-gradient(160deg, var(--forest-800), var(--forest-900));
  color: var(--paper-100);
}
.section--forest h2, .section--forest h3 { color: var(--paper-050); }
.section--forest p { color: rgba(247, 241, 229, .8); }
.section--forest a { color: var(--gold-400); }

.section__head { max-width: 62ch; margin-bottom: 32px; }
.section__head p { color: var(--ink-500); font-size: 1.02rem; }
.section--forest .section__head p { color: rgba(247, 241, 229, .78); }

.section__head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
}
.section__head--split > div { max-width: 62ch; }

@media (min-width: 900px) {
  .section { padding-block: 76px; }
}

/* --------------------------------------------------------------- grids -- */

.grid { display: grid; gap: 20px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--two { grid-template-columns: 1fr; }
@media (min-width: 820px) { .grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }

/* -------------------------------------------------------- species card -- */

.species-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-000);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.species-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--paper-300));
}
.species-card__link { text-decoration: none; color: inherit; display: block; }
.species-card__art { position: relative; }
.species-card__art .portrait { border-radius: 0; aspect-ratio: 4 / 3; }
.species-card__status { position: absolute; top: 10px; left: 10px; background: rgba(253, 250, 244, .92); }
.species-card__body { padding: 16px 18px 8px; }
.species-card__name { margin: 0 0 2px; font-size: 1.15rem; }
.species-card__sci { margin: 0 0 12px; font-style: italic; color: var(--ink-400); font-size: .87rem; }
.species-card__stats { margin: 0; display: grid; gap: 8px; }
.species-card__stats div { display: grid; gap: 1px; }
.species-card__stats dt {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-400);
}
.species-card__stats dd { margin: 0; font-size: .86rem; color: var(--ink-700); }
.species-card__cta {
  margin-top: auto;
  padding: 12px 18px 16px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--forest-600);
}
.species-card__cta:hover { color: var(--gold-600); }

/* ----------------------------------------------------- editorial cards -- */

.editorial-card {
  background: var(--paper-000);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.editorial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.editorial-card__link { display: block; text-decoration: none; color: inherit; padding: 20px; }
.editorial-card__art {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.editorial-card__slot .portrait { border: 2px solid var(--paper-200); }
.editorial-card__vs {
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--gold-600);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.editorial-card__body h3 { font-size: 1.12rem; margin-bottom: .4em; }
.editorial-card__summary { font-size: .92rem; color: var(--ink-500); margin-bottom: .6em; }
.editorial-card__meta { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-400); margin: 0; }

.section--forest .editorial-card { background: rgba(255, 255, 255, .04); border-color: rgba(224, 180, 95, .18); }
.section--forest .editorial-card h3 { color: var(--paper-050); }
.section--forest .editorial-card__summary { color: rgba(247, 241, 229, .72); }
.section--forest .editorial-card__meta { color: var(--moss-300); }

/* -------------------------------------------------------------- picker -- */

.picker {
  background: var(--paper-000);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.picker--inline { box-shadow: none; background: var(--paper-100); }

.picker__filters {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--paper-300);
}
@media (min-width: 760px) {
  .picker__filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field--search { grid-column: 1 / -1; }
}
@media (min-width: 1040px) {
  .picker__filters { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)) auto; align-items: end; }
  .field--search { grid-column: auto; }
}

.field { display: grid; gap: 6px; }
.field label, .slot label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--ink-400);
}
.field--action { align-self: end; }

input[type="search"], input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-sm);
  background: var(--paper-050);
  font: inherit;
  font-size: .93rem;
  color: var(--ink-900);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b543c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
input:hover, select:hover, textarea:hover { border-color: var(--bark-400); }
textarea { min-height: 150px; resize: vertical; }

.picker__slots { display: grid; gap: 14px; align-items: end; }
.slot { display: grid; gap: 6px; }
.slot--divider { display: none; }
.slot--submit .btn { width: 100%; }

@media (min-width: 820px) {
  .picker__slots { grid-template-columns: 1fr auto 1fr auto; }
  .slot--divider {
    display: grid;
    place-items: center;
    padding-bottom: 11px;
  }
  .slot--divider span {
    font-family: var(--font-display);
    color: var(--gold-600);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .9rem;
  }
  .slot--submit .btn { width: auto; }
}

.picker__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 0;
  font-size: .82rem;
  color: var(--ink-400);
}
.picker__clear { font-weight: 600; }

.notice {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(192, 138, 37, .12);
  border: 1px solid rgba(192, 138, 37, .3);
  color: #7a5610;
  font-size: .92rem;
  margin-bottom: 20px;
}
.notice--error { background: rgba(161, 48, 42, .1); border-color: rgba(161, 48, 42, .28); color: #8a2721; }
.notice--ok { background: rgba(62, 125, 83, .12); border-color: rgba(62, 125, 83, .3); color: #2c5d3c; }

/* --------------------------------------------------------- breadcrumbs -- */

.breadcrumbs { padding-top: 20px; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0; padding: 0;
  font-size: .8rem;
  color: var(--ink-400);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--paper-300); }
.breadcrumbs a { color: var(--ink-500); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-600); text-decoration: underline; }

.breadcrumbs--light ol { color: rgba(247, 241, 229, .6); }
.breadcrumbs--light a { color: rgba(247, 241, 229, .78); }

/* ---------------------------------------------------------- page intro -- */

.page-intro {
  padding-block: 26px 40px;
  border-bottom: 1px solid var(--paper-200);
  background: linear-gradient(180deg, rgba(247, 241, 229, .7), transparent);
}
.page-intro__lead { font-size: 1.08rem; color: var(--ink-500); max-width: 68ch; }
.page-intro__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: .78rem;
  color: var(--ink-400);
  margin: 0;
}

/* ---------------------------------------------------- comparison table -- */

.compare-head {
  position: relative;
  color: var(--paper-100);
  background:
    radial-gradient(60% 120% at 20% 0%, rgba(60, 107, 76, .5), transparent 60%),
    radial-gradient(60% 120% at 85% 10%, rgba(200, 149, 47, .28), transparent 60%),
    linear-gradient(160deg, var(--forest-800), var(--forest-900));
  padding-bottom: 34px;
}
.compare-head h1 { color: var(--paper-050); margin-top: 10px; }
.compare-head h1 span { color: var(--gold-400); }
.compare-head__lead { color: rgba(247, 241, 229, .82); max-width: 62ch; }

.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.versus__side {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(224, 180, 95, .2);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
  min-width: 0;
}
.versus__side .portrait { margin-inline: auto; width: 100%; max-width: 190px; }
.versus__name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  color: var(--paper-050);
  margin: 12px 0 2px;
}
.versus__sci { font-style: italic; color: var(--moss-300); font-size: .82rem; margin: 0 0 10px; }
.versus__mid {
  display: grid;
  place-items: center;
  gap: 10px;
}
.versus__badge {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(224, 180, 95, .35);
  color: var(--gold-400);
  font-family: var(--font-display);
  font-size: .9rem;
  background: rgba(13, 28, 19, .6);
}

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  align-items: center;
}
.compare-actions .toggle-diff {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .86rem;
  color: rgba(247, 241, 229, .84);
  cursor: pointer;
  padding: 10px 14px;
  border: 1px solid rgba(224, 180, 95, .25);
  border-radius: 999px;
}
.compare-actions .toggle-diff input { accent-color: var(--gold-500); width: 16px; height: 16px; }

.highlights {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.highlights li {
  position: relative;
  padding-left: 26px;
  font-size: .95rem;
  color: var(--ink-700);
}
.highlights li::before {
  content: "";
  position: absolute;
  left: 4px; top: .6em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
}

.compare-section { margin-bottom: 38px; }
.compare-section__head { margin-bottom: 14px; }
.compare-section__head h2 { margin-bottom: .2em; }
.compare-section__head p { color: var(--ink-400); font-size: .9rem; margin: 0; }

.compare-table {
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-000);
  box-shadow: var(--shadow-sm);
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--paper-200);
}
.compare-row:first-child { border-top: 0; }
.compare-row.is-same[hidden] { display: none; }

.compare-row__label {
  padding: 14px 18px 6px;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--ink-400);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-100);
}
.compare-row__flag {
  font-size: .62rem;
  letter-spacing: .08em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(192, 138, 37, .16);
  color: #7a5610;
}
.compare-row__flag--same { background: rgba(120, 111, 98, .14); color: var(--ink-400); }

.compare-cell {
  padding: 12px 18px 16px;
  min-width: 0;
}
.compare-cell + .compare-cell { border-top: 1px dashed var(--paper-200); }
.compare-cell__species {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-400);
  margin: 0 0 4px;
}
.compare-cell__value {
  font-family: var(--font-display);
  font-size: 1.06rem;
  color: var(--ink-900);
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.compare-cell__lead {
  font-family: var(--font-body);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-600);
  border: 1px solid rgba(200, 149, 47, .4);
  border-radius: 999px;
  padding: 2px 8px;
}
.compare-cell__detail { font-size: .9rem; color: var(--ink-500); margin: 0; }
.compare-cell__note { font-size: .8rem; color: var(--ink-400); margin: 6px 0 0; font-style: italic; }

.compare-cell.is-lead { background: linear-gradient(90deg, rgba(240, 220, 174, .3), transparent 70%); }

.metric-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--paper-200);
  overflow: hidden;
  margin: 8px 0 10px;
  max-width: 320px;
}
.metric-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--moss-500), var(--gold-500));
  width: calc(var(--w) * 100%);
  transition: width .5s ease;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.tag-list li {
  font-size: .76rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper-100);
  border: 1px solid var(--paper-300);
  color: var(--ink-700);
}
.tag-list li.is-shared { background: rgba(62, 125, 83, .1); border-color: rgba(62, 125, 83, .28); color: #2c5d3c; }

@media (min-width: 760px) {
  .compare-row { grid-template-columns: 210px 1fr 1fr; align-items: stretch; }
  .compare-row__label { background: var(--paper-100); padding: 18px; align-items: flex-start; flex-direction: column; gap: 6px; }
  .compare-cell { padding: 18px; border-left: 1px solid var(--paper-200); }
  .compare-cell + .compare-cell { border-top: 0; }
  .compare-cell__species { display: none; }
  .compare-table--with-species .compare-cell__species { display: block; }
}

/* ------------------------------------------------------- species pages -- */

.species-hero {
  color: var(--paper-100);
  background:
    radial-gradient(70% 120% at 80% 0%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 62%),
    linear-gradient(160deg, var(--forest-800), var(--forest-900));
  padding-bottom: 44px;
}
.species-hero__grid { display: grid; gap: 26px; align-items: center; padding-top: 8px; }
.species-hero h1 { color: var(--paper-050); margin-bottom: .1em; }
.species-hero__sci { font-style: italic; color: var(--gold-400); font-size: 1.05rem; margin-bottom: 1em; }
.species-hero__lead { color: rgba(247, 241, 229, .84); font-size: 1.05rem; }
.species-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.species-hero__badges .chip { background: rgba(255, 255, 255, .1); color: var(--paper-100); }
.species-hero .portrait { max-width: 420px; margin-inline: auto; }

@media (min-width: 900px) {
  .species-hero__grid { grid-template-columns: 1.1fr .9fr; gap: 46px; }
}

.quickfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--paper-300);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: -34px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-md);
}
.quickfacts div { background: var(--paper-000); padding: 16px 18px; }
.quickfacts dt {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-400); margin-bottom: 4px;
}
.quickfacts dd { margin: 0; font-family: var(--font-display); font-size: 1.02rem; color: var(--ink-900); }

.content-grid { display: grid; gap: 34px; }
@media (min-width: 980px) {
  .content-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
  .content-grid__aside { position: sticky; top: calc(var(--header-h) + 20px); }
}

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose a { font-weight: 500; }

.panel {
  background: var(--paper-000);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 20px; }
.panel h2, .panel h3 { font-size: 1.05rem; margin-bottom: .6em; }
.panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.panel--accent { border-left: 4px solid var(--gold-500); }

.callout {
  border-left: 4px solid var(--moss-500);
  background: rgba(62, 125, 83, .07);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 20px;
  margin: 26px 0;
}
.callout h3 { font-size: 1.02rem; margin-bottom: .4em; }
.callout p:last-child { margin-bottom: 0; }

.datalist { margin: 0; display: grid; gap: 14px; }
.datalist div { display: grid; gap: 3px; }
.datalist dt {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-400);
}
.datalist dd { margin: 0; color: var(--ink-700); }

.ability {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.ability i {
  width: 22px; height: 6px;
  border-radius: 2px;
  background: var(--paper-300);
  display: block;
}
.ability i.is-on { background: linear-gradient(90deg, var(--moss-500), var(--gold-500)); }

.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fact-list li {
  background: var(--paper-000);
  border: 1px solid var(--paper-300);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  font-size: .95rem;
}

/* ------------------------------------------------------------- sources -- */

.sources-block {
  background: var(--paper-100);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 40px;
}
.sources-block h2 { font-size: 1.15rem; }
.sources-block__list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.sources-block__list li { display: grid; gap: 2px; font-size: .9rem; }
.sources-block__list a { font-weight: 600; }
.sources-block__list span { color: var(--ink-400); font-size: .85rem; }
.sources-block__meta { font-size: .84rem; color: var(--ink-400); margin: 0; }

/* -------------------------------------------------------------- footer -- */

.site-footer {
  margin-top: 70px;
  background: linear-gradient(170deg, var(--forest-800), var(--forest-900));
  color: rgba(247, 241, 229, .74);
  padding-top: 52px;
  font-size: .92rem;
}
.site-footer__grid { display: grid; gap: 32px; padding-bottom: 40px; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 28px; } }

.brand__name--footer { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-400); display: block; margin-bottom: 12px; }
.site-footer__intro p { max-width: 46ch; }
.site-footer__note { font-size: .82rem; color: var(--moss-300); }
.site-footer__col h2 {
  font-family: var(--font-body);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold-400);
  margin-bottom: 14px;
}
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer__col a { color: rgba(247, 241, 229, .78); text-decoration: none; }
.site-footer__col a:hover { color: var(--gold-400); text-decoration: underline; }

.site-footer__base {
  border-top: 1px solid rgba(224, 180, 95, .16);
  padding-block: 20px 28px;
  display: grid;
  gap: 4px;
  font-size: .8rem;
  color: rgba(247, 241, 229, .55);
}
.site-footer__base p { margin: 0; }

/* ------------------------------------------------------------- misc/404 */

.empty-state {
  text-align: center;
  padding: 46px 20px;
  border: 1px dashed var(--paper-300);
  border-radius: var(--radius-lg);
  background: var(--paper-000);
}
.empty-state h2 { margin-bottom: .4em; }

.results-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: .9rem;
  color: var(--ink-500);
}
.results-bar form { display: flex; align-items: center; gap: 8px; }
.results-bar select { width: auto; }

.pill-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pill-links a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--paper-000);
  border: 1px solid var(--paper-300);
  font-size: .85rem;
  text-decoration: none;
  color: var(--ink-700);
}
.pill-links a:hover { border-color: var(--gold-500); color: var(--gold-600); }

.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: var(--paper-000);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-md);
  overflow: hidden;
}
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--paper-200); }
table.data th { background: var(--paper-100); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-500); }
table.data tr:last-child td { border-bottom: 0; }

.form-grid { display: grid; gap: 16px; max-width: 620px; }
@media (min-width: 720px) { .form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-grid .field--full { grid-column: 1 / -1; }
.form-hint { font-size: .82rem; color: var(--ink-400); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .compare-actions, .picker { display: none; }
  body { background: #fff; }
}
