/* Application shell shared by the service portal and the editor: a 64px header,
   a fixed 256px sidebar, centred content and a document-locking navigation
   overlay below 992px wide or 701px high (see ui/shell.js and DESIGN.md).
   Group toggles and submenus live in ui/navigation.css. */
.masthead {display:flex;align-items:center;gap:14px;height:64px;padding:0 24px;margin-left:256px;position:static;
  background:var(--ds-surface);border-bottom:1px solid var(--ds-border);backdrop-filter:none;}
.masthead .wordmark {font-family:var(--ds-font-sans);font-size:18px;font-weight:600;letter-spacing:-.005em;min-width:0;overflow-wrap:anywhere;}
.masthead .tagline {display:none;}
.masthead .grow {flex:1;}
.workspace {display:block;max-width:none;margin-left:256px;padding:24px;}
.workspace>main {max-width:1392px;margin-inline:auto;min-width:0;}
.rail {position:fixed;inset:0 auto 0 0;width:256px;background:var(--ds-surface);border-right:1px solid var(--ds-border);z-index:50;}
.rail-brand {height:64px;display:flex;align-items:center;padding:0 24px;color:var(--ink-1);font-size:20px;font-weight:750;
  text-decoration:none;border-bottom:1px solid var(--ds-border);overflow-wrap:anywhere;}
.navcard {background:var(--ds-surface);border:0;border-radius:0;box-shadow:none;padding:20px 16px;}
.navitem {display:flex;width:100%;align-items:center;gap:9px;min-height:44px;padding:9px 11px;margin:4px 0;
  border:1px solid transparent;border-radius:8px;background:none;color:var(--ink-2);font:inherit;font-size:var(--ds-fs-sm);
  font-weight:600;text-align:left;text-decoration:none;cursor:pointer;
  transition:background var(--ds-dur-fast),color var(--ds-dur-fast),border-color var(--ds-dur-fast);}
.navitem:hover {background:var(--ds-surface-2);color:var(--ink-1);}
.navitem.on {background:var(--ds-accent-tint);border-color:transparent;color:var(--ds-accent-text);}
.navitem .count {margin-left:auto;font-size:var(--ds-fs-2xs);font-weight:600;color:var(--ink-3);font-variant-numeric:tabular-nums;}
.navitem.on .count {color:var(--ds-accent-text);}
.nav-label {margin:16px 12px 8px;color:var(--ink-3);font-size:12px;font-weight:600;}
/* Items that need attention, e.g. requests waiting for an admin's decision. */
.nav-badge {display:inline-flex;align-items:center;justify-content:center;min-width:22px;margin-left:auto;padding:1px 7px;
  border-radius:999px;background:var(--ds-danger-fg);color:var(--ds-surface);font-size:var(--ds-fs-2xs);font-weight:700;
  font-variant-numeric:tabular-nums;}
.nav-group-toggle .nav-badge {margin:0 8px 0 auto;}
/* Who is signed in, and the way out, at the foot of the sidebar. */
.rail-account {display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:8px 16px 0;padding:12px 8px 0;
  border-top:1px solid var(--ds-border);font-size:var(--ds-fs-xs);color:var(--ink-3);}
.rail-account>span {max-width:100%;overflow-wrap:anywhere;}
.rail-account form {margin:0;}
/* Editor (service mode): the service name opens a list of the user's other services, over the menu. */
.service-switcher {position:relative;}
.service-switcher>summary.rail-brand {justify-content:space-between;gap:8px;cursor:pointer;list-style:none;}
.service-switcher>summary::-webkit-details-marker {display:none;}
.service-switcher>summary>span:first-child {min-width:0;}
.service-switcher>summary svg {flex-shrink:0;transition:transform var(--ds-dur-fast);}
.service-switcher[open]>summary svg {transform:rotate(180deg);}
.service-switcher-menu {position:absolute;top:calc(100% + 4px);left:12px;right:12px;z-index:60;padding:8px;background:var(--ds-surface);
  border:1px solid var(--ds-border);border-radius:var(--ds-radius-lg);box-shadow:var(--ds-shadow-md,var(--ds-shadow-sm));}
.rail-account-actions {display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;}
.rail-account-actions a, .rail-account .rail-signout {display:inline-flex;align-items:center;min-height:44px;min-width:0;padding:0;
  border:0;background:none;box-shadow:none;color:var(--ink-2);font:inherit;font-weight:600;cursor:pointer;}
.rail-account-actions a:hover, .rail-account .rail-signout:hover {background:none;color:var(--ink-1);text-decoration:underline;}
.rail-account .rail-signout .btn-content>* {justify-self:start;}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;}
.iconbtn {appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;
  padding:0 10px;border:1px solid var(--ds-border-default);border-radius:8px;background:transparent;color:var(--ink-2);
  cursor:pointer;font-family:var(--ds-font-sans);font-size:var(--ds-fs-xs);font-weight:600;}
.iconbtn:hover {background:var(--ds-surface-2);color:var(--ink-1);border-color:var(--ds-border-strong);}
.nav-toggle,.nav-close {display:none;}
.skip-link {position:fixed;top:-100px;left:16px;z-index:150;background:var(--ds-surface);padding:12px;}
.skip-link:focus {top:8px;}
@media(min-width:992px) and (min-height:701px){.rail .navcard {padding:8px 12px;}}
@media(max-width:991px),(max-height:700px){
  .masthead,.workspace {margin-left:0;}
  .nav-toggle,.nav-close {display:inline-flex;}
  .rail {display:none;}
  .rail.open {display:block;position:fixed;inset:0;z-index:100;width:100%;background:var(--ds-bg);padding:0 0 24px;border:0;overflow-y:auto;}
  .rail.open .rail-brand {padding-right:100px;}
  .rail.open .navcard {max-width:480px;margin-inline:auto;}
  .rail.open .rail-account {width:calc(100% - 32px);max-width:448px;margin-inline:auto;}
  .nav-close {position:absolute;right:16px;top:10px;}
}
@media(max-width:600px){
  .workspace {padding:16px;}
  .masthead {padding:0 16px;gap:8px;}
}
