/* Navigation is deliberately neutral and independent of the personal accent. */
.monochrome-shell {--rail-width:144px}
.monochrome-shell .workspace-rail {
 --rail-ink:#f4f4f4;--rail-hover:#222;--rail-selected:#2c2c2c;--rail-focus:#bfbfbf;
 --gem-base:#bc914e;--gem-top:#eddbab;--gem-left:#c7a161;--gem-right:#88622c;--gem-center:#d7b778;--gem-edge:#e7c987;
 --gem-bed:#27251f;--gem-shadow:0 3px 12px #00000016;
 background:#151515;border-color:#ffffff0c;
}
html[data-theme=light] .monochrome-shell .workspace-rail {
 --rail-ink:#181818;--rail-hover:#efefef;--rail-selected:#e8e8e8;--rail-focus:#484848;
 --gem-base:#c4a266;--gem-top:#f5e7be;--gem-left:#dfc28a;--gem-right:#aa7d35;--gem-center:#ebce90;--gem-edge:#977136;
 --gem-bed:#fbf4e6;--gem-shadow:0 3px 10px #8c652310;
 background:#f7f7f7;border-color:#00000008;
}
.monochrome-shell .workspace-rail .workspace-nav {box-sizing:border-box;align-items:stretch;gap:4px;padding:0 10px 12px;scrollbar-width:thin;scrollbar-color:var(--rail-selected) transparent}
html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link {
 box-sizing:border-box;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;
 flex:0 0 auto;width:100%;min-height:42px;padding:10px 12px;margin:0;gap:10px;
 border:0;border-radius:9px;background:transparent;box-shadow:none;color:var(--rail-ink);
 font-size:14px;line-height:20px;font-weight:450;letter-spacing:0;text-align:left;
 transition:background-color 140ms ease;
}
html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link:before {content:none}
html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link>svg,
html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link.active>svg {
 box-sizing:border-box;display:block;flex:0 0 20px;width:20px;height:20px;padding:0;
 border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--rail-ink);stroke-width:1.65;
}
html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link>span {display:block;white-space:nowrap;line-height:20px}
html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link.active {background:var(--rail-selected);color:var(--rail-ink);font-weight:600}
html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link:focus-visible {outline:2px solid var(--rail-focus);outline-offset:-2px}
@media(hover:hover){html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link:not(.active):hover {background:var(--rail-hover);color:var(--rail-ink)}}
.monochrome-shell .workspace-rail .rail-utilities {gap:4px}
.monochrome-shell .workspace-rail .rail-utilities>.icon-btn {
 width:44px;height:44px;min-height:44px;border-radius:14px;color:var(--rail-ink);
 transition:background-color 160ms,color 160ms;
}
.monochrome-shell .workspace-rail .rail-utilities>.icon-btn>.rail-icon {
 width:23px;height:23px;stroke-width:1.6;
}
.monochrome-shell .workspace-rail .rail-utilities>.workspace-upgrade {
 min-height:44px;padding:0;margin:0 0 2px;
}
.monochrome-shell .workspace-rail .workspace-upgrade>.rail-icon-membership {
 width:44px;height:44px;padding:9px;background:var(--gem-bed);box-shadow:var(--gem-shadow);
}
.monochrome-shell .rail-icon-membership .gem-base {fill:var(--gem-base)}
.monochrome-shell .rail-icon-membership .gem-top {fill:var(--gem-top)}
.monochrome-shell .rail-icon-membership .gem-left {fill:var(--gem-left)}
.monochrome-shell .rail-icon-membership .gem-right {fill:var(--gem-right)}
.monochrome-shell .rail-icon-membership .gem-center {fill:var(--gem-center)}
.monochrome-shell .rail-icon-membership .gem-edge {
 fill:none;stroke:var(--gem-edge);stroke-width:.65;stroke-linecap:round;stroke-linejoin:round;
}
.monochrome-shell .workspace-rail .workspace-upgrade.active>.rail-icon-membership {
 background:var(--gem-bed);box-shadow:var(--gem-shadow);outline:1px solid var(--gem-edge);outline-offset:2px;
}

