/* The left menu: ink column in both themes, 64px rail that opens to 240px on hover, can be kept open. */
.nsd{--rail:64px;--rail-open:240px}
.nsd.pinned{--rail:240px}
.app{display:block;min-height:100vh;padding-left:var(--rail);transition:padding-left .2s ease}
.side{--s-bg:#0C0E12;--s-fg:#F4F3EE;--s-text:#A3AAB4;--s-sub:#8E959F;--s-dim:#7D8590;--s-hover:#16191E;--s-line:#2A2E36;--s-ava:#272B32;--s-tint:#1A1D22;--s-edge:transparent;--as:#2F6BFF;--rt:#C8102E;--hr:#10A86A;
  position:fixed;left:0;top:0;bottom:0;z-index:40;width:var(--rail-open);display:flex;flex-direction:column;padding:12px 10px 10px;background:var(--s-bg);color:var(--s-text);font-size:14px;line-height:20px;overflow:hidden}
.nsd.dark .side{--s-edge:var(--line)}
.side::after{content:"";position:absolute;top:0;bottom:0;left:calc(100% - 1px);width:1px;background:var(--s-edge);pointer-events:none}
.side a{color:inherit}
.side :focus-visible{outline:2px solid var(--accent);outline-offset:-2px}

/* brand and keep open */
.side .s-top{display:flex;align-items:center;gap:4px;flex:none;height:40px}
.side .brand{position:relative;display:flex;align-items:center;flex:1;min-width:0;height:40px;padding-left:10px;border-radius:6px;font-size:15px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;color:var(--s-fg)}
.side .brand .ns{color:var(--s-dim)}
.side .brand .br{color:var(--accent)}
.side .brand .mark{position:absolute;left:0;top:0;width:44px;line-height:40px;text-align:center;font-size:18px;letter-spacing:-.04em;color:var(--accent);opacity:0}
.side .word,.side .mark,.side .nl,.side .lab{transition:opacity .15s ease}
.side .pin,.side .out{flex:none;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--s-dim);cursor:pointer}
.side .pin:hover,.side .out:hover{background:var(--s-hover);color:var(--s-fg)}

