/* The studio menu (2026-10-10, ui/nav.js): group buttons with dropdowns from 1024 px, a Menu button and a full-height
   sheet below. The top bar keeps its 60 px on a desktop, so nothing under it moves. */
.brand { color: inherit; text-decoration: none; border-radius: 10px; }
.brand:focus-visible, .nav-trigger:focus-visible, .nav-burger:focus-visible, .nav-close:focus-visible, .nav-upgrade:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-burger, .nav-here { display: none; }
.tabs { overflow: visible; gap: 4px; }
.nav-group { position: relative; }
.nav-trigger { border: 0; background: transparent; min-height: 36px; padding: 0 10px 0 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 550; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nav-trigger:hover { color: var(--ink); background: var(--soft); }
.nav-trigger.is-current { color: var(--muted); background: var(--panel); box-shadow: var(--shadow); }
.nav-trigger .nav-cur { color: var(--ink); font-weight: 650; }
.nav-trigger[aria-expanded="true"] { color: var(--ink); background: var(--soft); box-shadow: none; }
.nav-trigger .chev { width: 7px; height: 7px; margin: -3px 0 0 2px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); opacity: .7; }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(-135deg); margin-top: 3px; }
.nav-trigger .count, .nav-item .count, .nav-gh .count, .nav-burger-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; letter-spacing: 0; text-transform: none; } /* neutral: an ink outline, never the accent (the calm-UI review) */
.nav-pop { position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; width: 340px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 19, 17, .14), 0 2px 6px rgba(20, 19, 17, .06); }
.nav-pop.to-left { left: auto; right: 0; }
.nav-pop ul, .nav-sheet ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-item { display: grid; gap: 2px; padding: 9px 12px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav-item:hover { background: var(--soft); }
button.nav-item { width: 100%; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; } /* an action in the menu (Add to CRM) */
button.nav-item:hover { background: var(--soft); }
.nav-item[aria-current="page"] { background: #F6ECE6; box-shadow: inset 3px 0 0 var(--accent); }
.nav-t { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.nav-d { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.nav-item[aria-current="page"] .nav-tt::after { content: 'Here' / ''; margin-left: 8px; padding: 0 6px; border-radius: 6px; background: var(--panel); color: var(--accent); font-size: 11px; font-weight: 650; line-height: 18px; display: inline-block; vertical-align: 1px; }
/* the reserved plan slot (badge + Upgrade); hidden until plans fill it (setPlan in ui/nav.js) */
.nav-plan { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-plan-badge { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; font-weight: 600; line-height: 22px; color: var(--ink); }
.nav-upgrade { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 600; text-decoration: none; }
/* the account area's Credits link (Credits and licences, every plan): beside Log out on a desktop, in the sheet's foot below */
.who-link, .nav-foot-link { display: inline-flex; align-items: center; min-height: 28px; padding: 0 4px; border-radius: 6px; color: var(--muted); font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.who-link:hover, .nav-foot-link:hover { color: var(--ink); text-decoration: underline; }
.who-link:focus-visible, .nav-foot-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-foot-act { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-foot-link { min-height: 44px; padding: 0 6px; font-size: 14.5px; }

/* smaller desktops: the bar also holds the AI pill, Add to CRM, the name and Log out, so it gives up words first */
@media (min-width: 1024px) and (max-width: 1439px) {
  .top-in { gap: 14px; }
  .who .name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-trigger .nav-cur { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .helper-pill .mid { display: none; } .helper-pill .short { display: inline; } .who .name { display: none; } }
@media (min-width: 1024px) and (max-width: 1199px) { .nav-trigger .nav-cur { display: none; } } /* the current group keeps its white pill; its menu says Here */

/* phones and tablets: Menu button, the current section's name, the sheet */
@media (max-width: 1023px) {
  .top-in { height: 56px; gap: 10px; padding: 0 16px; }
  .tabs { display: none; }
  .brand span { display: none; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; flex: none; min-width: 44px; min-height: 44px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font-weight: 600; cursor: pointer; }
  .nav-burger-n { position: absolute; top: -5px; right: -7px; box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 2px var(--bg); }
  .nav-here { display: block; flex: 1; min-width: 0; font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .who { flex: none; gap: 8px; }
  .who .name, .who #logout, .who .who-link { display: none; } /* the sheet's foot has them */
  .who > .btn { min-height: 40px; padding: 0 10px; font-size: 14px; } /* a button in the account area: compact beside the Menu button */
  .top-in > .nav-plan { display: none; }
}
@media (max-width: 400px) { .top-in > .brand { display: none; } } /* the section name needs the room; the menu sheet shows the brand */
@media (max-width: 479px) {
  .top-in { padding: 0 12px; gap: 8px; }
  .nav-burger { padding: 0; width: 44px; }
  .nav-burger-l { display: none; }
}
dialog.nav-sheet { margin: 0; padding: 0; border: 0; border-radius: 0; inset: 0 auto 0 0; width: min(420px, 100vw); max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; background: var(--bg); color: var(--ink); box-shadow: 8px 0 32px rgba(20, 19, 17, .18); }
dialog.nav-sheet[open] { display: flex; flex-direction: column; animation: nav-in .18s ease-out; }
dialog.nav-sheet::backdrop { background: rgba(20, 19, 17, .35); }
@keyframes nav-in { from { transform: translateX(-14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog.nav-sheet[open] { animation: none; } }
html.nav-open { overflow: hidden; }
.nav-sheet-head { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); flex: none; }
.nav-sheet-head .brand span { display: inline; }
.nav-sheet-head .nav-plan { margin-left: auto; }
.nav-close { margin-left: auto; flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); cursor: pointer; }
.nav-sheet-head .nav-plan:not([hidden]) + .nav-close { margin-left: 0; }
.nav-sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 12px 18px; display: grid; gap: 4px; align-content: start; }
.nav-gh { display: flex; align-items: center; gap: 8px; margin: 14px 6px 8px; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-sg ul { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.nav-sheet .nav-item { min-height: 56px; align-content: center; padding: 10px 12px; }
.nav-sheet .nav-t { font-size: 16px; }
.nav-sheet .nav-d { font-size: 13.5px; }
.nav-sheet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; flex: none; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #FBFAF7; }
.nav-sheet-foot .btn { min-height: 44px; }
.nav-sheet-foot > .small { min-width: 0; overflow-wrap: anywhere; }
