/* ACG on the shared reading layout (acg 0.25.0, ekg-base re-parent Phase 3). The sheet and the side contents come
   from reading-layout/assets/reading-layout.css (the ekg-base module; never edit that copy). This file maps ACG's
   tokens onto the module's --rl-* contract and holds what only ACG has: the title band lined up with the sheet's
   text, the note under the sheet, the list's tighter rows and its Copy link button, and the collapsed "On this page"
   box (ACG builds it after In brief). Loaded after the module and article-format.css, on format posts only. These
   were parts 1 and 2 of article-format.css (0.22.0-0.22.7); the values are unchanged. */

/* ---- ACG's tokens ---- */
.has-reading-layout{
  --rl-page:var(--paper-deep);--rl-surface:var(--surface);--rl-band:var(--paper);--rl-hairline:var(--hairline);
  --rl-ink:var(--ink);--rl-muted:var(--muted);--rl-accent:var(--blue-d);--rl-focus:var(--blue-d);
  --rl-sheet:calc(var(--read) + 112px);--rl-side:250px;--rl-gap:48px;
  --rl-wide:calc(var(--read) + 112px + 48px + 250px);
  --rl-sticky-top:calc(var(--acg-sticky-top,74px) + 22px);
}

/* ---- the sheet: the page behind it, ACG's padding, the reading measure inside it ---- */
.has-reading-layout main.acg-reading{background:var(--rl-page)}
.has-reading-layout .acg-reading .rl-grid{max-width:1240px;padding:0 24px 56px}
.has-reading-layout .acg-reading .rl-paper{padding:44px 56px 56px}
.has-reading-layout .acg-reading .rl-paper > *{max-width:var(--read);margin-left:auto;margin-right:auto}
.has-reading-layout .acg-reading > .quiet{background:var(--rl-page);margin:0;padding:28px 24px 40px}
/* one left edge: the title area's text starts where the body text on the sheet starts, at every width (the band's
   inner box takes the sheet's width, plus the side column at 1280+, and the sheet's rail + left padding, 57px) */
.has-reading-layout .acg-reading .art-hero .inner{max-width:var(--rl-sheet);padding-left:57px;box-sizing:border-box}
@media(min-width:1280px){.has-reading-layout .acg-reading .art-hero .inner{max-width:var(--rl-wide)}}
@media(max-width:1279px){.has-reading-layout .acg-reading .rl-grid{gap:0}}
@media(max-width:700px){
  .has-reading-layout .acg-reading .art-hero .inner{max-width:none;padding-left:0}
  .has-reading-layout main.acg-reading{background:var(--rl-surface)}
  .has-reading-layout .acg-reading .rl-grid{padding:0}
  .has-reading-layout .acg-reading .rl-paper{padding:28px 20px 40px}
  .has-reading-layout .acg-reading > .quiet{background:var(--paper)}
}

/* ---- the side list (1280+): ACG's heading, tighter rows, Copy link, a thin track-less scrollbar so 11 sections
   and the button fit a 1280x800 window. style.css styles nav.toc as the sticky jump row of other pages: not here. ---- */
.has-reading-layout .acg-reading .rl-side[hidden]{display:none}
.has-reading-layout .acg-reading nav.rl-side{background:transparent;border-bottom:0;z-index:auto}
.has-reading-layout .acg-reading .rl-side{margin-top:44px;max-height:calc(100vh - var(--acg-sticky-top,74px) - 40px);font-family:inherit;
  scrollbar-width:thin;scrollbar-color:var(--hairline) transparent}
.has-reading-layout .acg-reading .rl-side::-webkit-scrollbar{width:6px}
.has-reading-layout .acg-reading .rl-side::-webkit-scrollbar-track{background:transparent}
.has-reading-layout .acg-reading .rl-side::-webkit-scrollbar-thumb{background:var(--hairline);border-radius:3px}
.has-reading-layout .acg-reading .rl-side::-webkit-scrollbar-button{display:none;height:0}
.has-reading-layout .acg-reading .rl-side h2{margin:0 0 8px}
.has-reading-layout .acg-reading .rl-side a{padding:4px 0 4px 12px;font-size:13.5px;line-height:1.3}
.has-reading-layout .acg-reading .rl-side .share{margin-top:14px;padding-top:12px}
.has-reading-layout .acg-reading .rl-side-progress{margin-top:12px}

/* ---- the collapsed box (under 1280px), right after In brief ---- */
.has-reading-layout .acg-reading .toc-box{display:none}
@media(max-width:1279px){
  .has-reading-layout .acg-reading .toc-box{display:block;background:var(--paper);border:1px solid var(--hairline);border-radius:10px;margin:0 0 30px;font-family:var(--sans)}
  .has-reading-layout .toc-box summary{cursor:pointer;padding:13px 18px;font-size:14px;font-weight:700;letter-spacing:.02em;color:var(--ink);list-style-position:inside}
  .has-reading-layout .toc-box summary:focus-visible{outline:2px solid var(--blue-d);outline-offset:2px;border-radius:10px}
  .has-reading-layout .toc-box ol{list-style:none;margin:0;padding:4px 18px 14px;border-top:1px solid var(--hairline)}
  .has-reading-layout .acg-reading .toc-box li{margin:0;font-size:15px;line-height:1.35}
  .has-reading-layout .toc-box a{display:block;padding:8px 0 8px 12px;border-left:2px solid var(--hairline);color:var(--charcoal);text-decoration:none}
  .has-reading-layout .toc-box a:hover,.has-reading-layout .toc-box a[aria-current]{color:var(--ink);border-left-color:var(--blue-d)}
}
