:root {
  --ink: #1a1713;
  --paper: #f4efe6;
  --card: #fffdf8;
  --rule: #d6cdbc;
  --muted: #5e574c;
  --accent: #8a3418;
  --accent-dark: #6c2710;
  --forest: #243d2e;
  --forest-soft: #e4eee6;
  --warn: #3d2a12;
  --warn-bg: #f3ead3;
  --thead: #efe8db;
  --focus: #1a4d8c;
  --max: 42rem;
  --wide: 64rem;
  --space: 1.25rem;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(26, 23, 19, 0.06), 0 1px 8px rgba(26, 23, 19, 0.04);
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible,
.skip:focus,
.nav-btn:focus-visible,
#nav-toggle:focus-visible + .nav-btn {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 20;
  border-radius: 4px;
}
.skip:focus { top: 0.5rem; }
.wrap { width: min(var(--wide), calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(26, 23, 19, 0.04);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.logo {
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.35rem 0;
}
.logo span { color: var(--accent); }
nav.primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.15rem;
}
nav.primary a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
}
nav.primary a:hover { color: var(--accent-dark); background: var(--paper); }
nav.primary a[aria-current="page"] {
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
  background: transparent;
}
/* #nav-toggle is visually hidden, not display:none, so it stays keyboard-focusable */
.nav-btn {
  display: none;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  min-width: 48px;
  min-height: 48px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
main { padding: 2rem 0 3.5rem; }
h1, h2, h3 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
  color: var(--ink);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 0.75rem; line-height: 1.15; }
h2 { font-size: 1.35rem; margin: 2.25rem 0 0.7rem; }
h3 { font-size: 1.12rem; margin: 1.5rem 0 0.45rem; }
.lede { font-size: 1.12rem; color: var(--muted); margin: 0 0 1rem; line-height: 1.55; }
.meta { font-size: 0.95rem; color: var(--muted); margin: 0 0 1.35rem; }
.disclosure, .disclaimer, .note, .who {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.15rem 0 1.4rem;
  background: var(--card);
}
.disclosure { border-left: 4px solid var(--accent); }
.disclaimer { background: var(--warn-bg); border-left: 4px solid var(--warn); }
.who { background: var(--forest-soft); border-left: 4px solid var(--forest); }
.note { background: var(--card); border-left: 4px solid var(--rule); }
.disclosure p, .disclaimer p, .note p, .who p { margin: 0.35rem 0; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--forest);
  margin: 0 0 0.4rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.1rem;
  margin-block: 1.35rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow);
}
a.card:hover { border-color: var(--accent); color: inherit; }
a.card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.card h2, .card h3 { margin-top: 0; margin-bottom: 0.4rem; font-size: 1.12rem; letter-spacing: -0.015em; }
.card p { margin: 0; color: var(--ink); }
.card .kicker { margin-bottom: 0.45rem; }
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 1.25rem 0 1.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  max-width: 100%;
  background:
    linear-gradient(to right, var(--card) 30%, rgba(255, 253, 248, 0)) 0 0 / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--card) 30%, rgba(255, 253, 248, 0)) 100% 0 / 2rem 100% no-repeat local,
    linear-gradient(to right, rgba(26, 23, 19, 0.14), transparent) 0 0 / 0.9rem 100% no-repeat scroll,
    linear-gradient(to left, rgba(26, 23, 19, 0.14), transparent) 100% 0 / 0.9rem 100% no-repeat scroll,
    var(--card);
  scrollbar-width: thin;
}
table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
caption {
  caption-side: top;
  text-align: left;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
  padding: 0.75rem 0.9rem 0.55rem;
  background: var(--card);
}
th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
th { background: var(--thead); font-weight: 600; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 11rem;
  box-shadow: 1px 0 0 var(--rule);
}
th:first-child { background: var(--thead); }
td:first-child { background: var(--card); }
.sources { font-size: 0.95rem; }
.sources li { margin: 0.45rem 0; }
.btn {
  display: inline-block;
  background: var(--forest);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 48px;
  margin: 0.2rem 0.45rem 0.35rem 0;
  box-shadow: 0 1px 0 rgba(26, 23, 19, 0.18);
}
.btn:hover { color: #fff; background: #1a2f23; }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn.secondary { background: var(--accent-dark); }
.btn.secondary:hover { color: #fff; background: #541e0c; }

/* Affiliate placeholders must stay non-clickable (Sagan): no <a>, no JS, no pointer cursor, no link styling. */
.aff-pending {
  display: inline-block;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.15rem 0.9rem 0.15rem 0;
  cursor: default;
  text-decoration: none;
}
.aff-pending:hover,
.aff-pending:focus,
.aff-pending:active {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}
footer.site {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 2.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  background: var(--thead);
}
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin-bottom: 0.85rem;
}
footer.site nav a {
  color: var(--ink);
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
footer.site nav a:hover { background: var(--paper); }
footer.site p { margin: 0.4rem 0 0; max-width: 48rem; }
.hero { padding: 0.5rem 0 0.25rem; }
ul, ol { padding-left: 1.25rem; }
li { margin: 0.35rem 0; }
code {
  font-size: 0.88em;
  background: var(--thead);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
@media (max-width: 720px) {
  html { font-size: 17px; }
  .wrap, .narrow { width: min(var(--wide), calc(100% - 1.5rem)); }
  .nav-btn { display: inline-flex; }
  nav.primary {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0.15rem 0 0.85rem;
    gap: 0;
    border-top: 1px solid var(--rule);
    margin-top: 0.2rem;
  }
  nav.primary a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0.7rem 0.2rem;
    border-radius: 0;
  }
  #nav-toggle:checked ~ nav.primary { display: flex; }
  .header-row { flex-wrap: wrap; padding: 0.55rem 0; }
  .btn {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin: 0.35rem 0;
    text-align: center;
  }
  table { font-size: 0.9rem; }
  th, td { padding: 0.6rem 0.7rem; }
  footer.site nav a { min-height: 48px; }
}
