/* Progressive enhancements informed by GoogleChrome/modern-web-guidance.
   Keep the existing editorial layout; unsupported declarations fall back naturally. */
:root{--focus-ring:#245db2;--control-size:2.75rem}
html{scrollbar-gutter:stable}
main :is(h1,h2,h3){text-wrap:balance}
main :is(.hero-deck,.article-hero>p,.paper-hero>p){text-wrap:pretty}
main :is(.frontier-preview,.learning-news,.practice-news,.paper-card){min-inline-size:0}
main :is(.frontier-preview,.learning-news,.practice-news,.paper-card) :is(h2,h3,h4){overflow-wrap:break-word}
body>header :is(button,select,.nav-search,.nav-category>summary){min-block-size:var(--control-size)}
body>header .nav-chevron{flex-shrink:0}
body>header .language select{font-size:1rem;max-inline-size:10rem}
:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}
main :is(pre,.table-scroll,.reading-table-scroll,.rendered-formula,.sde-math){overscroll-behavior-inline:contain;scrollbar-gutter:stable;scrollbar-width:thin}
main pre{border:1px solid #dce1e8;border-radius:.65rem;tab-size:4}
main pre code{font-size:.9375rem;line-height:1.5;white-space:pre}
main :is(input,select,textarea){font-size:1rem}
main textarea{resize:vertical;min-block-size:6rem}
@supports(field-sizing:content){.lesson-notebook textarea{field-sizing:content;max-block-size:22rem}}
main :is(.article-info-panel,.toc,.lesson-toc){border-radius:.75rem}
main .toc a:hover,main .lesson-toc a:hover{background:#f1f4f8;text-decoration:underline}
main :is(.frontier-preview,.learning-news,.practice-news):focus-visible{outline-offset:5px}
@media(hover:hover) and (pointer:fine){
 .nav-dropdown a:hover{background:#eef2f8}
 main :is(.frontier-preview,.learning-news,.practice-news):hover :is(h2,h3,h4){text-decoration:underline;text-underline-offset:.18em}
}
@media(max-width:700px){
 body>header .language select{font-size:1rem;width:6.4rem;max-width:6.4rem}
 .nav-ready body>header.nav-open .category-nav{max-block-size:65vh;max-block-size:65svh;overflow-y:auto;overscroll-behavior:contain;padding-block-end:max(.5rem,env(safe-area-inset-bottom))}
 body>header .nav-category>summary{font-size:1rem;white-space:normal;text-align:start}
 body>header .nav-dropdown a{font-size:1rem}
 main :is(.article-hero,.paper-hero) h1{font-size:clamp(1.75rem,1.5rem + 1.2vw,2.25rem)!important}
 main :is(pre,.rendered-formula,.reading-table-scroll){max-inline-size:100%}
}
@media(pointer:coarse){
 main :is(.toc,.lesson-toc) a{min-block-size:2.75rem}
 .nav-toggle{min-inline-size:2.75rem}
}
@media(prefers-reduced-motion:reduce){
 html:focus-within,html{scroll-behavior:auto!important}
 .nav-chevron,.frontier-preview,.learning-news,.practice-news{transition:none!important;animation:none!important}
}
@media(forced-colors:active){
 :where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline-color:Highlight}
 .nav-dropdown,.article-info-panel,main pre{border:1px solid CanvasText}
 .keyword-tag{border-color:CanvasText!important}
}

/* Article anchors must not inherit the tokenizer workbench's bounded output box. */
main.paper-reading article section#tokens{max-height:none;min-height:0;overflow:visible;padding:0}
/* Keep article metadata compact and prevent top-level media from growing the page. */
[data-sde-tutorial] .article-info-panel p{font-size:.9375rem!important;line-height:1.45!important}
[data-sde-tutorial] .sde-math{max-inline-size:100%;overflow-x:auto}
/* Course progression: editorial lists rather than repeated promotion cards. */
.course-entry-nav{display:flex;flex-wrap:wrap;gap:12px 24px;margin:20px 0}
.course-feature,.course-position{padding:24px;border:1px solid #d8dfe9;border-radius:14px;background:#f4f6fb;margin:28px 0}
.course-stage-list{list-style:none;padding:0}.course-stage-list>li{border-top:1px solid #dce0e5;padding:28px 0;scroll-margin-top:100px}
.course-number{color:#5267a5;font-variant-numeric:tabular-nums}.course-stage-list h4{font-size:1rem;margin:18px 0 6px}.course-stage-list p{margin:6px 0 14px}
.course-evidence{border-left:3px solid #9276bd;padding:2px 18px;background:#f8f6fc}.course-routes>article,.course-tutorial-list>article{padding:24px 0;border-bottom:1px solid #ddd}
.course-routes h3,.course-tutorial-list h3{margin:6px 0}.first-assistant .article-info-panel{background:#f5f5f5;border:1px solid #ddd;border-radius:12px;padding:18px;margin:22px 0}.first-assistant .article-info-panel p{font-size:.9375rem;line-height:1.45;margin:6px 0}.first-assistant figure img{width:100%;height:auto}.first-assistant .sde-math{overflow-x:auto}.first-assistant a[href^="https:"]{color:#175fc4;text-decoration:underline}.first-assistant details{margin:18px 0}.first-assistant pre{max-width:100%;overflow-x:auto}.course-hub .article-hero h1{max-width:24ch}
@media(max-width:600px){.course-feature,.course-position{padding:18px}.course-entry-nav{display:grid;gap:10px}.course-stage-list>li{padding:20px 0}.first-assistant figure{margin:24px 0}}
.course-feature .article-tags,.first-assistant .article-tags{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.course-feature .article-tags span,.first-assistant .article-tags span{padding:4px 10px;border-radius:6px;background:#e8edfb;color:#344e82;font-size:.875rem}.course-feature .article-tags span:nth-child(2),.first-assistant .article-tags span:nth-child(2){background:#f0e7fa;color:#674783}.course-feature .article-tags span:nth-child(3),.first-assistant .article-tags span:nth-child(3){background:#fff0d5;color:#795722}
/* Explicit instructional media and compact metadata on the foundational tutorials. */
.boundary-tutorial .article-info-panel{padding:16px 20px;border:1px solid #ddd;border-radius:12px;background:#f5f5f5;margin:22px 0}.boundary-tutorial .article-info-panel p{font-size:.9375rem;line-height:1.45;margin:5px 0}.boundary-tutorial figure{margin:24px 0}.boundary-tutorial figure img{width:100%;height:auto}.boundary-tutorial figcaption{font-size:.9375rem;line-height:1.45;margin-top:10px}.boundary-tutorial a[href^="https:"]{color:#175fc4;text-decoration:underline}.boundary-math{max-width:100%;overflow-x:auto;padding:12px 0}.boundary-tags{display:flex;gap:8px;flex-wrap:wrap}.boundary-tags span{font-size:.875rem;padding:4px 10px;border-radius:6px;background:#e4edff;color:#344e82}.boundary-tags span:nth-child(2){background:#f0e5ff;color:#674783}.boundary-tags span:nth-child(3){background:#fff0d0;color:#795722}.boundary-tutorial pre{max-width:100%;overflow-x:auto}.boundary-tutorial .toc ol{line-height:1.45}.boundary-tutorial .toc li{margin:6px 0}
.attention-depth{min-width:0}.attention-depth>section{margin:1.5rem 0}.attention-depth figure{margin:1.2rem 0}.attention-depth img{width:100%;height:auto}.attention-depth figcaption{font-size:.9rem;line-height:1.4;color:#525968}.attention-equation{max-width:100%;overflow-x:auto;padding:.5rem 0}.attention-depth pre{max-width:100%;overflow-x:auto}.attention-depth a[href^="http"]{color:#175bb7;text-decoration:underline;text-underline-offset:3px}.attention-depth details{margin:.6rem 0}.attention-depth table{width:100%}
