/* Shared workspace shell. Public pages retain their teal palette. */
.workspace {
    --bg: #212121;
    --side: #171717;
    --panel: #282828;
    --line: #3d3d3d;
    --text: #ececec;
    --muted: #b0b0b0;
    --accent: #e7e7e7;
    --accent-dark: #414141;
    --danger: #fca5a5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.workspace h1 { font-size: clamp(1.65rem, 3vw, 2.2rem); font-weight: 640; letter-spacing: -.035em; }
.workspace h2 { font-size: 1.12rem; font-weight: 620; }
.workspace a { color: var(--text); }
.workspace .muted, .workspace small { color: var(--muted); }
.workspace .eyebrow { color: var(--muted); letter-spacing: .06em; font-weight: 500; }
.workspace-shell { min-height: 100dvh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.workspace-shell .sidebar { position: sticky; inset: 0 auto auto 0; height: 100dvh; width: auto; overflow-y: auto; padding: 12px 10px; border-right: 0; z-index: 35; }
.workspace-body { min-width: 0; }
.workspace-shell .content { margin: 0 auto; padding: 24px clamp(16px, 3vw, 42px) 50px; max-width: 1500px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 0 4px 22px; }
.sidebar-top .brand { margin: 0; gap: 8px; font-size: .96rem; font-weight: 600; }
.workspace .brand-mark { width: 30px; height: 30px; border: 1px solid #555; border-radius: 8px; color: #eee; background: #2e2e2e; font-size: .72rem; }
.ui-icon { flex-shrink: 0; width: 21px; height: 21px; vertical-align: middle; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { padding: 10px 12px; gap: 11px; font-size: .94rem; line-height: 1.4; }
.side-nav a span { width: auto; color: inherit; text-align: left; font-size: inherit; }
.side-nav a:hover, .side-nav .current { background: #2b2b2b; color: #f4f4f4; box-shadow: none; }
.sidebar .nav-label { display: block; color: #a0a0a0; font-size: .8rem; font-weight: 500; letter-spacing: 0; text-transform: none; margin: 26px 10px 8px; }
.side-bottom { display: block; padding: 15px 8px 5px; }
.owner-row { display: flex; align-items: center; gap: 10px; }
.owner-row small { display: block; }
.avatar { flex-shrink: 0; width: 34px; height: 34px; background: #3d5550; color: white; border-radius: 50%; display: grid; place-items: center; }
.workspace-topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 18px; background: #212121f5; border-bottom: 1px solid #343434; }
.topbar-title { font-size: 1rem; font-weight: 550; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-button { background: transparent; border: 0; color: inherit; min-width: 40px; min-height: 40px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none !important; }
.icon-button:hover { background: #ffffff14; }
.workspace .panel { background: var(--panel); border-radius: 12px; box-shadow: none; }
.workspace .button { color: #e8e8e8; background: #383838; border-color: #484848; font-weight: 550; }
.workspace .button:hover { background: #444; }
.workspace .button.quiet { background: transparent; border-color: transparent; }
.workspace .button.quiet:hover { background: #ffffff10; }
.workspace .button.primary { background: #eee; color: #171717; border-color: #eee; }
.workspace .button.primary:hover { background: #fff; }
.workspace .button.danger { color: #ffb0b0; background: #372828; border-color: #654141; }
.workspace input:not([type=checkbox]),.workspace textarea,.workspace select { background: #212121; border-color: #494949; border-radius: 9px; }
.workspace .tile { background: #272727; border-color: #3d3d3d; }
.workspace .tile:hover { background: #303030; border-color: #5b5b5b; }
.workspace .tile-icon { color: #dedede; background: #383838; }
.workspace .mount-grid > div,.workspace .small-form,.workspace #note-editor,.workspace .markdown pre { background: #1e1e1e; }
.workspace .note-item.selected,.workspace .note-item:hover { background: #363636; }
.workspace .settings-form { border-left-color: #676767; }
.workspace .status { border-color: #555; color: #c9c9c9; }
.workspace .status.disabled { color: #efbd84; border-color: #775c3c; }
.workspace .status.public { color: #a8d6bb; border-color: #486353; }
.workspace .notice { background: #2b3a34; border-color: #445e50; }
.workspace .notice.error { background: #3a2828; border-color: #805151; }
.workspace .path { color: #b5b5b5; }
.workspace .inline-details summary { color: #dedede; }
.workspace .button,.icon-button { transition: background .14s, transform .12s; }
.workspace .button:active,.icon-button:active { transform: translateY(1px); }
.brand-image { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; background: #060606; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.section-heading h2 { margin: 0; }
.modal { color: var(--text); background: #292929; border: 1px solid #4a4a4a; border-radius: 16px; width: min(440px, calc(100vw - 32px)); padding: 22px; }
.modal::backdrop { background: #0009; }
.sidebar-backdrop { display: none; }
@media (min-width: 761px) {
    .workspace-shell.collapsed { grid-template-columns: 0 minmax(0,1fr); }
    .workspace-shell.collapsed .sidebar { visibility: hidden; overflow: hidden; padding: 0; }
}
@media (max-width: 760px) {
    .workspace-shell { display: block; }
    .workspace-shell .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); display: flex; flex-direction: column; height: 100dvh; transform: translateX(-105%); transition: transform .18s ease; padding: 12px 10px; visibility: hidden; }
    .workspace-shell.mobile-open .sidebar { transform: translateX(0); visibility: visible; }
    .workspace-shell.mobile-open .sidebar-backdrop { display: block; position: fixed; z-index: 30; inset: 0; border: 0; background: #0009; }
    .workspace-shell .content { padding: 18px 14px max(30px,env(safe-area-inset-bottom)); }
    .workspace-topbar { height: 52px; padding: 0 10px; }
    .workspace .button,.workspace select { min-height: 40px; }
    .workspace input:not([type=checkbox]),.workspace textarea,.workspace select { font-size: 16px; }
    .workspace .page-head { gap: 10px; margin-bottom: 18px; }
    .workspace .panel { padding: 14px; }
    .workspace .setting-row { align-items: stretch; }
    .side-nav a { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: .01s !important; } }
.access-nav { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:18px; border-bottom:1px solid #3a3a3a; padding-bottom:8px; }
.access-nav a { text-decoration:none; }
#global-access,#section-access,#metrics { scroll-margin-top:72px; }
.workspace .setting-detail summary { padding:14px 0; }
.workspace .setting-detail summary small { margin-top:3px; }
.workspace .section-heading input[type=search] { width:min(45%,260px); }
