  /* ---------- reading progress ---------- */
  .progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: transparent; }
  .progress #readProgress { height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

  /* ---------- article scaffold ---------- */
  .article { padding: clamp(28px, 5vh, 56px) 0 clamp(56px, 8vh, 96px); }
  .article > a { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 36px; }
  .article > a .arr { transition: transform .2s ease; }
  .article > a:hover .arr { transform: translateX(-3px); }

  .art-head { max-width: 860px; margin: 0 auto 0px; }
  .art-head .tag-row { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
  .art-head h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.06; letter-spacing: -0.022em; text-wrap: balance; margin-bottom: 18px; margin-top: 18px;}
  .art-head .sub { font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--muted); margin-bottom: 28px; }
  .byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .byline .who { display: flex; align-items: center; gap: 11px; }
  .byline .pubdate { color: var(--muted); font-size: 13.5px; }
  .byline .dots { margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }

  /* ---------- two-column layout ---------- */
  .layout { display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(0, 860px); gap: 0; margin-top: 44px; }
  .toc { position: sticky; top: 96px; align-self: start; padding-right: 28px; }
  .toc h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
  .toc a { display: block; color: var(--muted); font-size: 13.5px; padding: 6px 0 6px 14px; border-left: 2px solid var(--border); transition: color .16s ease, border-color .16s ease; line-height: 1.35; text-decoration: none; }
  .toc a:hover { color: var(--fg); }
  .toc a.active { color: var(--accent-ink); border-color: var(--accent); }
  .toc .share { margin-top: 22px; }

  @media (max-width: 1000px) {
    .layout { grid-template-columns: 1fr; }
    .toc { display: none; }
    .prose { grid-column: 1; }
  }

  /* ---------- prose ---------- */
  .prose { grid-column: 2; max-width: 820px; }
  .prose > p, .prose > ul, .prose > ol, .prose > pre, .prose > .callout, .prose > h2, .prose > h3, .prose > hr { margin-left: auto; margin-right: auto; }
  .prose p { font-size: 1.13rem; line-height: 1.74; color: var(--fg-soft); margin-bottom: 1.35em; text-wrap: pretty; }
  .prose > p:first-of-type { font-size: 1.32rem; line-height: 1.6; color: var(--fg); }
  .prose > p:first-of-type::first-letter {
    font-family: var(--font-display); font-weight: 600; float: left;
    font-size: 3.6em; line-height: 0.78; padding: 6px 12px 0 0; color: var(--accent);
  }
  .prose strong { color: var(--fg); font-weight: 600; }
  .prose em { font-style: italic; }
  .prose h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; line-height: 1.15; margin: 1.9em 0 0.7em; scroll-margin-top: 90px; }
  .prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; margin: 1.6em 0 0.6em; scroll-margin-top: 90px; color: var(--accent-ink); }
  .prose h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; margin: 1.3em 0 0.55em; scroll-margin-top: 90px; }
  .prose ul, .prose ol { margin-bottom: 1.35em; padding-left: 1.3em; }
  .prose li { font-size: 1.1rem; line-height: 1.7; color: var(--fg-soft); margin-bottom: 0.5em; }
  .prose li::marker { color: var(--faint); }
  .prose table {
    width: 100%;
    margin: 0 0 1.5em;
    border-collapse: collapse;
    border: 1px solid var(--border);
    background: var(--surface);
    table-layout: auto;
  }
  .prose th,
  .prose td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
    word-break: normal;
    overflow-wrap: break-word;
  }
  .prose th {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg);
    background: var(--bg-2);
  }
  .prose tbody tr:last-child td { border-bottom: 0; }
  .prose hr { border: 0; border-top: 1px solid var(--border); margin: 0.5em auto; width: 100%; }
  .prose > p:last-of-type {
    font-size: 11px;
    line-height: 1.2;
    color: var(--muted);
    font-style: normal;
    letter-spacing: 0.01em;
    margin: 0;
    padding-top: 18px;
  }
  .prose > p:last-of-type + hr {
    margin-top: 0;
  }
  .prose code { font-family: var(--font-mono); font-size: 0.86em; background: var(--bg-2); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); }
  .prose blockquote { border-left: 3px solid var(--accent); margin: 1.4em 0; padding: 0.5em 0 0.5em 1.4em; color: var(--fg-soft); font-style: italic; }
  .prose blockquote p { margin: 0; }
  .prose pre {
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
    padding: 20px 22px; overflow-x: auto; margin-bottom: 1.5em;
    font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; color: var(--fg-soft);
  }
  .prose pre code { background: transparent; border: 0; padding: 0; font-size: inherit; }
  .prose pre .c { color: var(--faint); }
  .prose pre .k { color: var(--accent-ink); }

  /* ---------- Prism syntax token colors (uses site CSS vars, no Prism theme loaded) ---------- */
  .prose .token.comment,
  .prose .token.prolog,
  .prose .token.doctype,
  .prose .token.cdata { color: var(--faint); font-style: italic; }
  .prose .token.keyword,
  .prose .token.rule,
  .prose .token.at-rule,
  .prose .token.important { color: var(--accent-ink); font-weight: 600; }
  .prose .token.string,
  .prose .token.attr-value,
  .prose .token.regex { color: var(--ok); }
  .prose .token.number,
  .prose .token.boolean,
  .prose .token.constant { color: var(--accent); }
  .prose .token.function,
  .prose .token.class-name { color: var(--fg); }
  .prose .token.operator,
  .prose .token.punctuation { color: var(--muted); }
  .prose .token.decorator,
  .prose .token.builtin { color: var(--accent-ink); }
  .crossref { color: var(--accent-ink); border-bottom: 1px solid var(--accent-wash); transition: border-color .16s ease; }
  .crossref:hover { border-color: var(--accent); }

  .callout {
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
    padding: 24px 26px; margin: 1.7em auto 1.6em;
  }
  .callout .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; display: block; }
  .callout p { margin-bottom: 0.5em; font-size: 1.02rem; }
  .callout ul { margin-bottom: 0; }
  .callout li { font-size: 0.98rem; margin-bottom: 0.3em; }

  /* ---------- article figures ---------- */
  .article-figure {
    margin: 1.7em auto 1.6em;
    max-width: 740px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
  }

  .article-figure__img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
  }

  .article-figure__caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-2);
  }

  .article-figure__alt {
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
  }

  .article-figure__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .article-figure__expand,
  .article-figure__download {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-soft);
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 6px;
    padding: 4px 8px;
    text-decoration: none;
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
  }

  .article-figure__expand:hover,
  .article-figure__download:hover {
    color: var(--accent);
    border-color: var(--accent);
  }

  .article-figure__expand[hidden] { display: none; }

  /* ---------- next read ---------- */
  .next-read { max-width: 860px; margin: clamp(0px, 6vh, 40px) auto 0; padding-top: 32px; border-top: 1px solid var(--border); }
  .next-read .mono { margin-bottom: 14px; display: block; }
  .next-list { display: grid; gap: 10px; }
  .next-card { position: relative; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
  .next-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
  .next-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 4px; }
  .next-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.45; max-width: none; }
  .next-card .arr { font-size: 24px; color: var(--accent); flex-shrink: 0; }
  .next-card a.arr { border: 1px solid var(--border-2); border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; transition: transform .16s ease, border-color .16s ease; }
  .next-card a.arr::after { content: ''; position: absolute; inset: 0; }
  .next-card a.arr:hover { transform: translateX(2px); border-color: var(--accent); }
