/* Load after article-audio-layout, audio-component and toc styles. */
@media (min-width: 961px) {
  /* The audio row already includes the strip's existing bottom margin. */
  .article-grid:has(> .article-audio-slot + .toc.article-toc) {
    row-gap: 0;
  }
  /* Align the directory's upper rule with the audio strip's upper rule.
     Spanning both rows gives the sticky sidebar the full reading height. */
  .article-grid > .article-audio-slot + .toc.article-toc {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
  }
}

/* Single-column reading entry: keep the existing player and TOC untouched. */
@media (max-width: 960px) {
  .article-grid:has(> .article-audio-slot + .toc.article-toc) {
    row-gap: 0;
  }
  .article-grid:has(> .article-audio-slot + .toc.article-toc) > .toc.article-toc {
    margin-block-start: 8px;
  }
  .article-grid:has(> .article-audio-slot + .toc.article-toc) > .toc.article-toc + .prose {
    margin-block-start: 30px;
  }
}

/* Accepted wordmark direction B: restrained system sans, English and Chinese. */
.wordmark{font-family:-apple-system,"PingFang SC",sans-serif!important;font-weight:600!important;letter-spacing:.01em!important}
.wordmark b{font-family:"PingFang SC",sans-serif!important;font-weight:500!important;letter-spacing:.08em!important}
/* Matching dark player; preserve the original controls, motion and height. */
.listen-strip{--listen-ink:#f1f1ef;--listen-muted:#c3c8c3;--listen-rule:#777f79;--listen-accent:#8bc99c;--listen-focus:#f0aaa3;background:#121514;color:var(--listen-ink);padding:8px 12px;border-color:#121514;box-sizing:border-box}
.listen-strip[data-playing="true"] .listen-strip__glyph,.listen-strip__play:hover .listen-strip__glyph{background:var(--listen-ink);color:#121514}
/* Keep the light directory, enclosing the folded and expanded states. */
.article-grid>.toc.article-toc .article-toc__disclosure{border:1px solid #9ca39e;box-sizing:border-box}
.article-grid>.toc.article-toc .article-toc__summary{padding-inline:12px}
.article-grid>.toc.article-toc .article-toc__links{padding-inline:12px}
@media(max-width:960px){.article-grid>.toc.article-toc{position:relative}}
.article-grid>.toc.article-toc::after{content:"";position:absolute;left:2px;bottom:0;width:24px;height:3px;pointer-events:none;background:linear-gradient(90deg,#943c39 0 25%,transparent 25% 38%,#406957 38% 63%,transparent 63% 76%,#121514 76%)}
