  /* Blog-specific styles, layered on top of styles.css */

  .blog-bar { align-items: center; gap: 16px; }
  .blog-bar .bar-spacer { flex: 1; }

  /* Index */
  .blog-index { max-width: 720px; margin: 0 auto; padding: 48px 0 20px; }
  .blog-index .eyebrow { margin-bottom: 8px; }
  .blog-index h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.9rem;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
  }
  .blog-index .index-lede { color: var(--ink-2); margin: 0 0 28px; }

  .post-filter { margin: 0 0 30px; }
  .post-search {
    width: 100%;
    font-family: var(--sans);
    font-size: 0.92rem;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 13px;
    margin-bottom: 12px;
  }
  .post-search::placeholder { color: var(--muted); }
  .post-search:focus { outline: none; border-color: var(--indigo-bright); }
  .tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
  .tag-chip {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  }
  .tag-chip:hover { color: var(--ink); border-color: var(--line-strong); }
  .tag-chip.is-active { color: #fff; background: var(--indigo); border-color: var(--indigo); }
  .tag-empty { color: var(--muted); font-style: italic; }

  .post-list { display: flex; flex-direction: column; gap: 4px; }
  .post-card {
    display: block;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    color: inherit;
  }
  .post-card:hover { color: inherit; }
  .post-card[hidden] { display: none; }
  .post-card:hover .post-card-title { color: var(--indigo-bright); }
  .post-card-meta {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 6px;
  }
  .post-card-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--ink);
    margin: 0 0 6px;
    transition: color 0.15s ease;
  }
  .post-card-subtitle {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.02rem;
    line-height: 1.3;
    color: var(--ink-2);
    margin: 0 0 6px;
  }
  .post-card-desc { color: var(--ink-2); margin: 0; font-size: 0.98rem; }

  /* Article */
  .post { max-width: 720px; margin: 0 auto; padding: 40px 0 24px; }
  .post-head { margin-bottom: 34px; }
  .post-meta { margin-bottom: 16px; }
  .post-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 2.1rem;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 0 14px;
  }
  .post-title:has(+ .post-subtitle) { margin-bottom: 8px; }
  .post-subtitle {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.28;
    letter-spacing: -0.005em;
    color: var(--ink-2);
    margin: 0 0 16px;
  }
  .post-lede {
    font-size: 1.16rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin: 0;
  }

  .prose { font-size: 1.05rem; line-height: 1.72; color: var(--ink); }
  .prose > * + * { margin-top: 1.15em; }
  .prose h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.42rem;
    letter-spacing: -0.01em;
    margin: 1.9em 0 0;
    padding-top: 0.3em;
  }
  .prose h3 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 1.7em 0 0;
  }
  .prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
  .prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
  .prose a:hover { text-decoration-color: var(--indigo-bright); }
  .prose code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.1em 0.36em;
  }
  .prose pre {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.55;
  }
  .prose pre code { background: none; border: none; padding: 0; font-size: inherit; }
  .prose ul, .prose ol { padding-left: 1.3em; }
  .prose li + li { margin-top: 0.35em; }
  .prose blockquote {
    border-left: 3px solid var(--ochre);
    margin: 0;
    padding-left: 1.1em;
    color: var(--ink-2);
    font-style: italic;
  }
  .prose img { max-width: 100%; height: auto; border-radius: 8px; }
  .prose .fig { margin: 2em 0; }
  .prose .fig svg { display: block; width: 100%; height: auto; }
  .prose figcaption {
    margin-top: 12px;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--muted);
    text-align: center;
  }

  /* Real-results figure: two model panels */
  .fig-real .fig-panels { display: flex; gap: 16px; }
  .fig-real .fig-card {
    flex: 1 1 0;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 10px 4px;
  }
  .fig-real .fig-card img,
  .fig-real .fig-card .fig-plot { display: block; width: 100%; height: auto; }
  .fig-real .fig-card-cap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-top: 4px;
    text-align: center;
  }
  .fig-real .fig-card-title {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--ink-2);
  }
  .fig-real .fig-card-sub { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
  .fig-real .fig-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--muted);
  }
  .fig-real .fig-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .fig-real .fig-legend .lg-dot { width: 9px; height: 9px; border-radius: 50%; }
  .fig-real .fig-legend .lg-ring {
    width: 11px; height: 11px; border-radius: 50%;
    border: 2px solid #d6483d; box-sizing: border-box;
  }
  @media (max-width: 560px) {
    .fig-real .fig-panels { flex-direction: column; }
  }
  .prose hr { border: none; border-top: 1px solid var(--line); margin: 2.2em 0; }

  /* Citations linked to references, with back-links */
  .prose a.cite { text-decoration: none; scroll-margin-top: 80px; }
  .prose a.cite:hover { text-decoration: underline; }
  .prose a.cite:target { background: rgba(183, 122, 43, 0.16); border-radius: 3px; box-shadow: 0 0 0 3px rgba(183, 122, 43, 0.16); }
  .prose ul.references { list-style: none; padding-left: 0; font-size: 0.95rem; }
  .prose ul.references li {
    padding-left: 1.5em;
    text-indent: -1.5em;
    color: var(--ink-2);
    scroll-margin-top: 80px;
  }
  .prose ul.references li + li { margin-top: 0.7em; }
  .prose ul.references li:target { background: rgba(183, 122, 43, 0.16); border-radius: 4px; box-shadow: 0 0 0 4px rgba(183, 122, 43, 0.16); }
  .prose ul.references .cite-back { margin-left: 0.4em; text-decoration: none; text-indent: 0; color: var(--muted); }
  .prose ul.references .cite-back:hover { color: var(--indigo); }

  /* Series navigation block */
  .series-nav {
    margin-top: 48px;
    padding: 22px 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .series-eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 14px;
  }
  .series-list { list-style: none; counter-reset: s; padding: 0; margin: 0; }
  .series-list li {
    counter-increment: s;
    position: relative;
    padding-left: 2em;
    margin: 9px 0;
    line-height: 1.4;
    font-size: 0.96rem;
  }
  .series-list li::before {
    content: counter(s);
    position: absolute;
    left: 0;
    top: 0.05em;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
  }
  .series-list a { text-decoration: none; color: var(--indigo); }
  .series-list a:hover { text-decoration: underline; }
  .series-list .is-current > span { font-weight: 600; color: var(--ink); }
  .series-list .is-current::before { color: var(--ochre); }
  .series-dirs {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.8rem;
  }
  .series-dirs .series-next { margin-left: auto; text-align: right; }

  .post-foot {
    margin-top: 52px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.8rem;
  }

  @media (max-width: 640px) {
    .post-title { font-size: 1.7rem; }
    .post-lede { font-size: 1.05rem; }
  }
