/* Shared alternate-shell contracts, deliberately absent from classic/print.
 * Geometry/composition for each design lives in themes/{id}.css. */
.layout-only,.layout-home{display:none}
@media screen{
html:not([data-design-theme="classic"]) .classic-home{display:none}
html:not([data-design-theme="classic"]) .topbar{gap:12px;background:var(--panel);backdrop-filter:none;font-family:system-ui,sans-serif;flex-wrap:wrap}
html:not([data-design-theme="classic"]) .topbar :is(.brand-logo,.topbar-title,.topbar-spacer){display:none!important}
html:not([data-design-theme="classic"]) .brand{opacity:1!important;flex:0 0 auto;order:0}
html:not([data-design-theme="classic"]) .layout-wordmark{display:block;font-family:system-ui,sans-serif;font-size:30px;font-weight:850;letter-spacing:-1.8px;color:var(--text)}
.layout-wordmark span{color:var(--accent)}
html:not([data-design-theme="classic"]) .layout-menu{display:block;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:6px;min-height:42px;padding:0 10px;cursor:pointer}
html:not([data-design-theme="classic"]) .layout-search-slot{display:block;flex:1;min-width:100px;max-width:520px;margin-right:auto}
html:not([data-design-theme="classic"]) .side-search-field{position:static;box-shadow:none;background:var(--panel-soft);font-size:14px;border-radius:6px}
html:not([data-design-theme="classic"]) .right-toggle{display:grid}
html:not([data-design-theme="classic"]) .topbar :is(.theme-icon,.right-toggle,.auth-icon){flex:0 0 40px;width:40px;height:42px;border-radius:6px;order:0}
html:not([data-design-theme="classic"]) .topbar>.editor-top-actions{order:8}
html:not([data-design-theme="classic"]) .sidebar{border-radius:0;box-shadow:none}
html:not([data-design-theme="classic"]) .explorer-head{position:static;box-shadow:none;font-size:12px}
html:not([data-design-theme="classic"]) .right-block{box-shadow:none;border-radius:0;border-width:0 0 1px;padding:16px 8px;background:transparent}
html:not([data-design-theme="classic"]) .rightslot::before{display:none}
html:not([data-design-theme="classic"]) body.layout-nav-drawer .sidebar,
html:not([data-design-theme="classic"]) body.layout-right-drawer .rightslot{display:none;position:fixed;top:var(--shell-height,74px);bottom:12px;z-index:30;width:min(340px,calc(100vw - 24px));min-width:0;height:auto;max-height:calc(100dvh - var(--shell-height,74px) - 12px);overflow:auto!important;opacity:1;visibility:visible;transform:none;pointer-events:auto;border:1px solid var(--line)!important;background:var(--panel)!important;box-shadow:0 12px 35px #0003!important;padding:16px!important;border-radius:8px}
html:not([data-design-theme="classic"]) body.layout-nav-drawer .sidebar{left:12px}
html:not([data-design-theme="classic"]) body.layout-right-drawer .rightslot{right:12px}
html:not([data-design-theme="classic"]) body.layout-nav-drawer.layout-nav-open .sidebar{display:block}
html:not([data-design-theme="classic"]) body.layout-right-drawer.rightslot-open .rightslot{display:flex}
.layout-home h1{letter-spacing:-.045em;line-height:1.2;overflow-wrap:anywhere}
.layout-home p{color:var(--muted);line-height:1.7}
html:not([data-design-theme="classic"]) :is(.layout-topics,.layout-home) a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html:not([data-design-theme="classic"]) body.editor-mode .layout{display:block;width:100%;max-width:none;margin:0;padding:18px 24px}
html:not([data-design-theme="classic"]) body.editor-mode .topbar{margin-left:0;min-height:0;padding:10px 18px}
html:not([data-design-theme="classic"]) body.editor-mode :is(.layout-topics,.layout-menu,.layout-search-slot){display:none}
html:not([data-design-theme="classic"]) body.editor-mode .content{width:100%;max-width:none;margin:0}
@media(max-width:1100px){
html:not([data-design-theme="classic"]) .layout{display:block;margin:0 auto;padding:24px;max-width:100%}
html:not([data-design-theme="classic"]) .topbar{margin:0;padding:10px 16px;min-height:0}
}
@media(max-width:760px){
html:not([data-design-theme="classic"]) .topbar{gap:8px;padding:8px 12px}
html:not([data-design-theme="classic"]) .layout-wordmark{font-size:26px}
html:not([data-design-theme="classic"]) .layout-search-slot{flex:1 1 100%;order:6;min-width:90px}
html:not([data-design-theme="classic"]) .brand{margin-right:auto}
html:not([data-design-theme="classic"]) .layout{padding:20px 14px}
html:not([data-design-theme="classic"]) .content{width:100%;max-width:100%}
html:not([data-design-theme="classic"]) body.editor-mode .layout{padding:12px}
}
}
@media print{.layout-only,.layout-home{display:none!important}.classic-home{display:block!important}}
@media screen and (min-width:1101px){
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"]) .topbar .brand{display:none}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"]) .sidebar{height:100dvh}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"]) .layout-menu{display:none}
html[data-design-theme="editorial"] .topbar{display:grid;grid-template-columns:60px minmax(0,1fr) 40px 40px 40px;gap:14px;padding-top:22px;padding-bottom:18px}
html[data-design-theme="editorial"] .topbar .brand{grid-column:1/-1;grid-row:1;justify-self:center;height:auto;margin-bottom:12px}
html[data-design-theme="editorial"] .topbar .layout-wordmark{font-size:56px;letter-spacing:-3px}
html[data-design-theme="editorial"] .layout-search-slot{width:100%;max-width:none}
html[data-design-theme="editorial"] body.editor-mode .topbar{display:flex}
html[data-design-theme="editorial"] body.editor-mode .topbar .brand{margin:0}
html[data-design-theme="editorial"] body.editor-mode .layout-wordmark{font-size:30px}
}
@media screen{
}
/* Pinned intro + curated topic lists + complete chronological latest feed. */
.studio-hero-media{display:none}
/* Match :last-child explicitly: legacy .tree-doc a span:last-child also
   matches this nested span; it must never clip the text before translation. */
