/* Side bar (topbar-mockups.html, option E): a soft indigo bar, so it is never mistaken for the browser's dark frame.
   Desktop: the wordmark, a row of Treatment / Study icons and the fold button, then the open half's tabs under its
   heading (Treatment has the ways into a treatment: pain, hara, indication, which open the matching door of
   the Assess step; Study has Meridians, Methods, Anatomy, Practice, Quiz), and your name at the foot. The Treatment
   and Indications tabs stay in the page for the code that opens them, but are not listed. Folds to icons only.
   On phones: the drawer behind ☰ (phone.css). */
:root { --nav-w: 300px; --nav-ink: #3c4696; --nav-line: #4b5bdc40; }
:root.nav-folded { --nav-w: 52px; }
.sidenav.mode { position: fixed; z-index: 6; inset-block: 0; inset-inline-start: 0; width: var(--nav-w); display: flex; flex-direction: column; gap: 2px;
  padding: 8px 8px 6px; margin: 0; border-radius: 0; background: var(--indigo-soft); border-inline-end: 1px solid var(--d-soft-line, #cdd2f5); overflow: hidden auto; scrollbar-width: thin; scrollbar-color: #9aa3dd transparent; transition: width .18s; }
.sidenav.mode > * { flex-shrink: 0; } /* a short window scrolls the dock; it never squeezes its buttons away */
.app { margin-inline-start: var(--nav-w); transition: margin .18s; }
@media (min-width: 1025px) { .sidenav.mode { cursor: pointer; } } /* its background folds / unfolds it (side-nav.js) */
/* Desktop, as in Claude: wordmark; a row of Treatment / Study icons and fold; the open half's tabs under its heading; your
   name at the foot (account-ui.js), or Settings when there is no account (settings.js). */
.sidenav .sn-head { flex: none; padding: 4px 8px 10px; font: 800 16px/1.2 "Plus Jakarta Sans", system-ui, sans-serif; color: var(--ink); white-space: nowrap; }
.sidenav .sn-head b { color: var(--indigo); }
.sidenav .sn-head img { display: block; height: 22px; width: auto; }
.sidenav .sn-tools { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 2px 8px; margin-bottom: 2px; border-bottom: 1px solid var(--nav-line); }
.sn-tools .sn-gap { display: none; }
.sidenav .sn-k { flex: none; padding: 10px 8px 3px; font: 700 10px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #7d86c4; }
.sidenav.mode .sn-sub { padding-inline-start: 26px; font-size: 12px; }
.sidenav.mode .sn-sub svg { width: 17px; height: 17px; }
.nav-folded .sidenav.mode .sn-sub { padding-inline-start: 0; }
.sidenav .sn-short { display: none; }
.sidenav .sn-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--nav-line); }
.sidenav.mode .sn-user { width: 100%; gap: 8px; padding: 6px; }
.sidenav.mode .sn-user svg { width: 18px; height: 18px; }
.sn-user .acct-av { width: 28px; height: 28px; flex: none; font-size: 13px; }
.sn-user.unread .acct-av { box-shadow: 0 0 0 2px var(--indigo-soft), 0 0 0 4px var(--pain, #e5484d); }
.sn-who { flex: 1; min-width: 0; display: grid; }
.sn-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--ink); }
.sn-who:has(.sn-ver) { grid-template-columns: minmax(0, auto) 1fr; column-gap: 8px; align-items: baseline; }
.sn-who:has(.sn-ver) small { grid-column: 1 / -1; }
.sn-ver { font: 600 10.5px "JetBrains Mono", ui-monospace, monospace; font-style: normal; color: var(--muted, #6b74b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not(.owner) .sn-ver { display: none; } /* the release stamp is for the owner only (account-ui.js) */
.sn-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 11px; color: #6b74b8; }
.sn-who small.low { color: var(--pain, #e5484d); font-weight: 700; }
.sidenav.mode .sn-user .sn-caret { width: 14px; height: 14px; flex: none; color: #6b74b8; }
.sidenav .sn-user[hidden] { display: none; }
.sidenav.mode button[hidden] { display: none !important; } /* Practice is hidden until the user has gone over its cards */
.sidenav.mode button { display: flex; align-items: center; gap: 9px; min-height: 0; padding: 7px 8px; border: 0; border-radius: 10px; background: none; box-shadow: none;
  color: var(--nav-ink); font: 600 12.5px/1.2 "Plus Jakarta Sans", system-ui, sans-serif; cursor: pointer; text-align: start; overflow-wrap: anywhere; }
.sidenav.mode button svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidenav.mode button:hover { background: #4b5bdc1f; }
.sidenav.mode button.on, .sidenav.mode button.on[data-mode] { background: var(--indigo); color: #fff; box-shadow: none; }
.sidenav .sep { display: none; flex: none; width: 70%; height: 1px; margin: 6px auto; background: var(--nav-line); }
.sidenav.mode [data-mode="treat"], .sidenav.mode [data-mode="ind"], .sidenav [data-mode="ind"] + .sep { display: none; }
/* One half at a time, as the Therapist / Student views were: the switch picks which (desktop and phones). */
[data-side="treat"] .sidenav.mode :is([data-mode]:not([data-mode="sage"]), .sn-sub), [data-side="treat"] .sidenav :is(.sep, .sn-k[data-k="study"]),
[data-side="study"] .sidenav.mode [data-way], [data-side="study"] .sidenav .sn-k[data-k="treat"] { display: none; }
/* The Treatment / Study switch: words on the open bar (stacked when a language's words are too long to sit side
   by side), icons when folded. */
.side-seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 10px; background: #4b5bdc24; }
.sidenav .sn-tools .side-seg { flex: 1; padding: 3px; border: 1px solid var(--d-soft-line, #cdd2f5); border-radius: 12px; background: var(--indigo-soft); }
.sn-tools .side-seg button, .sidenav.mode .sn-tools .side-seg button { flex: 1; padding: 8px 6px; font-size: 13px; }
.sn-tools .side-seg button span { display: inline; }
.sn-tools .side-seg button svg { display: block; }
.side-seg button, .sidenav.mode .side-seg button { flex: 1 1 auto; justify-content: center; gap: 5px; min-height: 0; padding: 6px 6px; border: 0; border-radius: 8px; background: none; box-shadow: none;
  color: var(--nav-ink); font: 600 11.5px/1.2 "Plus Jakarta Sans", system-ui, sans-serif; cursor: pointer; white-space: nowrap; overflow-wrap: normal; }
.side-seg button svg { display: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-seg button:hover { background: #4b5bdc1f; }
.side-seg button[aria-pressed="true"], .sidenav.mode .side-seg button[aria-pressed="true"] { background: var(--indigo); color: #fff; }
.side-seg button:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.sidenav.mode .fold { flex: none; justify-content: center; padding: 6px; color: #6b74b8; }
/* The panel icon (Lucide panel-left): its line stands on the side the bar is on, so it mirrors in right-to-left. */
[dir="rtl"] .sidenav .fold svg { scale: -1 1; }
.nav-folded .sidenav :is(.sn-head, .sn-k, .sn-gap) { display: none; }
.nav-folded .sidenav .sn-tools { flex-direction: column; padding-bottom: 6px; }
.nav-folded .sidenav.mode .sn-user .acct-av { display: grid; }
.nav-folded .sidenav.mode .sn-user .sn-caret { display: none; }
.nav-folded .sidenav.mode { padding-inline: 4px; }
.nav-folded .sidenav.mode button { justify-content: center; padding: 9px 0; }
.nav-folded .sidenav.mode button span { display: none; }
.nav-folded .sidenav .sn-tools .side-seg { flex: none; flex-direction: column; flex-wrap: nowrap; padding: 0; border: 0; background: none; }
.nav-folded .sidenav .side-seg button { padding: 6px 0; }
.nav-folded .sidenav .side-seg button svg { display: block; }
/* Phones only (phone.css): ☰, the dimmed body behind the drawer and the slogan under its logo. */
.m-burger, .m-scrim, .sn-slogan, .mc-hr, .mc-now { display: none; }

/* Narrow desktop windows: a slimmer bar leaves the body its room. */

/* Ask the Sage sits under both sides, after a line of its own; hidden until the server says it is on (sage-mode.js). */
.sidenav.mode .sep-sage, [data-side] .sidenav.mode .sep-sage { display: block; }
.sidenav.mode [data-mode="sage"][hidden], [data-side] .sidenav.mode .sep-sage:has(+ [hidden]) { display: none; }
/* The 12 meridians under Meridians (meridian-guide-ui.js): a coloured code in place of an icon; it alone shows when folded. */
.sidenav.mode .sn-mer { padding-block: 4px; font-weight: 500; }
.sn-dot { flex: none; display: grid; place-items: center; width: 22px; height: 18px; border-radius: 6px; background: var(--c); color: #fff; font: 700 9px "JetBrains Mono", ui-monospace, monospace;; line-height: 1; text-box: trim-both cap alphabetic; } /* the capitals sit in the middle whatever monospace the device has */
.nav-folded .sidenav.mode .sn-mer .sn-dot { margin-inline: auto; }
/* Its description over the page (the .hiw dialog shell, how-it-works.css). */
.mg .hiw-head { align-items: center; }
.mg-dot { width: 40px; height: 32px; border-radius: 10px; font-size: 13px; }
.mg-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.mg-full { display: block; width: 100%; min-height: 44px; margin: 0 0 12px; padding: 8px 16px; border: 0; border-radius: 12px; background: var(--indigo, #4f5bd5);
  color: #fff; font: 700 15px "Plus Jakarta Sans", Heebo, system-ui, sans-serif; text-align: center; cursor: pointer; }
.mg-full:hover { filter: brightness(1.08); }
.mg-full:focus-visible { outline: 2px solid var(--indigo, #4f5bd5); outline-offset: 2px; }
.mg-lesson { background: none; color: var(--indigo, #4f5bd5); box-shadow: inset 0 0 0 1.5px currentColor; }
:root[data-theme="dark"] .mg-lesson { color: #a5adff; }
.mg-five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 4px 0 4px; }
.mg-yy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 2px; font-size: 14px; color: var(--ink); }
.mg-yy-tag { padding: 3px 10px; border-radius: 99px; background: #f6c45333; color: #8a5a00; font-weight: 800; font-size: 12.5px; }
.mg-yy-tag.yin { background: #2f3a6b; color: #e3e6ff; }
:root[data-theme="dark"] .mg-yy-tag { color: #f6c453; }
:root[data-theme="dark"] .mg-yy-tag.yin { background: #3a4380; }
.mg-mc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 2px; font-size: 13.5px; color: var(--ink); }
.mg-mc span { display: inline-flex; align-items: center; gap: 6px; }
.mg-mc .mg-sw { box-shadow: 0 0 0 1px #9aa0b4; }
.mg-five div { background: var(--indigo-soft); border-radius: 12px; padding: 8px 12px; }
.mg-five small { display: block; font: 700 10px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mg-five b { display: flex; align-items: center; gap: 6px; font-size: 14.5px; line-height: 1.3; }
.mg-sw { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #0003; }
.mg-facts { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 12px 0 0; font-size: 14px; }
.mg-facts dt { color: var(--muted); } .mg-facts dd { margin: 0; }
.mg-t { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.4; }
.mg-t th { text-align: start; font: 700 11px "Plus Jakarta Sans", system-ui, sans-serif; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.mg-t td { vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mg-t .mg-code { font: 700 12.5px "JetBrains Mono", ui-monospace, monospace; white-space: nowrap; }

/* The phone drawer's cards (phone-panel.js, phone.css): on desktop the wrappers vanish and the descriptions stay hidden. */
.pn-treat, .pn-study, .pn-tiles { display: contents; }
.sn-d { display: none; }
/* The foot: the account's name, then Settings and Sign out as two quiet link rows under it (account-ui.js); folded, the links are icons. */
.sidenav .sn-foot:has(.sn-ico) { display: flex; flex-direction: column; gap: 2px; }
.sidenav .sn-foot:has(.sn-ico) > .sn-set { display: none; }
.sidenav.mode .sn-foot .sn-ico { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 9px; background: none; color: var(--d-muted, #6b7092); font: 600 13px "Plus Jakarta Sans", Heebo, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.sidenav.mode .sn-foot .sn-ico:hover { background: var(--indigo-soft); color: var(--indigo); }
.sidenav.mode .sn-foot .sn-ico svg { width: 18px; height: 18px; }
.sidenav.mode .sn-foot .sn-out, .sidenav.mode .sn-foot .sn-out:hover { color: #c0263a; }
.nav-folded .sidenav.mode .sn-foot .sn-ico { justify-content: center; padding: 0; }
.nav-folded .sidenav.mode .sn-foot .sn-ico span { display: none; }