@media(hover:hover) {
 .monochrome-shell .workspace-rail .workspace-upgrade:not(.active):hover>.rail-icon-membership {background:var(--gem-bed);box-shadow:0 4px 14px color-mix(in srgb,var(--gem-edge) 20%,transparent)}
 .monochrome-shell .workspace-rail .rail-utilities>.icon-btn:hover {background:var(--rail-hover);color:var(--rail-ink)}
}
@media(min-width:761px) and (max-width:1100px){.monochrome-shell {--rail-width:136px}.monochrome-shell .workspace-rail .workspace-nav {padding-inline:8px}}
@media(max-width:760px){
 .monochrome-shell,.monochrome-shell.sidebar-collapsed {--rail-width:128px;--history-width:min(264px,calc(100vw - 144px))}
 .monochrome-shell .workspace-rail .workspace-nav {padding-inline:6px}
 html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link {min-height:44px;padding:11px 10px;gap:9px}
}
@media(prefers-reduced-motion:reduce){html[data-theme] .monochrome-shell .workspace-rail .workspace-nav>.workspace-nav-link {transition:none}}

/* Membership and personal tools share one compact account dock. */
.monochrome-shell .workspace-rail .rail-utilities {align-items:stretch;gap:5px;padding:10px 10px 8px}
html[data-theme] .monochrome-shell .workspace-rail .rail-utilities>.workspace-upgrade {
 display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:9px;
 min-height:36px;width:100%;padding:7px 10px;margin:0;border-radius:9px;
 color:var(--rail-ink);font-size:13px;line-height:20px;font-weight:500;background:transparent;
}
html[data-theme] .monochrome-shell .workspace-rail .rail-utilities>.workspace-upgrade>span {display:block;line-height:20px}
html[data-theme] .monochrome-shell .workspace-rail .workspace-upgrade>.rail-icon-membership {
 flex:none;width:22px;height:22px;padding:0;border-radius:0;background:none;box-shadow:none;outline:0;
}
.monochrome-shell .workspace-rail .sidebar-profile-row {padding:0}
.monochrome-shell .workspace-rail .sidebar-avatar-trigger {
 display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;
 width:100%;height:42px;min-height:42px;padding:6px 7px;border:0;border-radius:10px;
 color:var(--rail-ink);background:var(--rail-hover);box-shadow:none;
}
.monochrome-shell .sidebar-avatar-trigger .avatar {flex:none;width:26px;height:26px;border:0}
.monochrome-shell .sidebar-avatar-trigger .rail-profile-label {min-width:0;font-size:12px;line-height:20px;white-space:nowrap}
.monochrome-shell .rail-account-more {display:flex;margin-left:auto;opacity:.6}
.monochrome-shell .sidebar-profile-row>.sidebar-user-menu {
 width:236px;max-width:calc(100vw - var(--rail-width) - 24px);padding:8px;
 left:calc(100% + 10px);bottom:0;border-radius:14px;
}
.monochrome-shell .account-menu-heading {padding:4px 4px 10px;border-bottom:1px solid var(--line)}
.monochrome-shell .account-menu-heading .sidebar-profile {display:flex;align-items:center;gap:10px;min-height:36px;padding:2px 4px;color:var(--ink);text-decoration:none;font-size:13px;font-weight:600}
.monochrome-shell .account-menu-heading .sidebar-profile>.avatar {width:28px;height:28px;flex:none}
.monochrome-shell .sidebar-user-menu>[role=menuitem] {min-height:37px;padding:8px 10px;gap:10px;font-size:13px;line-height:20px;border-radius:8px}
.monochrome-shell .sidebar-user-menu>#workspace-logout {display:flex;align-items:center;justify-content:flex-start;width:100%;height:auto;min-height:40px;margin-top:5px;padding:10px;border-top:1px solid var(--line);border-radius:0 0 8px 8px}
.monochrome-shell .sidebar-avatar-trigger:focus-visible {outline:2px solid var(--rail-focus);outline-offset:2px}
@media(hover:hover){
  html[data-theme] .monochrome-shell .workspace-rail .rail-utilities>.workspace-upgrade:hover {background:var(--rail-hover)}
}
@media(pointer:coarse){.monochrome-shell .sidebar-user-menu>[role=menuitem] {min-height:44px}}
@media(max-width:760px){
 .monochrome-shell .workspace-rail .rail-utilities {padding-inline:6px}
 .monochrome-shell .workspace-rail .sidebar-avatar-trigger {gap:6px;padding-inline:5px}
 .monochrome-shell .sidebar-avatar-trigger .rail-profile-label {font-size:11px}
 .monochrome-shell .sidebar-profile-row>.sidebar-user-menu {left:calc(100% + 8px)}
}
