:root {
  color-scheme: light;
  --ink: #22302c;
  --muted: #5c6b66;
  --accent: #19614f;
  --accent-dark: #103b30;
  --accent-soft: #eaf3f0;
  --blue: #265484;
  --blue-soft: #eef4fa;
  --amber: #945d14;
  --amber-soft: #fcf4e7;
  --line: #d7e0da;
  --paper: #fafbf8;
  --surface: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.78 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--accent-dark); }
a:focus-visible { outline: 3px solid #b08a38; outline-offset: 4px; }

header, main, footer { max-width: 1080px; margin: auto; padding: 0 40px; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--ink);
  font-weight: 680;
  font-size: 22px;
  text-decoration: none;
  letter-spacing: -.4px;
}
.brand span {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: 14.5px; text-decoration: none; font-weight: 500; }
nav a[aria-current] { color: var(--accent); box-shadow: 0 2px var(--accent); font-weight: 650; }

main { min-height: 72vh; padding-top: 48px; padding-bottom: 84px; }
article { max-width: 920px; }

h1, h2, h3 { line-height: 1.24; font-weight: 550; letter-spacing: -.022em; scroll-margin-top: 24px; }
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.6vw, 50px);
  margin: 0 0 18px;
}
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  margin: 48px 0 20px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
h3 { font-size: 20px; margin: 28px 0 12px; }
p { margin: 0 0 18px; }
strong { font-weight: 650; }
li { margin: 8px 0; }
ul, ol { padding-left: 24px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

/* Jump navigation & action pills */
.jump-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0 28px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}
.jump-bar .jump-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  margin-right: 4px;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  transition: all 0.15s ease;
}
.btn-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.btn-pill.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.btn-pill.primary:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

/* Hero figure & visual containers */
.hero-figure {
  margin: 26px 0 34px;
  padding: 18px 20px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(25, 50, 42, 0.045);
}
.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.hero-figure figcaption {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef2ef;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.fig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 24px 0 32px;
}
.fig-grid .hero-figure { margin: 0; }

/* Series & Paper Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 18px;
  margin: 24px 0 32px;
}
.series-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.series-card.blue { border-top-color: var(--blue); }
.series-card.amber { border-top-color: var(--amber); }
.series-card h3 { margin: 6px 0 10px; font-size: 19px; }
.series-card p { font-size: 14.8px; line-height: 1.62; color: #364540; margin-bottom: 14px; }
.series-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eef2ef;
  font-size: 13.5px;
}

/* Paper Anchor / Callout Box */
.paper-anchor-box {
  margin: 22px 0 30px;
  padding: 18px 22px;
  background: var(--accent-soft);
  border: 1px solid #bcd6ce;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
}
.paper-anchor-box.blue {
  background: var(--blue-soft);
  border-color: #c2d6ea;
  border-left-color: var(--blue);
}
.paper-anchor-box.amber {
  background: var(--amber-soft);
  border-color: #e6d0af;
  border-left-color: var(--amber);
}
.paper-anchor-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.paper-anchor-title {
  font-weight: 700;
  font-size: 16.5px;
  color: var(--ink);
}
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.3px;
  background: #ffffff;
  color: var(--accent-dark);
  border: 1px solid #9ec4b8;
}
.badge.blue { color: var(--blue); border-color: #9cbbe0; }
.badge.amber { color: var(--amber); border-color: #dbb883; }
.paper-meta {
  font-size: 14px;
  color: #364742;
  margin: 6px 0 12px;
}
.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
  font-size: 14.5px;
  margin: 24px 0;
}
th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 11px 16px 11px 0;
  vertical-align: top;
}
th { color: var(--accent); font-weight: 650; white-space: nowrap; }

blockquote {
  margin: 24px 0;
  padding: 6px 22px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: #f4f7f5;
  border-radius: 0 8px 8px 0;
}
code {
  font-size: .88em;
  background: #edf1eb;
  padding: 2px 5px;
  border-radius: 4px;
}
pre { overflow: auto; padding: 16px; background: #edf1eb; border-radius: 8px; }
pre code { padding: 0; }

footer {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.skip { position: absolute; left: 16px; top: -80px; padding: 8px; background: white; }
.skip:focus { top: 8px; }
img { max-width: 100%; }

@media (max-width: 720px) {
  header, main, footer { padding-left: 20px; padding-right: 20px; }
  header { align-items: flex-start; flex-direction: column; padding-top: 22px; gap: 14px; }
  nav { gap: 16px; }
  main { padding-top: 32px; }
  body { font-size: 16px; }
  .hero-figure { padding: 12px 12px 10px; margin: 20px 0 26px; }
  .paper-anchor-box { padding: 14px 16px; }
  .jump-bar { padding: 10px 12px; gap: 8px; }
  footer { gap: 14px; flex-wrap: wrap; }
}
@media print {
  header, footer, .skip, .jump-bar { display: none; }
  body { background: white; color: black; font-size: 11pt; }
  main { padding: 0; max-width: none; }
  article { max-width: none; }
  h1 { font-size: 26pt; }
  h2 { break-after: avoid; font-size: 17pt; margin-top: 22px; }
  a { color: inherit; }
}


/* Home: result highlights */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.stat-num {
  font: 700 28px/1.15 Georgia, "Times New Roman", serif;
  color: var(--accent);
}
.stat-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  margin: 4px 0 8px;
  line-height: 1.35;
}
.stat p { font-size: 13.6px; line-height: 1.55; color: #46554f; margin: 0; }
.source-note { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* Status tags on series cards */
.card-status { font-size: 13.5px !important; color: var(--muted) !important; }
.status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 1px 8px;
  border-radius: 999px;
  margin-right: 6px;
}
.status.done { background: var(--accent-soft); color: var(--accent); border: 1px solid #bcd6ce; }
.status.wip { background: var(--amber-soft); color: var(--amber); border: 1px solid #e6d0af; }

/* Compact paper list */
.paper-list { list-style: none; padding: 0; margin: 16px 0; }
.paper-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.paper-list li:first-child { border-top: 1px solid var(--line); }
.pl-title { display: block; font-weight: 650; color: var(--ink); line-height: 1.45; }
.pl-meta { display: block; color: var(--muted); font-size: 13.5px; margin: 2px 0 2px; }

/* Compact evidence typography and paper-friendly academic materials. */
.stat-grid .stat-num { font-size: clamp(21px, 2.7vw, 27px); overflow-wrap: anywhere; }
@media print { .series-card, .stat, .paper-anchor-box, .hero-figure { break-inside: avoid; box-shadow: none; } }
