/* Small header controls, with the alternate value in a disclosure. */
.story-dev-note{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root .sc-header-row{flex-wrap:nowrap;gap:16px}
html:root .sc-header-tools{flex:none;flex-wrap:nowrap;gap:8px;max-width:none}
html:root .sc-header-row>.sc-desktop-nav{flex:none;white-space:nowrap}
.sc-header-row.sc-header-collapsed>.sc-desktop-nav{display:none!important}
.sc-header-row.sc-header-collapsed>.sc-header-tools>.sc-menu{display:block}
html:root .story-resource-nav{display:none!important}
html:root .sc-desktop-nav .story-guide-menu{display:none!important}
html:root .sc-header-tools>.sc-menu{display:block}
.sc-site details.sc-theme-picker{position:relative;flex:none;border-top:0;z-index:101}
.sc-site details.sc-theme-picker>summary{display:flex;align-items:center;justify-content:center;gap:3px;box-sizing:border-box;width:48px;height:44px;min-height:44px;margin:0;padding:7px;list-style:none;cursor:pointer;border:1px solid var(--sc-line);border-radius:var(--r-xs,8px);color:var(--sc-ink);background:transparent}
.sc-theme-picker>summary::-webkit-details-marker{display:none}
.sc-site details.sc-theme-picker>summary::after{content:none!important}
.sc-theme-picker>summary svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.sc-theme-picker>summary svg:last-child{width:10px;height:10px}
.sc-theme-picker>summary:hover,.sc-theme-picker[open]>summary{background:var(--sc-surface);border-color:var(--sc-accent)}
.sc-theme-picker>summary:focus-visible,.sc-theme-picker a:focus-visible{outline:2px solid var(--sc-accent);outline-offset:3px}
html:root .sc-theme-picker>nav.sc-theme-switch{display:grid;position:absolute;right:0;top:calc(100% + 7px);box-sizing:border-box;width:156px;max-width:calc(100vw - 24px);margin:0;padding:5px;border:1px solid var(--sc-line);border-radius:var(--r-sm,12px);background:var(--sc-white);box-shadow:var(--sc-shadow);z-index:101}
.sc-theme-picker:not([open])>nav{display:none!important}
html:root body.sc-site .sc-theme-picker .sc-theme-switch a{display:flex;align-items:center;justify-content:flex-start;gap:10px;box-sizing:border-box;min-height:44px;padding:9px 12px;color:var(--sc-ink);font:500 .875rem/1.4 Inter,system-ui,sans-serif;font-size:.875rem;white-space:nowrap;border-radius:6px;text-decoration:none}
html:root .sc-theme-picker .sc-theme-switch a[aria-current],html:root .sc-theme-picker .sc-theme-switch a:hover{background:var(--sc-surface)}
html:root .sc-theme-picker .sc-theme-switch a::before{content:none!important}
.sc-theme-picker a[aria-current]::after{content:'✓';margin-left:auto;color:var(--sc-accent)}
.sc-header-tools>.sc-menu{position:relative;flex:none}
html:root .sc-header-tools>.sc-menu>summary{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;height:44px;min-height:44px;padding:10px;border-radius:var(--r-xs,8px);color:var(--sc-ink);background:transparent}
.sc-header-tools>.sc-menu>summary svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
html:root .sc-header-tools>.sc-menu>nav{top:calc(100% + 8px);width:300px;max-width:calc(100vw - 24px);padding:6px;border-radius:var(--r-sm,12px)}
html:root .sc-header-tools>.sc-menu>nav a{font-size:.875rem;line-height:1.4;padding:10px 12px;border-radius:6px}
.sc-header-tools>.sc-menu>nav a:hover{background:var(--sc-surface)}
.sc-header-tools>.sc-menu>nav a:nth-of-type(5){margin-top:5px;border-top:1px solid var(--sc-line);border-radius:0;padding-top:15px}
.sc-header-tools>.sc-menu>nav a[aria-current]{color:var(--sc-accent);background:var(--sc-surface);box-shadow:inset 2px 0 var(--sc-accent)}
@media(max-width:760px){html:root .sc-header-row{gap:8px}html:root .sc-header-tools{gap:6px}}
@media(max-width:360px){html:root .sc-header-tools{gap:4px}.sc-header-row .sc-brand{max-width:88px}.sc-header-row .sc-brand-mark{max-width:88px}}

/* Keep the preview identifier inside the hamburger without a pre-paint banner. */
.story-dev-note:not(.sc-menu-version){display:none!important}
.sc-menu nav>.story-dev-note.sc-menu-version{display:block;font:500 .75rem/1.5 Inter,system-ui,sans-serif;white-space:normal;text-align:left;letter-spacing:0;margin:6px 6px 0;padding:12px 6px 6px;border:0;border-top:1px solid var(--sc-line);background:transparent;color:var(--sc-muted)}

/* Hierarchical hamburger: sections are visible, without nested dropdowns. */
html:root .sc-grouped-menu .sc-menu-group{display:grid;padding:4px 0 8px}
html:root .sc-grouped-menu .sc-menu-group+.sc-menu-group{border-top:1px solid var(--sc-line)}
html:root .sc-grouped-menu .sc-menu-group-title{font:600 .7rem/1.4 Inter,system-ui,sans-serif;text-transform:uppercase;letter-spacing:.07em;color:var(--sc-muted);margin:9px 12px 4px;padding:0}
html:root .sc-header-tools>.sc-menu>nav.sc-grouped-menu a{margin:0;border:0;padding:9px 12px;min-height:40px}