.tree-doc a .tree-title-text:last-child{display:inline-block;min-width:max-content;overflow:visible;text-overflow:clip;white-space:nowrap;flex:none;line-height:1.5}
.tree-doc a.title-scrolling>span:last-child{text-overflow:clip}
@media screen{
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .home-latest-title{margin-top:40px;padding-top:24px;border-top:1px solid var(--line)}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-feature{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);background:var(--panel);align-items:center;border-bottom:3px solid var(--accent)}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-feature>img{width:100%;height:auto;max-height:460px;object-fit:contain;padding:24px}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .home-intro-body{min-width:0;padding:28px;font-size:16px;line-height:1.75;overflow-wrap:anywhere}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .home-intro-body>:first-child{margin-top:0}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .home-intro-body>:last-child{margin-bottom:0}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-topics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px;margin:32px 0}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-topics h2{font:700 20px system-ui;border-top:2px solid var(--accent);padding-top:15px;overflow-wrap:anywhere}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-topics ul{padding:0;list-style:none}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-topics li{padding:14px 0;border-bottom:1px solid var(--line);line-height:1.6;overflow-wrap:anywhere}
@media(max-width:760px){
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-feature{grid-template-columns:minmax(0,1fr)}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-feature>img{max-height:260px;padding:16px}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .home-intro-body{padding:24px 18px}
html:is([data-design-theme="studio"],[data-design-theme="studio-refined"],[data-design-theme="editorial"]) .magazine-topics{grid-template-columns:minmax(0,1fr);gap:12px}
}
}
