:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #0ea5e9;
  --brand-600: #0284c7;
  --surface: #f1f5f9;
  --border: #e2e8f0;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1100px, 92%); margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem;
  background: var(--text); color: white; border-radius: .5rem;
}
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; gap: 1rem; }
.site-nav ul { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; align-items: center; }
.site-nav a { color: var(--text); padding: .5rem .75rem; border-radius: .75rem; }
.site-nav a.btn { background: var(--surface); border: 1px solid var(--border); }
.hero { background: linear-gradient(180deg, var(--surface), transparent); padding: 2.25rem 0 1rem; }
.eyebrow { text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; color: var(--muted); margin: 0 0 .25rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 65ch; }
.meta { color: var(--muted); display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }

.content { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; padding: 2rem 0 4rem; }
.toc { position: sticky; top: 5.5rem; align-self: start; background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; }
.toc h2 { margin-top: 0; font-size: 1rem; }
#toc-nav a { display: block; padding: .25rem 0; color: var(--muted); }
#toc-nav a:hover { color: var(--text); }

article h1, article h2, article h3 { line-height: 1.3; }
article h2 { margin-top: 2rem; }

.btn { display: inline-block; padding: .6rem .9rem; border-radius: .8rem; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.btn.primary { background: var(--brand); border-color: var(--brand-600); color: white; }
.btn.primary:hover { background: var(--brand-600); }

.sep { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: center; }
.author-avatar { border-radius: 100%; border: 1px solid var(--border); }

.site-footer { border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; color: var(--muted); }
.footer-inner a { color: var(--muted); }

@media (max-width: 900px) {
  .content { grid-template-columns: 1fr; }
  .toc { position: relative; top: 0; }
}