@font-face { font-family: "Lilita One"; src: url("/static/fonts/lilita-one-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/static/fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/static/fonts/figtree-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/static/fonts/figtree-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/static/fonts/figtree-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ground: #F4F2FA;
  --card: #FFFFFF;
  --ink: #1B1A3A;
  --ink-2: #55537A;
  --rule: #E1DEF0;
  --cobalt: #2340C8;
  --cobalt-2: #1A2F96;
  --gold: #D9AE3F;
  --gold-2: #9C7420;
  --sun: #FFD25A;
  --stop: #B42318;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --measure: 68ch;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.blog-page {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 500 17px/1.55 var(--text);
}
::selection { background: var(--sun); color: var(--ink); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 40; }
.skip-link:focus {
  left: var(--gutter);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
}
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.lanyard :focus-visible { outline-color: var(--sun); }

.lanyard {
  position: relative;
  background: var(--cobalt);
  color: #fff;
  padding: 14px 0 18px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 12px 12px;
}
.lanyard::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 10px, var(--gold-2) 10px 12px);
}
.blog-lanyard-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.brand-block {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-block:hover .wordmark { text-decoration: underline; text-underline-offset: 4px; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 400 26px/1 var(--display);
  letter-spacing: 0.01em;
}
.mark { width: 34px; height: 24px; flex: none; }
.tagline { margin: 4px 0 0; font: 600 14px/1.2 var(--text); color: #DCE2FF; }
.blog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font: 700 15px/1 var(--text);
}
.blog-nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
}
.blog-nav a:hover { background: rgba(255, 255, 255, 0.12); }

.blog-main {
  max-width: min(720px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
}

.index-header h1,
.article-header h1 {
  margin: 0 0 8px;
  font: 400 clamp(1.65rem, 4vw, 2.1rem)/1.15 var(--display);
  letter-spacing: 0.01em;
  max-width: var(--measure);
}
.index-lede,
.article-meta {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 1rem;
  max-width: var(--measure);
}
.article-meta time { font-variant-numeric: tabular-nums; }

.article-body {
  max-width: var(--measure);
}
.article-body > *:first-child { margin-top: 0; }
.article-body h2 {
  margin: 2rem 0 0.65rem;
  font: 600 1.35rem/1.25 var(--text);
  color: var(--ink);
}
.article-body h3 {
  margin: 1.5rem 0 0.5rem;
  font: 600 1.12rem/1.3 var(--text);
}
.article-body p,
.article-body li {
  margin: 0 0 1rem;
}
.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}
.article-body strong { font-weight: 700; }
.article-body a {
  color: var(--cobalt-2);
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--cobalt); }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
}
.article-body th,
.article-body td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.article-body th {
  font-weight: 700;
  background: rgba(35, 64, 200, 0.06);
}
.article-body tr:last-child td { border-bottom: 0; }
.article-body th:not(:first-child),
.article-body td:not(:first-child) { text-align: right; }

.chart-wrap {
  margin: 1.75rem 0 2rem;
  padding: 16px 12px 12px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  max-width: 100%;
  overflow-x: auto;
}
.chart {
  display: block;
  width: 100%;
  min-width: 520px; /* below this, scroll the chart rather than shrink labels under ~11px */
  height: auto;
  color: var(--ink);
}
.chart .ct { font-weight: 600; font-size: 13px; fill: var(--ink); }
.chart .lb { font-size: 12px; fill: var(--ink); }
.chart .vl { font-size: 12px; fill: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .ax { font-size: 12px; fill: var(--ink-2); }
.chart .gl { stroke: var(--rule); stroke-width: 1; }
.chart .zl { stroke: var(--ink-2); stroke-width: 1; }
.chart-caption {
  margin: 10px 4px 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ink-2);
}

.blog-cta {
  margin-top: 40px;
  padding: 24px 20px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  max-width: var(--measure);
}
.blog-cta h2 {
  margin: 0 0 8px;
  font: 400 1.35rem/1.2 var(--display);
}
.blog-cta p { margin: 0 0 16px; color: var(--ink-2); }
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--cobalt);
  color: #fff;
  font: 700 16px/1 var(--text);
  text-decoration: none;
}
.cta-btn:hover { background: var(--cobalt-2); }

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: var(--measure);
}
.post-card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  transition: border-color 0.15s ease;
}
.post-card a {
  display: block;
  padding: 20px 18px;
  color: inherit;
  text-decoration: none;
}
.post-card:hover { border-color: var(--cobalt); }
.post-card h2 {
  margin: 0 0 6px;
  font: 400 1.35rem/1.2 var(--display);
}
.post-meta {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.post-desc { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }

.blog-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px var(--gutter) 32px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
}
.blog-foot p { margin: 0 0 8px; }
.blog-foot a { color: var(--cobalt-2); }

@media (min-width: 720px) {
  .blog-main { padding-top: 36px; }
  .chart-wrap { padding: 20px 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card { transition: none; }
}
