body[data-shell]{--shell-header:76px;--sidebar-wide:232px;--sidebar-rail:64px;--side-width:var(--sidebar-wide);
  --shell-surface:#fcfeff;--side-surface:#f6faff;--side-active:#e2efff;--side-hover:#eaf3fd;--side-ink:#245a89;
  --side-rule:#cbdcef;--shell-admin-accent:#267783}
:root[data-theme="dark"] body[data-shell]{--shell-surface:#142438;--side-surface:#122238;--side-active:#254761;
  --side-hover:#1d3550;--side-ink:#a9d4ff;--side-rule:#385775;--shell-admin-accent:#63bac5}
body[data-sidebar=compact]{--side-width:var(--sidebar-rail)}
body.portal-page[data-shell]{display:grid;grid-template-columns:var(--side-width) minmax(0,1fr);
  grid-template-rows:auto auto minmax(0,1fr) auto;
  grid-template-areas:"header header" "side banner" "side content" "side footer";min-height:100dvh}
body.portal-page[data-shell]>main{grid-area:content;min-width:0}
body.portal-page[data-shell]>.support-banner{grid-area:banner;width:min(1100px,100%)}
body.portal-page[data-shell]>.policy-footer{grid-area:footer}
body[data-shell=admin]{--side-ink:#1b6670;--side-active:#dbf0f2;--side-hover:#e9f5f7}
:root[data-theme="dark"] body[data-shell=admin]{--side-ink:#99e0e3;--side-active:#244a55;--side-hover:#1c3948}
.site-shell-header,.site-editor-header{grid-area:header;position:sticky;z-index:20;top:0;background:var(--shell-surface);
  border-bottom:1px solid var(--side-rule);min-width:0}
.site-shell-header{height:var(--shell-header);display:flex;align-items:center;justify-content:space-between;
  gap:12px;padding:0 clamp(12px,3vw,38px)}
body[data-shell=admin] .site-shell-header{border-top:3px solid var(--shell-admin-accent)}
.site-shell-header .brand,.workspace-identity{min-width:0;flex:0 1 auto}
.site-shell-header .brand>div:last-child,.workspace-identity>div{min-width:0}
.site-shell-header .brand strong{max-width:330px}
.workspace-identity{display:flex;align-items:center;gap:12px}
.workspace-identity strong,.workspace-identity small{display:block;overflow-wrap:anywhere}
.workspace-identity strong{font-size:clamp(1.02rem,2vw,1.27rem);line-height:1.14}
.workspace-identity small{color:var(--muted);font-size:.78rem;line-height:1.3;margin-top:3px}
.workspace-mark{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:12px;
  background:var(--side-active);color:var(--side-ink);font-size:24px}
.account-controls,.account-utilities{display:flex;align-items:center;flex:none;gap:8px;white-space:nowrap}
.account-controls form{flex:none;margin:0}
.account-controls .quiet{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:42px;
  border:1px solid var(--side-rule,var(--line));border-radius:9px;background:var(--field);color:var(--text);
  padding:8px 10px;line-height:1.3;text-decoration:none;font-weight:650;white-space:nowrap}
.account-controls .quiet:hover{border-color:var(--side-ink);background:var(--side-hover)}
.account-controls form .quiet{margin-left:3px}
.account-controls .notice-bell{min-width:42px}
.site-sidebar{grid-area:side;position:sticky;top:var(--shell-header);z-index:12;align-self:start;min-width:0;
  height:calc(100dvh - var(--shell-header));padding:16px 10px;overflow:auto;scrollbar-width:thin;
  background:var(--side-surface);border-right:1px solid var(--side-rule);color:var(--text)}
.side-navigation{display:grid;gap:15px;margin-top:12px}
.side-group{display:grid;align-content:start;gap:3px;min-width:0}
.side-group+.side-group{padding-top:13px;border-top:1px solid var(--side-rule)}
.side-heading{padding:0 8px 5px;color:var(--muted);font-size:12px;line-height:1.25;font-weight:700}
.side-link,.side-toggle{display:flex;align-items:center;position:relative;min-height:43px;min-width:0;gap:9px;width:100%;
  padding:6px 8px;text-decoration:none;color:var(--text);font:600 .9rem/1.21 "Segoe UI Variable Text","Segoe UI",system-ui,sans-serif;
  text-align:left;background:transparent;border:1px solid transparent;border-radius:9px}
.side-link:hover,.side-toggle:hover{background:var(--side-hover);color:var(--text)}
.side-link[aria-current]{background:var(--side-active);border-color:var(--side-rule);color:var(--side-ink)}
.side-toggle{border-color:var(--side-rule);margin:0}
.side-icon{display:grid;place-items:center;flex:none;width:24px;height:25px;font:700 21px/1 "Segoe UI Symbol","Segoe UI",system-ui,sans-serif;color:var(--side-ink)}
.side-link .nav-unread{margin-inline-start:auto;flex:none}
.side-label{min-width:0;overflow-wrap:anywhere}
body[data-sidebar=compact] .side-label,body[data-sidebar=compact] .side-heading{display:none}
body[data-sidebar=compact] .site-sidebar{padding-inline:7px}
body[data-sidebar=compact] .side-link,body[data-sidebar=compact] .side-toggle{justify-content:center;padding-inline:0}
body[data-sidebar=compact] .side-link .nav-unread{position:absolute;right:0;top:0;font-size:.65rem;margin:0}
.sidebar-backdrop[hidden]{display:none!important}
.sidebar-backdrop{display:none}
:root[data-theme="dark"] .side-link,:root[data-theme="dark"] .side-toggle{color:var(--text)}
:root[data-theme="dark"] .side-link[aria-current]{color:var(--side-ink)}
:root[data-theme="dark"] .side-toggle:not(:hover){background:transparent}
body[data-shell=editor]{
  --shell-header:75px;--sidebar-wide:204px;
  display:grid;grid-template-columns:var(--side-width) minmax(0,1fr);
  grid-template-rows:var(--shell-header) minmax(0,1fr) auto;
  grid-template-areas:"header header" "side editor" "side legal"}
body[data-shell=editor]>.shell{grid-area:editor;min-width:0}
body[data-shell=editor]>footer{grid-area:legal}
body[data-shell=editor] .site-editor-header{
  height:var(--shell-header);padding-inline:16px;display:grid;gap:10px;
  grid-template-columns:minmax(140px,.74fr) minmax(0,1.5fr) auto;align-items:center}
.site-editor-header .top-actions{min-width:0;max-width:100%;justify-content:center;flex-wrap:nowrap;overflow:auto;
  padding:4px 0;scrollbar-width:thin}
.site-editor-header .top-actions>*{flex:none}
.site-editor-header .top-actions button{white-space:nowrap}
.site-editor-header .brand strong{color:var(--text)}
.site-editor-header .account-controls{justify-self:end}
.site-editor-header .account-controls [data-theme-text]{display:none}
@media(max-width:1180px){
  body[data-shell=editor]{--shell-header:123px;--side-width:var(--sidebar-rail)}
  body[data-shell=editor][data-sidebar=expanded] .site-sidebar{width:var(--sidebar-wide);box-shadow:6px 0 24px #08132545}
  body[data-shell=editor] .sidebar-backdrop{display:block;position:fixed;inset:var(--shell-header) 0 0;
    z-index:11;background:#07142560;border:0;border-radius:0;padding:0}
  body[data-shell=editor] .site-editor-header{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr auto;
    grid-template-areas:"identity account" "project project";padding-block:7px;gap:4px 9px}
  .site-editor-header .brand{grid-area:identity}
  .site-editor-header .account-controls{grid-area:account}
  .site-editor-header .top-actions{grid-area:project;justify-content:flex-start;width:100%}
}
@media(max-width:760px){
  body[data-shell]{--shell-header:68px;--sidebar-rail:50px;--side-width:var(--sidebar-rail)}
  body[data-shell=editor]{--shell-header:112px;height:auto;grid-template-rows:var(--shell-header) minmax(0,1fr) auto}
  body[data-shell=editor] .site-editor-header{padding-inline:8px}
  .site-shell-header{padding-inline:8px;gap:6px}
  .site-shell-header .brand small,.site-editor-header .brand small{display:none}
  .site-shell-header .brand strong,.site-editor-header .brand strong{font-size:.88rem}
  .site-shell-header .brand-mark,.workspace-mark{width:32px;height:32px;font-size:18px}
  .account-controls,.account-utilities{gap:4px}
  .account-controls .quiet{min-height:38px;padding:6px 7px;font-size:.88rem}
  .account-controls .notice-bell{min-width:34px}
  .account-controls form .quiet{margin-left:0}
  .account-controls [data-theme-text]{display:none}
  .site-sidebar{padding-top:10px}
  body[data-sidebar=compact] .site-sidebar{padding-inline:4px}
  body[data-sidebar=expanded] .site-sidebar{width:min(248px,calc(100vw - 30px));box-shadow:6px 0 24px #08132545}
  .sidebar-backdrop{display:block;position:fixed;inset:var(--shell-header) 0 0;z-index:11;background:#07142560;
    border:0;border-radius:0;padding:0}
  .sidebar-backdrop:hover{background:#07142560}
  body.portal-page[data-shell]>main{padding-inline:11px}
}
@media(max-width:490px){
  .site-shell-header .brand,.site-editor-header .brand{gap:5px}
  .site-shell-header .brand strong,.site-editor-header .brand strong{font-size:.78rem}
  .site-editor-header .brand-mark{width:29px;height:29px}
  .workspace-identity{gap:6px}
  .workspace-identity small{font-size:.68rem}
  body[data-shell=editor] .shell{grid-template-columns:minmax(0,1fr)}
  body[data-shell=editor] .panel{min-width:0}
}
