/* Accepted workshop header: edge anchors, reader title, and progress. */
.topbar>.shell.header-main{display:grid;grid-template-columns:auto 1fr;min-height:0;padding-top:18px;padding-bottom:12px;gap:13px 32px}
.header-main .brand{font-size:32px;letter-spacing:-.05em}
:root[data-brand=unbounded] .header-main .brand{font-size:32px}
.header-main .topnote{margin-top:5px;font-size:10px;letter-spacing:.025em}
.header-main .section-nav{justify-self:end;gap:28px;flex-wrap:nowrap}
.header-main .section-nav a,.header-main .section-nav a.collections-nav{position:relative;padding:8px 0;border:0;border-radius:0;font:500 15px/1.4 var(--ui)}
.header-main .section-nav a[aria-current=page]{border:0;color:var(--accent)}
.header-main .section-nav a::after{content:'';position:absolute;bottom:2px;left:0;right:0;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform 240ms cubic-bezier(.2,.7,.2,1)}
.header-main .section-nav a[aria-current=page]::after,.header-main .section-nav a:focus-visible::after{transform:scaleX(1)}
.header-main .topic-nav{grid-column:1/-1;grid-row:2;justify-content:flex-start;gap:3px 23px;padding:9px 0 0;border-top:1px solid var(--rule)}
.header-main .topic-nav .filter{font-size:13px;padding:5px 0;border:0;background:none}
.header-main .topic-nav .filter>span:first-child{background:linear-gradient(currentColor,currentColor) left bottom/0% 1px no-repeat;padding-bottom:3px;transition:background-size 240ms cubic-bezier(.2,.7,.2,1)}
.header-main .topic-nav .filter.active>span:first-child,.header-main .topic-nav .filter:focus-visible>span:first-child{background-size:100% 1px}
.header-sections-only{padding-bottom:18px!important}

