/* Sidebar, quiet version (founder picked option A, 2026-09-27): smaller type, muted icons, a guide line
   under open sections and a white card for the current page. Loaded last and scoped through #sidebar so
   it beats the older layered sidebar rules without !important. */

body.balanced-blue.minimal-calm #sidebar{--nav-text:#3f3f46;--nav-icon:#9a9aa2;padding:14px 10px 10px}
body.balanced-blue.minimal-calm.theme-dark #sidebar{--nav-text:#d4d4d8;--nav-icon:#7c7c85}

/* brand */
body.balanced-blue.minimal-calm #sidebar .brand{min-height:0;margin:0;padding:6px 8px 16px;gap:10px;font-size:14px;font-weight:600;line-height:20px}
body.balanced-blue.minimal-calm #sidebar .cc-brand-logo{width:26px;height:26px}

/* items */
body.balanced-blue.minimal-calm #sidebar #nav{display:flex;flex-direction:column;gap:1px}
body.balanced-blue.minimal-calm #sidebar .navitem{min-height:32px;padding:7px 8px;gap:10px;border-radius:8px;font-size:13.5px;font-weight:450;line-height:18px;color:var(--nav-text);background:transparent;box-shadow:none}
body.balanced-blue.minimal-calm #sidebar .navitem .icon{width:16px;height:16px;stroke-width:1.75;color:var(--nav-icon)}
body.balanced-blue.minimal-calm #sidebar .navitem:hover{background:var(--soft);color:var(--ink)}
body.balanced-blue.minimal-calm #sidebar .navitem.active{background:var(--surface);color:var(--ink);font-weight:550;box-shadow:0 0 0 1px var(--line),0 1px 2px rgb(0 0 0 / 4%)}
body.balanced-blue.minimal-calm #sidebar .navitem.active .icon{color:var(--ink)}
body.balanced-blue.minimal-calm.theme-dark #sidebar .navitem.active{box-shadow:0 0 0 1px var(--line)}

/* sections: same size as a page link, chevron in the icon color, pages hang off a thin guide line */
body.balanced-blue.minimal-calm #sidebar .navgroup{margin:0}
body.balanced-blue.minimal-calm #sidebar .navgroup>summary.navitem{font-weight:450;color:var(--nav-text)}
body.balanced-blue.minimal-calm #sidebar .navgroup>summary .chevron{width:14px;height:14px;color:var(--nav-icon)}
body.balanced-blue.minimal-calm #sidebar .sub{display:flex;flex-direction:column;gap:1px;margin:1px 0 4px 16px;padding:0 0 0 10px;border-left:1px solid var(--line)}
body.balanced-blue.minimal-calm #sidebar .sub .navitem{min-height:30px;padding:6px 8px;font-size:13px;color:var(--secondary)}
body.balanced-blue.minimal-calm #sidebar .sub .navitem:hover,body.balanced-blue.minimal-calm #sidebar .sub .navitem.active{color:var(--ink)}

/* a hairline between the sections and the single pages under them */
body.balanced-blue.minimal-calm #sidebar #nav>.navgroup+a.navitem{position:relative;margin-top:9px}
body.balanced-blue.minimal-calm #sidebar #nav>.navgroup+a.navitem::before{content:"";position:absolute;left:8px;right:8px;top:-5px;height:1px;background:var(--line);pointer-events:none}

/* footer: you on the left, notifications / theme / settings as quiet icon buttons */
body.balanced-blue.minimal-calm #sidebar .navfoot{display:flex;align-items:center;gap:2px;margin-top:auto;padding:10px 0 0;border-top:1px solid var(--line)}
body.balanced-blue.minimal-calm #sidebar .navfoot>.navitem{flex:none;width:30px;height:30px;min-height:30px;padding:0;gap:0;justify-content:center;font-size:0;border-radius:7px}
body.balanced-blue.minimal-calm #sidebar .navfoot>.navitem .icon{width:16px;height:16px;color:var(--secondary)}
body.balanced-blue.minimal-calm #sidebar .navfoot>.navitem.active{box-shadow:none;background:var(--soft)}
body.balanced-blue.minimal-calm #sidebar #theme-toggle::after{display:none}
body.balanced-blue.minimal-calm #sidebar .profile{order:-1;flex:1;min-width:0;min-height:0;margin:0;padding:4px 6px;gap:10px;border:0;border-radius:8px;background:transparent;box-shadow:none;font-size:13px;font-weight:550;line-height:17px;color:var(--ink)}
body.balanced-blue.minimal-calm #sidebar .profile:hover{background:var(--soft)}
body.balanced-blue.minimal-calm #sidebar .profile>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.balanced-blue.minimal-calm #sidebar .profile small{display:block;font-size:12px;font-weight:400;line-height:15px;color:var(--secondary)}
body.balanced-blue.minimal-calm #sidebar .profile .avatar{position:relative;display:grid;place-items:center;overflow:hidden;width:30px;height:30px;flex-shrink:0;border:0;border-radius:50%;background:var(--brand-wash);color:var(--brand-ink);font-size:12px;font-weight:600}
body.balanced-blue.minimal-calm #sidebar .profile .avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* short windows: tighten the rows the same way the older rules did */
@media(max-height:700px){
  body.balanced-blue.minimal-calm #sidebar .navitem{min-height:28px;padding-block:5px}
  body.balanced-blue.minimal-calm #sidebar .sub .navitem{min-height:26px;padding-block:4px}
}
