/* Shared navigation: slim public header, grouped workspaces, one mobile menu. */
@font-face {
  font-family: 'Manrope';
  src: url('/static/fonts/manrope-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root { --shell-height: 60px; --shell-sidebar: 232px; --shell-accent: #79acff; --shell-action: #246bd6; }
:root[data-theme='light'] { --shell-accent: #2466c8; }
.shell-header, .shell-sidebar, .shell-mobile-dialog, .shell-no-script { font: 13px/1.5 var(--font); text-underline-offset: 4px; }
.shell-header *, .shell-sidebar *, .shell-mobile-dialog * { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.shell-header ::selection, .shell-sidebar ::selection, .shell-mobile-dialog ::selection { background: var(--accent); color: #fff; }
.shell-header :focus-visible, .shell-sidebar :focus-visible, .shell-mobile-dialog :focus-visible, .shell-no-script :focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 3px; }
.shell-icon { flex: 0 0 auto; }
.shell-header { position: sticky; top: 0; z-index: 40; height: var(--shell-height); border-bottom: 1px solid var(--border); background: var(--bg); }
.shell-header-inner { height: 100%; display: flex; align-items: center; gap: 24px; padding-inline: 24px; }
body[data-area='public'] .shell-header-inner { max-width: 1280px; margin: auto; padding-inline: 40px; }
.shell-brand { display: inline-flex; align-items: baseline; gap: 4px; color: var(--text); font: 750 22px/1 'Manrope', var(--font); letter-spacing: -.04em; flex-shrink: 0; }
.shell-brand:hover { text-decoration: none; }
.shell-brand-dot { width: 5px; height: 5px; background: var(--shell-accent); border-radius: 50%; }
.shell-public-links { display: flex; align-items: center; align-self: stretch; gap: 24px; margin-left: 20px; }
.shell-public-links a { position: relative; display: flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 500; }
.shell-public-links .shell-icon { width: 13px; height: 13px; }
.shell-public-links a:hover { text-decoration: none; color: var(--text); }
.shell-public-links a[aria-current='page'] { color: var(--text); }
.shell-public-links a[aria-current='page']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--shell-accent); }
.shell-header-actions { display: flex; gap: 14px; align-items: center; margin-left: auto; min-width: 0; }
.shell-header button, .shell-mobile-dialog button { cursor: pointer; font: inherit; }
.shell-theme, .shell-close { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: 8px; flex-shrink: 0; }
.shell-theme:hover, .shell-close:hover { background: var(--surface-2); color: var(--text); }
.shell-primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 38px; padding: 8px 14px; border: 1px solid var(--shell-action); border-radius: 8px; background: var(--shell-action); color: #fff; font-weight: 600; white-space: nowrap; }
.shell-primary:hover { background: #1d5bb9; border-color: #1d5bb9; text-decoration: none; }
.shell-primary .shell-icon { width: 16px; height: 16px; }
.shell-guest-actions { display: flex; align-items: center; gap: 22px; }
.shell-guest-actions > a:not(.shell-primary) { color: var(--text); }
.shell-switcher { padding-left: 24px; border-left: 1px solid var(--border-strong); }
.shell-area-control, .shell-account-control { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 4px 8px; border-radius: 8px; cursor: pointer; color: var(--text); font-weight: 500; }
.shell-area-control::-webkit-details-marker, .shell-account-control::-webkit-details-marker { display: none; }
.shell-area-control:hover, .shell-account-control:hover, .shell-switcher[open] .shell-area-control, .shell-account[open] .shell-account-control { background: var(--surface-2); }
.shell-area-control .shell-icon, .shell-account-control > .shell-icon { width: 14px; height: 14px; color: var(--muted); }
.shell-switcher[open] .shell-area-control .shell-icon, .shell-account[open] .shell-account-control > .shell-icon { transform: rotate(180deg); }
.shell-page-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.shell-account-control { padding: 3px 6px 3px 3px; gap: 8px; }
.shell-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-quiet); color: var(--shell-accent); font-size: 11px; font-weight: 700; }
.shell-account-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-popover { position: absolute; top: calc(100% + 10px); right: 0; width: 264px; padding: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; }
.shell-switcher .shell-popover { left: 24px; right: auto; width: 240px; }
.shell-current { margin-left: auto; color: var(--muted); font-size: 11px; }
.shell-account-identity { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.shell-account-identity strong { font-size: 13px; font-weight: 600; }
.shell-account-identity span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.shell-nav-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 34px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 400 13px/1.4 var(--font); text-align: left; cursor: pointer; }
.shell-nav-link > span:first-of-type { flex: 1; min-width: 0; }
.shell-nav-link .shell-icon { width: 17px; height: 17px; }
.shell-nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.shell-nav-link[aria-current] { background: var(--accent-quiet); color: var(--shell-accent); font-weight: 600; }
.shell-nav-link > .shell-icon:last-child:not(:first-child) { width: 14px; height: 14px; }
.shell-popover form, .shell-mobile-dialog form { margin: 0; }
.shell-sidebar { position: fixed; top: var(--shell-height); bottom: 0; left: 0; width: var(--shell-sidebar); z-index: 30; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--border); }
.shell-sidebar-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px; }
.shell-nav-group + .shell-nav-group { margin-top: 18px; }
.shell-nav-label { margin: 0 0 6px; padding-inline: 10px; font-size: 11px; font-weight: 600; color: var(--muted); }
.shell-sidebar-footer { padding: 10px 12px 14px; border-top: 1px solid var(--border); }
body:not([data-area='public']) .shell-content { margin-left: var(--shell-sidebar); min-width: 0; }
body:not([data-area='public']) .shell-content > main.container { width: 100%; padding-inline: 28px; }
.shell-content { min-height: calc(100dvh - var(--shell-height)); }
.shell-content > main { outline: none; }
.shell-content .ops-railbar { top: var(--shell-height); }
.shell-root-state { color: var(--muted); font-size: 12px; white-space: nowrap; }
.shell-root-state.is-locked { color: var(--warn); }
.shell-root-state .ops-ttl { margin-left: 0; color: var(--muted); }
.shell-root-state .ops-ttl.low { color: var(--warn); }
.shell-mobile-toggle { display: none; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; color: var(--text); background: transparent; border: 1px solid var(--border-strong); border-radius: 8px; }
.shell-mobile-toggle[hidden] { display: none; }
.shell-mobile-dialog { position: fixed; inset: 0 0 0 auto; width: min(380px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text); overflow-y: auto; overscroll-behavior: contain; }
.shell-mobile-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.shell-mobile-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; padding: 10px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
body .shell-mobile-dialog .shell-mobile-heading h2 { margin: 0; padding: 0; font: 650 19px/1.3 'Manrope', var(--font); letter-spacing: -.02em; text-transform: none; }
body .shell-mobile-dialog .shell-mobile-heading h2::after { display: none; }
.shell-mobile-links { padding: 20px 14px; }
.shell-mobile-dialog .shell-nav-link { min-height: 44px; font-size: 14px; }
.shell-mobile-dialog .shell-nav-label { font-size: 12px; }
.shell-mobile-dialog .shell-nav-group { margin-bottom: 18px; }
.shell-mobile-account { border-top: 1px solid var(--border); padding: 14px 14px max(20px, env(safe-area-inset-bottom)); }
.shell-mobile-account .shell-primary { display: flex; min-height: 44px; margin-bottom: 10px; }
body:has(.shell-mobile-dialog[open]) { overflow: hidden; }
.shell-skip { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 18px; background: var(--surface); color: var(--text); border: 1px solid var(--shell-accent); border-radius: 8px; }
.shell-skip:focus { top: 8px; }
.shell-no-script { padding: 20px; }
@media (min-width: 1081px) { body:not([data-area='public']) .shell-no-script { margin-left: var(--shell-sidebar); } }
@media (max-width: 1080px) {
  .shell-desktop, .shell-sidebar { display: none; }
  .shell-mobile-toggle:not([hidden]) { display: inline-flex; }
  .shell-header-inner, body[data-area='public'] .shell-header-inner { padding-inline: 20px; gap: 12px; }
  .shell-header-actions { gap: 8px; }
  body:not([data-area='public']) .shell-content { margin-left: 0; }
  body:not([data-area='public']) .shell-content > main.container { padding-inline: 20px; }
  .shell-theme { min-width: 44px; height: 44px; }
  .shell-content .ops-railbar { position: static; }
}
@media (max-width: 380px) {
  .shell-header-inner, body[data-area='public'] .shell-header-inner { padding-inline: 12px; }
  .shell-header-actions { gap: 4px; }
  .shell-brand { font-size: 20px; }
  .shell-root-state { font-size: 11px; }
}
@media (prefers-reduced-motion: no-preference) {
  .shell-mobile-dialog[open] { animation: shell-enter .2s cubic-bezier(.16, 1, .3, 1); }
  @keyframes shell-enter { from { transform: translateX(24px); } to { transform: translateX(0); } }
}