@media(max-width:560px){
 .topbar>.shell.header-main{padding-top:16px;gap:12px 16px}
 :root[data-brand=unbounded] .header-main .brand,.header-main .brand{font-size:28px}
 .header-main .section-nav{gap:16px}.header-main .section-nav a,.header-main .section-nav a.collections-nav{font-size:13px;padding:8px 0}
 .header-main .topic-nav{gap:2px 18px}.header-main .topic-nav .filter{font-size:12px}
}
@media(max-width:360px){.header-main .section-nav{gap:10px}.header-main .section-nav a,.header-main .section-nav a.collections-nav{font-size:12px}}
/* Reading navigation remains available without taking a column from the text. */
@media(min-width:851px){
 .topbar>.shell.header-with-topics{grid-template-columns:auto minmax(0,1fr) auto;min-height:76px;padding-top:12px;padding-bottom:12px;gap:30px}
 .header-with-topics .topic-nav{grid-column:auto;grid-row:auto;justify-content:center;border:0;padding:0;gap:4px 18px}
 .header-with-topics .section-nav{gap:24px}
}
.reading-header{position:sticky;top:0;z-index:65;background:var(--paper,#fff)}
.topbar.reading-header>.shell.header-main{grid-template-columns:190px minmax(0,1fr) 190px;min-height:70px;padding-top:13px;padding-bottom:13px;gap:24px}
.reading-header .topnote{display:none}
.reading-header-title{min-width:0;border:0;background:none;color:var(--ink);padding:8px 0;font:450 15px/1.45 'Unbounded',Arial,sans-serif;letter-spacing:-.025em;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;visibility:hidden;transition:opacity 200ms}
.reading-title-visible .reading-header-title{opacity:1;visibility:visible}
.reading-header .section-nav{gap:22px}
.reading-header-progress{position:absolute;bottom:-1px;left:0;width:100%;height:2px;background:var(--accent);transform:scaleX(0);transform-origin:left;pointer-events:none}
.article-body [id],.collection-overview [id],.collection-texts,.article-title,.collection-heading h1{scroll-margin-top:calc(var(--reading-header-height,70px) + 24px)}
@media(min-width:851px){.article-rail{top:calc(var(--reading-header-height,0px) + 24px);max-height:calc(100vh - var(--reading-header-height,0px) - 48px)}}
@media(max-width:850px){.topbar.reading-header>.shell.header-main{grid-template-columns:130px minmax(0,1fr) 168px;gap:18px}.reading-header-title{font-size:13px}.reading-header .section-nav{gap:16px}}
@media(max-width:560px){.topbar.reading-header>.shell.header-main{grid-template-columns:auto minmax(0,1fr) auto;min-height:58px;padding-top:10px;padding-bottom:10px;gap:16px}.reading-header .section-nav a[href="#/"]{display:none}:root[data-brand=unbounded] .reading-header .header-main .brand{font-size:23px}.reading-header-title{font-size:12px}.reading-header .section-nav a.collections-nav{font-size:12px}.reading-header .section-nav{gap:0}}

/* Experiment: viewport edges anchor navigation; the middle is genuinely centered. */
@media(min-width:851px){
 .topbar>.shell.header-main{max-width:none;padding-left:32px;padding-right:32px}
 .topbar>.shell.header-with-topics,.topbar.reading-header>.shell.header-main{grid-template-columns:210px minmax(0,1fr) 210px}
 .header-main .brand-block{justify-self:start}
 .header-main .section-nav{justify-self:end;justify-content:flex-end}
 .header-with-topics .topic-nav{justify-content:center}
}
@media(min-width:851px) and (max-width:1100px){
 .topbar>.shell.header-main{padding-left:24px;padding-right:24px;gap:20px}
 .topbar>.shell.header-with-topics,.topbar.reading-header>.shell.header-main{grid-template-columns:185px minmax(0,1fr) 185px}
 .header-main .section-nav{gap:18px}
 .header-main .section-nav a,.header-main .section-nav a.collections-nav{font-size:14px}
 .header-with-topics .topic-nav{gap:3px 16px}
}

/* Slightly stronger navigation, keeping the same anchors and spacing. */
@media(min-width:851px){
 .header-main .topic-nav .filter{font-size:14px}
 .header-main .section-nav a,.header-main .section-nav a.collections-nav{font-size:16px}
}
@media(min-width:851px) and (max-width:1100px){
 .header-main .section-nav a,.header-main .section-nav a.collections-nav{font-size:15px}
}

/* Keep the same navigation available over the catalog as well as the reader. */
.topbar{position:sticky;top:0;z-index:65;background:var(--paper,#fff)}

@media(prefers-reduced-motion:reduce){.header-main a::after,.header-main .filter>span,.reading-header-title{transition:none}}
@media(hover:hover) and (pointer:fine){
 .header-main .section-nav a:hover::after{transform:scaleX(1)}
 .header-main .topic-nav .filter:hover>span:first-child{background-size:100% 1px}
}

/* Mobile catalog: topics unfold from the main row instead of occupying it permanently. */
.mobile-topics-toggle{display:none}
@media(max-width:850px){
 .topbar>.shell.header-with-topics{grid-template-columns:auto auto minmax(0,1fr);gap:0 16px;padding-top:10px;padding-bottom:10px}
 .header-with-topics .brand-block{grid-column:1;grid-row:1}
 .mobile-topics-toggle{grid-column:2;grid-row:1;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:8px 0;border:0;background:none;color:var(--muted);font:500 13px/1.4 var(--ui);white-space:nowrap}
 .mobile-topics-toggle svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
 .mobile-topics-toggle[aria-expanded=true],.mobile-topics-toggle.has-selection{color:var(--accent)}
 .mobile-topics-toggle[aria-expanded=true] svg{transform:rotate(180deg)}
 .header-with-topics .section-nav{grid-column:3;grid-row:1;justify-self:end;gap:16px}
 .header-with-topics .topic-nav{display:none;grid-column:1/-1;grid-row:2;justify-content:center;gap:3px 20px;margin-top:8px;padding-top:10px;padding-bottom:4px;text-align:center}
 .header-with-topics .topic-nav.mobile-topics-open{display:flex}
 .header-with-topics .topic-nav .filter{justify-content:center;min-height:36px}
}
@media(max-width:560px){
 .topbar>.shell.header-with-topics{gap:0 12px}
 :root[data-brand=unbounded] .header-with-topics .brand,.header-with-topics .brand{font-size:24px}
 .header-with-topics .section-nav{gap:12px}
 .header-with-topics .section-nav a,.header-with-topics .section-nav a.collections-nav{font-size:12px}
 .mobile-topics-toggle{font-size:12px;gap:3px}
}
@media(max-width:360px){
 .topbar>.shell.header-with-topics{gap:0 8px}
 :root[data-brand=unbounded] .header-with-topics .brand,.header-with-topics .brand{font-size:21px}
 .header-with-topics .section-nav{gap:8px}
 .mobile-topics-toggle svg{width:10px;height:10px}
}
@media(prefers-reduced-motion:reduce){.mobile-topics-toggle svg{transition:none}}

/* Keep the topics disclosure at the right edge of the mobile row. */
@media(max-width:850px){
 .topbar>.shell.header-with-topics{grid-template-columns:auto minmax(0,1fr) auto}
 .header-with-topics .section-nav{grid-column:2;grid-row:1}
 .header-with-topics .mobile-topics-toggle{grid-column:3;grid-row:1;justify-self:end}
}
@media(min-width:851px){
 .header-with-topics .topic-nav{grid-column:2;grid-row:1}
 .header-with-topics .section-nav{grid-column:3;grid-row:1}
}
