:root {
  --burnt: #d96b3b;
  --burnt-deep: #b9542d;
  --yolk: #e8b04b;
  --eggshell: #fff8f0;
  --cream: #f3e7d8;
  --cream-deep: #e5d2bb;
  --sage: #9caf7a;
  --sage-pale: #e7ecd9;
  --blue-pale: #e7f0f4;
  --roost: #4b2f28;
  --roost-soft: #6f574f;
  --ink: #281a17;
  --white: #fffdf9;
  --line: rgba(75, 47, 40, 0.14);
  --line-strong: rgba(75, 47, 40, 0.24);
  --shadow: 0 18px 50px rgba(75, 47, 40, 0.09);
  --display: "Satoshi", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", "Satoshi", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--roost);
  background: var(--eggshell);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(217, 107, 59, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 148px;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-nav a {
  color: var(--roost-soft);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: var(--burnt-deep);
}

.top-nav .nav-cta {
  padding: 9px 15px;
  border-radius: 999px;
  color: white;
  background: var(--burnt);
}

.top-nav .nav-cta:hover {
  color: white;
  background: var(--burnt-deep);
}

.page-shell {
  padding: 48px 0 96px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--roost-soft);
  font-size: 14px;
}

.breadcrumb a {
  text-decoration: none;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--burnt-deep);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 7vw, 76px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 92% 10%, rgba(232, 176, 75, 0.24), transparent 29%),
    linear-gradient(145deg, var(--white), var(--cream));
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -62px;
  width: 260px;
  height: 260px;
  border: 52px solid rgba(156, 175, 122, 0.14);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--display);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 920px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 76px);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 44px);
}

h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.hero-lede,
.section-lede {
  max-width: 760px;
  color: var(--roost-soft);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--burnt);
  background: var(--burnt);
  color: white;
}

.button:hover {
  transform: translateY(-1px);
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--roost-soft);
  font-size: 14px;
}

.status-line strong {
  color: var(--ink);
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: process;
}

.process li {
  position: relative;
  min-height: 136px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  counter-increment: process;
}

.process li::before {
  content: "0" counter(process);
  display: block;
  margin-bottom: 24px;
  color: var(--burnt);
  font: 800 12px/1 var(--display);
  letter-spacing: 0.12em;
}

.process strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
}

.section {
  padding: 82px 0 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(300px, 1.25fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 30px;
}

.section-heading p {
  margin-top: 0;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

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

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

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

.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
}

.card.sage {
  background: var(--sage-pale);
}

.card.blue {
  background: var(--blue-pale);
}

.card.cream {
  background: var(--cream);
}

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

.card-kicker,
.metadata-label {
  color: var(--roost-soft);
  font: 800 11px/1.2 var(--display);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.evidence-level {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.evidence-level .level {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font: 800 13px/1 var(--display);
}

.plain-list,
.check-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.plain-list li,
.check-list li {
  position: relative;
  margin: 10px 0;
  padding-left: 22px;
}

.plain-list li::before,
.check-list li::before {
  position: absolute;
  left: 0;
  color: var(--burnt);
}

.plain-list li::before {
  content: "—";
}

.check-list li::before {
  content: "✓";
  font-weight: 800;
}

.truth-note,
.alert {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 4px solid var(--burnt);
  border-radius: 4px 16px 16px 4px;
  background: rgba(217, 107, 59, 0.08);
}

.alert.warning {
  border-left-color: var(--yolk);
  background: rgba(232, 176, 75, 0.13);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
  margin: 26px 0;
}

.topic-node {
  position: relative;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.topic-node::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.topic-node strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--display);
}

.topic-node small {
  color: var(--roost-soft);
}

.graph-panel {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--ink);
  color: #f7ede3;
}

.graph-panel h3,
.graph-panel strong {
  color: white;
}

.graph-panel .graph-node {
  max-width: 620px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}

.graph-lines {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.graph-lines span {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  text-align: center;
}

.metric-card {
  min-height: 190px;
}

.metric-state,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--roost-soft);
  font: 700 12px/1.2 var(--display);
}

.metric-state {
  margin-top: 14px;
}

.metric-state::before,
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yolk);
}

.badge.peer_reviewed::before {
  background: var(--sage);
}

.badge.government_guidance::before {
  background: #6795ad;
}

.badge.extension_service::before {
  background: var(--yolk);
}

.badge.veterinary_textbook::before {
  background: var(--burnt);
}

.library-shell {
  margin-top: 34px;
}

.filters {
  position: sticky;
  top: 88px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 220px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 12px 36px rgba(75, 47, 40, 0.08);
  backdrop-filter: blur(12px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--roost-soft);
  font: 800 11px/1.2 var(--display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: white;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 22px 2px 14px;
  color: var(--roost-soft);
  font-size: 14px;
}

.source-list {
  display: grid;
  gap: 14px;
}

.source-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  overflow: hidden;
}

.source-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 24px;
  cursor: pointer;
  list-style: none;
}

.source-card summary::-webkit-details-marker {
  display: none;
}

.source-card summary::after {
  content: "+";
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--burnt-deep);
  font: 600 22px/1 var(--display);
}

.source-card[open] summary::after {
  content: "−";
}

.source-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(21px, 3vw, 28px);
}

.source-byline {
  margin: 0;
  color: var(--roost-soft);
  font-size: 14px;
}

.source-detail {
  padding: 0 24px 26px;
  border-top: 1px solid var(--line);
}

.source-summary {
  max-width: 820px;
  margin: 22px 0;
  font-size: 17px;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: var(--cream);
}

.metadata-grid div {
  min-width: 0;
}

.metadata-value {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.empty-state,
.loading-state {
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--roost-soft);
  text-align: center;
}

.transparency-list {
  border-top: 1px solid var(--line);
}

.transparency-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.transparency-row time,
.transparency-row .status {
  color: var(--roost-soft);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 36px 0;
  color: var(--roost-soft);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.noscript {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

@media (max-width: 980px) {
  .topic-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .filters .field:first-child {
    grid-column: 1 / -1;
  }

  .metadata-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 28px, 1180px);
  }

  .top-nav a:not(.nav-cta) {
    display: none;
  }

  .brand img {
    width: 126px;
  }

  .page-shell {
    padding-top: 24px;
  }

  .hero {
    border-radius: 24px;
  }

  .process,
  .grid-2,
  .grid-3,
  .grid-4,
  .graph-lines {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 64px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    position: static;
    grid-template-columns: 1fr;
  }

  .filters .field:first-child {
    grid-column: auto;
  }

  .metadata-grid {
    grid-template-columns: 1fr;
  }

  .source-card summary {
    gap: 12px;
    padding: 20px;
  }

  .source-detail {
    padding: 0 20px 22px;
  }

  .transparency-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
