:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --paper: #ffffff;
  --ink: #20272f;
  --muted: #5d6873;
  --line: #d9ded8;
  --accent: #006b78;
  --accent-soft: #e7f4f5;
  --warn: #9b4d13;
  --warn-soft: #fff2e8;
  --danger: #8a1f1f;
  --ok: #237047;
  --ok-soft: #edf8f1;
  --blue: #265f9c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.58;
}
a { color: var(--accent); text-underline-offset: 0.16em; }
header { background: var(--paper); border-bottom: 1px solid var(--line); }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.topbar { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 14px 0; color: var(--muted); font-size: 0.88rem; border-bottom: 1px solid var(--line); }
.topbar span, .hero, .lead, .authors, .collaboration, h1, h2, h3, p, nav a { min-width: 0; overflow-wrap: anywhere; }
.hero { padding: 42px 0 28px; }
.hero.compact { padding-bottom: 24px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: .82rem; }
h1 { max-width: 940px; margin: 0 0 18px; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.08; letter-spacing: 0; }
h2 { margin: 0 0 18px; font-size: clamp(1.5rem, 2.5vw, 2.15rem); line-height: 1.2; }
h3 { margin: 24px 0 10px; font-size: 1.18rem; line-height: 1.28; }
.lead { max-width: 860px; margin: 0 0 22px; color: #324354; font-size: clamp(1.08rem, 2vw, 1.28rem); }
.authors, .collaboration { max-width: 920px; color: var(--muted); font-size: 0.94rem; }
.collaboration { margin: -8px 0 0; }
nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 18px; }
nav a { display: inline-flex; align-items: center; min-height: 38px; max-width: 100%; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fbfbf9; text-decoration: none; font-size: .94rem; }
nav a:hover, nav a.active { border-color: var(--accent); background: var(--accent-soft); color: #073f46; }
main { padding: 34px 0 54px; }
section { margin: 0 0 42px; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; margin: 26px 0 0; }
.summary > div, .card, .source, .debunk { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.summary strong { display: block; margin-bottom: 8px; font-size: 1.04rem; line-height: 1.25; }
.summary .meta, .card p, .source p, .debunk p { color: var(--muted); }
.summary > div.ok { border-color: rgba(35, 112, 71, 0.45); background: var(--ok-soft); }
.summary > div.alert { position: relative; }
.summary > div.alert strong { padding-right: 30px; }
.summary > div.alert::after {
  content: "!";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 50%;
}
.summary > div.alert.ok::after { background: var(--ok); }
.meta { color: var(--muted); font-size: 0.9em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.note { border-left: 5px solid var(--accent); background: var(--accent-soft); padding: 16px 18px; margin: 20px 0; }
.note.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.note.warning { border-left-color: var(--warn); background: var(--warn-soft); }
.refs { color: var(--muted); font-size: 0.94rem; }
.plain-table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); background: var(--paper); border-radius: 6px; }
.plain-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 0.95rem; }
.plain-table th, .plain-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plain-table th { text-align: left; background: #eef2f1; }
.milestone-table { min-width: 900px; }
.milestone-table th:first-child, .milestone-table td:first-child { width: 130px; font-weight: 700; color: var(--accent); }
.milestone-table th:last-child, .milestone-table td:last-child { width: 150px; }
.species-table td:first-child { min-width: 220px; }
.source-group, .debunk-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.source h3, .debunk h3, .card h3 { margin-top: 0; }
.fair-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(0, 107, 120, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fcfc 0%, var(--accent-soft) 100%);
}
.fair-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}
.fair-kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fair-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.fair-head h2 { margin-bottom: 8px; }
.fair-head p { max-width: 760px; margin: 0; color: #324354; }
.fair-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.fair-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--paper);
  color: #073f46;
  font-weight: 700;
  text-decoration: none;
}
.fair-button:hover { background: #dff0f2; }
.fair-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}
.fair-facts > div {
  padding: 14px 16px;
  border: 1px solid rgba(0, 107, 120, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
}
.fair-facts dt { color: var(--muted); font-size: .82rem; font-weight: 700; text-transform: uppercase; }
.fair-facts dd { margin: 4px 0 0; line-height: 1.4; }
.fair-machine { margin: 18px 0 0; color: var(--muted); font-size: .9rem; }
.fair-machine code { font-size: .92em; }
.license-notice { max-width: 980px; }
.license-notice a, .fair-link a { font-weight: 700; }
.fair-link { margin-bottom: 0; }
footer { padding: 30px 0 42px; color: var(--muted); font-size: .94rem; }
.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.footer-logos a {
  display: inline-flex;
  align-items: center;
  max-width: min(280px, 100%);
}
.footer-logos img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 58px;
  object-fit: contain;
}
.footer-logos .logo-mark { max-height: 72px; }
.footer-logos .logo-elixir { width: 94px; max-width: 94px; }
@media (max-width: 820px) {
  body { font-size: 17px; }
  .two-col { grid-template-columns: 1fr; }
  .fair-head { display: block; }
  .fair-actions { margin-top: 16px; }
  .footer-logos { gap: 16px; }
  .footer-logos a { max-width: 220px; }
  .footer-logos img { max-height: 46px; }
  .footer-logos .logo-mark { max-height: 58px; }
  .footer-logos .logo-elixir { width: 75px; max-width: 75px; }
}