/* company switcher */
.side .wsw{position:relative;flex:none;margin:6px 0 2px}
.side .ws{display:flex;align-items:center;gap:9px;width:100%;height:44px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:var(--s-fg);text-align:left;white-space:nowrap;cursor:pointer}
.side .ws:hover,.side .ws[aria-expanded="true"]{background:var(--s-hover)}
.side .ws>.ic{color:var(--s-dim)}
.side .ava{width:24px;height:24px;border-radius:6px;background:var(--s-ava);color:var(--s-fg);font-size:10px;font-weight:700}
.side .ava.round{width:28px;height:28px;border-radius:50%;background:var(--s-ava);color:var(--s-fg);font-size:11px;font-weight:600}
.side .lab{display:flex;flex-direction:column;flex:1;min-width:0;line-height:16px}
.side .lab b{overflow:hidden;text-overflow:ellipsis;font-size:13.5px;font-weight:500;color:var(--s-fg)}
.side .lab small{font-size:12px;color:var(--s-dim)}
.side .ws-menu{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:5;padding:4px;background:#15181D;border:1px solid var(--s-line);border-radius:8px;box-shadow:0 16px 32px rgba(0,0,0,.4)}
.side .ws-opt{display:flex;align-items:center;gap:9px;width:100%;height:44px;padding:0 9px;border:0;border-radius:6px;background:transparent;color:var(--s-fg);text-align:left;white-space:nowrap;cursor:pointer}
.side .ws-opt:hover{background:#1E2127}
.side .ws-opt>.ic{color:var(--accent)}

/* navigation */
.side .snav{display:flex;flex-direction:column;gap:2px;flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--s-line) transparent}
.side .nl{flex:none;margin:14px 0 2px;padding:0 13px;font-size:12px;line-height:16px;color:var(--s-dim);white-space:nowrap}
.side .nl:first-child{margin-top:10px}
.side .ni{position:relative;display:flex;align-items:center;gap:12px;flex:none;width:100%;height:32px;padding:0 10px 0 13px;border:0;border-radius:6px;background:transparent;color:var(--s-text);font:inherit;text-align:left;white-space:nowrap;cursor:pointer}
.side .ni>.ic{width:18px;height:18px;stroke-width:1.6}
.side .ni:hover{background:var(--s-hover);color:var(--s-fg)}
.side .ni.on{background:color-mix(in srgb,var(--accent) 10%,var(--s-tint));color:var(--s-fg);font-weight:500}
.side .ni.on>.ic{color:var(--accent)}
.side .ni.on::before{content:"";position:absolute;left:-10px;top:8px;bottom:8px;width:2px;border-radius:0 2px 2px 0;background:var(--accent)}
.side .ni.mod>.ic{color:var(--mc);width:20px;height:20px;margin:0 -1px}
.side .ni.cur{color:var(--s-fg);font-weight:500}
.side .ni.dim{color:var(--s-dim)}
.side .ni.dim:hover{color:var(--s-fg)}
.side .n{margin-left:auto;padding-left:8px;font:500 12px/1 'IBM Plex Mono',ui-monospace,monospace;color:#FF7A4D}
.side .dot{display:none;position:absolute;left:27px;top:6px;width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--s-bg)}

/* pages of the open module */
.side .sub{position:relative;display:flex;flex-direction:column;flex:none;margin:0 0 4px}
.side .sub::before{content:"";position:absolute;left:22px;top:2px;bottom:2px;width:1px;background:var(--s-line)}
.side .sub a{position:relative;display:flex;align-items:center;height:28px;margin-left:34px;padding:0 10px 0 9px;border-radius:6px;font-size:13px;color:var(--s-sub);white-space:nowrap}
.side .sub a:hover{background:var(--s-hover);color:var(--s-fg)}
.side .sub a.on{background:color-mix(in srgb,var(--mc) 14%,var(--s-tint));color:var(--s-fg);font-weight:500}
.side .sub a.on::before{content:"";position:absolute;left:-13px;top:6px;bottom:6px;width:3px;border-radius:2px;background:var(--mc)}

/* footer: support, operator view, account */
.side .sfoot{display:flex;flex-direction:column;gap:2px;flex:none;margin-top:8px;padding-top:8px;border-top:1px solid var(--s-line)}
.side .opv[aria-pressed="true"]>.ic{color:var(--accent)}
.side .sw{width:28px;height:16px;border-radius:8px;margin-left:auto;background:#2A2E36}
.side .sw::after{top:2px;left:2px;width:12px;height:12px;background:var(--s-dim)}
.side .sw.on{background:var(--s-fg)}
.side .sw.on::after{left:14px;background:var(--s-bg)}
.side .me{display:flex;align-items:center;gap:2px;margin-top:2px}
.side .me .ni{flex:1;min-width:0;height:44px;gap:7px;padding-left:8px}


/* desktop: the menu is always 240px and clip-path shows the 64px rail, so labels never squeeze while it opens */
@media (min-width:901px){
  .side{clip-path:inset(0 -40px 0 0);transition:clip-path .2s cubic-bezier(.2,.8,.2,1),box-shadow .2s ease}
  .side::after{transition:left .2s cubic-bezier(.2,.8,.2,1)}
  .nsd:not(.pinned) .side:hover,.nsd:not(.pinned) .side:focus-within{box-shadow:12px 0 32px rgba(12,14,18,.24)}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within){clip-path:inset(0 calc(var(--rail-open) - var(--rail)) 0 0)}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within)::after{left:calc(var(--rail) - 1px)}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .word,
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .nl,
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .lab,
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .n,
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .sw,
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .ws>.ic,
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .out{opacity:0}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .ni,
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .ws{width:44px;flex:none}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .mark{opacity:1}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .sub{display:none}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .dot{display:block}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .ni.cur{background:color-mix(in srgb,var(--mc) 16%,var(--s-tint))}
  .nsd:not(.pinned) .side:not(:hover):not(:focus-within) .ni.cur::before{content:"";position:absolute;left:-10px;top:8px;bottom:8px;width:2px;border-radius:0 2px 2px 0;background:var(--mc)}
}
/* phone and tablet: the menu button opens the same menu as a drawer */
@media (max-width:900px){
  .app,.nsd.pinned .app{padding-left:0}
  .side{width:min(280px,86vw);z-index:60;transform:translateX(-100%);transition:transform .2s ease}
  .side.on{transform:none;box-shadow:0 0 40px rgba(0,0,0,.3)}
  .side .pin{display:none}
  .side .ni{height:40px}
  .side .sub a{height:36px}
}
@media (prefers-reduced-motion:reduce){
  .app,.side,.side::after{transition:none}
}
