/* small stylesheet for the static blog */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #0f172a;
  background: #fbf9f4;
}

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

h1, h2, h3, h4 { font-weight: 700; color: #1a2332; line-height: 1.25; }
h1 { font-size: 2.4rem; margin: 0.5rem 0 1.4rem; }
h1 em { font-style: italic; font-weight: 400; color: #334155; }
h2 { font-size: 1.7rem; margin-bottom: 1rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; max-width: 68ch; }
em { font-style: italic; }
strong { font-weight: 600; color: #1a2332; }

a { color: #2563eb; text-decoration: underline; }
a:hover { color: #1a2332; }

code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
pre {
  background: #1a2332;
  color: #d8e1ec;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
pre code { background: transparent; padding: 0; color: inherit; }

.topbar {
  background: #fbf9f4;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
}
.brand { font-weight: 700; font-size: 1.05rem; color: #1a2332; text-decoration: none; }
.topbar nav { display: flex; gap: 1.2rem; font-size: 0.9rem; }
.topbar nav a { color: #334155; text-decoration: none; }
.topbar nav a:hover { color: #1a2332; }
.topbar nav a.github {
  color: #fff;
  background: #1a2332;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
}
@media (max-width: 920px) { .topbar nav { display: none; } }

.container { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 3.5rem 0; }
section.alt { background: #f5f1e8; }
section + section { border-top: 1px solid #e2e8f0; }

.hero { padding: 4.5rem 0 3.5rem; background: #fff8e1; }
.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.lede { font-size: 1.05rem; max-width: 38em; color: #334155; }
.lede em { color: #1a2332; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2.2rem 0 1.6rem;
}
.hero-stats div { background: #fff; border: 1px solid #e2e8f0; padding: 0.9rem 1.1rem; border-radius: 6px; }
.hero-stats .big { font-size: 1.7rem; font-weight: 700; color: #1a2332; display: block; }
.hero-stats span:nth-child(2) { font-size: 0.82rem; color: #64748b; display: block; margin-top: 0.3rem; }

.hero-cta { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.92rem;
}
.btn.primary { background: #1a2332; color: #fff; }
.btn.ghost { background: #fff; color: #1a2332; border: 1px solid #1a2332; }

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5b400;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.2rem;
  margin: 1.4rem 0;
}
.chart, .chart-tall { width: 100%; min-height: 360px; }
.chart-tall { min-height: 560px; }
.chart-card figcaption { font-size: 0.85rem; color: #64748b; margin-top: 0.5rem; }

.callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.callouts article { background: #fff; border: 1px solid #e2e8f0; border-left: 3px solid #2563eb; padding: 0.9rem 1.1rem; border-radius: 4px; }
.callouts h3 { font-size: 1rem; }
.callouts p { font-size: 0.9rem; margin: 0.3rem 0 0; }

.callout-banner {
  background: #1a2332;
  color: #fff;
  padding: 1rem 1.3rem;
  border-radius: 6px;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 1.4rem 0;
  flex-wrap: wrap;
}
.callout-banner .label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: #f5b400; }
.callout-banner strong { font-size: 1.5rem; color: #f5b400; }
.callout-banner .meta { font-size: 0.85rem; color: #cbd5e1; }
.callout-banner code { background: rgba(255,255,255,0.12); color: #fff; }

.table-wrap { overflow-x: auto; margin: 1.4rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #e2e8f0; text-align: right; }
th[scope="col"]:first-child, td:first-child, th[scope="row"] { text-align: left; }
thead th { color: #64748b; font-weight: 600; }
tfoot th { color: #64748b; font-weight: 600; border-top: 2px solid #1a2332; }
.coef { font-variant-numeric: tabular-nums; }
.muted { color: #cbd5e1; }
.stars { color: #f5b400; font-weight: 700; padding-left: 2px; }
.sig-legend { font-size: 0.82rem; color: #64748b; margin-top: 0.5rem; display: flex; gap: 1.5rem; }
.caption { font-size: 0.82rem; color: #64748b; margin-top: 0.5rem; }

.mini-table { max-width: 420px; margin: 0.6rem 0 0.4rem; font-size: 0.9rem; }
.mini-table th[scope="row"] { font-weight: 500; }

.scrape-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.4rem;
}
.scrape-stats li {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  color: #64748b;
}
.scrape-stats strong { display: block; font-size: 1.4rem; color: #1a2332; }

.takeaways { padding-left: 1.6rem; }
.takeaways li { margin-bottom: 0.7rem; }
.takeaways strong { color: #1a2332; }

.refs { font-size: 0.92rem; padding-left: 1.2rem; }
.refs li { margin-bottom: 0.4rem; }

footer { background: #1a2332; color: #cbd5e1; padding: 1.8rem 0; font-size: 0.88rem; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
footer a { color: #f5b400; }
footer .muted { color: #94a3b8; font-size: 0.8rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.35rem; }
  .topbar { padding: 0.6rem 1rem; }
}
