@font-face { font-family: "Glacial Indifference"; src: url("/fonts/glacial-indifference-700.woff2") format("woff2"); font-weight: 700 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Glacial Indifference"; src: url("/fonts/glacial-indifference-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* Shared styles for the blog index and blog posts. Same tokens as the homepage. */
:root {
  --bg: #ffffff;
  --soft: #f5f7fb;
  --line: #e3e7ef;
  --navy: #010137;
  --text: #1c1d2b;
  --muted: #5b6075;
  --blue: #2563eb;
  --blue-hover: #1d4fd8;
  --blue-soft: #e8efff;
  --display: "Glacial Indifference", "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  --read: 42rem;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--serif); font-size: 1.0625rem; line-height: 1.8; padding-inline: 20px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); color: var(--navy); text-wrap: balance; margin: 0; font-weight: 700; }
p { margin: 0; }
.eyebrow { font-family: var(--sans); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; margin-inline: -20px; padding: 12px 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--navy); text-decoration: none; white-space: nowrap; min-width: 0; }
.logo { width: 34px; height: 34px; flex: none; border-radius: 9px; }
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--sans); font-weight: 700; font-size: .95rem; line-height: 1.2; padding: 9px 16px; border-radius: 10px; text-decoration: none; white-space: nowrap; background: var(--blue); color: #fff; transition: background .15s; }
.btn:hover { background: var(--blue-hover); }
.btn-lg { font-size: 1.02rem; padding: 14px 22px; }

/* Blog index */
.blog-head { padding-block: 72px 40px; max-width: var(--read); }
.blog-head h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; margin-block: 12px 16px; }
.blog-head p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }
.posts { list-style: none; margin: 0; padding: 0 0 40px; display: grid; gap: 16px; max-width: 52rem; }
.post-card { display: grid; gap: 6px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: border-color .15s; }
.post-card:hover { border-color: var(--blue); }
.post-card h2 { font-size: 1.5rem; line-height: 1.2; }
.post-card p { color: var(--muted); font-size: .98rem; line-height: 1.65; }
.meta { font-family: var(--sans); font-weight: 600; font-size: .88rem; color: var(--muted); }
.empty { max-width: 52rem; padding: 36px; margin-bottom: 40px; background: var(--soft); border-radius: 16px; display: grid; gap: 10px; }
.empty h2 { font-size: 1.5rem; line-height: 1.2; }
.empty p { color: var(--muted); }
.empty .actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 8px; font-family: var(--sans); font-weight: 600; }
.empty .actions a:not(.btn) { color: var(--blue); }

/* Blog post */
.post { max-width: var(--read); margin-inline: auto; padding-block: 56px 32px; }
.back { font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--blue); text-decoration: none; }
.post h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; margin-block: 18px 12px; }
.post .meta { margin-bottom: 32px; }
.post-body { display: grid; gap: 1.2em; }
.post-body h2 { font-size: 1.7rem; line-height: 1.2; margin-top: .8em; }
.post-body h3 { font-size: 1.3rem; margin-top: .4em; }
.post-body ul, .post-body ol { margin: 0; padding-left: 1.3em; display: grid; gap: .4em; }
.post-body a { color: var(--blue); }
.post-body blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--blue); font-style: italic; color: var(--muted); }
.post-body code { font-size: .9em; background: var(--soft); padding: 2px 6px; border-radius: 4px; }
.post-cta { max-width: var(--read); margin: 24px auto 0; padding: 28px; background: var(--navy); color: #e8eaf6; border-radius: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.post-cta p { font-family: var(--display); font-size: 1.4rem; line-height: 1.25; color: #fff; flex: 1 1 260px; }

footer { padding-block: 28px 44px; border-top: 1px solid var(--line); margin-top: 56px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-family: var(--sans); font-size: .92rem; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .logo { width: 30px; height: 30px; }
  .blog-head { padding-block: 48px 28px; }
  .post { padding-block: 36px 24px; }
  .post-card, .empty { padding: 22px; }
  .post-cta .btn { width: 100%; }
}
@media (max-width: 420px) { .nav .btn { display: none; } }

/* Post diagrams */
.fig { margin: .6em 0; padding: 20px 16px 14px; background: var(--soft); border-radius: 14px; }
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { margin-top: 10px; font-family: var(--sans); font-size: .9rem; color: var(--muted); text-align: center; }
.fig text { font-family: var(--sans); }
.f-box rect { fill: #ffffff; stroke: var(--line); stroke-width: 1.5; }
.f-box rect.f-accent { fill: var(--navy); stroke: var(--navy); }
.f-box rect.f-soft { fill: var(--blue-soft); stroke: #c9d8ff; }
.f-label text, text.f-label { fill: var(--navy); font-size: 14px; font-weight: 600; text-anchor: middle; }
.f-label .f-light { fill: #ffffff; }
.f-strong { font-weight: 700; font-size: 16px; }
text.f-left { text-anchor: start; }
.f-num text { fill: var(--blue); font-size: 13px; font-weight: 700; text-anchor: middle; }
.f-line path { fill: none; stroke: #9aa6c2; stroke-width: 1.6; }
.f-arrow { fill: #9aa6c2; }
.f-cap { fill: var(--muted); font-size: 13px; font-style: italic; text-anchor: middle; font-family: var(--serif) !important; }
.f-axis text { fill: var(--muted); font-size: 12px; font-weight: 700; text-anchor: middle; letter-spacing: .06em; text-transform: uppercase; }
.f-dot { fill: var(--blue); } .f-dot-ok { fill: #1fa96a; } .f-dot-warn { fill: #e08a1e; }

@media (max-width: 640px) {
  .fig { padding: 16px 12px 12px; }
  .fig svg { min-width: 540px; }
  .fig figcaption::after { content: " Swipe to see the full diagram."; }
}
