/* Article-only reading controls. No capture or analytics. */
:root { --lc-reading-header: 100px; }
.post-template #gh-navigation { position: sticky; top: 0; z-index: 80; background: var(--background-color, #fff); }
.lc-reading-progress { position: sticky; top: var(--lc-reading-header); z-index: 79; height: 3px; background: #dce7ef; pointer-events: none; }
.lc-reading-progress > span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #5b45df, #17b8dc); }
.lc-article-main [data-lc-article-content] h2, .lc-article-main [data-lc-article-content] h3 { scroll-margin-top: calc(var(--lc-reading-header) + 24px); }
[data-lc-article-content] [tabindex="-1"]:focus-visible { outline: 3px solid #087a94; outline-offset: 5px; }
.lc-rail-guide { margin-top: 16px; padding: 18px; border: 1px solid #c9dfed; border-radius: 16px; background: linear-gradient(135deg, #e8fbff, #f2efff 68%, #fff8e7); color: #0b1627; }
.lc-rail-guide p { margin: 10px 0; line-height: 1.5; }
.lc-rail-guide a, .lc-rail-guide button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px; margin-top: 8px; border-radius: 10px; font: inherit; text-align: center; }
.lc-rail-guide a { color: #fff; background: #5840c9; }
.lc-rail-guide button:disabled { width: 100%; border: 1px solid #75849c; background: #fff; color: #526577; cursor: not-allowed; }
.lc-rail-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; }
.lc-rail-links a { display: inline-flex; align-items: center; min-height: 44px; color: #4632c9; text-decoration: underline; }
.lc-reading-rail a:focus-visible, .lc-reading-rail summary:focus-visible { outline: 3px solid #087a94; outline-offset: 3px; }
.lc-toc a { min-height: 44px; display: flex; align-items: center; overflow-wrap: anywhere; }
.lc-toc summary { min-height: 44px; }
/* A06's legacy viewport breakout cannot span a sidebar column or create a scroll ancestor. */
html:has(.post-template .a06-article), body.post-template:has(.a06-article) { overflow-x: clip; }
.a06-article .lc-article-shell { width: 100%; }
.lc-article-main .a06-table-region { width: 100%; max-width: 100%; margin: 3rem 0; transform: none; overflow-x: auto; }
/* Published A06 also contains bare tables, without table-region wrappers. */
.post-template .a06-content > table { display: block; width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
@media (min-width: 1101px) {
    .lc-toc[open] nav { max-height: min(22dvh, 220px); overflow-y: auto; }
    .lc-article-shell { grid-template-columns: minmax(0, 76rem) minmax(23rem, 29rem); width: min(calc(100% - 4rem), 118rem); gap: 4rem; align-items: start; }
    .lc-article-shell > .lc-article-main { grid-column: 1; grid-row: 1; }
    .lc-article-shell > .lc-reading-rail { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--lc-reading-header) + 19px); max-height: calc(100dvh - var(--lc-reading-header) - 35px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 3px; }
}
@media (max-width: 1100px) {
    .lc-article-shell { grid-template-columns: minmax(0, 1fr); }
    .lc-article-shell > .lc-reading-rail { position: static; max-height: none; }
    .lc-rail-guide, .lc-rail-links { display: none; }
    .lc-reading-rail .lc-share-rail { display: none; }
    .lc-toc[open] nav { max-height: min(50dvh, 360px); overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) { .post-template { scroll-behavior: auto; } .lc-reading-progress > span { transition: none; } }
