/* =============================================================================
   sl-shell.css — app shell (left pane · top bar · workspace)
   -----------------------------------------------------------------------------
   Three chrome bands (keep in sync with sl-tokens.css §9 and sl-shell.js):
     phone  ≤700px     hamburger, overlay drawer, bottom tab bar
     tablet 701–900px  persistent 56px icon rail, top-bar tool links, no tab bar
     desktop ≥901px    expandable left pane or the same rail when collapsed
   Contract for another project: docs/RESPONSIVE-SHELL-KIT.md
   -----------------------------------------------------------------------------
   Composes sl-tokens.css + sl-components.css. A page opts in by:
     1. adding class="sl-has-shell" to <body>
     2. replacing  ~{common/HeaderFragment :: appHeader}
        with      ~{common/ShellFragment :: appShell}
     3. loading this file after sl-migrate.css, and js/sl-shell.js at body end.

   The page's existing top-level container (#main-container, #main-frame,
   .page-content, or <main>) becomes the workspace grid item — no markup
   changes inside it. Legacy fixed offsets are neutralised below.

   Requires: sl-tokens.css. See static/sl-shell-proposal.html for the spec.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Shell grid on <body>
   -------------------------------------------------------------------------- */
body.sl-has-shell {
  /* Pane width lives in a custom property so the drag-resizer, the collapse
     button, and the grid column all read from one value. JS writes it inline
     on <body>. Two columns app-wide: section pane | workspace (the tools
     moved from the retired icon rail into the top bar). */
  --sl-sections-w: 288px;
  --sl-sections-rail-w: 56px;
  --sl-config-w: 232px;
  --sl-actions-w: 256px;
  /* horizontal gap between the viewport and the app edge; 0 when full-bleed,
     computed by the big-display canvas cap below. Everything fixed-position
     that anchors to an app edge must add this in. */
  --sl-app-gap: 0px;
  display: grid;
  /* The main row must size to CONTENT (auto), not to the free viewport space.
     Legacy global CSS pins body to height:100% — a definite box — so any fr
     row clamps to 732px and tall workspace content overflows a fixed track,
     which silently breaks position:sticky inside it (the containing block
     ends where the row does). With auto the row grows with the page and the
     workspace item below carries a viewport-height floor so short pages
     still fill the screen. Columns keep the 0 minimum; that one prevents
     horizontal blowout. */
  grid-template-rows: var(--sl-header-height) auto;
  grid-template-columns: var(--sl-sections-w) minmax(0, 1fr);
  grid-template-areas:
    "topbar   topbar"
    "sections main";
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--sl-surface-page);
}

/* Collapsed section pane: an icon rail. Labels hide; each key item keeps
   its icon. Groups with children open a tree flyout to the right. The edge
   chevron expands the pane again. A class-level grid override beats the base
   columns, so the inline --sl-sections-w kept for re-expansion does not hold
   the column open. */
/* Wide viewports only: tablet (701–900) forces the slim rail in JS without
   persisting that force; phone (≤700) uses the overlay drawer instead. A
   persisted collapsed state must not fight those bands. */
@media (min-width: 901px) {
  body.sl-has-shell.sections-collapsed {
    grid-template-columns: var(--sl-sections-rail-w) minmax(0, 1fr);
  }
  body.sl-has-shell.has-actions-pane {
    --sl-actions-col: var(--sl-actions-w);
    grid-template-columns: var(--sl-sections-w) minmax(0, 1fr) var(--sl-actions-w);
    grid-template-areas:
      "topbar   topbar   topbar"
      "sections main     actions";
  }
  body.sl-has-shell.has-actions-pane.sections-collapsed {
    grid-template-columns: var(--sl-sections-rail-w) minmax(0, 1fr) var(--sl-actions-w);
  }
  body.sl-has-shell.has-actions-pane.actions-collapsed {
    --sl-actions-col: 48px;
    grid-template-columns: var(--sl-sections-w) minmax(0, 1fr) 48px;
  }
  body.sl-has-shell.has-actions-pane.sections-collapsed.actions-collapsed {
    --sl-actions-col: 48px;
    grid-template-columns: var(--sl-sections-rail-w) minmax(0, 1fr) 48px;
  }
  body.sl-has-shell.config-pane-open {
    grid-template-columns: var(--sl-sections-w) var(--sl-config-w) minmax(0, 1fr);
    grid-template-areas:
      "topbar   topbar   topbar"
      "sections config   main";
  }
  body.sl-has-shell.config-pane-open.sections-collapsed {
    grid-template-columns: var(--sl-sections-rail-w) var(--sl-config-w) minmax(0, 1fr);
  }
  body.sl-has-shell.config-pane-open.has-actions-pane {
    --sl-actions-col: var(--sl-actions-w);
    grid-template-columns: var(--sl-sections-w) var(--sl-config-w) minmax(0, 1fr) var(--sl-actions-w);
    grid-template-areas:
      "topbar   topbar   topbar   topbar"
      "sections config   main     actions";
  }
  body.sl-has-shell.config-pane-open.has-actions-pane.sections-collapsed {
    grid-template-columns: var(--sl-sections-rail-w) var(--sl-config-w) minmax(0, 1fr) var(--sl-actions-w);
  }
  body.sl-has-shell.config-pane-open.has-actions-pane.actions-collapsed {
    --sl-actions-col: 48px;
    grid-template-columns: var(--sl-sections-w) var(--sl-config-w) minmax(0, 1fr) 48px;
  }
  body.sl-has-shell.config-pane-open.has-actions-pane.sections-collapsed.actions-collapsed {
    grid-template-columns: var(--sl-sections-rail-w) var(--sl-config-w) minmax(0, 1fr) 48px;
  }
  /* My Hub: no sections rail. Workspace full width, or Summary | workspace
     when side-by-side is on. */
  body.sl-has-shell.hub-no-sections {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "topbar"
      "main";
  }
  body.sl-has-shell.hub-no-sections.config-pane-open {
    grid-template-columns: var(--sl-config-w) minmax(0, 1fr);
    grid-template-areas:
      "topbar topbar"
      "config main";
  }
  body.sl-has-shell.hub-no-sections > .shell-sections,
  body.sl-has-shell.hub-no-sections:not(.config-pane-open) > .shell-sections-resizer {
    display: none !important;
  }
  body.sl-has-shell.hub-no-sections .nav-collapse-toggle:not(.nav-actions-collapse):not(.nav-kbd-attr-collapse) {
    display: none !important;
  }
  body.sl-has-shell.hub-no-sections.config-pane-open > .shell-sections-resizer {
    display: block;
    left: calc(var(--sl-app-gap, 0px) + var(--sl-config-w) - 3px);
  }
  body.sl-has-shell.sections-collapsed > .shell-sections {
    align-items: center;
    gap: 0;
    padding: calc(var(--sl-ws-title-row-h) + var(--sl-space-2)) 12px var(--sl-space-3);
    overflow: visible;
    cursor: default;
    /* The rail is a grid sibling of the workspace. Flyout z-index only
       competes inside this pane, so the pane itself has to sit above the
       workspace stacking context (sticky identity band, cards, etc.). */
    z-index: var(--sl-z-dropdown);
  }
  body.sl-has-shell.sections-collapsed > .shell-sections .shell-sections__body {
    overflow: visible;
    align-items: center;
    gap: 8px;
  }
  body.sl-has-shell.sections-collapsed .nav-collapse-toggle:not(.nav-actions-collapse):not(.nav-kbd-attr-collapse) {
    left: calc(var(--sl-app-gap, 0px) + var(--sl-sections-rail-w) - 11px);
    z-index: calc(var(--sl-z-dropdown) + 2);
  }
  body.sl-has-shell.sections-collapsed .shell-sections-resizer { display: none; }
  body.sl-has-shell.actions-collapsed > .shell-actions {
    padding: var(--sl-space-3) 0 0;
    cursor: pointer;
  }
  body.sl-has-shell.actions-collapsed > .shell-actions > * { display: none; }
  body.sl-has-shell.actions-collapsed > .shell-actions::before {
    content: "\f0db";                     /* fa-table-columns — same glyph as the left pane */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: block;
    text-align: center;
    font-size: var(--sl-font-size-sm);
    color: var(--sl-text-muted);
  }
  body.sl-has-shell.actions-collapsed > .shell-actions:hover::before {
    color: var(--sl-text-primary);
  }
  body.sl-has-shell.actions-collapsed .nav-actions-collapse {
    right: calc(var(--sl-app-gap, 0px) + 48px - 11px);
  }
  body.sl-has-shell.actions-collapsed .shell-actions-resizer { display: none; }
}

/* Collapsed left pane: icon rail + tree flyouts for groups with children.
   Tablet (701–900) uses this rail as the persistent left chrome. */
@media (min-width: 701px) {
  body.sl-has-shell.sections-collapsed > .shell-sections {
    padding-top: calc(var(--sl-ws-title-row-h) + var(--sl-space-2));
    padding-bottom: var(--sl-space-3);
    gap: 0;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .shell-sections__title,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-heading,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__chevron,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-item__meta,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-menu,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-meta { display: none; }

  body.sl-has-shell.sections-collapsed .shell-sections .shell-sections__group.is-active,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree + .sl-pane-group {
    margin-top: 0;
  }

  /* Square icon hit-target shared by links, group heads, and tool buttons */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button {
    position: relative;
    justify-content: center;
    align-items: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    gap: 0;
    border-radius: var(--sl-radius-md);
    overflow: visible;
    cursor: pointer;
  }
  /* Nested tree heads inside a rail flyout stay full-width rows. */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children > .sl-pane-group > .sl-pane-group__head {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 32px;
    padding: 5px 10px;
    gap: 8px;
    overflow: hidden;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children > .sl-pane-group > .sl-pane-group__head > .sl-pane-group__title {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: none;
    width: auto;
    max-width: none;
    padding: 0;
    background: none;
    color: inherit;
    box-shadow: none;
    font-size: inherit;
    font-weight: inherit;
    white-space: nowrap;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children > .sl-pane-group > .sl-pane-group__head > .sl-pane-group__chevron {
    display: inline-block;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children > .sl-pane-group > .sl-pane-group__head > .sl-pane-group__icon {
    display: none;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn.is-current,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn.active,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link.active {
    background: transparent;
  }

  /* Same chip as the icon beside each workspace title: pale square, product
     blue glyph, soft halo. */
  body.sl-has-shell.sections-collapsed .shell-sections .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    background: var(--sl-surface-accent);
    border-radius: var(--sl-radius-md);
    font-size: 0.9375rem;
    color: var(--sl-action-primary-bg);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--sl-surface-accent) 70%, transparent);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn:hover .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link:hover .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head:hover .sl-pane-group__icon,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button:hover i,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn:focus-visible .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link:focus-visible .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head:focus-visible .sl-pane-group__icon {
    box-shadow: 0 0 0 4px var(--sl-surface-accent);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn.is-current .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn.active .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link.active .nav-icon {
    color: var(--sl-action-primary-bg);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--sl-action-primary-bg) 22%, transparent);
  }

  /* Quiet the Add Package fill so the rail stays icon-only; inline white
     on the plus icon is overridden so it stays visible on the pane surface. */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools {
    padding: 0 0 var(--sl-space-1);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools .page-head__actions,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools .pkg-start__actions {
    align-items: center;
    gap: 4px;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools #addPackageRequest {
    background: transparent;
    border-color: transparent;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools #addPackageRequest:hover {
    background: var(--sl-surface-sunken);
    border-color: transparent;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools #addPackageRequest.btn-primary i,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools #addPackageRequest.btn-primary label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools #addPackageRequest.btn-primary span:where(.sl-label-text) {
    color: var(--sl-text-primary);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button.btn-secondary {
    background: transparent;
    border-color: transparent;
    color: var(--sl-text-primary);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button.btn-secondary i,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button.btn-secondary label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button.btn-secondary span:where(.sl-label-text) {
    color: var(--sl-text-primary);
  }

  /* Labels become dark tooltips to the right of the icon */
  body.sl-has-shell.sections-collapsed .shell-sections .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__title,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button span:where(.sl-label-text) {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    z-index: calc(var(--sl-z-dropdown) + 1);
    width: max-content;
    max-width: 240px;
    margin: 0;
    padding: 6px 10px;
    overflow: visible;
    background: var(--sl-surface-inverse);
    color: var(--sl-text-inverse);
    border-radius: var(--sl-radius-md);
    box-shadow: var(--sl-elevation-2);
    font-size: var(--sl-font-size-xs);
    font-weight: var(--sl-font-weight-medium);
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    text-overflow: unset;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    flex: none;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn:hover > .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link:hover > .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head:hover > .sl-pane-group__title,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button:hover > label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-menu-btn:focus-visible > .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .nav-link:focus-visible > .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head:focus-visible > .sl-pane-group__title,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button:focus-visible > label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button:hover > span:where(.sl-label-text),
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-tools button:focus-visible > span:where(.sl-label-text) {
    opacity: 1;
  }

  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search,
  body.sl-has-shell.sections-collapsed .shell-sections .help-pane-search {
    position: relative;
    width: 32px;
    height: 32px;
    min-height: 32px;
    margin: 0;
    overflow: visible;
    border-radius: var(--sl-radius-md);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .help-pane-search:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search:focus-within,
  body.sl-has-shell.sections-collapsed .shell-sections .help-pane-search:focus-within {
    background: var(--sl-surface-sunken);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search .fa-magnifying-glass,
  body.sl-has-shell.sections-collapsed .shell-sections .help-pane-search .fa-magnifying-glass {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--sl-font-size-sm);
    color: var(--sl-text-primary);
    pointer-events: none;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search input,
  body.sl-has-shell.sections-collapsed .shell-sections .help-pane-search input {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--sl-z-dropdown);
    width: 220px;
    height: 34px;
    min-height: 34px;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--sl-elevation-2);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search:hover input,
  body.sl-has-shell.sections-collapsed .shell-sections .help-pane-search:hover input,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search:focus-within input,
  body.sl-has-shell.sections-collapsed .shell-sections .help-pane-search:focus-within input {
    opacity: 1;
    pointer-events: auto;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__search-mic {
    display: none;
  }

  /* Group flyout: tree-styled popover to the right of the icon */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group {
    position: relative;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group > .sl-pane-group__children {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% + 6px);
    z-index: var(--sl-z-dropdown);
    flex-direction: column;
    gap: 2px;
    width: max-content;
    min-width: 180px;
    max-width: 280px;
    max-height: min(70vh, 420px);
    margin: 0;
    padding: 8px 10px 8px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--sl-surface-raised);
    border: 1px solid var(--sl-border-subtle);
    border-radius: var(--sl-radius-md);
    box-shadow: var(--sl-elevation-2);
    scrollbar-width: thin;
    pointer-events: auto;
  }
  /* Hover bridge so the pointer can travel from the icon into the flyout */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group > .sl-pane-group__children::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 0;
    width: 18px;
    height: 100%;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group.is-flyout-open > .sl-pane-group__children,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head:hover ~ .sl-pane-group__children,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__head:focus-visible ~ .sl-pane-group__children,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group > .sl-pane-group__children:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group > .sl-pane-group__children:focus-within {
    display: flex;
  }
  /* Section labels stay visible inside the flyout (the rail hides them). */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group > .sl-pane-group__children .sl-pane-heading {
    display: block;
    padding: var(--sl-space-2) 0 var(--sl-space-1);
  }
  /* Sections nest under the selected package; keep them visible inside a
     My packages flyout even when that group is stored as collapsed. */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group.is-flyout-open .sl-pane-pkg__children,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group:hover .sl-pane-pkg__children,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group:focus-within .sl-pane-pkg__children {
    display: flex;
  }
  /* Don't cover menu rows with the icon tooltip while the flyout is open */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group.is-flyout-open > .sl-pane-group__head > .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group.is-flyout-open > .sl-pane-group__head > .sl-pane-group__title,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group:hover > .sl-pane-group__head > .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group:hover > .sl-pane-group__head > .sl-pane-group__title {
    opacity: 0 !important;
  }

  /* Vertical trunk of the tree */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group > .sl-pane-group__children::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: var(--sl-border-subtle);
    pointer-events: none;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-pane-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-menu-btn,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .nav-link,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__btn,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__help {
    position: relative;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 32px;
    padding: 6px 10px 6px 16px;
    overflow: hidden;
    border-radius: var(--sl-radius-sm);
    color: var(--sl-text-primary);
    font-size: 0.8125rem;
    font-weight: var(--sl-font-weight-regular);
    pointer-events: auto;
    cursor: pointer;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-menu-btn:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .nav-link:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__btn:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__help:hover,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-menu-btn.active,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-menu-btn.is-current,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .nav-link.active,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__btn.active {
    background: var(--sl-surface-sunken);
    color: var(--sl-text-primary);
    box-shadow: none;
    font-weight: var(--sl-font-weight-regular);
  }
  /* Horizontal stems */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-menu-btn::before,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .nav-link::before,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__btn::before,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__help::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 1px;
    background: var(--sl-border-subtle);
    pointer-events: none;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-menu-btn:has(.sl-pane-tree__icon)::before,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .nav-link:has(.sl-pane-tree__icon)::before,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__btn:has(.sl-pane-tree__icon)::before,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__help:has(.sl-pane-tree__icon)::before {
    display: none;
  }
  /* Flyout rows show their names inline, not as tooltips */
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-pane-item__name {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    z-index: auto;
    width: auto;
    max-width: none;
    padding: 0;
    background: none;
    color: inherit;
    border-radius: 0;
    box-shadow: none;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: none;
    opacity: 1;
    pointer-events: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .nav-icon,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-pane-group__icon,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group:not(.sl-pane-group--tree) > .sl-pane-group__children i.fa-plus,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group:not(.sl-pane-group--tree) > .sl-pane-group__children i.fa-file-import,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children i.fa-code-compare,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children i.fa-circle-question {
    display: none;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-empty,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-keyboard-nav__empty {
    margin: 4px 0 4px 16px;
    padding: 0;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__del,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__children .sl-keyboard-nav__meta {
    display: none;
  }

  /* My Hub is a top-bar tool. Do not repeat it as a rail icon. */
  body.sl-has-shell.sections-collapsed .shell-sections .hub-home-chip {
    display: none;
  }
  /* Settings stays at the foot of the rail on every page. */
  body.sl-has-shell.sections-collapsed .shell-sections .hub-settings-chip {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    padding-top: var(--sl-space-3);
    border-top: 1px solid var(--sl-border-subtle);
  }
  body.sl-has-shell.sections-collapsed .shell-sections .hub-settings-chip .nav-label {
    left: calc(100% + 14px);
  }

  /* Package pages: Hub, Add, Import, My packages, Help as matching chips. */
  body.sl-has-shell.sections-collapsed.sl-package-page > .shell-sections .shell-sections__body {
    gap: 16px;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--fill {
    flex: 0 0 auto;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group__search {
    display: none;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .pkg-help-chip {
    display: flex;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .pkg-help-chip .nav-label {
    left: calc(100% + 14px);
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__head {
    display: none;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children {
    display: flex !important;
    position: static;
    left: auto;
    top: auto;
    z-index: auto;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children::before,
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children::after {
    content: none;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn,
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn:hover,
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn.is-current,
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn.active {
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    font-weight: inherit;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn::before {
    content: none;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    background: var(--sl-surface-accent);
    border-radius: var(--sl-radius-md);
    font-size: 0.9375rem;
    color: var(--sl-action-primary-bg);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--sl-surface-accent) 70%, transparent);
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn:hover .nav-icon,
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn:focus-visible .nav-icon {
    box-shadow: 0 0 0 4px var(--sl-surface-accent);
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .nav-label {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    z-index: calc(var(--sl-z-dropdown) + 1);
    width: max-content;
    max-width: 240px;
    padding: 6px 10px;
    overflow: visible;
    background: var(--sl-surface-inverse);
    color: var(--sl-text-inverse);
    border-radius: var(--sl-radius-md);
    box-shadow: var(--sl-elevation-2);
    font-size: var(--sl-font-size-xs);
    font-weight: var(--sl-font-weight-medium);
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
  }
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn:hover > .nav-label,
  body.sl-has-shell.sections-collapsed.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .sl-menu-btn:focus-visible > .nav-label {
    opacity: 1;
  }
}


/* Hub package flyouts: hover SmartTE / SmartBrowser packages for Add, Import,
   and My Packages. Same tree popover as the collapsed rail; the pane lifts
   above the workspace while the menu is open. */
.shell-sections .sl-pane-flyout {
  position: relative;
  width: 100%;
  overflow: visible;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__head {
  width: 100%;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 6px);
  z-index: var(--sl-z-dropdown);
  flex-direction: column;
  gap: 2px;
  width: max-content;
  min-width: 180px;
  max-width: 280px;
  margin: 0;
  padding: 8px 10px 8px 14px;
  overflow: visible;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-2);
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  width: 18px;
  height: 100%;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--sl-border-subtle);
  pointer-events: none;
}
.shell-sections .sl-pane-flyout.is-flyout-open > .sl-pane-group__children,
.shell-sections .sl-pane-flyout:hover > .sl-pane-group__children,
.shell-sections .sl-pane-flyout:focus-within > .sl-pane-group__children,
.shell-sections .sl-pane-flyout > .sl-pane-group__head:hover ~ .sl-pane-group__children,
.shell-sections .sl-pane-flyout > .sl-pane-group__children:hover {
  display: flex;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children .sl-menu-btn {
  position: relative;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px 6px 16px;
  border-radius: var(--sl-radius-sm);
  font-weight: var(--sl-font-weight-regular);
  pointer-events: auto;
  cursor: pointer;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children .sl-menu-btn::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--sl-border-subtle);
  pointer-events: none;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children .sl-menu-btn:has(.sl-pane-tree__icon) {
  padding-left: 10px;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children .sl-menu-btn:has(.sl-pane-tree__icon)::before {
  display: none;
}
.shell-sections .sl-pane-flyout > .sl-pane-group__children .sl-menu-btn:hover {
  background: var(--sl-surface-sunken);
}
body.sl-has-shell > .shell-sections:has(.sl-pane-flyout:hover),
body.sl-has-shell > .shell-sections:has(.sl-pane-flyout:focus-within),
body.sl-has-shell > .shell-sections:has(.is-flyout-open) {
  overflow: visible;
  z-index: var(--sl-z-dropdown);
}
body.sl-has-shell:has(.sl-pane-flyout:hover) .nav-collapse-toggle:not(.nav-actions-collapse):not(.nav-kbd-attr-collapse),
body.sl-has-shell:has(.sl-pane-flyout:focus-within) .nav-collapse-toggle:not(.nav-actions-collapse):not(.nav-kbd-attr-collapse),
body.sl-has-shell:has(.is-flyout-open) .nav-collapse-toggle:not(.nav-actions-collapse):not(.nav-kbd-attr-collapse) {
  z-index: calc(var(--sl-z-dropdown) + 2);
}
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .shell-sections .sl-pane-flyout > .sl-pane-group__children { display: none !important; }
  .shell-sections .sl-pane-flyout > .sl-pane-group__head .sl-pane-group__chevron { display: none; }
}

/* The page's existing top-level container becomes the workspace item.
   (Each page has exactly one of these.) */
body.sl-has-shell > #main-container,
body.sl-has-shell > #main-frame,
body.sl-has-shell > .page-content,
body.sl-has-shell > main {
  grid-area: main;
  min-width: 0;
  /* Size to CONTENT, not to the track: the row auto-sizes to the panes'
     viewport height (732px), and a stretched workspace becomes a definite
     732px box whose overflow silently breaks position:sticky inside it.
     With start alignment the item grows with the page instead. */
  align-self: start;
  /* short pages still fill the viewport */
  min-height: calc(100vh - var(--sl-header-height));
  min-height: calc(100dvh - var(--sl-header-height));
}

/* ---- Section pane: the second navigation level, on every page ------------ */
body.sl-has-shell > .shell-sections {
  grid-area: sections;
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  padding: var(--sl-space-3) var(--sl-space-2);
  background: var(--sl-surface-raised);
  border-right: 1px solid var(--sl-border-subtle);
  /* The pane holds still: only the open group's LIST scrolls (see
     .sl-pane-group__children), so the Serial/Version footer never leaves the
     bottom of the screen. */
  overflow: hidden;
  position: sticky;
  top: var(--sl-header-height);
  height: calc(100vh - var(--sl-header-height));
  height: calc(100dvh - var(--sl-header-height));
}
/* The pane title is the page's primary identity now (the workspace title row
   is gone on several pages) — it reads as a heading, not a whisper. */
.shell-sections .shell-sections__title {
  display: block;
  padding: 2px var(--sl-space-2h) var(--sl-space-2);
  font-size: var(--sl-font-size-lg);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--sl-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shell-sections .shell-sections__title:empty { display: none; }
/* Package pages: pane identity is "Packages" above New package / My packages. */
body.sl-package-page.sl-has-shell > .shell-sections { gap: 0; }
body.sl-package-page .shell-sections .shell-sections__title {
  display: block;
}
/* Keep My packages off the New package tree so the two groups read apart. */
body.sl-package-page .shell-sections .sl-pane-group--tree + .sl-pane-group {
  margin-top: var(--sl-space-3);
}
/* My packages fills leftover pane height; the list scrolls. A bottom
   arrow appears when more packages sit below the visible set. */
body.sl-package-page:not(.sections-collapsed) .shell-sections .sl-pane-group[data-pane-key="packages"] .sl-pane-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.shell-sections .sl-pane-pkg {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}
.shell-sections .sl-pane-pkg__children {
  flex: 0 0 auto;
  overflow: visible;
}
body.sl-package-page .shell-sections .sl-pane-group[data-pane-key="packages"].sl-pane-group--fill > .sl-pane-group__children {
  scrollbar-width: thin;
}
body.sl-package-page .shell-sections .sl-pane-group[data-pane-key="packages"].sl-pane-group--fill > .sl-pane-group__children::-webkit-scrollbar {
  display: block;
  width: var(--sl-space-2);
}
body.sl-package-page .shell-sections .sl-pane-group[data-pane-key="packages"].sl-pane-group--fill > .sl-pane-group__children::-webkit-scrollbar-thumb {
  background: var(--sl-border-strong);
  border-radius: var(--sl-radius-pill);
}
.shell-sections .sl-pane-more-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--sl-space-8);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sl-text-secondary);
  cursor: pointer;
}
.shell-sections .sl-pane-more-arrow:hover,
.shell-sections .sl-pane-more-arrow:focus-visible {
  color: var(--sl-text-primary);
}
.shell-sections .sl-pane-more-arrow:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -2px;
}
.shell-sections .sl-pane-more-arrow[hidden] {
  display: none;
}
body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-more-arrow {
  display: none;
}
.shell-sections .shell-sections__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
/* Running lists (packages, keyboards, licenses) scroll inside their group. */
.shell-sections .shell-sections__body:has(.sl-pane-group--fill) {
  overflow: hidden;
}

/* ---- Configuration pane: package section links beside the package list ---- */
body.sl-has-shell > .shell-config {
  grid-area: config;
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  padding: var(--sl-space-3) var(--sl-space-2);
  background: var(--sl-surface-raised);
  border-right: 1px solid var(--sl-border-subtle);
  overflow: hidden;
  position: sticky;
  top: var(--sl-header-height);
  height: calc(100vh - var(--sl-header-height));
  height: calc(100dvh - var(--sl-header-height));
}
body.sl-has-shell > .shell-config[hidden] { display: none !important; }
/* Same title chrome as the sections pane so the first tree group
   (At a glance, package sections) lines up with New package. */
.shell-config .shell-config__title {
  display: block;
  padding: 2px var(--sl-space-2h) var(--sl-space-2);
  font-size: var(--sl-font-size-lg);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--sl-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shell-config .shell-config__title:empty { display: none; }
.shell-config .shell-config__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.shell-config .shell-config__links,
.shell-config .nav-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.shell-config .nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  margin: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: 0.8125rem;
  font-weight: var(--sl-font-weight-regular);
  line-height: 1.35;
  color: var(--sl-text-primary);
  text-align: left;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
.shell-config .nav-link::before,
.shell-config .nav-link::after { content: none; display: none; }
.shell-config .nav-link:hover { background: var(--sl-surface-sunken); }
.shell-config .nav-link:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -1px;
}
.shell-config .nav-link.active {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
}
.shell-config .shell-config__source { display: none; }
.shell-config .shell-config__tree {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.shell-config .sl-pane-group {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.shell-config .sl-pane-group__head {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: 0.8125rem;
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
  text-align: left;
  cursor: pointer;
}
.shell-config .sl-pane-group__head:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -1px;
}
.shell-config .sl-pane-group__head.is-current {
  color: var(--sl-text-link);
  background: var(--sl-surface-accent);
}
.shell-config .sl-pane-group__title {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-config .sl-pane-group__chevron {
  order: -1;
  flex-shrink: 0;
  width: 12px;
  margin-left: 0;
  font-size: 0.625rem;
  color: var(--sl-text-secondary);
  transition: transform var(--sl-duration-fast, 120ms) var(--sl-easing-standard, ease);
}
.shell-config .sl-pane-group.is-collapsed .sl-pane-group__chevron {
  transform: rotate(-90deg);
}
.shell-config .sl-pane-group__icon { display: none; }
.shell-config .sl-pane-tree__icon { display: none; }
.shell-config .sl-pane-group__children {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-left: 16px;
  border-left: 1px solid var(--sl-border-subtle);
  padding-left: 0;
  flex: none;
  min-height: 0;
  overflow: visible;
}
.shell-config .sl-pane-group.is-collapsed .sl-pane-group__children { display: none; }
.shell-config .sl-pane-group--tree { flex: 0 0 auto; }
.shell-config .sl-pane-group--tree.sl-pane-group--fill {
  flex: 1 1 auto;
  min-height: 0;
}
.shell-config .sl-pane-group--tree.sl-pane-group--fill > .sl-pane-group__children {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.shell-config .sl-pane-group--tree.sl-pane-group--fill > .sl-pane-group__children::-webkit-scrollbar { display: none; }
.shell-config .sl-menu-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: 0.8125rem;
  font-weight: var(--sl-font-weight-regular);
  line-height: 1.35;
  color: var(--sl-text-primary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.shell-config .sl-menu-btn:hover,
.shell-config .sl-pane-group__head:hover { background: var(--sl-surface-sunken); }
.shell-config .sl-menu-btn:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -1px;
}
.shell-config .sl-menu-btn.active {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
}
.shell-config .sl-pane-group + .sl-pane-group {
  margin-top: var(--sl-space-3);
}
.shell-config .shell-config__body:has(.sl-pane-group--fill) {
  overflow: hidden;
}
.shell-config .sl-pane-item {
  justify-content: space-between;
  gap: var(--sl-space-2);
}
.shell-config .sl-pane-item__name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
}
.shell-config .sl-pane-item .pkg-imported-dot {
  margin-left: 0;
  top: 0;
}
.shell-config .sl-pane-item__meta {
  flex-shrink: 0;
  font-size: var(--sl-font-size-2xs);
  color: var(--sl-text-muted);
  font-variant-numeric: tabular-nums;
}
.shell-config .hub-config-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sl-space-3);
  padding: 6px 10px;
  font-size: var(--sl-font-size-sm);
  line-height: 1.35;
  color: var(--sl-text-primary);
}
.shell-config .hub-config-stat__label {
  min-width: 0;
  color: var(--sl-text-secondary);
}
.shell-config .hub-config-stat__value {
  flex: none;
  font-weight: var(--sl-font-weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--sl-text-primary);
}
.shell-config .sl-menu-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.shell-config .sl-pane-list { display: flex; flex-direction: column; gap: 1px; }
.shell-config .sl-pane-item .nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-config .sl-pane-empty {
  margin: var(--sl-space-2) var(--sl-space-2h);
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-muted);
}
.criterion-row.is-pane-highlight {
  outline: 2px solid var(--sl-border-accent);
  outline-offset: 2px;
}

/* ---- Actions pane: package create/save/status, editor and list pages ------ */
body.sl-has-shell > .shell-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  padding: var(--sl-space-3) var(--sl-space-2);
  background: var(--sl-surface-raised);
  border-left: 1px solid var(--sl-border-subtle);
  overflow: hidden;
  position: sticky;
  top: var(--sl-header-height);
  height: calc(100vh - var(--sl-header-height));
  height: calc(100dvh - var(--sl-header-height));
  overscroll-behavior: contain;
}
body.sl-has-shell > .shell-actions[hidden] { display: none; }
.shell-actions .shell-actions__title {
  display: block;
  padding: 2px var(--sl-space-2h) var(--sl-space-2);
  font-size: var(--sl-font-size-lg);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--sl-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shell-actions .shell-actions__body {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-5);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.shell-actions .shell-actions__body::-webkit-scrollbar { display: none; }
.shell-actions .shell-actions__import {
  flex: none;
  margin-top: auto;
  padding: var(--sl-space-3) var(--sl-space-2h) 0;
  border-top: 1px solid var(--sl-border-subtle);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sl-space-2);
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-secondary);
  line-height: 1.45;
}
.shell-actions .shell-actions__import .vi-imported-banner__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-2);
}
.shell-actions .shell-actions__import .vi-imported-banner__head > i { display: none; }
.shell-actions .shell-actions__import .vi-imported-key {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shell-actions .shell-actions__import .vi-imported-log {
  margin-left: 0;
}
.shell-actions .shell-actions__import .vi-imported-notes {
  margin: 0;
  padding-left: 1.1em;
}
.shell-actions .shell-actions__section {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-2);
  min-width: 0;
}
.shell-actions .shell-actions__label {
  padding: 0 var(--sl-space-2h);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-text-muted);
}
.shell-actions .shell-actions__stack,
.shell-actions .page-head__actions,
.shell-actions .pkg-start__actions,
.shell-actions .settings-action-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sl-space-2);
  margin: 0;
  padding: 0 var(--sl-space-2h);
  border: 0;
  background: none;
}
.shell-actions .settings-action-bar .nav-actions { display: contents; }
.shell-actions .shell-actions__stack button,
.shell-actions .page-head__actions button,
.shell-actions .pkg-start__actions button,
.shell-actions .settings-action-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  height: auto;
  margin: 0;
  padding: 0 14px;
  border-radius: var(--sl-radius-sm);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: 20px;
  box-shadow: none;
}
body.sl-has-shell > .shell-actions button,
body.sl-has-shell > .shell-actions button label,
body.sl-has-shell > .shell-actions button span:where(.sl-label-text) {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: 20px;
}
.shell-actions button label,
.shell-actions button span:where(.sl-label-text) {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: 20px;
  cursor: inherit;
}
.shell-actions button i { font-size: var(--sl-font-size-sm); }
.shell-actions #publishButton,
.shell-actions #editAndVersionButton,
.shell-actions #addPackageRequest {
  background: var(--sl-action-primary-bg);
  border: 1px solid transparent;
  color: var(--sl-text-on-accent);
}
.shell-actions #publishButton:hover,
.shell-actions #editAndVersionButton:hover,
.shell-actions #addPackageRequest:hover {
  background: var(--sl-action-primary-bg-hover);
}
.shell-actions #publishButton label,
.shell-actions #publishButton i,
.shell-actions #editAndVersionButton label,
.shell-actions #editAndVersionButton i,
.shell-actions #addPackageRequest label,
.shell-actions #addPackageRequest i,
.shell-actions #publishButton span:where(.sl-label-text),
.shell-actions #editAndVersionButton span:where(.sl-label-text),
.shell-actions #addPackageRequest span:where(.sl-label-text) { color: var(--sl-text-on-accent); }
.shell-actions .page-head__actions button:not(#addPackageRequest),
.shell-actions .pkg-start__actions button:not(#addPackageRequest) { order: 2; }
.shell-actions #saveButton { order: 1; }
.shell-actions #deleteButton { order: 2; }
.shell-actions #unpublishButton { order: 3; }
.shell-actions #editAndVersionButton { order: 4; }
.shell-actions #publishButton { order: 5; }
.shell-actions #downloadButton,
.shell-actions #saveAndDownloadButton { order: 6; }
.shell-actions #saveButton,
.shell-actions #saveAndDownloadButton,
.shell-actions #downloadButton,
.shell-actions #unpublishButton {
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-accent);
  color: var(--sl-text-link);
}
.shell-actions #saveButton label,
.shell-actions #saveAndDownloadButton label,
.shell-actions #downloadButton label,
.shell-actions #unpublishButton label,
.shell-actions #saveButton span:where(.sl-label-text),
.shell-actions #saveAndDownloadButton span:where(.sl-label-text),
.shell-actions #downloadButton span:where(.sl-label-text),
.shell-actions #unpublishButton span:where(.sl-label-text) { color: var(--sl-text-link); }
.shell-actions #deleteButton {
  background: none;
  border: 1px solid var(--sl-border-danger);
  color: var(--sl-text-danger);
}
.shell-actions #deleteButton:hover { background: var(--sl-feedback-danger-bg); }
.shell-actions #deleteButton label,
.shell-actions #deleteButton span:where(.sl-label-text) { color: var(--sl-text-danger); }
.shell-actions .metadata-right-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-3);
  margin: 0;
  padding: 0 var(--sl-space-2h);
  border: 0;
  text-align: left;
}
.shell-actions .metadata-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  width: 100%;
  text-align: left;
}
.shell-actions .metadata-label-2 {
  margin: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-text-muted);
  text-align: left;
}
.shell-actions .metadata-value {
  align-self: flex-start;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-link);
  background: var(--sl-surface-accent);
  padding: 2px 10px;
  border-radius: var(--sl-radius-sm);
  white-space: nowrap;
  text-align: left;
}
.shell-actions #date-edited {
  align-self: flex-start;
  background: none;
  padding: 0;
  color: var(--sl-text-secondary);
  font-weight: var(--sl-font-weight-regular);
  text-align: left;
}
.shell-actions .metadata-dirty { gap: 7px; flex-direction: row; align-items: center; }
.shell-actions .metadata-dirty[hidden] { display: none; }
.shell-actions .metadata-dirty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sl-feedback-warning-fg);
}
.shell-actions .metadata-dirty-text {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
}
/* My Hub home chip: phone drawer only. Hidden in the expanded pane and in
   the collapsed rail (My Hub is a top-bar tool). Lives outside the pane
   body so Help / Settings scripts that replace that body keep it. */
.shell-sections .hub-home-chip { display: none; }
/* Settings gear: collapsed slim rail only, on every page. Outside the pane
   body so Help / package scripts that replace that body keep it. */
.shell-sections .hub-settings-chip { display: none; }
/* only the group matching the current path is shown (set by sl-shell.js) */
.shell-sections .shell-sections__group { display: none; flex-direction: column; gap: 1px; }
.shell-sections .shell-sections__group.is-active {
  display: flex;
  flex: 0 0 auto; /* natural height so the pane body can scroll */
}
.shell-sections .shell-sections__body:has(.sl-pane-group--fill) .shell-sections__group.is-active {
  flex: 1 1 auto;
  min-height: 0;
}

/* Collapsible pane groups (built by sl-shell.js makeGroup): a bold
   [icon] Title ... [chevron] header with the children indented behind a thin
   left rule, keyboard-designer style. Used for the "Packages" list and for the
   package-name parent on editor pages; collapse state persists per group. */
.shell-sections .sl-pane-group { display: flex; flex-direction: column; min-height: 0; }
.shell-sections .sl-pane-group__head {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: 0.8125rem;
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
  text-align: left;
  cursor: pointer;
}
.shell-sections .sl-pane-group__head:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -1px;
}
.shell-sections .sl-pane-group__icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  color: var(--sl-text-primary);
}
.shell-sections .sl-pane-group__title {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-sections .sl-pane-group__chevron {
  flex-shrink: 0;
  font-size: var(--sl-font-size-2xs);
  color: var(--sl-text-muted);
  transition: transform var(--sl-duration-fast, 120ms) var(--sl-easing-standard, ease);
}
.shell-sections .sl-pane-group.is-collapsed .sl-pane-group__chevron {
  transform: rotate(-90deg);
}
/* Children align to the parent's TITLE text, no rule line: 26px = the head's
   18px icon + 8px gap, and each row's own 10px padding lands its text at the
   same x as the title. Child icons are deliberately reserved for the future —
   if they arrive, drop this margin and give rows the icon+gap instead. */
.shell-sections .sl-pane-group__children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 26px;
  border-left: 0;
  padding-left: 0;
  /* the list scrolls on its own once it outgrows the space above the footer;
     no scrollbar shows (wheel, trackpad, and keys still scroll it) */
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.shell-sections .sl-pane-group__children::-webkit-scrollbar { display: none; }
.shell-sections .sl-pane-group.is-collapsed .sl-pane-group__children,
.shell-sections .sl-pane-group.is-collapsed > .sl-pane-group__search { display: none; }

/* Accent tiles used by every pane dropdown child (Settings, Hub flyouts,
   New package, My packages, Keyboard Designer, Help). */
.shell-sections .sl-pane-tree__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface-accent);
  color: var(--sl-action-primary-bg);
  font-size: var(--sl-font-size-2xs);
  pointer-events: none;
}
.shell-sections .sl-pane-tree__icon i {
  display: inline-block;
  margin: 0;
  color: inherit;
  font-size: inherit;
}

/* New package / Settings / My packages: chevron first, children on a rule. */
.shell-sections .sl-pane-group--tree {
  flex: 0 0 auto;
  min-height: 0;
}
.shell-sections .sl-pane-group--tree.sl-pane-group--fill {
  flex: 1 1 auto;
  min-height: 0;
}
.shell-sections .sl-pane-group--tree .sl-pane-group__icon { display: none; }
.shell-sections .sl-pane-group--tree .sl-pane-group__chevron {
  order: -1;
  margin-left: 0;
  width: 12px;
  font-size: 0.625rem;
  color: var(--sl-text-secondary);
}
.shell-sections .sl-pane-group--tree .sl-pane-group__children {
  flex: none;
  overflow: visible;
  gap: 0;
  margin-left: 16px;
  border-left: 1px solid var(--sl-border-subtle);
}
.shell-sections .sl-pane-group--tree.sl-pane-group--fill > .sl-pane-group__children {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.shell-sections .sl-pane-group--tree .sl-pane-group--tree {
  width: 100%;
}
.shell-sections .sl-pane-group--tree .sl-pane-group--tree > .sl-pane-group__head {
  min-height: 32px;
  padding: 5px 10px;
}
/* SmartTE / SmartBrowser: pane rows are labels only (no action or package tiles). */
body.sl-package-page .shell-sections .sl-pane-tree__icon {
  display: none;
}
body.sl-package-page .shell-sections .sl-pane-group--tree:not(.sl-pane-group--fill) > .sl-pane-group__children .nav-icon {
  display: none;
}
body.sl-package-page .shell-sections .pkg-help-chip { display: none; }
/* Keyboard Designer: Get started and My Keyboards rows are labels only. */
#sl-keyboard-nav .sl-pane-tree__icon,
body.sl-has-shell:has(.sl-keyboard) .shell-sections .sl-pane-tree__icon {
  display: none;
}
/* Settings: Administration pane rows are labels only. */
.shell-sections__group[data-section-for="/Settings /ChangePassword"] .sl-pane-tree__icon,
.shell-sections__group[data-section-for="/Settings /ChangePassword"] .nav-icon {
  display: none;
}
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .sl-menu-btn,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > button,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .nav-link,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > a,
.shell-sections .sl-pane-group--tree .sl-pane-list .sl-pane-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 5px 10px 5px 10px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
  text-align: left;
  cursor: pointer;
}
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .sl-menu-btn:hover,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > button:hover,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .nav-link:hover,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > a:hover,
.shell-sections .sl-pane-group--tree .sl-pane-list .sl-pane-item:hover {
  background: none;
  color: var(--sl-text-primary);
}
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .sl-menu-btn:focus-visible,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > button:focus-visible,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .nav-link:focus-visible,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > a:focus-visible,
.shell-sections .sl-pane-group--tree .sl-pane-list .sl-pane-item:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -2px;
}
.shell-sections .sl-pane-group--tree .sl-pane-group__children label,
.shell-sections .sl-pane-group--tree .sl-pane-group__children .nav-label,
.shell-sections .sl-pane-group--tree .sl-pane-group__children span:where(.sl-label-text) {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: inherit;
  pointer-events: none;
}
.shell-sections .sl-pane-group--tree .sl-pane-item__meta,
.shell-sections .sl-pane-group--tree .sl-keyboard-nav__meta {
  margin-left: auto;
}
.shell-sections .sl-pane-group--tree .sl-pane-group__children > button:disabled {
  opacity: 0.45;
  cursor: default;
}
body.sl-adding-package .sl-pane-group--tree #addPackageRequest,
body.sl-add-package-open .sl-pane-group--tree #addPackageRequest,
body.sl-importing .sl-pane-group--tree #importPackageRequest,
.shell-sections .sl-pane-group--tree .sl-pane-group__children .sl-menu-btn.is-current,
.shell-sections .sl-pane-group--tree .sl-pane-group__children .sl-menu-btn.is-current:hover,
.shell-sections .sl-pane-group--tree .sl-pane-list .sl-pane-item.active,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .nav-link.active,
.shell-sections .sl-pane-group--tree .sl-pane-group__children > .sl-keyboard-nav__btn.active {
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
  box-shadow: inset 2px 0 0 var(--sl-border-accent);
}

/* Settings cards moved into the Administration pane. */
body.sl-has-shell .settings-details {
  display: none;
}

.shell-sections .sl-menu-btn,
.shell-sections .nav-link {
  display: flex;
  align-items: center;
  /* the component default is space-between (menu rows with a trailing
     chevron); pane rows have no chevron, so that pushed labels to the far
     edge, 68px from their icons */
  justify-content: flex-start;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  margin: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: 0.8125rem;
  font-weight: var(--sl-font-weight-regular);
  line-height: 1.35;
  color: var(--sl-text-primary);
  text-align: left;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
.shell-sections .nav-link::before,
.shell-sections .nav-link::after { content: none; display: none; }
.shell-sections .sl-menu-btn:hover,
.shell-sections .nav-link:hover { background: var(--sl-surface-sunken); }
.shell-sections .sl-menu-btn:focus-visible,
.shell-sections .nav-link:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -1px;
}
.shell-sections .sl-menu-btn.is-current,
.shell-sections .nav-link.active {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
}
.shell-sections .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--sl-text-secondary);
}
.shell-sections .sl-menu-btn.is-current .nav-icon { color: var(--sl-text-link); }

/* ---------------------------------------------------------------------------
   2. Top bar — keeps the SmartHub ink identity
   -------------------------------------------------------------------------- */
/* Light bar matching the nav pane surface; brand carried by the green S-mark.
   One row on tablet and desktop: identity | tool links | search/account.
   Phone stays one row (tools live in the tab bar). */
body.sl-has-shell > .shell-topbar {
  grid-area: topbar;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto;
  grid-template-areas: "identity tools app";
  align-items: center;
  column-gap: var(--sl-space-3);
  row-gap: 0;
  background: var(--sl-surface-raised);
  color: var(--sl-text-primary);
  border-bottom: 1px solid var(--sl-border-subtle);
  padding-inline: var(--sl-space-4);
  padding-block: var(--sl-space-2);
  position: sticky;
  top: 0;
  z-index: var(--sl-z-header);
  min-height: 0;
}

.shell-topbar .topbar-identity {
  grid-area: identity;
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-self: start;
  gap: var(--sl-space-3);
  padding-block: 0;
  padding-inline-end: 0;
  min-width: 0;
}

.shell-topbar .topbar-app {
  grid-area: app;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: var(--sl-space-3);
  min-width: 0;
  padding-block: 0;
  z-index: 2;
}

.shell-topbar .topbar-user:focus-visible,
.shell-topbar .topbar-settings:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

.shell-topbar .topbar-brand {
  display: flex;
  align-items: center;
  gap: var(--sl-space-3);
  text-decoration: none;
  color: var(--sl-text-primary);
  min-width: 0;
}
.shell-topbar .topbar-brand img,
.shell-topbar .topbar-brand__mark {
  height: var(--sl-brand-mark-h);
  width: auto;
  display: block;
  max-width: none;
  flex-shrink: 0;
}
.shell-topbar .topbar-brand__mark {
  aspect-ratio: 545.1 / 627.7;
  fill: var(--sl-brand-mark);
}
.shell-topbar .topbar-rule {
  flex: 0 0 auto;
  align-self: stretch;
  width: 0;
  margin-block: var(--sl-space-1);
  border-left: 1px solid var(--sl-border-subtle);
}
.shell-topbar .topbar-brand .topbar-brand__name {
  font-size: var(--sl-font-size-lg);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.shell-topbar .topbar-title {
  font-size: var(--sl-font-size-xl);
  font-weight: var(--sl-font-weight-light);
  color: var(--sl-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shell-topbar .topbar-title sup.beta-badge,
sup.beta-badge {
  font-size: 0.6em;
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-text-on-accent);
  background: var(--sl-action-primary-bg);
  padding: 1px 5px;
  border-radius: var(--sl-radius-sm);
  vertical-align: super;
  line-height: 1;
}

/* The primary navigation: plain text links, quiet hover, and a soft pill on
   the current tool. On narrow widths the row scrolls sideways (scrollbar
   hidden) instead of hiding — with the rail retired this is the only nav. */
.shell-topbar .topbar-links {
  grid-area: tools;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 2px;
  position: relative;
  left: auto;
  transform: none;
  margin-left: 0;
  max-width: none;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 1;
  border-top: 0;
  padding-block: 0;
}
.shell-topbar .topbar-links::-webkit-scrollbar { display: none; }
.shell-topbar .topbar-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--sl-control-height-sm);
  padding: 2px var(--sl-space-2);
  border-radius: 999px;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  color: var(--sl-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--sl-duration-fast) var(--sl-easing-standard),
              color var(--sl-duration-fast) var(--sl-easing-standard);
}
.shell-topbar .topbar-links a:hover {
  background: var(--sl-surface-sunken);
  color: var(--sl-text-primary);
}
.shell-topbar .topbar-links a.is-current {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
}
/* The Keyboard link's beta chip: a real chip in BOTH states, not bare text
   that only reads as a chip when the pill happens to sit behind it */
.shell-topbar .topbar-links sup.beta-badge {
  font-size: 0.55em;
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-text-on-accent);
  background: var(--sl-action-primary-bg);
  padding: 1px 5px;
  margin-left: 4px;
  border-radius: var(--sl-radius-sm);
  vertical-align: super;
  line-height: 1;
}
.shell-topbar .topbar-spacer { display: none; }

/* Conversational Help search in the top bar. Field on tablet/desktop;
   magnifying-glass control on the phone that opens a docked panel. */
.shell-topbar .topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 280px;
  min-width: 180px;
  max-width: 320px;
  z-index: 2;
}
.shell-topbar .topbar-search__open,
.shell-topbar .topbar-search__close { display: none; }
.shell-topbar .topbar-search__panel {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.shell-topbar .topbar-search__field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding-right: var(--sl-space-1);
  border: 1px solid var(--sl-border-field);
  border-radius: 999px;
  background: var(--sl-surface-sunken);
}
.shell-topbar .topbar-search__field:focus-within {
  border-color: var(--sl-selected-border);
  background: var(--sl-surface-raised);
  box-shadow: 0 0 0 3px var(--sl-selected-ring-soft);
}
.shell-topbar .topbar-search__field > .fa-magnifying-glass {
  flex: 0 0 auto;
  margin-inline: var(--sl-space-3) 0;
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-sm);
  pointer-events: none;
}
.shell-topbar .topbar-search__command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: var(--sl-space-1);
  margin-inline: var(--sl-space-1) 0;
  padding: var(--sl-space-1) var(--sl-space-2);
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: transparent;
  color: var(--sl-text-muted);
  min-width: 0;
  min-height: 0;
  height: auto;
  cursor: pointer;
  box-shadow: none;
}
.shell-topbar .topbar-search__command-kbd {
  display: inline-flex;
  align-items: center;
  gap: var(--sl-space-1);
  line-height: 1;
  white-space: nowrap;
}
.shell-topbar .topbar-search__command:hover {
  color: var(--sl-text-primary);
  background: var(--sl-surface-raised);
}
.shell-topbar .topbar-search__command:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.shell-topbar .topbar-search__command[aria-expanded="true"] {
  color: var(--sl-text-link);
  background: var(--sl-surface-accent);
}
.shell-topbar .topbar-search__field input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 0 var(--sl-space-2);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sl-text-field);
  font-family: inherit;
  font-size: var(--sl-font-size-sm);
  box-shadow: none;
}
.shell-topbar .topbar-search__field input::placeholder {
  color: var(--sl-text-muted);
}
.shell-topbar .topbar-search__field input:focus {
  outline: none;
}
.shell-topbar .topbar-search__field input[type="search"]::-webkit-search-decoration,
.shell-topbar .topbar-search__field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.shell-topbar .topbar-search__mic {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--sl-text-muted);
  cursor: pointer;
  box-shadow: none;
  pointer-events: auto;
  touch-action: manipulation;
}
.shell-topbar .topbar-search__mic > i {
  pointer-events: none;
}
.shell-topbar .topbar-search__mic:hover {
  background: var(--sl-border-subtle);
  color: var(--sl-text-primary);
}
.shell-topbar .topbar-search__mic:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: 2px;
}
.shell-topbar .topbar-search__mic.is-listening {
  color: var(--sl-action-primary-bg);
  background: var(--sl-surface-accent);
}
.shell-topbar .topbar-search__results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: max(100%, 360px);
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 6px;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-3);
  z-index: var(--sl-z-dropdown);
}
.shell-topbar .topbar-search__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shell-topbar .topbar-search__list [role="option"] {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--sl-radius-sm);
  cursor: pointer;
}
.shell-topbar .topbar-search__list [role="option"]:hover,
.shell-topbar .topbar-search__list [role="option"][aria-selected="true"] {
  background: var(--sl-surface-sunken);
}
.shell-topbar .topbar-search__kicker {
  font-size: var(--sl-font-size-2xs);
  color: var(--sl-text-muted);
}
.shell-topbar .topbar-search__title {
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-primary);
}
.shell-topbar .topbar-search__empty {
  margin: 0;
  padding: 10px;
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-secondary);
}
.shell-topbar .topbar-search__more {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 0;
  border-top: 1px solid var(--sl-border-subtle);
  background: none;
  color: var(--sl-text-link);
  font-family: inherit;
  font-size: var(--sl-font-size-sm);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.shell-topbar .topbar-search__more:hover { text-decoration: underline; }

.shell-topbar .topbar-user,
.shell-topbar .topbar-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sl-surface-sunken);
  border: 0;
  color: var(--sl-text-secondary);
  font-size: 0.9375rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.shell-topbar .topbar-user:hover,
.shell-topbar .topbar-settings:hover { background: var(--sl-border-subtle); color: var(--sl-text-primary); }
.shell-topbar .topbar-settings,
.shell-topbar .topbar-settings:visited {
  color: var(--sl-text-secondary);
  text-decoration: none;
  box-sizing: border-box;
  flex-shrink: 0;
}
.shell-topbar .topbar-settings:hover,
.shell-topbar .topbar-settings:focus,
.shell-topbar .topbar-settings:active {
  color: var(--sl-text-primary);
  text-decoration: none;
}
.shell-topbar .topbar-settings.is-current {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
}

/* Appearance control, sits left of Settings and the account icon */
.shell-topbar .topbar-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Filled circle at rest, so the control reads as a button, not a stray glyph */
  background: var(--sl-surface-sunken);
  border: 0;
  color: var(--sl-text-secondary);
  font-size: 0.9375rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.shell-topbar .topbar-theme:hover { background: var(--sl-border-subtle); color: var(--sl-text-primary); }
.shell-topbar .topbar-theme:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

/* Account dropdown — Figma menu rows in a raised panel */
.shell-user-menu {
  position: fixed;
  top: calc(var(--sl-header-height) + 6px);
  right: calc(var(--sl-app-gap, 0px) + var(--sl-space-4));
  width: 253px;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-3);
  padding: var(--sl-space-2h);
  z-index: var(--sl-z-dropdown);
  display: none;
}
.shell-user-menu.open { display: block; }
.shell-user-menu .sl-menu-btn { box-shadow: none; }

.shell-phone-tools { display: none; }
.shell-overflow-menu {
  display: none;
  box-sizing: border-box;
  min-width: 14rem;
  max-width: min(22rem, calc(100vw - var(--sl-space-8)));
  max-height: min(24rem, calc(100dvh - var(--sl-space-8) * 3));
  overflow: auto;
  padding: var(--sl-space-2);
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-3);
  z-index: var(--sl-z-dropdown);
}
.shell-overflow-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  position: fixed;
  top: var(--sl-menu-top);
  left: var(--sl-menu-left);
}
.shell-overflow-menu__item,
.shell-overflow-menu a.shell-overflow-menu__item,
.shell-overflow-menu button.shell-overflow-menu__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sl-space-2);
  width: 100%;
  height: auto;
  min-height: var(--sl-touch-min);
  margin: 0;
  padding: 0 var(--sl-space-3);
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: transparent;
  color: var(--sl-text-primary);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}
.shell-overflow-menu__item i {
  width: var(--sl-space-4);
  text-align: center;
  color: var(--sl-text-secondary);
}
@media (hover: hover) {
  .shell-overflow-menu__item:hover {
    background: var(--sl-surface-sunken);
  }
}
.shell-overflow-menu__item:focus-visible,
.shell-overflow-menu__item:active {
  background: var(--sl-surface-sunken);
}
.shell-overflow-menu__item:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: calc(-1 * var(--sl-focus-ring-offset));
}
.shell-overflow-menu__sep {
  height: 0;
  margin: var(--sl-space-1) 0;
  border: 0;
  border-top: 1px solid var(--sl-border-subtle);
}
.shell-overflow-menu__empty {
  margin: 0;
  padding: var(--sl-space-3);
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
}
.shell-overflow-scrim {
  display: none;
}
.shell-overflow-menu__title,
.shell-overflow-menu__cancel {
  display: none;
}
.shell-user-menu hr {
  border: 0;
  border-top: 1px solid var(--sl-border-subtle);
  margin: var(--sl-space-2) 0;
}

/* Collapse control: a small round button straddling the section pane's right
   edge at the top — half on the pane, half on the workspace, centred on the
   divider. Fixed-positioned so the pane's own overflow can't clip it; it
   tracks the live pane width through --sl-sections-w. */
.nav-collapse-toggle {
  position: fixed;
  top: calc(var(--sl-header-height) + 14px);
  left: calc(var(--sl-app-gap, 0px) + var(--sl-sections-w) - 11px);
  z-index: calc(var(--sl-z-header) + 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 0;                  /* pages style bare <button> with margins */
  padding: 0;
  gap: 0;
  background: var(--sl-action-primary-bg);   /* same blue as the beta chip */
  border: 2px solid var(--sl-surface-raised);
  border-radius: 50%;
  box-shadow: var(--sl-elevation-1);
  color: var(--sl-text-on-accent);
  font-size: 0.5625rem;
  line-height: 1;
  cursor: pointer;
  transition:
    left var(--sl-duration-base) var(--sl-easing-standard),
    right var(--sl-duration-base) var(--sl-easing-standard),
    background-color var(--sl-duration-fast) var(--sl-easing-standard);
}
.nav-collapse-toggle:hover { background: var(--sl-action-primary-bg-hover); }
.nav-collapse-toggle:active { background: var(--sl-action-primary-bg-active); }
.nav-collapse-toggle:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: 2px;
}
/* Clicking shouldn't leave a ring behind — keyboard focus still gets one above */
.nav-collapse-toggle:focus:not(:focus-visible) {
  outline: none;
}
.nav-collapse-toggle .nav-collapse-label { display: none; }

/* Right pane: same round chevron, mirrored onto the actions pane's left edge. */
.nav-actions-collapse {
  left: auto;
  right: calc(var(--sl-app-gap, 0px) + var(--sl-actions-w) - 11px);
}
body.sl-has-shell:not(.has-actions-pane) .nav-actions-collapse,
body.sl-has-shell:not(.has-actions-pane) .shell-actions-resizer { display: none; }

/* Drag handle sitting on the divider; widens its hit area beyond the hairline */
.shell-nav-resizer {  /* the section pane's drag handle */
  position: fixed;
  top: var(--sl-header-height);
  bottom: 0;
  left: calc(var(--sl-app-gap, 0px) + var(--sl-sections-w) - 3px);
  width: 6px;
  z-index: var(--sl-z-header);
  cursor: col-resize;
  background: transparent;
  border: 0;
  padding: 0;
  transition: background-color var(--sl-duration-fast) var(--sl-easing-standard);
}
.shell-nav-resizer:hover,
body.nav-resizing-sections .shell-sections-resizer,
body.nav-resizing-actions .shell-actions-resizer { background: var(--sl-border-accent); }
.shell-nav-resizer:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -1px;
}
/* While dragging: kill text selection and pointer noise across the page */
body.nav-resizing { cursor: col-resize; user-select: none; }
body.nav-resizing iframe { pointer-events: none; }
/* No resizing while collapsed — expand first */

/* ---- Section pane resize handle: sits on the pane's live right edge ----- */
.shell-sections-resizer {
  left: calc(var(--sl-app-gap, 0px) + var(--sl-sections-w) - 3px);
}
/* ---- Actions pane resize handle: sits on the pane's live left edge ------ */
.shell-actions-resizer {
  left: auto;
  right: calc(var(--sl-app-gap, 0px) + var(--sl-actions-w) - 3px);
}

/* Pane footer (serial + version) retired; account menu still has the serial. */
.shell-sections .nav-meta { display: none; }

/* ---------------------------------------------------------------------------
   4. Legacy container neutralisers — undo fixed header offsets and absolute
      centring now that the shell owns layout. Scoped to shell pages only.
   -------------------------------------------------------------------------- */
body.sl-has-shell > #main-container {
  margin-top: 0;                          /* was 68px under the fixed header */
}

body.sl-has-shell > .page-content {
  padding-top: 0;                         /* base layout carried a 68px inline pad */
}

/* Home (#main-frame was absolutely centred with a shadow-frame hack) */
body.sl-has-shell > #main-frame {
  position: static;
  transform: none;
  width: auto;
  max-width: 1046px;
  min-height: 0;
  margin: var(--sl-space-6) auto;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
  border-radius: var(--sl-radius-md);
  border: 1px solid var(--sl-border-subtle);
}

/* The old fixed .header is gone from shell pages; keep any stray spacing sane */
body.sl-has-shell { padding: 0; }

/* ---------------------------------------------------------------------------
   5. Phone (≤700) and tablet (701–900)
   Phone: hamburger, overlay drawer, tab bar.
   Tablet: persistent slim icon rail, no tab bar. Desktop (≥901) is unchanged.
   -------------------------------------------------------------------------- */
body.sl-has-shell .shell-topbar .topbar-nav,
body.sl-has-shell .shell-tabbar,
body.sl-has-shell .shell-nav-scrim { display: none; }

/* Compact workspace chrome shared by phone and tablet. */
@media (max-width: 900px) {
  body.sl-has-shell {
    --sl-content-gutter: 16px;
    --sl-control-height: var(--sl-touch-min, 44px);
    --sl-icon-button-size: var(--sl-touch-min, 44px);
    --sl-ws-title-row-h: 3.5rem;
  }
  body.sl-has-shell:has(.ws-chrome) {
    height: 100dvh;
    overflow: hidden;
  }
  body.sl-has-shell:has(.ws-chrome) > #main-container,
  body.sl-has-shell:has(.ws-chrome) > #main-frame,
  body.sl-has-shell:has(.ws-chrome) > .page-content,
  body.sl-has-shell:has(.ws-chrome) > main {
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
  body.sl-has-shell > .shell-topbar {
    padding-inline: 10px;
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    column-gap: var(--sl-space-3);
  }

  body.sl-has-shell > .shell-actions { display: none !important; }
  body.sl-has-shell .nav-collapse-toggle,
  body.sl-has-shell .shell-nav-resizer { display: none; }

  body.sl-has-shell > #main-container,
  body.sl-has-shell > #main-frame,
  body.sl-has-shell > .page-content,
  body.sl-has-shell > main {
    grid-area: main;
    min-width: 0;
    min-height: 0;
    padding-left: max(var(--sl-content-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--sl-content-gutter), env(safe-area-inset-right, 0px));
  }
  body.sl-has-shell:has(.ws-chrome) > #main-container,
  body.sl-has-shell:has(.ws-chrome) > #main-frame,
  body.sl-has-shell:has(.ws-chrome) > .page-content,
  body.sl-has-shell:has(.ws-chrome) > main {
    padding-left: 0;
    padding-right: 0;
  }

  body.sl-has-shell .ws-chrome {
    margin-left: 0;
    margin-right: 0;
    padding-left: max(var(--sl-content-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--sl-content-gutter), env(safe-area-inset-right, 0px));
  }
  body.sl-has-shell .ws-chrome__title-row {
    height: auto;
    min-height: 56px;
    padding: 12px 0;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  body.sl-has-shell .ws-chrome__title,
  body.sl-has-shell .ws-chrome #page-heading {
    font-size: var(--sl-font-size-lg);
    line-height: 22px;
  }
  body.sl-has-shell .ws-chrome__actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  body.sl-has-shell .ws-chrome__actions button {
    min-height: var(--sl-touch-min, 44px);
    height: var(--sl-touch-min, 44px);
    padding: 0 14px;
    font-size: 0.8125rem;
  }
  body.sl-has-shell .sl-btn,
  body.sl-has-shell .vi-btn {
    min-height: var(--sl-touch-min, 44px);
  }
  body.sl-has-shell .settings-panel .text-field,
  body.sl-has-shell .section-panel .text-field,
  body.sl-has-shell .settings-panel select.text-field,
  body.sl-has-shell .section-panel select.text-field {
    min-height: var(--sl-touch-min, 44px);
  }
  body.sl-has-shell .page-head {
    flex-wrap: wrap;
    gap: var(--sl-space-3);
    padding: var(--sl-space-4) 0 var(--sl-space-3);
  }
  body.sl-has-shell .page-head__title {
    font-size: var(--sl-font-size-xl);
  }
  body.sl-has-shell .page-head__actions {
    flex-wrap: wrap;
  }
  body.sl-has-shell .pkg-start {
    width: min(var(--sl-ws-start-max), calc(100% - 2 * var(--sl-content-gutter)));
    max-width: var(--sl-ws-start-max);
    max-height: calc(100% - 2 * var(--sl-space-4));
    margin: 0;
    padding: var(--sl-space-8) var(--sl-space-5) var(--sl-space-6);
  }
  body.sl-has-shell .pkg-start__icon {
    width: 56px;
    height: 56px;
    font-size: 1.375rem;
    margin-bottom: var(--sl-space-4);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--sl-surface-accent) 70%, transparent);
  }
  body.sl-has-shell .pkg-start__title {
    font-size: var(--sl-font-size-xl);
  }
  body.sl-has-shell .pkg-start__help,
  body.sl-has-shell .hub-start__help {
    width: var(--sl-touch-min, 44px);
    height: var(--sl-touch-min, 44px);
  }
  body.sl-has-shell .pkg-start__lead {
    margin-bottom: var(--sl-space-5);
  }
  body.sl-has-shell .pkg-start__card {
    min-height: 11rem;
    padding: var(--sl-space-4);
  }
  body.sl-has-shell .editor-identity {
    --band-pad-top: var(--sl-space-4);
    --band-gap-head-name: var(--sl-space-3);
  }
  body.sl-has-shell .settings-tabs .nav-link {
    min-height: var(--sl-touch-min, 44px);
  }
  body.sl-has-shell .settings-action-bar,
  body.sl-has-shell .nav-actions,
  body.sl-has-shell .nav-actions-right {
    gap: var(--sl-space-2);
  }
  body.sl-has-shell .settings-action-bar button,
  body.sl-has-shell .nav-actions button,
  body.sl-has-shell .nav-actions-right button {
    min-height: var(--sl-touch-min, 44px);
  }
  body.sl-has-shell table,
  body.sl-has-shell .list-table,
  body.sl-has-shell .file-operations-table {
    max-width: 100%;
  }
  body.sl-has-shell .sl-table-scroll,
  body.sl-has-shell .file-operations-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.sl-has-shell #addPackageModal {
    padding: var(--sl-space-3);
  }
  body.sl-has-shell #addPackageModal .package-modal-content {
    width: min(32rem, 100%);
    max-width: min(32rem, 100%);
    height: auto;
    max-height: calc(100dvh - var(--sl-space-6));
    padding: var(--sl-space-5);
  }
  body.sl-has-shell #addPackageModal .package-modal-head h1 {
    font-size: var(--sl-font-size-xl);
  }
  body.sl-has-shell #addPackageModal .btn-x-close {
    width: var(--sl-touch-min, 44px);
    height: var(--sl-touch-min, 44px);
  }
  body.sl-has-shell .editor-name-bar,
  body.sl-has-shell .ws-chrome__package-row {
    flex-wrap: wrap;
    row-gap: 8px;
    min-height: 0;
    height: auto;
    padding: 8px 0 12px;
  }
  body.sl-has-shell .ws-body {
    padding-top: var(--sl-space-3);
    padding-bottom: 24px;
    padding-left: max(var(--sl-content-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--sl-content-gutter), env(safe-area-inset-right, 0px));
  }

  .shell-user-menu {
    right: 8px;
    left: auto;
    width: min(22rem, calc(100vw - 16px));
  }
}

/* Tablet: slim rail, top tool links, no tab bar or hamburger.
   Short landscape (a phone on its side) stays in the phone band. */
@media (min-width: 701px) and (max-width: 900px) and (min-height: 501px) {
  body.sl-has-shell,
  body.sl-has-shell.sections-collapsed,
  body.sl-has-shell.has-actions-pane,
  body.sl-has-shell.has-actions-pane.sections-collapsed,
  body.sl-has-shell.has-actions-pane.actions-collapsed,
  body.sl-has-shell.has-actions-pane.sections-collapsed.actions-collapsed {
    grid-template-columns: var(--sl-sections-rail-w) minmax(0, 1fr);
    grid-template-rows: var(--sl-header-height) auto minmax(0, 1fr);
    grid-template-areas:
      "topbar   topbar"
      "config   config"
      "sections main";
    min-height: 100dvh;
  }
  body.sl-has-shell.config-pane-open,
  body.sl-has-shell.config-pane-open.has-actions-pane,
  body.sl-has-shell.config-pane-open.has-actions-pane.actions-collapsed {
    grid-template-columns: var(--sl-sections-rail-w) var(--sl-config-w) minmax(0, 1fr);
    grid-template-rows: var(--sl-header-height) minmax(0, 1fr);
    grid-template-areas:
      "topbar   topbar   topbar"
      "sections config   main";
  }
  body.sl-has-shell.hub-no-sections,
  body.sl-has-shell.hub-no-sections.sections-collapsed,
  body.sl-has-shell.hub-no-sections.has-actions-pane {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "topbar"
      "main";
  }
  body.sl-has-shell.hub-no-sections.config-pane-open,
  body.sl-has-shell.hub-no-sections.config-pane-open.has-actions-pane,
  body.sl-has-shell.hub-no-sections.config-pane-open.has-actions-pane.actions-collapsed {
    grid-template-columns: var(--sl-config-w) minmax(0, 1fr);
    grid-template-rows: var(--sl-header-height) minmax(0, 1fr);
    grid-template-areas:
      "topbar topbar"
      "config main";
  }
  body.sl-has-shell.hub-no-sections > .shell-sections,
  body.sl-has-shell.hub-no-sections:not(.config-pane-open) > .shell-sections-resizer {
    display: none !important;
  }
  body.sl-has-shell.hub-no-sections .nav-collapse-toggle:not(.nav-actions-collapse):not(.nav-kbd-attr-collapse) {
    display: none !important;
  }
  body.sl-has-shell.hub-no-sections.config-pane-open > .shell-sections-resizer {
    display: block;
    left: calc(var(--sl-app-gap, 0px) + var(--sl-config-w) - 3px);
  }
  body.sl-has-shell > .shell-sections,
  body.sl-has-shell.sections-collapsed > .shell-sections {
    align-items: center;
    gap: 16px;
    padding: var(--sl-space-3) 12px var(--sl-space-3);
    overflow: visible;
    z-index: var(--sl-z-dropdown);
  }
  .topbar-nav,
  .shell-tabbar,
  .shell-nav-scrim { display: none !important; }
  .shell-topbar .topbar-links {
    position: relative;
    left: auto;
    transform: none;
    max-width: none;
    min-width: 0;
    overflow-x: auto;
  }
  .shell-topbar .topbar-links a {
    padding: 2px var(--sl-space-2);
    font-size: 0.8125rem;
  }
  .shell-topbar .topbar-search {
    flex: 0 1 200px;
    min-width: 156px;
    max-width: 220px;
  }
  body.sl-has-shell #addPackageModal {
    left: var(--sl-sections-rail-w);
    width: auto;
  }
}

/* Phone: overlay drawer + tab bar. Landscape phones are often wider than
   700px; keep this band when the short side is still a phone. */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell {
    --sl-content-gutter: 12px;
    --sl-tabbar-h: calc(56px + env(safe-area-inset-bottom, 0px));
    --sl-header-height: 0px;
    --sl-header-height-phone: 0px;
    --sl-brand-mark-h: 1.75rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) var(--sl-tabbar-h);
    grid-template-areas:
      "config"
      "main"
      "tabbar";
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }
  body.sl-has-shell.sl-keyboard-page.sl-kbd-land-edit.sl-kbd-view-designer {
    --sl-tabbar-h: 0px;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "config"
      "main";
  }
  body.sl-has-shell.sl-keyboard-page.sl-kbd-land-edit.sl-kbd-view-designer .shell-tabbar {
    display: none !important;
  }
  body.sl-has-shell.config-pane-open,
  body.sl-has-shell.config-pane-open.has-actions-pane,
  body.sl-has-shell.config-pane-open.has-actions-pane.actions-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "config"
      "main"
      "tabbar";
  }

  body.sl-has-shell > .shell-config {
    grid-area: config;
    position: relative;
    top: auto;
    height: auto;
    max-height: 40vh;
    align-self: start;
    padding: 8px 12px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    border-right: 0;
    border-bottom: 1px solid var(--sl-border-subtle);
    overflow: hidden;
  }
  body.sl-has-shell > .shell-config .shell-config__title,
  body.sl-has-shell > .shell-config .shell-config__tree { display: none; }
  body.sl-has-shell > .shell-config .shell-config__source,
  body.sl-has-shell > .shell-config .shell-config__links,
  body.sl-has-shell > .shell-config .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.sl-has-shell > .shell-config .nav-links::-webkit-scrollbar { display: none; }
  body.sl-has-shell > .shell-config .nav-link {
    width: auto;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--sl-surface-sunken);
    white-space: nowrap;
    flex: none;
  }
  body.sl-has-shell > .shell-config .nav-link.active {
    background: var(--sl-surface-accent);
  }

  body.sl-has-shell > .shell-topbar {
    display: none;
  }
  body.sl-has-shell .shell-topbar .topbar-nav,
  body.sl-has-shell .shell-topbar .topbar-search__open,
  body.sl-has-shell .shell-topbar .topbar-command__toggle,
  body.sl-has-shell .shell-topbar .topbar-tts__btn,
  body.sl-has-shell .shell-topbar .topbar-theme,
  body.sl-has-shell .shell-topbar .topbar-bell,
  body.sl-has-shell .shell-topbar .topbar-settings,
  body.sl-has-shell .shell-topbar .topbar-settings:visited,
  body.sl-has-shell .shell-topbar .topbar-user {
    background: transparent;
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .shell-topbar .topbar-nav:hover,
  body.sl-has-shell .shell-topbar .topbar-nav:focus-visible,
  body.sl-nav-open .shell-topbar .topbar-nav,
  body.sl-has-shell .shell-topbar .topbar-search__open:hover,
  body.sl-has-shell .shell-topbar .topbar-search.is-open .topbar-search__open,
  body.sl-has-shell .shell-topbar .topbar-command__toggle:hover,
  body.sl-has-shell .shell-topbar .topbar-command__toggle[aria-expanded="true"],
  body.sl-has-shell .shell-topbar .topbar-tts__btn:hover,
  body.sl-has-shell .shell-topbar .topbar-tts__btn[aria-pressed="true"],
  body.sl-has-shell .shell-topbar .topbar-theme:hover,
  body.sl-has-shell .shell-topbar .topbar-bell:hover,
  body.sl-has-shell .shell-topbar .topbar-settings:hover,
  body.sl-has-shell .shell-topbar .topbar-settings:focus,
  body.sl-has-shell .shell-topbar .topbar-settings:active,
  body.sl-has-shell .shell-topbar .topbar-settings.is-current,
  body.sl-has-shell .shell-topbar .topbar-user:hover {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .shell-topbar .topbar-nav:focus-visible,
  body.sl-has-shell .shell-topbar .topbar-search__open:focus-visible,
  body.sl-has-shell .shell-topbar .topbar-command__toggle:focus-visible,
  body.sl-has-shell .shell-topbar .topbar-tts__btn:focus-visible,
  body.sl-has-shell .shell-topbar .topbar-theme:focus-visible,
  body.sl-has-shell .shell-topbar .topbar-bell:focus-visible,
  body.sl-has-shell .shell-topbar .topbar-settings:focus-visible,
  body.sl-has-shell .shell-topbar .topbar-user:focus-visible {
    outline-color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .shell-topbar .topbar-bell__dot {
    box-shadow: 0 0 0 2px var(--sl-action-primary-bg);
  }
  .shell-topbar .topbar-identity {
    border-right: 0;
    padding: 0;
    align-self: center;
  }
  .shell-topbar .topbar-brand__name,
  .shell-topbar .topbar-title,
  .shell-topbar .topbar-rule { display: none; }
  body.sl-has-shell .shell-topbar .topbar-brand__mark {
    fill: var(--sl-action-primary-fg);
  }
  .shell-topbar .topbar-app { display: contents; }
  .shell-topbar .topbar-search { margin-left: auto; }

  body.sl-has-shell .shell-topbar .topbar-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-md);
    background: none;
    color: var(--sl-action-primary-fg);
    font-size: var(--sl-font-size-lg);
    cursor: pointer;
    flex-shrink: 0;
  }
  .shell-topbar .topbar-nav:hover,
  .shell-topbar .topbar-nav:focus-visible,
  body.sl-nav-open .shell-topbar .topbar-nav {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
  }
  .shell-topbar .topbar-nav:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-action-primary-fg);
    outline-offset: 2px;
  }
  .shell-topbar .topbar-links { display: none; }

  .shell-topbar .topbar-search {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    margin-left: auto;
  }
  .shell-topbar .topbar-search__open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-md);
    background: none;
    color: var(--sl-action-primary-fg);
    font-size: var(--sl-font-size-md);
    cursor: pointer;
    box-shadow: none;
  }
  .shell-topbar .topbar-search__open:hover,
  .shell-topbar .topbar-search.is-open .topbar-search__open {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    color: var(--sl-action-primary-fg);
  }
  .shell-topbar .topbar-search__panel {
    display: none;
  }
  .shell-topbar .topbar-search.is-open .topbar-search__panel {
    display: block;
    position: fixed;
    top: var(--sl-header-height);
    left: 0;
    right: 0;
    width: auto;
    padding: 8px 12px 12px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    background: var(--sl-surface-raised);
    border-bottom: 1px solid var(--sl-border-subtle);
    z-index: var(--sl-z-dropdown);
  }
  .shell-topbar .topbar-search__field {
    min-height: 44px;
  }
  .shell-topbar .topbar-search__field input {
    height: 44px;
    font-size: var(--sl-font-size-md);
  }
  .shell-topbar .topbar-search__mic,
  .shell-topbar .topbar-search__close {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    pointer-events: auto;
    touch-action: manipulation;
  }
  .shell-topbar .topbar-search__mic {
    color: var(--sl-text-primary);
  }
  .shell-topbar .topbar-search__mic:hover,
  .shell-topbar .topbar-search__mic:active,
  .shell-topbar .topbar-search__mic.is-listening {
    background: none;
    box-shadow: none;
  }
  .shell-topbar .topbar-search__mic.is-listening {
    color: var(--sl-action-primary-bg);
  }
  .shell-topbar .topbar-search__mic > i {
    font-size: var(--sl-font-size-xl);
    line-height: 1;
  }
  .shell-topbar .topbar-search__results {
    position: relative;
    top: 8px;
    right: auto;
    width: auto;
    max-height: min(50vh, 360px);
    box-shadow: none;
  }

  .shell-topbar .topbar-tts__btn,
  .shell-topbar .topbar-theme,
  .shell-topbar .topbar-bell,
  .shell-topbar .topbar-settings,
  .shell-topbar .topbar-user {
    width: var(--sl-touch-min, 44px);
    height: var(--sl-touch-min, 44px);
  }
  .shell-topbar .topbar-search__command,
  .ws-chrome .topbar-search__command {
    display: none;
  }

  body.sl-has-shell .shell-tabbar {
    display: flex;
    grid-area: tabbar;
    align-items: stretch;
    justify-content: space-around;
    gap: 0;
    box-sizing: border-box;
    height: var(--sl-tabbar-h);
    flex-shrink: 0;
    padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
    background: var(--sl-surface-raised);
    border-top: 1px solid var(--sl-border-subtle);
    z-index: var(--sl-z-header);
  }
  .shell-tabbar a,
  .shell-tabbar button.shell-tabbar__notices,
  .shell-tabbar button.shell-tabbar__more {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 44px;
    padding: 4px 2px;
    border: 0;
    border-radius: var(--sl-radius-sm);
    background: none;
    color: var(--sl-text-muted);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.625rem;
    font-weight: var(--sl-font-weight-medium);
    line-height: 1.15;
    letter-spacing: 0;
    cursor: pointer;
  }
  .shell-tabbar a i,
  .shell-tabbar button.shell-tabbar__notices i,
  .shell-tabbar button.shell-tabbar__more i {
    font-size: var(--sl-font-size-lg);
    line-height: 1;
  }
  .shell-tabbar a span,
  .shell-tabbar button.shell-tabbar__notices span,
  .shell-tabbar button.shell-tabbar__more span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .shell-tabbar a.is-current,
  .shell-tabbar button.shell-tabbar__notices[aria-expanded="true"],
  .shell-tabbar button.shell-tabbar__more[aria-expanded="true"] {
    color: var(--sl-action-primary-bg);
    font-weight: var(--sl-font-weight-semibold);
  }
  .shell-tabbar a:focus-visible,
  .shell-tabbar button.shell-tabbar__notices:focus-visible,
  .shell-tabbar button.shell-tabbar__more:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
    outline-offset: -2px;
  }
  .shell-tabbar a.shell-tabbar__aux { display: none; }
  .shell-tabbar a.shell-tabbar__aux.is-current { display: flex; }

  body.sl-has-shell > .shell-sections {
    position: fixed;
    grid-area: main;
    top: var(--sl-phone-chrome-h, env(safe-area-inset-top, 0px));
    left: 0;
    bottom: var(--sl-tabbar-h);
    width: min(22rem, calc(100vw - 48px));
    height: auto;
    max-height: none;
    padding: var(--sl-space-3);
    padding-left: max(var(--sl-space-3), env(safe-area-inset-left, 0px));
    overflow: hidden;
    overflow-y: auto;
    background: var(--sl-surface-raised);
    border-right: 1px solid var(--sl-border-subtle);
    box-shadow: var(--sl-elevation-3);
    z-index: calc(var(--sl-z-overlay) + 1);
    transform: translateX(-105%);
    transition: transform var(--sl-duration-base) var(--sl-easing-standard, ease);
    pointer-events: none;
  }
  body.sl-nav-open > .shell-sections {
    transform: none;
    pointer-events: auto;
  }
  /* Drawer is a full labeled tree — never the slim collapsed rail. */
  body.sl-has-shell.sections-collapsed > .shell-sections {
    align-items: stretch;
    gap: var(--sl-space-1);
    padding: var(--sl-space-3);
    padding-left: max(var(--sl-space-3), env(safe-area-inset-left, 0px));
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group > .sl-pane-group__children {
    display: flex !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    margin: 0 0 0 12px !important;
    padding: 0 0 0 8px !important;
    overflow: visible !important;
    background: none !important;
    border: 0 !important;
    border-left: 1px solid var(--sl-border-subtle) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group.is-collapsed > .sl-pane-group__children {
    display: none !important;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .nav-label,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__title,
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__chevron {
    position: static !important;
    left: auto !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    overflow: visible !important;
    background: none !important;
    color: inherit !important;
    box-shadow: none !important;
    white-space: normal !important;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group__icon {
    display: none !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    box-shadow: none !important;
  }
  body.sl-has-shell.sections-collapsed .shell-sections .sl-pane-group--tree .sl-pane-group__chevron {
    display: inline-block !important;
  }
  body.sl-has-shell > .shell-sections .shell-sections__group.is-active,
  body.sl-has-shell > .shell-sections .sl-pane-group,
  body.sl-has-shell > .shell-sections .sl-pane-group__children {
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    width: 100%;
  }
  body.sl-has-shell > .shell-sections .sl-pane-group__children {
    margin-left: 12px;
    border-left: 1px solid var(--sl-border-subtle);
    padding-left: 8px;
  }
  body.sl-has-shell > .shell-sections .sl-menu-btn,
  body.sl-has-shell > .shell-sections .nav-link {
    width: 100%;
    min-height: 44px;
    white-space: normal;
  }
  .shell-nav-scrim {
    display: block;
    position: fixed;
    inset: var(--sl-header-height) 0 var(--sl-tabbar-h) 0;
    z-index: var(--sl-z-overlay);
    margin: 0;
    padding: 0;
    border: 0;
    background: color-mix(in srgb, var(--sl-text-primary) 32%, transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--sl-duration-base) var(--sl-easing-standard, ease);
  }
  body.sl-nav-open .shell-nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  body.sl-nav-open { overflow: hidden; }

  /* Drawer: Hub as a full-width row. The collapsed rail does not show it. */
  .shell-sections .hub-home-chip {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    margin-bottom: var(--sl-space-2);
  }
  .shell-sections .hub-home-chip .sl-menu-btn,
  body.sl-package-page .shell-sections .pkg-help-chip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--sl-space-2);
    width: 100%;
    min-height: 44px;
    padding: 6px 10px;
  }
  body.sl-package-page .shell-sections .pkg-help-chip { display: flex; }
  .shell-sections .hub-home-chip .nav-label,
  body.sl-package-page .shell-sections .pkg-help-chip .nav-label {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: none;
    color: inherit;
    box-shadow: none;
    padding: 0;
    font-size: inherit;
    font-weight: var(--sl-font-weight-medium);
  }

  body.sl-has-shell .pkg-start {
    width: min(var(--sl-ws-start-max), calc(100% - 2 * var(--sl-content-gutter)));
    max-height: none;
    margin: 0;
    padding: var(--sl-space-6) var(--sl-space-4) var(--sl-space-5);
    justify-content: flex-start;
  }
  /* Phone: New package already names the job. Hide the hero (icon, heading,
     lead) so only Add package and Import sit in the slot — no page scroll. */
  body.sl-has-shell .pkg-start:not(.lic-start) {
    position: relative;
    width: 100%;
    max-width: none;
    padding: var(--sl-space-3);
    overflow: hidden;
    max-height: none;
  }
  body.sl-has-shell .pkg-start:not(.lic-start) > .pkg-start__icon,
  body.sl-has-shell .pkg-start:not(.lic-start) > .pkg-start__lead {
    display: none;
  }
  body.sl-has-shell .pkg-start:not(.lic-start) > .pkg-start__title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  body.sl-has-shell .pkg-start:not(.lic-start) .pkg-start__cards {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sl-space-3);
  }
  body.sl-has-shell .pkg-start:not(.lic-start) .pkg-start__card-icon {
    display: none;
  }
  body.sl-has-shell .pkg-start:not(.lic-start) .pkg-start__card {
    gap: var(--sl-space-2);
    padding: var(--sl-space-4);
    min-height: 0;
  }
  body.sl-has-shell .pkg-start:not(.lic-start) .pkg-start__card-title,
  body.sl-has-shell .pkg-start:not(.lic-start) .vi-dropzone__lead {
    margin-top: 0;
    font-size: var(--sl-font-size-lg);
    font-weight: var(--sl-font-weight-semibold);
    color: var(--sl-text-primary);
  }
  body.sl-has-shell .pkg-start:not(.lic-start) .pkg-start__card-hint,
  body.sl-has-shell .pkg-start:not(.lic-start) .vi-dropzone__sub {
    font-size: var(--sl-font-size-sm);
    line-height: var(--sl-line-height-body);
    color: var(--sl-text-secondary);
  }
  body.sl-has-shell .ws-chrome__actions {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
  body.sl-has-shell .pkg-start__icon {
    width: 48px;
    height: 48px;
    font-size: var(--sl-font-size-xl);
    margin-bottom: var(--sl-space-3);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--sl-surface-accent) 70%, transparent);
  }
  body.sl-has-shell .pkg-start__title {
    font-size: var(--sl-font-size-lg);
  }
  body.sl-has-shell .pkg-start__help,
  body.sl-has-shell .hub-start__help {
    width: var(--sl-touch-min, 44px);
    height: var(--sl-touch-min, 44px);
  }
  body.sl-has-shell .pkg-start__lead {
    margin-bottom: var(--sl-space-4);
  }
  body.sl-has-shell .pkg-start__cards {
    grid-template-columns: 1fr;
  }
  body.sl-has-shell .pkg-start__card {
    min-height: 0;
  }
  body.sl-has-shell .editor-identity,
  body.sl-has-shell .editor-identity:not(:has(.page-head__title)) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "name"
      "tabs"
      "status"
      "lane";
  }
  body.sl-has-shell .page-head__actions {
    width: 100%;
  }
  body.sl-has-shell #addPackageModal {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  body.sl-has-shell #addPackageModal .package-modal-content {
    width: 100%;
    max-width: none;
    min-height: 100%;
    height: auto;
    max-height: none;
    border-radius: 0;
    padding: max(var(--sl-space-4), env(safe-area-inset-top, 0px))
             max(var(--sl-space-4), env(safe-area-inset-right, 0px))
             max(var(--sl-space-4), env(safe-area-inset-bottom, 0px))
             max(var(--sl-space-4), env(safe-area-inset-left, 0px));
  }
  body.sl-has-shell .section-panel .injection-frame.settings-panel {
    min-height: 0;
  }
  body.sl-has-shell #editor.injection-editor-surface,
  body.sl-has-shell .injection-editor-surface {
    min-height: 240px;
  }
  body.sl-has-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  body.sl-has-shell select,
  body.sl-has-shell textarea {
    font-size: var(--sl-font-size-input);
  }
}

@media (max-width: 640px) {
  .shell-tabbar a span,
  .shell-tabbar button.shell-tabbar__notices span { font-size: 0.5625rem; }
  body.sl-has-shell .ws-chrome__icon,
  body.sl-has-shell .ws-chrome .hub-start__icon {
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
    box-shadow: none;
  }
}

/* ---------------------------------------------------------------------------
   6. CONSISTENCY GUARD — the shell chrome must render identically on every
      page. Page stylesheets set the ROOT font-size (14px on some pages, 16px
      on others — which rescales every rem token) and style bare button/hr/a
      and even .fa-* compounds (style_licenses.css colours the pane's own
      Licensing icon). Two defences:

      a) Re-pin the size tokens to px INSIDE shell scope. Custom properties
         inherit, so every shell rule that uses var(--sl-space-*) or
         var(--sl-font-size-*) resolves to these fixed values regardless of
         what the page does to <html>.
      b) Explicit pins for the element-level properties pages set on generic
         selectors. sl-shell.css loads after page CSS, so equal specificity
         resolves in the shell's favour once the property is stated here.
   -------------------------------------------------------------------------- */
.shell-topbar,
.shell-sections,
.shell-config,
.shell-user-menu {
  --sl-font-size-2xs: 11px;
  --sl-font-size-xs: 12px;
  --sl-font-size-sm: 14px;
  --sl-font-size-md: 16px;
  --sl-font-size-input: 16px;
  --sl-font-size-lg: 18px;
  --sl-font-size-xl: 20px;
  --sl-font-size-2xl: 25px;
  --sl-space-1: 4px;
  --sl-space-2: 8px;
  --sl-space-2h: 10px;
  --sl-space-3: 12px;
  --sl-space-4: 16px;
  --sl-space-5: 20px;
  --sl-space-6: 24px;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  line-height: 1.4286;
}

/* Comfortable density (Accessible, Dyslexia, Low vision, Keyboard-first):
   follow the user font scale in the panes. The px re-pin above stops a
   page from shrinking chrome via html { font-size }; the kernel now owns
   that, and large type needs matching space in the left/config panes. */
html[data-density="comfortable"] .shell-sections,
html[data-density="comfortable"] .shell-config,
html[data-density="comfortable"] .shell-actions,
html[data-density="comfortable"] .shell-user-menu {
  --sl-font-size-2xs: 0.6875rem;
  --sl-font-size-xs: 0.75rem;
  --sl-font-size-sm: 0.875rem;
  --sl-font-size-md: 1rem;
  --sl-font-size-lg: 1.125rem;
  --sl-font-size-xl: 1.25rem;
  --sl-font-size-2xl: 1.5625rem;
  --sl-space-1: 0.25rem;
  --sl-space-2: 0.5rem;
  --sl-space-2h: 0.625rem;
  --sl-space-3: 0.75rem;
  --sl-space-4: 1rem;
  --sl-space-5: 1.25rem;
  --sl-space-6: 1.5rem;
}

/* Links: pages set colour/underline on bare a and its states */
.shell-topbar a, .shell-topbar a:visited, .shell-topbar a:hover, .shell-topbar a:focus, .shell-topbar a:active,
.shell-user-menu a, .shell-user-menu a:visited, .shell-user-menu a:hover, .shell-user-menu a:focus, .shell-user-menu a:active {
  text-decoration: none;
}
.shell-user-menu a.sl-menu-btn, .shell-user-menu a.sl-menu-btn:visited {
  color: var(--sl-text-primary);
}

/* Buttons: pages style bare <button> (display/height/padding/gap/radius…).
   The pane edge controls live outside the pane, so they're named explicitly. */
.shell-topbar button,
.shell-user-menu button,
.shell-sections button,
button.nav-collapse-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  height: auto;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--sl-font-family);
}
/* All three topbar icon buttons. box-shadow MUST be pinned here: page
   stylesheets set a drop shadow on bare `button` (style_licenses.css et al),
   which otherwise draws a chrome ring around these transparent controls. */
.shell-topbar .topbar-theme,
.shell-topbar .topbar-user,
.shell-topbar .topbar-settings,
.shell-topbar .topbar-tts__btn {
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  flex-shrink: 0;
}
.shell-topbar .topbar-search__open,
.shell-topbar .topbar-search__close,
.shell-topbar .topbar-search__mic,
.shell-topbar .topbar-search__more {
  box-shadow: none;
}
/* The appearance toggle keeps its own geometry: a 32px filled circle
   (defined in §2 above); this later group pin must not undo it. */
.shell-topbar .topbar-theme,
.shell-topbar .topbar-user,
.shell-topbar .topbar-settings {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sl-surface-sunken);
}
.shell-topbar .topbar-settings.is-current {
  background: var(--sl-surface-accent);
}
.shell-sections .nav-meta .copy-serial {
  width: auto;
  height: auto;
  padding: 2px 6px;
  gap: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: var(--sl-font-size-xs);
}

/* Menu rows: identical metrics everywhere, whatever the page's root size.
   Nav rows are deliberately slimmer than dropdown rows — the pane is a dense
   list, not a set of standalone controls. */
.shell-user-menu .sl-menu-btn {
  min-height: 40px;
  padding: 10px;
  margin: 0;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: 1.4286;
  letter-spacing: 0.1px;
  border: 0;
}
/* The collapse control must stay a true circle: the generic `height: auto`
   above (and page `button` rules) would otherwise stretch it into an oval. */
button.nav-collapse-toggle {
  width: 22px;
  height: 22px;
  min-height: 0;
  min-width: 0;
  padding: 0;
  gap: 0;
  margin: 0;
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
  font-size: 0.5625rem;
  line-height: 1;
}

/* Icons: pages size/colour .fa-* compounds (Licensing hits file-circle-check) */
.shell-user-menu .sl-menu-btn__chevron { font-size: var(--sl-font-size-xs); }
.shell-topbar .topbar-brand img,
.shell-topbar .topbar-brand__mark { height: var(--sl-brand-mark-h); }
.shell-topbar .topbar-brand .topbar-brand__name { font-size: var(--sl-font-size-lg); }
.shell-topbar .topbar-user i,
.shell-topbar .topbar-settings i { font-size: inherit; }

/* Pane footer */
.shell-sections .nav-meta { font-size: var(--sl-font-size-xs); }
.shell-topbar .topbar-title { font-size: var(--sl-font-size-xl); letter-spacing: 0; }

/* hr: pages restyle it (colour/margins) */
.shell-user-menu hr {
  height: 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--sl-border-subtle);
  margin: 8px 0;
}

/* ---------------------------------------------------------------------------
   7. FLAT PANELS — nav pane and workspace meet edge to edge, separated by
      hairlines rather than gaps and shadows. No gap ring, no card radius, no
      elevation: the chrome recedes and page content carries the structure.
      NOTE: this section follows the drawer media queries in source order, so
      the narrow block below re-asserts the drawer's overlay geometry.
   -------------------------------------------------------------------------- */
body.sl-has-shell {
  gap: 0;
  background: var(--sl-surface-page);
}

/* Workspace: flush, no card treatment. The surface is WHITE — it forms the
   page's identity band (breadcrumb + title); an inner working area, where a
   page has one, carries the tint. See sl-migrate.css §6 for the tinted band. */
body.sl-has-shell > #main-container,
body.sl-has-shell > #main-frame,
body.sl-has-shell > .page-content,
body.sl-has-shell > main {
  background: var(--sl-surface-raised);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (max-width: 900px) {
  body.sl-has-shell > #main-container,
  body.sl-has-shell > #main-frame,
  body.sl-has-shell > .page-content,
  body.sl-has-shell > main {
    margin: 0;
  }
}

/* Skip link */
.shell-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sl-surface-raised);
  color: var(--sl-text-link);
  padding: var(--sl-space-2) var(--sl-space-4);
  z-index: var(--sl-z-toast);
  border-radius: 0 0 var(--sl-radius-sm) 0;
}
.shell-skip-link:focus { left: 0; }

@media print {
  body.sl-has-shell > .shell-topbar { display: none; }
  body.sl-has-shell { display: block; }
}

/* ---------------------------------------------------------------------------
   8. WORKSPACE RHYTHM — one spacing contract for every page
   -----------------------------------------------------------------------------
   Page stylesheets each invented their own workspace geometry: Licensing padded
   40px, Seat/License Details padded nothing but forced 1620–2000px min-widths and
   centred their children, config pages relied on a :has() block, and layout-
   decorated pages (Keyboard Designer, SBP, error) used .page-content, which
   centres content and pads nothing at all. That is why the Keyboard Designer
   title sat at a different offset from Configuration and Licensing.

   The shell owns this now: identical gutters, identical top offset, identical
   breadcrumb → title → content rhythm, whichever container a page happens to use.
   -------------------------------------------------------------------------- */
body.sl-has-shell > #main-container,
body.sl-has-shell > #main-frame,
body.sl-has-shell > .page-content,
body.sl-has-shell > main {
  display: block;                 /* was flex+centre on some pages */
  box-sizing: border-box;
  width: 100%;
  min-width: 0;                   /* kills the 1620px / 2000px floors */
  max-width: none;
  margin-top: 0;                  /* kills leftover 68px fixed-header offsets */
  padding-inline: var(--sl-content-gutter);
  align-items: stretch;
}

/* Breadcrumb → title → content: the same vertical rhythm on every page */
body.sl-has-shell nav.breadcrumb,
body.sl-has-shell .breadcrumb {
  margin: 0 0 var(--sl-space-2);
  padding: 0;
}
body.sl-has-shell nav.breadcrumb ol,
body.sl-has-shell .breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.sl-has-shell #page-heading,
body.sl-has-shell .page-title {
  margin: 0 0 var(--sl-space-5);
  padding: 0;
  border: 0;
}

/* Layout-decorated pages (Keyboard Designer, SBP, error) inject their own
   bundle inside .page-content — align that bundle to the same left edge. */
body.sl-has-shell > .page-content > * {
  max-width: 100%;
}
body.sl-has-shell > .page-content > .ws-chrome,
body.sl-has-shell > .page-content > .ws-body {
  max-width: none;
}
body.sl-has-shell > .page-content .breadcrumb,
body.sl-has-shell > .page-content h1 {
  margin-left: 0;
  padding-left: 0;
}

/* Boot-time transition suppressor: lets a page apply its starting layout
   (e.g. the section-pane rail) without animating into it. */
body.sl-no-transition,
body.sl-no-transition * {
  transition: none !important;
}

/* ---------------------------------------------------------------------------
   9. SECTION PANE — two-level navigation
   -----------------------------------------------------------------------------
   Pages whose content divides into sections (package/config editors) used a
   horizontal tab strip, which forces the section list to compete with the page
   title for the top of the screen and truncates as sections are added.

   Those pages now use the desktop two-level pattern: the primary nav drops to
   its 60px icon rail, a section pane sits beside it listing the sections, and
   the workspace shows the selected one. Product-level and page-level navigation
   read as two distinct depths instead of two competing strips.

   No markup change: :has(.settings-body) detects these pages, and the existing
   showSection()/.nav-link.active contract is reused as-is.
   -------------------------------------------------------------------------- */
body.sl-has-shell .settings-body {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: var(--sl-space-6);
  align-items: start;
  width: 100%;
  min-width: 0;
}

/* The section pane */
body.sl-has-shell .settings-tabs {
  position: sticky;
  top: calc(var(--sl-header-height) + var(--sl-space-4));
  width: auto;
  min-width: 0;
  margin: 0;                       /* was `0 30px` */
  padding: var(--sl-space-2);
  align-self: start;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-sizing: border-box;
}
body.sl-has-shell .settings-tabs .nav-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1px;
  margin: 0;                       /* was a centring margin-left calc() */
  padding: 0;
}
body.sl-has-shell .settings-tabs .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  margin: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-regular);
  line-height: 1.35;
  color: var(--sl-text-primary);
  text-align: left;
  text-decoration: none;
  white-space: normal;             /* long section names wrap instead of truncating */
  cursor: pointer;
}
body.sl-has-shell .settings-tabs .nav-link .pkg-imported-dot {
  margin-left: 0;
  top: 0;
  flex-shrink: 0;
}
/* the old strip drew its state with an underline pseudo-element */
body.sl-has-shell .settings-tabs .nav-link::before,
body.sl-has-shell .settings-tabs .nav-link::after { content: none; display: none; }

body.sl-has-shell .settings-tabs .nav-link:hover { background: var(--sl-surface-sunken); }
body.sl-has-shell .settings-tabs .nav-link:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -1px;
}
body.sl-has-shell .settings-tabs .nav-link.active {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
}

/* Workspace side of the split */
body.sl-has-shell .settings-content {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Narrow: the section pane returns to a horizontal scrolling strip above the
   content — a 232px column plus content doesn't fit under ~1100px. */
@media (max-width: 1100px) {
  body.sl-has-shell .settings-body { grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); }
  body.sl-has-shell .settings-tabs { position: static; padding: var(--sl-space-1); }
  body.sl-has-shell .settings-tabs .nav-links {
    flex-direction: row;
    gap: 2px;
    overflow-x: auto;
  }
  body.sl-has-shell .settings-tabs .nav-link { white-space: nowrap; width: auto; }
}

/* ---------------------------------------------------------------------------
   10. PACKAGE PAGES — master/detail
   -----------------------------------------------------------------------------
   The package list moves into the section pane (New package, then My packages
   with search, then the packages themselves), leaving the workspace to show
   one package. Adding a package renders in the workspace rather than over it,
   so the form gets full width and the page keeps its context.
   -------------------------------------------------------------------------- */
.shell-sections .sl-pane-tools {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-2);
  /* inset Add / Import from the pane edges; My packages follows */
  padding: var(--sl-space-1) var(--sl-space-2h) var(--sl-space-3);
}
.shell-sections .sl-pane-tools .page-head__actions,
.shell-sections .sl-pane-tools .pkg-start__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-2);
  width: 100%;
}
.shell-sections .sl-pane-tools .page-head__actions button,
.shell-sections .sl-pane-tools .pkg-start__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 0 14px;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: 20px;
  order: 2;
}
.shell-sections .sl-pane-tools #addPackageRequest { order: 1; }
.shell-sections .sl-pane-tools #addPackageRequest {
  background: var(--sl-action-primary-bg);
  border-color: var(--sl-action-primary-bg);
}
.shell-sections .sl-pane-tools #addPackageRequest:hover {
  background: var(--sl-action-primary-bg-hover);
  border-color: var(--sl-action-primary-bg-hover);
}
.shell-sections .sl-pane-tools #addPackageRequest label,
.shell-sections .sl-pane-tools #addPackageRequest i,
.shell-sections .sl-pane-tools #addPackageRequest span:where(.sl-label-text) { color: var(--sl-text-on-accent); }
.shell-sections .sl-pane-tools button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Search below the list title, above the scrolling rows.
   Height is pinned so list and editor chrome line up. */
.shell-sections .sl-pane-group__search {
  margin: 2px var(--sl-space-2h) var(--sl-space-2);
  flex-shrink: 0;
  height: 34px;
  min-height: 34px;
  overflow: hidden;
}

/* Static list header (fixedOpen groups): a heading, not a control */
.shell-sections .sl-pane-group__head--static {
  cursor: default;
}
.shell-sections .sl-pane-group__head--static:hover {
  background: none;
}
/* the relocated search: full width of the pane */
.shell-sections .sl-pane-tools .search-container,
.shell-sections .sl-pane-group__search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
}
.shell-sections .sl-pane-tools .search-container input.search,
.shell-sections .sl-pane-group__search input.search {
  /* matches the Help pane's search field */
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 6px 36px 6px 30px;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-field);
  border-radius: 10px;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-field);
  box-sizing: border-box;
  box-shadow: none;
}
.shell-sections .sl-pane-tools .search-container input.search:focus,
.shell-sections .sl-pane-group__search input.search:focus {
  outline: none;
  border-color: var(--sl-selected-border);
}
.shell-sections .sl-pane-tools .search-container .fa-magnifying-glass,
.shell-sections .sl-pane-group__search .fa-magnifying-glass {
  position: absolute;
  left: 11px;
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-muted);
  pointer-events: none;
}
.shell-sections .sl-pane-group__search-mic,
.shell-sections .sl-pane-group__search button.sl-pane-group__search-mic {
  position: absolute;
  right: var(--sl-space-1);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: var(--sl-text-muted);
  cursor: pointer;
}
.shell-sections .sl-pane-group__search-mic:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.shell-sections .sl-pane-group__search-mic.is-listening {
  color: var(--sl-action-primary-bg);
  background: var(--sl-surface-accent);
}
/* the in-group search keeps its inset (the combined rule above zeroes margins) */
.shell-sections .sl-pane-group__search {
  width: auto;
  margin: 2px var(--sl-space-2h) var(--sl-space-2);
  flex-shrink: 0;
  height: 34px;
  min-height: 34px;
  overflow: hidden;
}

/* column-filter affordance has no place in a pane */
.shell-sections .sl-pane-tools .filter-column-btn,
.shell-sections .sl-pane-group__search .filter-column-btn,
.shell-sections .sl-pane-tools .filter-columns,
.shell-sections .sl-pane-group__search .filter-columns { display: none !important; }

.shell-sections .sl-pane-tools #addPackageRequest,
.shell-sections .sl-pane-tools .sl-pane-add {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  margin: 0;
  font-size: var(--sl-font-size-sm);
}
.shell-sections .sl-pane-tools .sl-pane-add i { margin-right: 6px; }
.shell-sections .sl-pane-tools button label,
.shell-sections .sl-pane-tools button span:where(.sl-label-text) {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: 20px;
  cursor: inherit;
}

.shell-sections .sl-pane-heading {
  display: block;
  margin: 0;
  padding: 0 0 var(--sl-space-1);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-text-muted);
}
.shell-sections .settings-pane-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  min-width: 0;
}
.shell-sections .settings-pane-block + .settings-pane-block {
  margin-top: var(--sl-space-3);
}
.shell-sections .settings-pane-block .sl-pane-heading {
  padding: var(--sl-space-2) 0 var(--sl-space-1);
}
.shell-sections .sl-pane-group .sl-pane-list { display: flex; flex-direction: column; gap: 1px; }
.shell-sections .sl-pane-item {
  justify-content: space-between;
  gap: var(--sl-space-2);
}
.shell-sections .sl-pane-item .nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-sections .sl-pane-item__name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.shell-sections .sl-pane-item .pkg-imported-dot {
  margin-left: 0;
  top: 0;
}
.shell-sections .sl-pane-item__meta {
  flex-shrink: 0;
  font-size: var(--sl-font-size-2xs);
  color: var(--sl-text-muted);
  font-variant-numeric: tabular-nums;
}
.shell-sections .sl-pane-empty {
  margin: var(--sl-space-2) var(--sl-space-2h);
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-muted);
}

/* The list lives in the pane now, so the whole table card goes. It stays in
   the DOM rather than being deleted: initPackagePane() and
   package-list-table.js's row-action registration both gate on #packageTable
   existing, and sbp-list-table.css pins this page's layout with
   :has(#packageTable) — which stops matching on removal but survives
   display:none. The relocated search/add nodes are moved out before this
   applies, so they are unaffected. */
body.sl-has-shell #content-container:has(#packageTable) .server-bg { display: none; }
body.sl-package-page #content-container { display: none; }

/* Add Package is a dialog overlay (Create package). File import lives in
   the Import modal, not a second tab here. */
body.sl-package-page #addPackageModal {
  z-index: var(--sl-z-modal);
}

/* While adding, keep the workspace visible behind the dialog. Import still
   hides editor body when the old drop-zone panel is used. */
body.sl-adding-package > #main-container { display: block; }
body.sl-importing .page-content.settings-layout .settings-body { display: none; }
/* Import: keep the name/tabs band, stop the form eating the workspace so
   the drop zone can sit in the remaining space instead of below the fold. */
body.sl-importing.sl-has-shell .page-content.settings-layout > form,
body.sl-importing.sl-has-shell .page-content.settings-layout > form#smart-te-config-details,
body.sl-importing.sl-has-shell .page-content.settings-layout > form#smart-browser-config-details {
  flex: 0 0 auto;
}

.shell-actions .shell-actions__section.is-disabled,
.shell-actions button:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.shell-actions button:disabled { cursor: default; }

/* --- Per-package actions in the pane ---------------------------------------
   The table's ellipsis menu was the only entry point for Download / Publish /
   Unpublish / Delete on this page, so those actions move here with the list.
   They call the same global handlers the table rows did. */
.shell-sections .sl-pane-row {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 1px;
}
.shell-sections .sl-pane-row > .sl-pane-item { flex: 1 1 auto; min-width: 0; }

.shell-sections .sl-pane-menu { position: relative; flex: 0 0 auto; display: flex; align-items: center; }
.shell-sections .sl-pane-menu__trigger {
  width: var(--sl-space-8);
  min-width: var(--sl-space-8);
  min-height: var(--sl-space-8);
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
  border-radius: var(--sl-radius-sm);
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shell-sections .sl-pane-menu__trigger:hover,
.shell-sections .sl-pane-menu.open .sl-pane-menu__trigger {
  background: var(--sl-surface-sunken);
  color: var(--sl-text-primary);
}
.shell-sections .sl-pane-menu__trigger:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

.sl-pane-menu__items {
  display: none;
}
.shell-sections .sl-pane-menu__items,
body.sl-has-shell > .sl-pane-menu__items {
  display: none;
  box-sizing: border-box;
  min-width: 14rem;
  max-width: min(22rem, calc(100vw - var(--sl-space-8)));
  padding: var(--sl-space-2);
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-3);
  z-index: var(--sl-z-dropdown);
}
body.sl-has-shell > .sl-pane-menu__items.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  position: fixed;
  top: var(--sl-menu-top);
  left: var(--sl-menu-left);
  grid-area: 1 / 1 / -1 / -1;
}
.sl-pane-menu__title,
.sl-pane-menu__cancel {
  display: none;
}
.shell-sections .sl-pane-menu__item,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: var(--sl-touch-min);
  padding: 0 var(--sl-space-3);
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
  border-radius: var(--sl-radius-sm);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-primary);
  text-align: start;
  cursor: pointer;
}
.shell-sections .sl-pane-menu__item i,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item i {
  width: var(--sl-space-4);
  text-align: center;
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-secondary);
}
.shell-sections .sl-pane-menu__item:hover,
.shell-sections .sl-pane-menu__item:focus-visible,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item:hover,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item:focus-visible {
  background: var(--sl-surface-sunken);
}
.shell-sections .sl-pane-menu__item:focus-visible,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: calc(-1 * var(--sl-focus-ring-offset));
}
.shell-sections .sl-pane-menu__item.is-danger,
.shell-sections .sl-pane-menu__item.is-danger i,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item.is-danger,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item.is-danger i {
  color: var(--sl-text-danger);
}
.shell-sections .sl-pane-menu__item.is-danger:hover,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__item.is-danger:hover {
  background: var(--sl-feedback-danger-bg);
}
.shell-sections .sl-pane-menu__sep,
body.sl-has-shell > .sl-pane-menu__items .sl-pane-menu__sep {
  height: 0;
  margin: var(--sl-space-1) 0;
  border: 0;
  border-top: 1px solid var(--sl-border-subtle);
}
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  html[data-sl-os="ios"] body.sl-has-shell > .sl-pane-menu__items.is-open.is-sheet {
    top: auto;
    right: 0;
    bottom: var(--sl-tabbar-h);
    left: 0;
    z-index: var(--sl-z-modal);
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0 0 var(--sl-space-4);
    gap: 0;
    border: 0;
    border-radius: var(--sl-radius-xl) var(--sl-radius-xl) 0 0;
    background: var(--sl-surface-sunken);
  }
  html[data-sl-os="ios"] body.sl-has-shell > .sl-pane-menu__items.is-open.is-sheet .sl-pane-menu__title {
    display: block;
    margin: 0;
    padding: var(--sl-space-3) var(--sl-space-4) var(--sl-space-2);
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-sm);
    font-weight: var(--sl-font-weight-semibold);
    color: var(--sl-text-secondary);
    text-align: center;
  }
  html[data-sl-os="ios"] body.sl-has-shell > .sl-pane-menu__items.is-open.is-sheet .sl-pane-menu__item {
    min-height: calc(var(--sl-touch-min) + var(--sl-space-2));
    padding: var(--sl-space-3) var(--sl-space-4);
    border-radius: 0;
    font-size: var(--sl-font-size-md);
  }
  html[data-sl-os="ios"] body.sl-has-shell > .sl-pane-menu__items.is-open.is-sheet .sl-pane-menu__item + .sl-pane-menu__item {
    border-top: 1px solid var(--sl-border-subtle);
  }
  html[data-sl-os="ios"] body.sl-has-shell > .sl-pane-menu__items.is-open.is-sheet .sl-pane-menu__sep {
    margin: 0;
  }
  html[data-sl-os="ios"] body.sl-has-shell > .sl-pane-menu__items.is-open.is-sheet .sl-pane-menu__cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - var(--sl-space-8));
    min-height: var(--sl-touch-min);
    margin: var(--sl-space-3) auto 0;
    padding: 0 var(--sl-space-3);
    border: 0;
    border-radius: var(--sl-radius-md);
    background: var(--sl-surface-raised);
    box-shadow: var(--sl-elevation-1);
    color: var(--sl-text-link);
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-md);
    font-weight: var(--sl-font-weight-semibold);
    cursor: pointer;
  }
}

/* published packages read slightly quieter — they are read-only by default */
.shell-sections .sl-pane-item.is-published .sl-pane-item__meta::after {
  content: "·published";
  margin-left: 4px;
  opacity: .75;
}

/* --- Workspace placeholder --------------------------------------------------
   With the list gone, the workspace holds a package, the add form, or this. */
.sl-workspace-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sl-space-2);
  min-height: 46vh;
  padding: var(--sl-space-8) var(--sl-space-4);
  text-align: center;
  color: var(--sl-text-muted);
}
.sl-workspace-empty__icon { font-size: 1.875rem; color: var(--sl-border-strong); margin-bottom: var(--sl-space-1); }
.sl-workspace-empty__title {
  margin: 0;
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
}
.sl-workspace-empty__hint { margin: 0; font-size: var(--sl-font-size-sm); max-width: 40ch; }

/* ---------------------------------------------------------------------------
   11. PACKAGE / CONFIG EDITOR — reconciling the legacy page with the shell
   -----------------------------------------------------------------------------
   This page predates the shell and assumed it owned the whole viewport under a
   68px fixed header. Inside the shell it lives in a grid cell that is already
   (100vh - 68px) tall and 292px narrower, so those assumptions clip content.

   It also has to unwind one of OUR earlier decisions: section 9 laid
   .settings-body out as "232px tabs | content". sl-shell.js now RELOCATES the
   tab list into the shell's section pane, which left .settings-content as the
   first grid child — rendering the whole form in the 232px tab column. That is
   the left-clipping. The body is a single column now.
   -------------------------------------------------------------------------- */

/* --- the tab column is gone; content takes the full workspace ------------- */
body.sl-has-shell .settings-body {
  display: block;              /* was: grid 232px | 1fr, pairing tabs + content */
  overflow: visible;           /* was: hidden — clipped the form */
  height: auto;
  min-height: 0;
}
body.sl-has-shell .settings-content {
  display: block;              /* was a flex column sized by a viewport-height chain */
  flex: none;
  width: auto;
  max-width: none;
  min-width: 0;
  height: auto;                /* the chain it measured against is gone; it collapsed to 0 */
  min-height: 0;
  margin: 0;                   /* was: 0 30px, doubling the workspace gutter */
  overflow: visible;
}
/* Panels were height:0 with overflow:hidden — content existed but was clipped
   away entirely (measured: 821px of content inside a 0px box). */
body.sl-has-shell .settings-content > .section-panel {
  width: auto;
  max-width: none;
  min-width: 0;
  height: auto;
  min-height: 0;
  overflow: visible;
}
body.sl-has-shell .settings-content > .section-panel > * { min-width: 0; }

/* --- release the viewport-height lock ------------------------------------- */
/* The page sets height/max-height:100vh on a container that already starts
   68px down, so it overflowed the viewport and hid the overflow. */
body.sl-has-shell .page-content.settings-layout {
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  padding-top: var(--sl-space-6);   /* was 68px: a stale fixed-header offset */
  background: transparent;          /* the workspace owns the surface now */
  align-items: stretch;
  width: 100%;
}
/* Its html/body :has() companions force overflow:hidden + height:100% on the
   grid container itself, which stopped the page scrolling at all. The editor
   now scrolls exactly like every other shell page: BODY is the scroller
   (viewport-bound height, y auto), html holds still. One scroller everywhere
   means one sticky model and one overscroll story. */
html:has(.page-content.settings-layout) {
  overflow: hidden;
  height: 100%;
}
body.sl-has-shell:has(.page-content.settings-layout) {
  overflow-x: hidden;
  overflow-y: auto;
  height: 100vh;
  height: 100dvh;
  background: var(--sl-surface-page);
}

/* --- the form itself ------------------------------------------------------ */
body.sl-has-shell .page-content.settings-layout form[method="post"] {
  display: block;
  flex: none;
  min-width: 0;
}

/* --- action bar: span the workspace, stick to the top while scrolling ----- */
body.sl-has-shell .settings-header {
  width: auto;
  max-width: none;
  margin: 0 0 var(--sl-space-4);
  padding: var(--sl-space-2h) var(--sl-space-3);
  border-radius: var(--sl-radius-md);
  position: sticky;
  top: calc(var(--sl-header-height) + var(--sl-space-2));
  z-index: 5;
}
body.sl-has-shell .settings-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sl-space-2);
  width: 100%;
}

/* --- the injection/Ace panel keeps its own scroll area -------------------- */
body.sl-has-shell .settings-content.settings-content-injection { overflow: visible; }
body.sl-has-shell .section-panel .injection-frame.settings-panel {
  height: auto;
  min-height: 420px;
}

/* --- Injection tab ---------------------------------------------------------
   Two problems, both caused by the workspace being ~292px narrower than the
   viewport now that the rail and section pane exist:

   1. `.injection-frame` is width: calc(100% - 80px) with auto margins — a
      second inset on top of the workspace gutter, costing 80px it can't spare.
   2. `.injection-workspace` is a two-column grid whose minimums add up to
      1060px (minmax(500px,49%) + minmax(560px,51%)), and it stacks via
      `@media (max-width: 1120px)`. That breakpoint measures the VIEWPORT, so
      at 1440px it never fires — while the actual container is 986px. Measured
      result: 1060px of columns in 986px of space, overflowing by 74px.

   The fix is to let the columns shrink and to stack on the CONTAINER's width
   rather than the window's, so the panel responds to the space it actually has.
   -------------------------------------------------------------------------- */
/* showSection() sets `display:flex` inline on the injection panel, so its
   descendants are flex items that shrink-wrap unless told to fill. And the
   page's centring margins are !important, so they need matching weight. */
body.sl-has-shell #section-injection {
  align-items: stretch;
}
body.sl-has-shell #section-injection > .general-background.injection-settings-bg {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
body.sl-has-shell .general-frame.injection-frame {
  width: 100%;                   /* NOT auto: it is a flex item and would collapse */
  max-width: none;
  margin-left: 0 !important;     /* page sets margin-left/right: auto !important */
  margin-right: 0 !important;
  margin-top: 0;
  margin-bottom: var(--sl-space-3);
  padding: 0;
  container-type: inline-size;   /* the columns below query THIS, not the window */
  overflow: visible;
}

body.sl-has-shell .injection-workspace {
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  grid-template-areas: "nav editor";
  height: auto;
  min-height: 0;
}
body.sl-has-shell .injection-navigation { grid-area: nav; }
body.sl-has-shell .injection-editor-panel { grid-area: editor; }

/* Stack when the panel itself is narrow — independent of window width. */
@container (max-width: 1040px) {
  body.sl-has-shell .injection-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Modules-first: show the hint before the long module list. */
  body.sl-has-shell .injection-workspace:not(.injection-advanced-open) {
    grid-template-areas:
      "editor"
      "nav";
  }
  body.sl-has-shell .injection-workspace.injection-advanced-open {
    grid-template-areas:
      "nav"
      "editor";
  }
  body.sl-has-shell .injection-navigation {
    border-right: 0;
    border-bottom: 1px solid var(--sl-border-subtle);
  }
  body.sl-has-shell .injection-workspace.injection-advanced-open .injection-navigation {
    max-height: min(36rem, 70vh);
    overflow-y: auto;
  }
}

/* Global `button { display:flex }` beats the hidden attribute. */
body.sl-has-shell .injection-workspace [hidden],
body.sl-has-shell .injection-json-modal [hidden],
body.sl-has-shell .injection-inline-modal [hidden] {
  display: none !important;
}

body.sl-has-shell .injection-module-card__actions button,
body.sl-has-shell .injection-modules-hint button {
  margin-left: 0;
}

/* Both panes must be allowed to shrink inside the grid, or their content
   re-imposes a minimum width and the overflow returns. */
body.sl-has-shell .injection-navigation,
body.sl-has-shell .injection-editor-panel {
  min-width: 0;
  max-width: none;
}

/* The panel scrolls internally. Removing its height floor collapses it to ~2px
   (it is a flex item in a container with no intrinsic height), so instead of
   unsetting the height we simply give it a taller, viewport-relative floor —
   verified working, where `min-height: 0` was not. */
body.sl-has-shell .section-panel .injection-frame.settings-panel {
  min-height: min(620px, calc(100vh - 260px));
}
/* After the Ace floor: modules-first does not need that empty slab. */
body.sl-has-shell .injection-workspace:not(.injection-advanced-open) .injection-editor-panel {
  min-height: 0;
  overflow: visible;
}
body.sl-has-shell #section-injection:has(.injection-workspace:not(.injection-advanced-open)) .injection-frame.settings-panel {
  min-height: 0;
}

/* The Ace host keeps an explicit height — the viewport-height chain it used to
   inherit from is gone. */
body.sl-has-shell #editor.injection-editor-surface,
body.sl-has-shell .injection-editor-surface {
  width: 100% !important;
  min-height: 360px;
  height: 100% !important;
}

/* ---------------------------------------------------------------------------
   12. EDITOR PANELS — ID-weight overrides
   -----------------------------------------------------------------------------
   Section 11 aims at `.settings-content > .section-panel`, which is (0,3,1).
   The page scopes these panels by id — `#section-injection.section-panel` is
   (1,1,0) — so every §11 declaration that collides with one LOSES. Measured
   consequence: #section-injection kept `overflow:hidden` + `flex:1 1 0` and
   clipped 173px of its own content (648px box, 821px content) even though the
   panel looked fine at a glance.

   These selectors carry id weight so they actually win.
   -------------------------------------------------------------------------- */
body.sl-has-shell #section-general.section-panel,
body.sl-has-shell #section-profiles.section-panel,
body.sl-has-shell #section-scanning.section-panel,
body.sl-has-shell #section-barcode-rules.section-panel,
body.sl-has-shell #section-injection.section-panel,
body.sl-has-shell #section-file-operations.section-panel,
body.sl-has-shell #section-device-criteria.section-panel {
  flex: none;            /* flex:1 1 0 sized against a 100vh chain that is gone */
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;     /* was hidden — hard-clipped, with no scrollbar to recover */
}

/* --- Centring made start-side overflow unreachable -------------------------
   `.general-background{justify-content:center}` around
   `.general-frame{width:fit-content; margin:30px auto; min-width:605px}` splits
   any overflow evenly across both edges — and overflow past the START edge of a
   scroll box cannot be scrolled back to (scrollLeft can't go negative), so it is
   permanently clipped. §11 only neutralised this for the injection frame; the
   other four tabs use the same pair. Left-aligned and fluid instead. */
body.sl-has-shell .settings-content .general-background {
  display: block;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}
body.sl-has-shell #section-general > .general-background,
body.sl-has-shell #section-profiles > .general-background,
body.sl-has-shell #section-file-operations > .general-background,
body.sl-has-shell #section-device-criteria > .general-background {
  justify-content: flex-start;   /* id weight: the page scopes some of these too */
}
body.sl-has-shell .settings-content .general-frame {
  width: 100%;
  min-width: 0;                  /* removes the 605px floor */
  max-width: 1500px;
  margin-inline: 0;
  flex: none;
  height: auto;
}

/* --- The three header bands must share one left edge -----------------------
   §11 fixed .settings-header's `margin: 0 30px`, but the file-header row above
   it has the same margin and was untouched — so the bands stepped in and out. */
body.sl-has-shell .metadata-header,
body.sl-has-shell .page-content.settings-layout > .metadata-header {
  width: auto;
  margin-inline: 0;
}

/* ---------------------------------------------------------------------------
   13. FLUID FORM FIELDS — retiring the 525px grid
   -----------------------------------------------------------------------------
   The editor was designed against a fixed 525px field column, and that number
   is hard-coded in three different ways:

     • `width: 525px`     — cannot shrink; overflows a narrowed workspace
     • `min-width: 525px` — same, and it also propagates a floor up the layout
     • `max-width: 525px` — harmless: a readable cap that still shrinks

   Only the first two are converted. The 525px CAP is kept as a max-width
   everywhere, because it is a real design decision: full-width text inputs on a
   1400px screen are unpleasant to read and to fill in. The goal is "at most
   525px", which is what was meant, rather than "exactly 525px", which is what
   was written.
   -------------------------------------------------------------------------- */

/* Inputs and textareas — the headline case */
body.sl-has-shell .text-field,
body.sl-has-shell .text-area {
  width: 100%;
  max-width: 525px;      /* keeps the intended measure */
  min-width: 0;
  box-sizing: border-box;
}

/* Config blocks: id-scoped in the page (1,1,0), so these carry id weight */
body.sl-has-shell #section-general .config-block,
body.sl-has-shell #section-general .config-block-proxy {
  width: 100%;
  max-width: 525px;
  min-width: 0;
}

/* The Ace host had a 525px floor, which forced the whole editor column wider
   than its container on narrow workspaces. */
body.sl-has-shell #editor.ace-editor-block,
body.sl-has-shell .ace-editor-block {
  min-width: 0;
  max-width: 100%;
}

/* Help/notice boxes carried a 525px floor while already being width:100%. */
body.sl-has-shell .help-box {
  min-width: 0;
  max-width: 100%;
}

/* Anything still declaring a fixed pixel width inside a form row should at
   least be allowed to shrink rather than push the row sideways. */
body.sl-has-shell .settings-content .form-row > input,
body.sl-has-shell .settings-content .form-row > select,
body.sl-has-shell .settings-content .form-row > textarea {
  max-width: 100%;
  min-width: 0;
}

/* Action-bar button rows wrap rather than pushing the page sideways. Not the
   525px issue — this surfaced while verifying it, at widths below the laptop
   range this tool targets — but wrapping is free and strictly better. */
body.sl-has-shell .nav-actions,
body.sl-has-shell .nav-actions-right,
body.sl-has-shell .settings-action-bar {
  flex-wrap: wrap;
  min-width: 0;
}
body.sl-has-shell #fadeModalContainer { max-width: 100%; }

/* ---------------------------------------------------------------------------
   14. ADVANCED FILE OPERATIONS — a grid whose minimums exceeded the workspace
   -----------------------------------------------------------------------------
   The file-operation rows are a five-column grid built from custom properties.
   Their MINIMUMS add up to more than the workspace has:

     action  minmax(0,145px)      →    0
     source  minmax(256px, 1fr)   →  256   <-- hard floor
     target  minmax(256px, 1fr)   →  256   <-- hard floor
     overwrite            216px   →  216   <-- fixed
     actions              330px   →  330   <-- fixed
     4 × 14px column-gap          →   56
                                   ------
                                    1114px  in a 988px wrapper → 127px overflow,
                                            which pushed the whole PAGE sideways.

   Because the columns come from variables, the grid can be reshaped by
   redefining them — no template change, and the intended proportions survive.
   Fixed widths become caps; the two path columns are allowed to shrink.
   -------------------------------------------------------------------------- */
body.sl-has-shell #section-file-operations .advanced-file-operations-page {
  /* (1,2,1) beats the page's (1,1,0) */
  --file-op-path-column: minmax(0, 1fr);      /* was minmax(256px, 1fr) */
  --file-op-overwrite-column: minmax(0, 216px);
  --file-op-actions-column: minmax(0, 330px);
  min-width: 0;                                /* the wrapper carried a 900px floor */
  width: 100%;
  max-width: 1500px;
  /* `width:100%` PLUS a 40px side margin puts the right edge 40px past the
     container. Section 12 zeroed this for `.general-frame`; this tab uses a
     different wrapper class and was missed. */
  margin-inline: 0;
  box-sizing: border-box;
}

/* Safety net: if the row genuinely cannot fit (very narrow pane, long labels),
   the TABLE scrolls — the page never does. */
body.sl-has-shell #section-file-operations .file-operations-table {
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
}
body.sl-has-shell #section-file-operations .file-operation-row,
body.sl-has-shell #section-file-operations .file-operations-header {
  min-width: 0;
  max-width: 100%;
}
/* Cells must be allowed to shrink or their content re-imposes the old floor. */
body.sl-has-shell #section-file-operations .file-operation-row > *,
body.sl-has-shell #section-file-operations .file-operations-header > * {
  min-width: 0;
}

/* Page CSS used Grey-100 / white fills. Those stay dark on a dark surface
   and beat `.settings-panel label`. Retoken the tab so titles and labels
   follow the theme. */
body.sl-has-shell #section-file-operations .advanced-file-operations-page {
  background-color: var(--sl-surface-raised);
  color: var(--sl-text-primary);
}
body.sl-has-shell #section-file-operations .advanced-file-operations-page .settings-title,
body.sl-has-shell #section-file-operations .package-information-section > label,
body.sl-has-shell #section-file-operations .targets-section > label,
body.sl-has-shell #section-file-operations .file-operations-section > label,
body.sl-has-shell #section-file-operations .package-information-section .toggle-wrapper,
body.sl-has-shell #section-file-operations .target-label,
body.sl-has-shell #section-file-operations .package-information-section > span:where(.sl-label-text),
body.sl-has-shell #section-file-operations .targets-section > span:where(.sl-label-text),
body.sl-has-shell #section-file-operations .file-operations-section > span:where(.sl-label-text) {
  color: var(--sl-text-primary);
}
body.sl-has-shell #section-file-operations .file-operations-header,
body.sl-has-shell #section-file-operations .targets-header,
body.sl-has-shell #section-file-operations .file-operation-empty-row,
body.sl-has-shell #section-file-operations .target-empty-row,
body.sl-has-shell #section-file-operations .file-operation-upload-info,
body.sl-has-shell #section-file-operations .file-operation-upload-size {
  color: var(--sl-text-secondary);
}
body.sl-has-shell #section-file-operations .package-information-section > .text-field,
body.sl-has-shell #section-file-operations .package-information-section > .text-area,
body.sl-has-shell #section-file-operations .package-information-section > select.text-field,
body.sl-has-shell #section-file-operations .targets-section .text-field,
body.sl-has-shell #section-file-operations .file-operations-section .text-field {
  color: var(--sl-text-field);
  background: var(--sl-surface-sunken);
  border-color: var(--sl-border-field);
}
body.sl-has-shell #section-file-operations .file-operation-field-label,
body.sl-has-shell #section-file-operations .target-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Residuals found while sweeping every tab at every pane width ----------
   Both only surface once the user widens the nav pane, which is exactly the
   case a window-based media query can never see. */

/* `.general-frame` carries 40px padding; without border-box its `width:100%`
   resolves to 100% PLUS the padding and pushes the page sideways. Seen on
   Device distribution at a 708px workspace (52px over). */
body.sl-has-shell .settings-content .general-frame,
body.sl-has-shell .settings-content .advanced-file-operations-page {
  box-sizing: border-box;
}

/* The injection profile <select> is the screen-reader twin of the custom
   dropdown. It is absolutely positioned and invisible, but still reports a
   width and can extend the scroll area. Clip it properly. */
body.sl-has-shell .injection-profile-native-select.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  max-width: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Device distribution: a 720px floor on the frame -----------------------
   `.general-frame.device-criteria-frame` carries `min-width: 720px` and a 40px
   side margin, both scoped tightly enough to defeat the class-level overrides
   in section 12 — the same id-specificity trap as the injection panel. The
   criteria table below it is a grid of fixed columns, so it also gets a scroll
   container rather than being allowed to push the page. */
body.sl-has-shell #section-device-criteria .general-frame,
body.sl-has-shell #section-device-criteria .device-criteria-frame {
  min-width: 0;
  width: 100%;
  max-width: 1500px;
  margin-inline: 0;
  box-sizing: border-box;
}
body.sl-has-shell #section-device-criteria .criteria-table {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;      /* the table scrolls; the page never does */
}
body.sl-has-shell #section-device-criteria .criteria-row,
body.sl-has-shell #section-device-criteria .criteria-header {
  min-width: 0;
}
body.sl-has-shell #section-device-criteria .criteria-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell #section-device-criteria.section-panel {
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.sl-has-shell #section-device-criteria > .general-background {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  body.sl-has-shell #section-device-criteria .general-frame,
  body.sl-has-shell #section-device-criteria .device-criteria-frame,
  body.sl-has-shell #section-device-criteria .general-frame.device-criteria-frame {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: var(--sl-space-4);
    padding-bottom: var(--sl-space-8);
  }
  body.sl-has-shell #section-device-criteria .criteria-table {
    overflow: visible;
  }
  body.sl-has-shell #section-device-criteria .criteria-header {
    display: none;
  }
  body.sl-has-shell #section-device-criteria .criteria-field-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 var(--sl-space-1);
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    display: block;
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-sm);
    font-weight: var(--sl-font-weight-medium);
    color: var(--sl-text-secondary);
  }
  body.sl-has-shell #section-device-criteria .criteria-row,
  body.sl-has-shell #section-device-criteria .criterion-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sl-space-3);
    padding: var(--sl-space-4);
    border: 1px solid var(--sl-border-subtle);
    border-radius: var(--sl-radius-md);
    background: var(--sl-surface-raised);
  }
  body.sl-has-shell #section-device-criteria .criterion-row .hidden {
    display: none;
  }
  body.sl-has-shell #section-device-criteria .criterion-insert-delete-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--sl-space-2);
    min-width: 0;
    padding-left: 0;
  }
  body.sl-has-shell #section-device-criteria .criterion-insert-delete-cell .primary-button,
  body.sl-has-shell #section-device-criteria .criterion-insert-delete-cell .btn-warning {
    flex: 1 1 auto;
    min-height: var(--sl-touch-min, 44px);
    height: auto;
    margin: 0;
  }
  body.sl-has-shell #section-device-criteria .add-button-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sl-space-3);
    margin-top: var(--sl-space-4);
  }
  body.sl-has-shell #section-device-criteria .add-button-wrapper .primary-button {
    width: 100%;
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
  }
  body.sl-has-shell #section-device-criteria .criteria-help-text {
    flex: none;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--sl-text-secondary);
    font-size: var(--sl-font-size-sm);
    line-height: var(--sl-line-height-body);
  }

  /* Advanced file operations: the desktop row is five columns with a
     max-content action group. On a phone that becomes a sideways table.
     Stack Package information and targets, then each operation as a card. */
  body.sl-has-shell #section-file-operations.section-panel {
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.sl-has-shell #section-file-operations > .general-background {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-page {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: var(--sl-space-4);
    padding-bottom: var(--sl-space-8);
    box-shadow: none;
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-top-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sl-space-6);
  }
  body.sl-has-shell #section-file-operations .package-information-section > .text-field,
  body.sl-has-shell #section-file-operations .package-information-section > .text-area,
  body.sl-has-shell #section-file-operations .package-information-section > select.text-field {
    width: 100%;
    max-width: none;
  }
  body.sl-has-shell #section-file-operations .file-operations-section {
    margin-top: var(--sl-space-6);
  }
  body.sl-has-shell #section-file-operations .file-operations-table,
  body.sl-has-shell #section-file-operations .targets-list {
    overflow: visible;
  }
  body.sl-has-shell #section-file-operations .file-operations-header,
  body.sl-has-shell #section-file-operations .targets-header {
    display: none;
  }
  body.sl-has-shell #section-file-operations .file-operation-field-label,
  body.sl-has-shell #section-file-operations .target-field-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 var(--sl-space-1);
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    display: block;
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-sm);
    font-weight: var(--sl-font-weight-medium);
    color: var(--sl-text-secondary);
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-row:not(.file-operations-header),
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .target-row:not(.targets-header) {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sl-space-3);
    padding: var(--sl-space-4);
    border: 1px solid var(--sl-border-subtle);
    border-radius: var(--sl-radius-md);
    background: var(--sl-surface-raised);
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-row:not(.file-operations-header) > .file-operation-field-label,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-row:not(.file-operations-header) > .text-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-row:not(.file-operations-header) > select.text-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-action-header,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-action-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-source-header,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-source-cell,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-target-header,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-target-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-overwrite-header,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-overwrite-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-actions-header,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-insert-delete-cell {
    grid-area: auto !important;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch !important;
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-source-cell.hidden {
    display: none;
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-insert-delete-cell,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page
  .file-operation-row:not(.file-operations-header) .file-operation-insert-delete-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: stretch;
    gap: var(--sl-space-2);
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-insert-delete-cell .primary-button,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-insert-delete-cell .btn-warning,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .target-row .delete-target-button {
    flex: 1 1 auto;
    min-height: var(--sl-touch-min, 44px);
    height: auto;
    margin: 0;
  }
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-row > .text-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-row > select.text-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .file-operation-source-cell > .text-field,
  body.sl-has-shell #section-file-operations .advanced-file-operations-page .target-row .text-field {
    min-height: var(--sl-touch-min, 44px);
    height: auto;
  }
  body.sl-has-shell #section-file-operations .add-button-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sl-space-3);
    margin-top: var(--sl-space-4);
  }
  body.sl-has-shell #section-file-operations .add-button-wrapper .primary-button {
    width: 100%;
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
  }
}

/* ---------------------------------------------------------------------------
   15. ADD PACKAGE — overlay dialog for Create package
   -----------------------------------------------------------------------------
   Add Package is a popup, matching Import. Create package is the form;
   file upload moved to Import in the left pane.
   addPackageModal() sets display:flex inline on #addPackageModal.
   -------------------------------------------------------------------------- */
body.sl-has-shell #addPackageModal {
  position: fixed;
  inset: 0;
  z-index: var(--sl-z-modal);
  width: auto;
  height: auto;
  margin: 0;
  padding: var(--sl-space-4);
  overflow: auto;
  background: color-mix(in srgb, var(--sl-surface-inverse) 45%, transparent);
  align-items: center;
  justify-content: center;
}
body.sl-has-shell #addPackageModal .package-modal-content {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--sl-space-4);
  width: min(32rem, 100%);
  max-width: min(32rem, 100%);
  height: auto;
  max-height: min(36rem, calc(100vh - var(--sl-header-height) - var(--sl-space-8)));
  margin: 0;
  padding: var(--sl-space-5);
  overflow: auto;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-lg);
  box-shadow: var(--sl-elevation-3);
  box-sizing: border-box;
  color: var(--sl-text-primary);
}
body.sl-has-shell #addPackageModal .package-modal-head {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  min-height: var(--sl-control-height-sm);
  margin: 0;
  padding: 0;
}
body.sl-has-shell #addPackageModal .package-modal-head h1 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-lg);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
  letter-spacing: normal;
  text-transform: none;
  color: var(--sl-text-primary);
}
body.sl-has-shell #addPackageModal .btn-x-close {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sl-control-height-sm);
  height: var(--sl-control-height-sm);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
  cursor: pointer;
}
body.sl-has-shell #addPackageModal .btn-x-close:hover {
  background: var(--sl-surface-sunken);
  color: var(--sl-text-primary);
}
body.sl-has-shell #addPackageModal .btn-x-close:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
body.sl-has-shell #addPackageModal > .package-modal-content > .p1,
body.sl-has-shell #addPackageModal #addPackageForm > .p1 {
  margin: 0;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-secondary);
}
body.sl-has-shell #addPackageModal .required-marker {
  color: var(--sl-feedback-danger-fg);
}
body.sl-has-shell #addPackageModal #addPackageForm {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-4);
  min-height: 0;
  height: auto;
}
body.sl-has-shell #addPackageModal .package-tabs,
body.sl-has-shell #addPackageModal .edit-seat-header {
  display: none;
}
body.sl-has-shell #addPackageModal .input-label {
  display: block;
  margin: 0 0 var(--sl-space-1);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-primary);
}
body.sl-has-shell #addPackageModal .standard-required input,
body.sl-has-shell #addPackageModal .standard-required textarea,
body.sl-has-shell #addPackageModal .standard-required select,
body.sl-has-shell #addPackageModal .input-container input,
body.sl-has-shell #addPackageModal .input-container textarea,
body.sl-has-shell #addPackageModal .input-container select,
body.sl-has-shell #addPackageModal #package-description {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  min-height: var(--sl-control-height);
  margin: 0;
  padding: var(--sl-space-2h) var(--sl-space-3);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
  color: var(--sl-text-field);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
}
body.sl-has-shell #addPackageModal .standard-required input:focus,
body.sl-has-shell #addPackageModal .standard-required input:focus-visible,
body.sl-has-shell #addPackageModal .standard-required textarea:focus,
body.sl-has-shell #addPackageModal .standard-required textarea:focus-visible,
body.sl-has-shell #addPackageModal .standard-required select:focus,
body.sl-has-shell #addPackageModal .standard-required select:focus-visible,
body.sl-has-shell #addPackageModal .input-container input:focus,
body.sl-has-shell #addPackageModal .input-container input:focus-visible,
body.sl-has-shell #addPackageModal .input-container textarea:focus,
body.sl-has-shell #addPackageModal .input-container textarea:focus-visible,
body.sl-has-shell #addPackageModal .input-container select:focus,
body.sl-has-shell #addPackageModal .input-container select:focus-visible,
body.sl-has-shell #addPackageModal #package-description:focus,
body.sl-has-shell #addPackageModal #package-description:focus-visible {
  background: var(--sl-surface-raised);
  border-color: var(--sl-selected-border);
  box-shadow: none;
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
body.sl-has-shell #addPackageModal select:disabled {
  background: var(--sl-surface-disabled);
  color: var(--sl-text-secondary);
  cursor: not-allowed;
}
body.sl-has-shell #addPackageModal .input-container,
body.sl-has-shell #addPackageModal .standard-required {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
}
body.sl-has-shell #addPackageModal input[type="text"],
body.sl-has-shell #addPackageModal select,
body.sl-has-shell #addPackageModal textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body.sl-has-shell #addPackageModal .error-icon {
  color: var(--sl-feedback-danger-fg);
}
body.sl-has-shell #addPackageModal .input-container textarea,
body.sl-has-shell #addPackageModal #package-description {
  min-height: 6rem;
  resize: vertical;
}
body.sl-has-shell #addPackageModal .button-row {
  position: static;
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--sl-space-2);
  margin: 0;
  padding-top: var(--sl-space-4);
  border-top: 1px solid var(--sl-border-subtle);
}
body.sl-has-shell #addPackageModal .package-head-actions {
  display: flex;
  gap: var(--sl-space-2);
  position: static;
  margin: 0;
}
body.sl-has-shell #addPackageModal .package-head-actions button {
  position: static;
  margin: 0;
}

/* --- Workspace identity band (STANDARD): every page's workspace opens with a
       .page-identity region holding the breadcrumb, the title, and whatever
       the page declares as top-line items. It is dedicated space: pinned
       below the top bar, sized to ~20% of the workspace height, closed by a
       divider; only the working area beneath it scrolls. Editor pages extend
       it with their own internal grid (.editor-identity). */
body.sl-has-shell .page-identity {
  position: sticky;
  top: var(--sl-header-height);
  z-index: var(--sl-z-sticky);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: calc((100vh - var(--sl-header-height)) * 0.2);
  min-height: calc((100dvh - var(--sl-header-height)) * 0.2);
  /* raised, not canvas: every workspace container paints itself with the
     raised surface, and a sticky band must match the surface it covers */
  background: var(--sl-surface-raised);
  padding-bottom: var(--sl-space-1);
  border-bottom: 1px solid var(--sl-border-subtle);
  margin-bottom: var(--sl-space-4);
}

/* Title row inside the band: page title on the left, the page's primary
   action (e.g. Add Package) on the right of the same row */
body.sl-has-shell .page-identity__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-4);
}
body.sl-has-shell .page-identity__title-row h1 { margin: 0; }
body.sl-has-shell .page-identity__actions {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  margin-inline-end: var(--sl-space-6);
}

/* ---------------------------------------------------------------------------
   Workspace chrome — one sticky header for every tool page
   -----------------------------------------------------------------------------
   Title on the left, page actions on the right, section tabs underneath.
   The tool title (SmartTE, SmartBrowser, Settings, …) stays on this first
   row. Package editors put the package name, Save/Download/Publish, and
   section tabs underneath so the top of the workspace does not jump.
   -------------------------------------------------------------------------- */
body.sl-has-shell {
  --sl-ws-title-row-h: 4.4375rem;
}
/* Lock the workspace to the viewport so the header never scrolls away.
   Page content lives in .ws-body, which fills the space below the header. */
body.sl-has-shell:has(.ws-chrome) {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}
body.sl-has-shell:has(.ws-chrome) > #main-container,
body.sl-has-shell:has(.ws-chrome) > #main-frame,
body.sl-has-shell:has(.ws-chrome) > .page-content,
body.sl-has-shell:has(.ws-chrome) > main {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  box-sizing: border-box;
  height: calc(100vh - var(--sl-header-height));
  height: calc(100dvh - var(--sl-header-height));
  max-height: calc(100dvh - var(--sl-header-height));
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  /* Gutter lives in .ws-chrome / .ws-body so the title band can paint
     edge to edge. Negative-margin bleed plus width:100% / max-width:100%
     left a gap on the right of every title row. */
  padding-inline: 0;
  /* Blue-grey page ground under the white title chrome — same surface
     package editors show (transparent .page-content over body). Settings
     and other #main-container tools were opaque raised white instead. */
  background: var(--sl-surface-page);
}

/* Phone: keep the top bar and tab bar on screen on every shelled page.
   The workspace cell scrolls. Later desktop/editor rules that size the
   workspace to 100dvh minus the header must not cover the tab bar. */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell,
  body.sl-has-shell:has(.ws-chrome),
  body.sl-has-shell:has(.page-content.settings-layout) {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  body.sl-has-shell > #main-container,
  body.sl-has-shell > #main-frame,
  body.sl-has-shell > .page-content,
  body.sl-has-shell > main,
  body.sl-has-shell:has(.ws-chrome) > #main-container,
  body.sl-has-shell:has(.ws-chrome) > #main-frame,
  body.sl-has-shell:has(.ws-chrome) > .page-content,
  body.sl-has-shell:has(.ws-chrome) > main,
  body.sl-has-shell .page-content.settings-layout {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: auto;
  }
  body.sl-has-shell:has(.ws-chrome) > #main-container,
  body.sl-has-shell:has(.ws-chrome) > #main-frame,
  body.sl-has-shell:has(.ws-chrome) > .page-content,
  body.sl-has-shell:has(.ws-chrome) > main {
    overflow: hidden;
  }
}

body.sl-has-shell .ws-chrome {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  align-self: stretch;
  z-index: var(--sl-z-sticky);
  box-sizing: border-box;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 var(--sl-content-gutter);
  background: var(--sl-surface-raised);
}
body.sl-has-shell .ws-chrome__title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-3);
  box-sizing: border-box;
  min-height: var(--sl-ws-title-row-h);
  height: auto;
  padding: var(--sl-space-5) 0;
  border-bottom: 0;
}
body.sl-has-shell .ws-chrome__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  color: var(--sl-text-secondary);
  text-decoration: none;
  cursor: pointer;
}
body.sl-has-shell .ws-chrome__back[hidden] {
  display: none !important;
}
body.sl-has-shell .ws-chrome__back i {
  font-size: var(--sl-font-size-sm);
}
body.sl-has-shell .ws-chrome__back:hover {
  background: var(--sl-surface-sunken);
  color: var(--sl-text-primary);
}
body.sl-has-shell .ws-chrome__back:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
/* Full-width seam under the tool title when a package bar or tabs follow.
   Pages with only a title (Hub, Help, start cards) keep the single line on
   .ws-body instead of stacking two borders. */
body.sl-has-shell .ws-chrome:has(.ws-chrome__package-row, .editor-name-bar, .ws-chrome__tab, .editor-tabs .nav-link) > .ws-chrome__title-row::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sl-content-gutter));
  right: calc(-1 * var(--sl-content-gutter));
  bottom: 0;
  border-bottom: 1px solid var(--sl-border-subtle);
}
body.sl-has-shell .ws-chrome__icon,
body.sl-has-shell .ws-chrome .hub-start__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  flex: none;
  background: var(--sl-surface-accent);
  border-radius: var(--sl-radius-md);
  font-size: 0.9375rem;
  color: var(--sl-action-primary-bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--sl-surface-accent) 70%, transparent);
}
body.sl-has-shell .ws-chrome__icon .sl-hub-mark,
body.sl-has-shell .shell-sections .sl-hub-mark {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
}
body.sl-has-shell .ws-chrome__title,
body.sl-has-shell .ws-chrome #page-heading {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xl);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.sl-has-shell .ws-chrome #page-heading span {
  color: inherit;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
body.sl-has-shell .ws-chrome__title-phone { display: none; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell .ws-chrome__title-full { display: none; }
  body.sl-has-shell .ws-chrome__title-phone { display: inline; }
}
body.sl-has-shell .ws-chrome__title-meta {
  font-weight: var(--sl-font-weight-regular);
  color: var(--sl-text-secondary);
}
body.sl-has-shell .ws-chrome__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}
body.sl-has-shell .ws-chrome__actions:empty { display: none; }
body.sl-has-shell .ws-chrome__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  min-height: 26px;
  height: 26px;
  margin: 0;
  padding: 0 10px;
  border-radius: var(--sl-radius-sm);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-medium);
  line-height: 16px;
  white-space: nowrap;
  box-shadow: none;
}
body.sl-has-shell .ws-chrome__actions button label,
body.sl-has-shell .ws-chrome__actions button span:where(.sl-label-text) {
  margin: 0;
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-medium);
  line-height: 16px;
}
body.sl-has-shell .ws-chrome__actions button i {
  font-size: var(--sl-font-size-xs);
}
body.sl-has-shell .ws-chrome__tabs,
body.sl-has-shell .ws-chrome .editor-tabs,
body.sl-has-shell .ws-chrome .editor-tabs .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  border: 0;
  border-bottom: 0;
  background: none;
  box-shadow: none;
  min-height: 0;
  overflow-x: auto;
}
body.sl-has-shell .ws-chrome__tabs,
body.sl-has-shell .ws-chrome .editor-tabs {
  padding: var(--sl-space-3) 0 var(--sl-space-2);
}
body.sl-has-shell .ws-chrome .editor-tabs .nav-links {
  padding: 0;
}
body.sl-has-shell .ws-chrome__tabs:empty {
  display: none;
}
body.sl-has-shell.has-config-pane .ws-chrome .editor-tabs,
body.sl-has-shell.has-config-pane .ws-chrome > .ws-chrome__tabs:not(.sl-pkg-section-switch) {
  display: none;
}
body.sl-has-shell .sl-pkg-section-switch { display: none; }
body.sl-has-shell .ws-chrome .nav-link::before,
body.sl-has-shell .ws-chrome .nav-link::after {
  content: none;
  display: none;
}
body.sl-has-shell .ws-chrome__tab,
body.sl-has-shell .ws-chrome .editor-tabs .nav-link,
body.sl-has-shell .ws-chrome .nav-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-medium);
  line-height: 20px;
  color: var(--sl-text-secondary);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
@media (hover: hover) {
  body.sl-has-shell .ws-chrome__tab:hover,
  body.sl-has-shell .ws-chrome .editor-tabs .nav-link:hover,
  body.sl-has-shell .ws-chrome .nav-link:hover {
    background: none;
    color: var(--sl-text-primary);
  }
}
body.sl-has-shell .ws-chrome__tab.active,
body.sl-has-shell .ws-chrome__tab.is-current,
body.sl-has-shell .ws-chrome__tab[aria-current="page"],
body.sl-has-shell .ws-chrome .editor-tabs .nav-link.active,
body.sl-has-shell .ws-chrome .nav-link.active {
  background: none;
  color: var(--sl-selected-fg);
  border-bottom-color: var(--sl-selected-border);
  font-weight: var(--sl-font-weight-semibold);
}
body.sl-has-shell:has(.ws-chrome) .breadcrumb,
body.sl-has-shell:has(.ws-chrome) .sub-heading,
body.sl-has-shell:has(.ws-chrome) .page-identity:not(.ws-chrome) {
  display: none;
}
body.sl-has-shell:has(.ws-chrome__tab) .inner-container > h2:not(.hub-card__title) { display: none; }
body.sl-has-shell:has(.ws-chrome) .rectangle-70 { display: none; }

body.sl-has-shell .ws-body {
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin-inline: 0;
  padding: var(--sl-space-4) var(--sl-content-gutter) 24px;
  border-top: 1px solid var(--sl-border-subtle);
  overscroll-behavior: contain;
}
body.sl-has-shell .ws-body > #content-container {
  height: auto;
  min-height: 0;
  max-height: none;
}

/* Package editors: name bar + section tabs sit in the same chrome as Settings. */
body.sl-has-shell .page-content.settings-layout > .ws-chrome {
  flex: 0 0 auto;
  align-self: stretch;
  width: auto;
  max-width: none;
  margin-top: 0;
  margin-bottom: 0;
}
body.sl-has-shell .page-content.settings-layout > .ws-body {
  display: flex;
  flex-direction: column;
  padding-top: var(--sl-space-3);
  overflow: hidden;
}
body.sl-has-shell .page-content.settings-layout > .ws-body > form,
body.sl-has-shell .page-content.settings-layout > .ws-body > form#smart-te-config-details,
body.sl-has-shell .page-content.settings-layout > .ws-body > form#smart-browser-config-details {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
body.sl-has-shell .ws-chrome .editor-name-bar,
body.sl-has-shell .ws-chrome__package-row,
body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .ws-chrome .editor-name-bar {
  flex: 0 0 auto;
  align-self: stretch;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-3);
  width: auto;
  max-width: none;
  min-height: 40px;
  height: auto;
  margin: 0;
  padding: 10px 0;
  background: transparent;
  border: 0;
  position: relative;
}
body.sl-has-shell .ws-chrome .editor-name-bar::after,
body.sl-has-shell .ws-chrome__package-row::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sl-content-gutter));
  right: calc(-1 * var(--sl-content-gutter));
  bottom: 0;
  border-bottom: 1px solid var(--sl-border-subtle);
}
body.sl-has-shell .ws-chrome .editor-name-bar .metadata-label-block,
body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .ws-chrome .editor-name-bar .metadata-label-block {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0;
  gap: var(--sl-space-2);
}
body.sl-has-shell .ws-chrome .editor-name-bar .metadata-label-title {
  display: none;
}
body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status,
body.sl-has-shell .ws-chrome .editor-name-bar #package-status {
  display: inline-flex;
  align-items: center;
  flex: none;
  order: 1;
  margin: 0;
  padding: 3px 10px;
  border: 1px solid var(--sl-action-secondary-border, var(--sl-border-accent-soft));
  border-radius: var(--sl-radius-pill);
  background: var(--sl-action-secondary-bg, var(--sl-surface-accent));
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-2xs);
  font-weight: var(--sl-font-weight-semibold);
  line-height: 1.2;
  color: var(--sl-action-secondary-fg, var(--sl-text-link));
  white-space: nowrap;
}
body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="published"] {
  background: var(--sl-feedback-success-bg);
  border-color: transparent;
  color: var(--sl-feedback-success-fg);
}
body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="imported"],
body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="uploaded"] {
  background: var(--sl-feedback-info-bg);
  border-color: var(--sl-border-accent-soft);
  color: var(--sl-text-link);
}
body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="draft"],
body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="new"] {
  background: var(--sl-surface-sunken);
  border-color: var(--sl-border-subtle);
  color: var(--sl-text-secondary);
}

/* Color-blind: do not rely on hue alone. Icons + left border, and
   primary text on the tint for contrast (same idea as hub badges). */
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="published"],
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="uploaded"],
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="imported"] {
  gap: var(--sl-space-2);
  color: var(--sl-text-primary);
  border-left-width: 4px;
  border-left-style: solid;
}
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="published"] {
  border-left-color: var(--sl-feedback-success-fg);
  border-color: var(--sl-feedback-success-fg);
  border-left-width: 4px;
}
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="uploaded"],
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="imported"] {
  border-left-color: var(--sl-feedback-info-fg);
  border-color: var(--sl-border-subtle);
  border-left-width: 4px;
  border-left-style: dashed;
}
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="published"]::before,
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="uploaded"]::before,
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="imported"]::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: var(--sl-font-size-2xs);
  line-height: 1;
  flex: none;
}
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="published"]::before {
  content: "\f00c";
  color: var(--sl-feedback-success-fg);
}
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="uploaded"]::before,
html[data-color="cb"] body.sl-has-shell .ws-chrome .editor-name-bar .ws-pkg-status[data-status="imported"]::before {
  content: "\f05a";
  color: var(--sl-feedback-info-fg);
}

body.sl-has-shell .ws-chrome .editor-name-bar .metadata-column:has(#package-status) .metadata-label-2,
body.sl-has-shell .ws-chrome .editor-name-bar .metadata-label-block .metadata-label-2 {
  display: none;
}
body.sl-has-shell .ws-chrome .editor-name-bar .metadata-customer,
body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .ws-chrome .editor-name-bar .metadata-customer {
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xl);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.sl-has-shell:has(.ws-chrome .editor-tabs) .editor-identity {
  display: none;
}

/* ---------------------------------------------------------------------------
   16. DARK MODE — legacy surfaces that cannot theme themselves
   -----------------------------------------------------------------------------
   Found by simulating the create-and-configure flow in dark mode. These
   surfaces are hardcoded literals in page CSS (not tokens), so they stay light
   while the text on them correctly turns light — producing white-on-white.

   This is a sample, not a cure: ~126 distinct hardcoded light background
   colours remain across 27 page stylesheets. The real fix is migrating those
   to tokens; these three are patched because they sit in the main flow.
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] .profile-card,
:root:not([data-theme="light"]) .profile-card,
:root[data-theme="dark"] .option,
:root:not([data-theme="light"]) .option,
:root[data-theme="dark"] .drop-zone,
:root:not([data-theme="light"]) .drop-zone {
  background-color: var(--sl-surface-sunken);
}
:root[data-theme="dark"] .drop-zone,
:root:not([data-theme="light"]) .drop-zone {
  border-color: var(--sl-border-strong);
}

/* Licensing product cards: `.product-card-body` is #F2F7EE (a pale green) in
   four stylesheets. It is the landing page after sign-in, and in dark mode the
   themed light text landed on it unreadably. */
:root[data-theme="dark"] .product-card-body,
:root:not([data-theme="light"]) .product-card-body {
  background: var(--sl-surface-sunken);
}
:root[data-theme="dark"] .product-card,
:root:not([data-theme="light"]) .product-card {
  background: var(--sl-surface-raised);
  border-color: var(--sl-border-accent-soft);
}

/* Licensing product cards — same hairline and lift as start / hub cards.
   The page sheets still ship SLDS hex; this wins after sl-shell loads. */
body.sl-has-shell .product-card {
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-raised);
  box-shadow: var(--sl-elevation-start);
}
body.sl-has-shell .product-card:hover {
  border-color: var(--sl-border-accent);
  background: var(--sl-surface-raised);
  box-shadow: var(--sl-elevation-start);
}

/* Form controls hardcode `background-color: var(--sl-surface-raised) !important`, so fields stay
   var(--sl-surface-raised) in dark mode. Readable (dark text on var(--sl-surface-raised)) but jarring; matching
   weight is required to move them. */
:root[data-theme="dark"] .text-field,
:root:not([data-theme="light"]) .text-field,
:root[data-theme="dark"] .text-area,
:root:not([data-theme="light"]) .text-area {
  background-color: var(--sl-surface-raised);
  color: var(--sl-text-field);
  border-color: var(--sl-border-field);
}

/* ---------------------------------------------------------------------------
   18. Manage-account modal — the account dataset is small, so it presents as
       a dialog over the current page instead of claiming the section pane and
       workspace. Markup in ShellFragment; behaviour in sl-shell.js.
   -------------------------------------------------------------------------- */
body.sl-has-shell > .shell-modal-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--sl-z-overlay);
  background: rgba(15, 20, 28, 0.45);
}
body.sl-has-shell > .shell-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--sl-z-modal);
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px 22px 22px;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-lg);
  box-shadow: var(--sl-elevation-3);
  color: var(--sl-text-primary);
}
body.sl-has-shell > .shell-modal[hidden],
body.sl-has-shell > .shell-modal-scrim[hidden] { display: none; }

body.sl-has-shell > .shell-modal--welcome {
  width: min(28rem, calc(100vw - var(--sl-space-8)));
  padding: var(--sl-space-6) var(--sl-space-6) var(--sl-space-5);
}
.shell-welcome__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto var(--sl-space-5);
}
.shell-welcome__hello {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  max-width: calc(100% - var(--sl-space-4));
  margin: 0 0 var(--sl-space-4);
  padding: var(--sl-space-2) var(--sl-space-3);
  background: var(--sl-surface-accent);
  border: 1px solid var(--sl-border-accent);
  border-radius: var(--sl-radius-lg);
  box-shadow: var(--sl-elevation-1);
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
  text-align: center;
}
.shell-welcome__hello::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--sl-space-1));
  width: var(--sl-space-2);
  height: var(--sl-space-2);
  background: var(--sl-surface-accent);
  border-right: 1px solid var(--sl-border-accent);
  border-bottom: 1px solid var(--sl-border-accent);
  transform: translateX(-50%) rotate(45deg);
}
.shell-welcome__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--sl-space-16) + var(--sl-space-8));
  height: calc(var(--sl-space-16) + var(--sl-space-8));
  margin: 0;
  border-radius: var(--sl-radius-pill);
  background: var(--sl-surface-accent);
  color: var(--sl-action-primary-bg);
}
.shell-welcome__hero .sl-link-mark {
  width: var(--sl-space-16);
  height: var(--sl-space-16);
}
.shell-modal--welcome .shell-modal__title {
  text-align: center;
}
.shell-welcome__lead,
.shell-welcome__link {
  margin: var(--sl-space-3) 0 0;
  font-size: var(--sl-font-size-sm);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-secondary);
}
.shell-welcome__skip {
  display: inline-flex;
  align-items: center;
  gap: var(--sl-space-2);
  margin: 0;
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-secondary);
  cursor: pointer;
}
.shell-welcome__skip input {
  width: var(--sl-space-4);
  height: var(--sl-space-4);
  margin: 0;
  accent-color: var(--sl-action-primary-bg);
}
.shell-welcome__skip:focus-within {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
  border-radius: var(--sl-radius-sm);
}

.shell-modal .shell-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-2);
  margin-bottom: 4px;
}
.shell-modal .shell-modal__title {
  margin: 0;
  font-size: var(--sl-font-size-lg);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: normal;
  text-transform: none;
  color: var(--sl-text-primary);
}
.shell-modal .shell-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  color: var(--sl-text-secondary);
  font-size: 0.9375rem;
  cursor: pointer;
}
.shell-modal .shell-modal__close:hover { background: var(--sl-surface-sunken); color: var(--sl-text-primary); }
.shell-modal .shell-modal__meta {
  margin: 0 0 16px;
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-muted);
}
.shell-modal .shell-modal__field {
  display: block;
  margin-bottom: 14px;
}
.shell-modal .shell-modal__field > span {
  display: block;
  margin-bottom: 6px;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-primary);
}
.shell-modal .shell-modal__field .sl-input { width: 100%; }
.shell-modal .shell-modal__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--sl-feedback-danger-bg);
  border: 1px solid var(--sl-palette-red-50);
  border-radius: var(--sl-radius-sm);
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-primary);
}
.shell-modal .shell-modal__success {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--sl-feedback-success-bg, #EAF7EA);
  border: 1px solid var(--sl-palette-green-mark);
  border-radius: var(--sl-radius-sm);
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-primary);
}
.shell-modal .shell-modal__error[hidden],
.shell-modal .shell-modal__success[hidden] { display: none; }
.shell-modal .shell-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sl-space-2);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--sl-border-subtle);
}
.shell-modal.shell-modal--welcome .shell-welcome__actions {
  justify-content: space-between;
  align-items: center;
  gap: var(--sl-space-3);
  flex-wrap: wrap;
}

body.sl-has-shell > .shell-modal--confirm {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--sl-radius-md);
  box-shadow: 0 24px 64px rgba(8, 15, 30, 0.28);
  z-index: calc(var(--sl-z-modal) + 20);
}
body.sl-has-shell > #sl-confirm-scrim {
  background: rgba(15, 23, 32, 0.55);
  z-index: calc(var(--sl-z-modal) + 19);
}
.shell-modal--confirm .shell-modal__body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 18px;
}
.shell-modal--confirm .shell-modal__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sl-feedback-danger-bg);
  color: var(--sl-text-danger);
  font-size: var(--sl-font-size-lg);
}
.shell-modal--confirm.is-info .shell-modal__icon {
  background: var(--sl-feedback-info-bg, #E8F2FB);
  color: var(--sl-text-link);
}
.shell-modal--confirm .shell-modal__copy {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 2px;
}
.shell-modal--confirm .shell-modal__title {
  margin: 0 0 6px;
  font-size: 1.03125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.shell-modal--confirm .shell-modal__message {
  margin: 0;
  font-size: 0.84375rem;
  line-height: 1.55;
  color: var(--sl-text-secondary);
}
.shell-modal--confirm .shell-modal__emphasis {
  font-weight: 700;
  color: var(--sl-text-primary);
}
.shell-modal--confirm .shell-modal__note {
  margin-top: 10px;
  color: var(--sl-text-secondary);
}
.shell-modal--confirm .shell-modal__note[hidden] { display: none; }
.shell-modal--confirm .shell-modal__note-title {
  font-size: 0.8125rem;
  font-weight: var(--sl-font-weight-semibold);
  line-height: 1.4;
  color: var(--sl-text-primary);
}
.shell-modal--confirm .shell-modal__note-body {
  margin-top: 2px;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.shell-modal--confirm .shell-modal__actions--confirm {
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 20px;
  background: var(--sl-surface-sunken, #F6F8FB);
}
.shell-modal--confirm .shell-modal__btn-cancel,
.shell-modal--confirm .shell-modal__btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--sl-radius-md);
  font-family: var(--sl-font-family);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.shell-modal--confirm .shell-modal__btn-cancel {
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  color: var(--sl-text-primary);
  box-shadow: none;
}
.shell-modal--confirm .shell-modal__btn-cancel:hover {
  background: var(--sl-surface-sunken);
}
.shell-modal--confirm .shell-modal__btn-danger {
  background: var(--sl-feedback-danger-solid);
  border: 1px solid transparent;
  color: var(--sl-text-on-accent);
  box-shadow: 0 1px 2px rgba(8, 15, 30, 0.2);
}
.shell-modal--confirm .shell-modal__btn-danger:hover {
  filter: brightness(0.95);
}
.shell-modal--confirm .shell-modal__btn-danger:focus-visible,
.shell-modal--confirm .shell-modal__btn-cancel:focus-visible,
.shell-modal--confirm .sl-btn:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: 2px;
}

body.sl-has-shell > .shell-modal--import {
  display: flex;
  flex-direction: column;
  width: min(48rem, calc(100vw - 48px));
  height: min(36rem, calc(100vh - 64px));
  max-height: calc(100vh - 48px);
  padding: var(--sl-space-10) var(--sl-space-8) var(--sl-space-6);
  overflow: hidden;
  border: 1px solid var(--sl-border-accent-soft);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--sl-action-primary-bg) 14%, transparent);
}
.shell-modal--import .shell-modal__title {
  font-size: var(--sl-font-size-2xl);
  letter-spacing: -0.02em;
}
.shell-modal--import .shell-modal__meta {
  max-width: 46ch;
  margin: 0 0 var(--sl-space-4);
  font-size: var(--sl-font-size-sm);
  line-height: 1.5;
  color: var(--sl-text-secondary);
}
.shell-modal--import .shell-modal__actions {
  flex: none;
  margin-top: var(--sl-space-4);
}
.sl-import-drop {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sl-space-2);
  width: 100%;
  min-height: 13rem;
  margin: 0;
  padding: var(--sl-space-8) var(--sl-space-5);
  box-sizing: border-box;
  border: 1px dashed var(--sl-border-accent);
  border-radius: var(--sl-radius-md);
  background: var(--sl-action-secondary-bg);
  color: var(--sl-text-primary);
  text-align: center;
}
.sl-import-drop.is-dragover {
  border-style: solid;
  border-color: var(--sl-action-primary-bg);
  background: var(--sl-feedback-info-bg);
}
.sl-import-drop.is-busy { opacity: 0.65; pointer-events: none; }
.sl-import-drop__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-accent);
  color: var(--sl-action-primary-bg);
  font-size: var(--sl-font-size-lg);
}
.sl-import-drop__title {
  margin: var(--sl-space-3) 0 0;
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
.sl-import-drop__sub {
  margin: 0;
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-secondary);
}
.sl-import-drop__choose {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sl-space-4);
  align-self: center;
  border-radius: 999px;
  padding-inline: 18px;
}
.sl-import-title--phone,
.sl-import-lead--phone,
.sl-import-choose--phone { display: none; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .sl-import-title--desk,
  .sl-import-lead--desk,
  .sl-import-choose--desk,
  .sl-import-drop__icon,
  .sl-import-drop__title,
  .sl-import-drop__sub { display: none; }
  .sl-import-title--phone,
  .sl-import-lead--phone,
  .sl-import-choose--phone { display: inline; }
  .sl-import-lead--phone { display: block; }
  .sl-import-drop {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
  }
  .sl-import-drop__choose {
    width: 100%;
    min-height: var(--sl-touch-min, 44px);
    margin-top: 0;
    justify-content: center;
  }
}

/* Phone list pages: New package / My packages under the title. */
body.sl-has-shell .sl-pkg-view-switch { display: none; }
.pkg-mine { display: none; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell.sl-package-page .sl-pkg-view-switch,
  body.sl-has-shell.sl-package-page .sl-pkg-view-switch[hidden] {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--sl-space-1);
    padding-block: var(--sl-space-2);
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.sl-package-page .sl-pkg-view-switch::-webkit-scrollbar { display: none; }
  body.sl-package-page .sl-pkg-view-switch .ws-chrome__tab {
    flex: 1 1 0;
    justify-content: center;
    min-height: var(--sl-touch-min, 44px);
    padding-inline: var(--sl-space-2);
    font-size: var(--sl-font-size-sm);
  }
  body.sl-package-page.sl-pkg-view-mine .ws-body:has(> .pkg-start:not(.lic-start)) {
    align-items: stretch;
    justify-content: flex-start;
  }
  body.sl-package-page.sl-pkg-view-mine .pkg-start { display: none !important; }
  body.sl-package-page.sl-pkg-view-mine .pkg-mine[hidden],
  body.sl-package-page.sl-pkg-view-mine .pkg-mine {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: auto;
    padding: var(--sl-space-3);
    box-sizing: border-box;
  }
  body.sl-package-page.sl-pkg-list-adopted [data-pane-key="packages"] { display: none; }
  .pkg-mine .sl-pane-group__search,
  .pkg-mine .search-container.sl-pane-group__search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
    min-height: var(--sl-touch-min, 44px);
    margin: 0 0 var(--sl-space-3);
    overflow: visible;
    padding-right: var(--sl-space-1);
    border: 1px solid var(--sl-border-field);
    border-radius: var(--sl-radius-pill);
    background: var(--sl-surface-sunken);
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }
  .pkg-mine .sl-pane-group__search:focus-within {
    border-color: var(--sl-border-field);
    background: var(--sl-surface-sunken);
  }
  .pkg-mine .sl-pane-group__search > .fa-magnifying-glass {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    flex: 0 0 auto;
    margin-inline: var(--sl-space-3);
    color: var(--sl-text-secondary);
    font-size: var(--sl-font-size-md);
    pointer-events: none;
  }
  .pkg-mine .sl-pane-group__search input.search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: var(--sl-touch-min, 44px);
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
    padding: 0 var(--sl-space-2) 0 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--sl-text-primary);
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-md);
    -webkit-appearance: none;
    appearance: none;
  }
  .pkg-mine .sl-pane-group__search input.search:focus,
  .pkg-mine .search-container input:focus,
  .pkg-mine .search-container input.search:focus {
    outline: none;
    border: 0;
    box-shadow: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
  }
  .pkg-mine .sl-pane-group__search input[type="search"]::-webkit-search-decoration,
  .pkg-mine .sl-pane-group__search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
  }
  .pkg-mine .sl-pane-group__search-mic,
  .pkg-mine .sl-pane-group__search button.sl-pane-group__search-mic {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: var(--sl-touch-min, 44px);
    height: auto;
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--sl-text-secondary);
    cursor: pointer;
  }
  .pkg-mine .sl-pane-group__search-mic:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
    outline-offset: calc(-1 * var(--sl-focus-ring-offset));
  }
  .pkg-mine .sl-pane-group__search-mic.is-listening {
    color: var(--sl-action-primary-bg);
  }
  .pkg-mine #sl-package-list,
  .pkg-mine .sl-pane-list {
    display: flex;
    flex-direction: column;
    gap: var(--sl-space-3);
    flex: 1 1 auto;
  }
  .pkg-mine .sl-pane-more-arrow { display: none; }
  .pkg-mine .sl-pane-row {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
    width: 100%;
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
    padding: var(--sl-space-3);
    border: 1px solid var(--sl-border-subtle);
    border-radius: var(--sl-radius-md);
    background: var(--sl-surface-raised);
    box-shadow: var(--sl-elevation-1);
    box-sizing: border-box;
  }
  .pkg-mine .sl-pane-item,
  .pkg-mine .sl-menu-btn {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--sl-space-1);
    min-width: 0;
    width: auto;
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--sl-text-primary);
    font-family: inherit;
    font-size: var(--sl-font-size-md);
    font-weight: var(--sl-font-weight-medium);
    text-align: left;
    text-decoration: none;
    box-sizing: border-box;
  }
  .pkg-mine .sl-pane-item__name {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2);
    min-width: 0;
    width: 100%;
  }
  .pkg-mine .sl-pane-item__name .nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pkg-mine .sl-pane-item__meta {
    font-size: var(--sl-font-size-xs);
    font-weight: var(--sl-font-weight-regular);
    color: var(--sl-text-secondary);
  }
  .pkg-mine .sl-pane-menu {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }
  .pkg-mine .sl-pane-menu__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sl-touch-min, 44px);
    min-width: var(--sl-touch-min, 44px);
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-md);
    background: none;
    box-shadow: none;
    color: var(--sl-text-secondary);
    font-size: var(--sl-font-size-md);
    cursor: pointer;
  }
  .pkg-mine .sl-pane-menu__trigger:hover,
  .pkg-mine .sl-pane-menu.open .sl-pane-menu__trigger {
    background: var(--sl-surface-sunken);
    color: var(--sl-text-primary);
  }
  .pkg-mine .sl-pane-menu__trigger:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
    outline-offset: var(--sl-focus-ring-offset);
  }
  .pkg-mine .sl-pane-empty {
    margin: var(--sl-space-6) var(--sl-space-3);
    text-align: center;
    color: var(--sl-text-secondary);
    font-size: var(--sl-font-size-md);
  }

  /* Phone: tap a package name opens it. Sections do not expand in the list. */
  body.sl-package-page .sl-pane-pkg__children { display: none !important; }
  body.sl-package-page .sl-pane-pkg > .sl-pane-row .sl-pane-group__chevron { display: none; }

  /* Phone editor: Hosts, Profiles, Scanning, and the rest live under the title.
     As many tabs as fit; a right chevron pages to the next set when more sit off-screen. */
  body.sl-has-shell.sl-pkg-editor .sl-pkg-section-switch,
  body.sl-has-shell.sl-pkg-editor.has-config-pane .ws-chrome > .ws-chrome__tabs.sl-pkg-section-switch,
  body.sl-has-shell.sl-pkg-editor .sl-pkg-section-switch[hidden] {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding-block: var(--sl-space-2);
    overflow: hidden;
  }
  body.sl-pkg-editor .sl-pkg-section-switch__scroller {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--sl-space-1);
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.sl-pkg-editor .sl-pkg-section-switch__scroller::-webkit-scrollbar { display: none; }
  body.sl-pkg-editor .sl-pkg-section-switch .ws-chrome__tab {
    flex: 0 0 auto;
    justify-content: center;
    min-height: var(--sl-touch-min, 44px);
    padding-inline: var(--sl-space-3);
    font-size: var(--sl-font-size-sm);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  body.sl-pkg-editor .sl-pkg-section-switch__more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--sl-touch-min, 44px);
    min-height: var(--sl-touch-min, 44px);
    height: var(--sl-touch-min, 44px);
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--sl-action-primary-fg) 40%, transparent);
    border-radius: var(--sl-radius-md);
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    box-shadow: none;
    color: var(--sl-action-primary-fg);
    cursor: pointer;
  }
  body.sl-pkg-editor .sl-pkg-section-switch__more:hover,
  body.sl-pkg-editor .sl-pkg-section-switch__more:focus-visible {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 28%, transparent);
    color: var(--sl-action-primary-fg);
  }
  body.sl-pkg-editor .sl-pkg-section-switch__more:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-action-primary-fg);
    outline-offset: 2px;
  }
  body.sl-pkg-editor .sl-pkg-section-switch__more[hidden] {
    display: none;
  }
}
.shell-modal--import .shell-modal__error { flex: none; }

/* ---------------------------------------------------------------------------
   19. Add License as a workspace panel — the legacy overlay renders inline in
       the Licensing workspace (markup moved inside #main-container). Two tab
       panels inside the one form; the action bar sits below both, global to
       the panel. Same approach as the Add Package form (§15): the pane sizes
       from its container, and legacy `.modal` positioning is neutralized.
   -------------------------------------------------------------------------- */
body.sl-has-shell #addLicenseModal {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  background: none;
  z-index: auto;
}
body.sl-has-shell #addLicenseModal .modal-content {
  margin: 0;
  width: 100%;
  max-width: 720px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  position: relative;
}
body.sl-has-shell #addLicenseModal :is(#btn-x-close, .sl-id-btn-x-close) { top: 0; right: 0; }

/* tab bar: quiet buttons, blue underline for the active tab */
body.sl-has-shell #addLicenseModal .al-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--sl-border-subtle);
}
body.sl-has-shell #addLicenseModal .al-tab {
  margin: 0 0 -1px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
  cursor: pointer;
}
body.sl-has-shell #addLicenseModal .al-tab:hover { color: var(--sl-text-primary); }
body.sl-has-shell #addLicenseModal .al-tab.active {
  color: var(--sl-text-link);
  border-bottom-color: var(--sl-border-accent);
  font-weight: var(--sl-font-weight-semibold);
}
body.sl-has-shell #addLicenseModal .al-tab:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: -2px;
}

body.sl-has-shell #addLicenseModal .al-panel[hidden] { display: none; }

/* action bar: global to the panel, below a divider, right-aligned */
body.sl-has-shell #addLicenseModal .al-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sl-space-2);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--sl-border-subtle);
}
body.sl-has-shell #addLicenseModal .al-actions button { position: static; margin: 0; }

/* §12 addendum: the package LIST page pins its own workspace geometry with
   #main-container:has(#packageTable) (2,0,0) — align-self: stretch there
   re-creates the definite-732px box that breaks position:sticky for the
   identity band. Outweigh it the same way §12 outweighs the editor rules. */
body.sl-has-shell > #main-container:has(#packageTable) {
  align-self: start;
  flex: none;
  min-height: calc(100vh - var(--sl-header-height));
  min-height: calc(100dvh - var(--sl-header-height));
}

/* §19 addendum: licensing selection-prompt state and the pane add action.
   The workspace defaults to "select a license" (adding lives in the pane);
   the pane's Add License mirrors the workspace secondary button. */
body.sl-has-shell .null-license {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 72px 24px;
  text-align: center;
}
body.sl-has-shell .null-license .null-license-icon {
  font-size: 1.625rem;
  color: var(--sl-text-muted);
  margin-bottom: 6px;
}
body.sl-has-shell .null-license .null-license-text {
  margin: 0;
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-has-shell .null-license .null-license-sub {
  margin: 0;
  max-width: 44ch;
  font-size: var(--sl-font-size-sm);
  line-height: 1.6;
  color: var(--sl-text-secondary);
}
/* List page: products live in the pane. Keep the cards in the DOM for
   initLicensePane, but do not paint them in the workspace. The page
   stylesheet uses #content-container { display: flex }, so this must
   beat that ID. */
body.sl-has-shell #content-container.lic-pane-source,
body.sl-has-shell .lic-pane-source { display: none; }
body.sl-has-shell .pkg-start__lead + .lic-start__serial {
  margin-top: calc(var(--sl-space-8) * -1 + var(--sl-space-3));
  margin-bottom: var(--sl-space-8);
}
body.sl-has-shell .lic-start__serial b { color: var(--sl-text-primary); }
.shell-sections .sl-pane-tools .sl-pane-add i { margin-right: 6px; }

/* ---------------------------------------------------------------------------
   20. Host and profile cards + configure-in-modal (package editor)
       Closed: compact tiles in a grid, or a single-column list. Open: the
       SAME element elevates into a centered modal so the fields never leave
       the editor form. Accordion chrome is retired.
   -------------------------------------------------------------------------- */
body.sl-has-shell .profile-controls { display: none; }
body.sl-has-shell .is-template { display: none; }
body.sl-has-shell .entry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-3);
  margin: 0 0 var(--sl-space-3);
}
body.sl-has-shell .entry-toolbar__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sl-space-2);
}
body.sl-has-shell .entry-link-launch {
  min-height: var(--sl-control-height);
}
body.sl-has-shell .entry-link-launch .sl-link-mark {
  width: calc(var(--sl-control-height) - var(--sl-space-3));
  height: calc(var(--sl-control-height) - var(--sl-space-3));
}
/* One-icon layout flip: My Hub, Hosts, Profiles, Barcode rules. */
body.sl-has-shell .sl-layout-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sl-control-height-sm);
  min-width: var(--sl-control-height-sm);
  height: var(--sl-control-height-sm);
  min-height: var(--sl-control-height-sm);
  margin: 0;
  padding: 0;
  background: var(--sl-surface-accent);
  border: 1px solid transparent;
  border-radius: var(--sl-radius-md);
  color: var(--sl-action-primary-bg);
  box-shadow: none;
  cursor: pointer;
}
body.sl-has-shell .sl-layout-toggle:hover,
body.sl-has-shell .sl-layout-toggle.is-active {
  /* The layout you picked, not a button you are pressing. */
  background: var(--sl-selected-bg);
  border-color: var(--sl-selected-border);
  color: var(--sl-selected-fg);
}
body.sl-has-shell .sl-layout-toggle:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
/* Phone Hosts / Profiles: cards only. Add sits on the title. No lead. */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell #section-hosts .general-frame.settings-panel,
  body.sl-has-shell #section-profiles .general-frame.settings-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--sl-space-2);
    row-gap: var(--sl-space-3);
  }
  body.sl-has-shell #section-hosts .settings-heading.settings-title,
  body.sl-has-shell #section-profiles .settings-heading.settings-title {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
  }
  body.sl-has-shell #section-hosts .entry-toolbar,
  body.sl-has-shell #section-profiles .entry-toolbar {
    display: contents;
  }
  body.sl-has-shell #section-hosts .sl-layout-toggle,
  body.sl-has-shell #section-profiles .sl-layout-toggle {
    display: none;
  }
  body.sl-has-shell #section-hosts #addHostButton,
  body.sl-has-shell #section-profiles #addProfileButton {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  body.sl-has-shell #section-hosts .settings-section-note:not(.hosts-import-note) {
    display: none;
  }
  body.sl-has-shell #section-hosts .hosts-import-note,
  body.sl-has-shell #section-hosts #host-list,
  body.sl-has-shell #section-hosts #host-template,
  body.sl-has-shell #section-profiles #profile-list,
  body.sl-has-shell #section-workflows #te-workflows {
    grid-column: 1 / -1;
  }
  body.sl-has-shell #section-hosts .entry-card-list,
  body.sl-has-shell #section-hosts .entry-card-list.is-list-view,
  body.sl-has-shell #section-profiles .entry-card-list,
  body.sl-has-shell #section-profiles .entry-card-list.is-list-view,
  body.sl-has-shell #section-workflows .entry-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sl-space-3);
  }
  body.sl-has-shell #section-hosts .entry-card-list.is-list-view .card-header,
  body.sl-has-shell #section-profiles .entry-card-list.is-list-view .card-header,
  body.sl-has-shell #section-hosts .entry-card-list .card-header,
  body.sl-has-shell #section-profiles .entry-card-list .card-header,
  body.sl-has-shell #section-workflows .entry-card-list .card-header {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--sl-space-2);
    padding: var(--sl-space-3);
  }
  body.sl-has-shell #section-hosts .entry-card-list .profile-header-info,
  body.sl-has-shell #section-profiles .entry-card-list .profile-header-info,
  body.sl-has-shell #section-workflows .entry-card-list .profile-header-info {
    margin-left: 0;
    padding-right: var(--sl-touch-min);
  }
  body.sl-has-shell #section-hosts .entry-card-list .profile-title,
  body.sl-has-shell #section-profiles .entry-card-list .profile-title,
  body.sl-has-shell #section-workflows .entry-card-list .profile-title {
    display: block;
    text-align: start;
    font-size: var(--sl-font-size-lg);
    font-weight: var(--sl-font-weight-semibold);
    line-height: var(--sl-line-height-tight);
  }
  body.sl-has-shell #section-hosts .entry-card-list .delete-profile-btn,
  body.sl-has-shell #section-profiles .entry-card-list .delete-profile-btn,
  body.sl-has-shell #section-workflows .entry-card-list .delete-profile-btn {
    position: absolute;
    top: var(--sl-space-2);
    right: var(--sl-space-2);
    width: var(--sl-touch-min);
    min-width: var(--sl-touch-min);
    height: var(--sl-touch-min);
    min-height: var(--sl-touch-min);
    border-radius: var(--sl-radius-pill);
    background: var(--sl-feedback-danger-bg);
    color: var(--sl-feedback-danger-fg);
    font-size: var(--sl-font-size-lg);
  }
  body.sl-has-shell #section-hosts .entry-card-list .delete-profile-btn:hover,
  body.sl-has-shell #section-profiles .entry-card-list .delete-profile-btn:hover,
  body.sl-has-shell #section-workflows .entry-card-list .delete-profile-btn:hover {
    background: var(--sl-feedback-danger-bg);
    color: var(--sl-feedback-danger-fg);
  }
  body.sl-has-shell #section-hosts .entry-card-list .entry-glance,
  body.sl-has-shell #section-profiles .entry-card-list .entry-glance,
  body.sl-has-shell #section-workflows .entry-card-list .entry-glance {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: var(--sl-space-2);
  }
}
body.sl-has-shell .entry-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sl-space-3);
  align-items: stretch;
}
body.sl-has-shell .entry-card-list.is-list-view {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-2);
}
body.sl-has-shell .entry-card-list .profile-card {
  margin: 0;
  padding: 0;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-start);
  cursor: pointer;
  transition: border-color var(--sl-duration-fast) var(--sl-easing-standard);
}
body.sl-has-shell .entry-card-list .profile-card:hover { border-color: var(--sl-border-accent); }
body.sl-has-shell .entry-card-list .profile-card .chevron-toggle { display: none; }
body.sl-has-shell .entry-card-list .profile-card .profile-content { display: none; }

body.sl-has-shell .entry-card-list .card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sl-space-2);
  padding: var(--sl-space-3) var(--sl-space-4);
  border: 0;
  background: none;
}
body.sl-has-shell .entry-card-list.is-list-view .card-header {
  align-items: center;
  padding: var(--sl-space-2) var(--sl-space-3);
}
body.sl-has-shell .entry-card-list .profile-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  margin-left: 0;
}
body.sl-has-shell .entry-card-list .profile-title {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.sl-has-shell .entry-card-list .profile-description-header,
body.sl-has-shell .entry-card-list .profile-endpoint-header {
  display: none;
}
body.sl-has-shell .entry-card-list .entry-glance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sl-space-2) var(--sl-space-4);
  flex: 1 1 100%;
  min-width: 0;
  margin: var(--sl-space-1) 0 0;
}
body.sl-has-shell .entry-card-list .entry-glance[hidden] {
  display: none;
}
body.sl-has-shell .entry-card-list .entry-glance__row {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  min-width: 0;
}
body.sl-has-shell .entry-card-list .entry-glance__row[hidden] {
  display: none;
}
body.sl-has-shell .entry-card-list .entry-glance dt {
  margin: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-muted);
}
body.sl-has-shell .entry-card-list .entry-glance dd {
  margin: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.sl-has-shell > .profile-card.is-open .entry-glance {
  display: none;
}
@media (min-width: 701px) {
  body.sl-has-shell .entry-card-list.is-list-view .card-header {
    display: grid;
    grid-template-columns: minmax(8rem, 16rem) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--sl-space-4);
    flex-wrap: nowrap;
  }
  body.sl-has-shell .entry-card-list.is-list-view .profile-header-info {
    flex: none;
    grid-column: 1;
  }
  body.sl-has-shell .entry-card-list.is-list-view .entry-glance {
    flex: none;
    margin: 0;
    grid-column: 2;
    grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
  }
  body.sl-has-shell .entry-card-list.is-list-view .delete-profile-btn {
    grid-column: 3;
  }
}
body.sl-has-shell .entry-card-list .delete-profile-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sl-space-6);
  height: var(--sl-space-6);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-sm);
  cursor: pointer;
}
body.sl-has-shell .entry-card-list .delete-profile-btn:hover {
  background: var(--sl-feedback-danger-bg);
  color: var(--sl-text-danger);
}
body.sl-has-shell .entry-card-list .delete-profile-btn:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

/* ---- open card = the modal ---- */
/* Must be a direct child of body (see sl-shell.js) so sticky editor chrome
   and the shell grid cannot trap it under a lower stacking context. Because
   body is display:grid, these also claim the full grid area so they are not
   auto-placed into a new row. */
.profile-modal-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--sl-z-overlay);
  background: rgba(15, 20, 28, 0.45);
}
body.sl-has-shell > .profile-modal-scrim {
  grid-area: 1 / 1 / -1 / -1;
}
.profile-modal-scrim[hidden] { display: none; }
body.sl-has-shell .profile-card-placeholder {
  min-height: 64px;
  border: 1px dashed var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
}
body.sl-has-shell > .profile-card.is-open {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--sl-z-modal);
  grid-area: 1 / 1 / -1 / -1;
  justify-self: center;
  align-self: center;
  display: flex;
  flex-direction: column;
  width: min(720px, calc(100vw - var(--sl-space-8)));
  height: auto;
  max-height: min(82vh, 760px);
  min-height: 0;
  flex-shrink: 1;
  overflow: hidden;
  cursor: default;
  margin: 0;
  padding: 0;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-start);
  overscroll-behavior: contain;
}
body.sl-has-shell .entry-card-list .profile-card .profile-done {
  display: none;
}
body.sl-has-shell > .profile-card.is-open .card-header {
  position: sticky;
  top: 0;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sl-space-2);
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--sl-border-subtle);
  background: var(--sl-surface-raised);
}
body.sl-has-shell > .profile-card.is-open .profile-header-info {
  flex: 1 1 auto;
  min-width: 0;
}
body.sl-has-shell > .profile-card.is-open .profile-title {
  font-size: var(--sl-font-size-xl);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
}
body.sl-has-shell > .profile-card.is-open.host-entry-card .profile-title,
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) .profile-title {
  font-size: var(--sl-font-size-2xl);
}
body.sl-has-shell > .profile-card.is-open.host-entry-card,
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) {
  width: min(36rem, calc(100vw - var(--sl-space-8)));
}
body.sl-has-shell > .profile-card.is-open.host-entry-card .profile-content,
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) .profile-content {
  flex: 0 1 auto;
  padding-block: var(--sl-space-4);
  padding-inline: var(--sl-space-5);
}
body.sl-has-shell > .profile-card.is-open.host-entry-card .profile-content .text-field,
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) .profile-content .text-field {
  max-width: none;
}
body.sl-has-shell > .profile-card.is-open .text-field.is-invalid,
body.sl-has-shell > .profile-card.is-open .text-area.is-invalid,
body.sl-has-shell > .profile-card.is-open select.text-field.is-invalid {
  border-color: var(--sl-border-danger);
}
body.sl-has-shell > .profile-card.is-open .text-field.is-invalid:focus,
body.sl-has-shell > .profile-card.is-open .text-field.is-invalid:focus-visible,
body.sl-has-shell > .profile-card.is-open .text-area.is-invalid:focus,
body.sl-has-shell > .profile-card.is-open .text-area.is-invalid:focus-visible,
body.sl-has-shell > .profile-card.is-open select.text-field.is-invalid:focus,
body.sl-has-shell > .profile-card.is-open select.text-field.is-invalid:focus-visible {
  outline: none;
  border-color: var(--sl-border-danger);
  box-shadow: 0 0 0 3px var(--sl-palette-red-50);
}
body.sl-has-shell > .profile-card.is-open.host-entry-card .profile-content label,
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) .profile-content label,
body.sl-has-shell > .profile-card.is-open.host-entry-card .profile-content span:where(.sl-label-text),
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) .profile-content span:where(.sl-label-text) {
  display: block;
  margin: var(--sl-space-3) 0 var(--sl-space-1);
}
body.sl-has-shell > .profile-card.is-open.host-entry-card .profile-content label:first-child,
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) .profile-content label:first-child,
body.sl-has-shell > .profile-card.is-open.host-entry-card .profile-content span:where(.sl-label-text):first-child,
body.sl-has-shell > .profile-card.is-open:has([name^="hosts.hosts"]) .profile-content span:where(.sl-label-text):first-child {
  margin-top: 0;
}
body.sl-has-shell > .profile-card.is-open .delete-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sl-touch-min);
  min-width: var(--sl-touch-min);
  height: var(--sl-touch-min);
  min-height: var(--sl-touch-min);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: none;
  box-shadow: none;
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-sm);
  cursor: pointer;
}
body.sl-has-shell > .profile-card.is-open .delete-profile-btn:hover {
  background: var(--sl-feedback-danger-bg);
  color: var(--sl-text-danger);
}
body.sl-has-shell > .profile-card.is-open .delete-profile-btn:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
body.sl-has-shell > .profile-card.is-open .profile-done {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 34px;
  padding: 0 14px;
}
body.sl-has-shell > .profile-card.is-open .profile-content {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 20px 20px;
  overscroll-behavior: contain;
}
body.profile-modal-open {
  overflow: hidden;
}
body.sl-has-shell > .profile-card.is-open .profile-content fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
body.sl-has-shell > .profile-card.is-open .chevron-toggle { display: none; }
.profile-modal-actions {
  display: none;
}

/* §18 addendum: account-menu content — serial row up top, version + copyright
   footer below Log out (content carried over from the 2.2 admin popup). */
.shell-user-menu .user-menu-serial {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  padding: 8px 10px 4px;
  font-size: var(--sl-font-size-sm);
}
.shell-user-menu .user-menu-serial__label {
  color: var(--sl-text-primary);
  flex: 1;
  font-weight: var(--sl-font-weight-semibold);
}
.shell-user-menu .user-menu-serial b {
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
  white-space: nowrap;
}
.shell-user-menu .user-menu-serial .copy-serial {
  border: 0;
  background: none;
  box-shadow: none;
  margin: 0;
  padding: 2px 6px;
  color: var(--sl-text-link);
  border-radius: var(--sl-radius-xs);
  cursor: pointer;
}
.shell-user-menu .user-menu-appearance {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  padding: var(--sl-space-2) 10px;
}
.shell-user-menu .user-menu-appearance label,
.shell-user-menu .user-menu-appearance span:where(.sl-label-text) {
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-secondary);
}
.shell-user-menu .user-menu-appearance__select {
  width: 100%;
  min-height: var(--sl-control-height);
  margin: 0;
  padding: 0 var(--sl-space-6) 0 var(--sl-space-3);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-page);
  color: var(--sl-text-primary);
  font-family: inherit;
  font-size: var(--sl-font-size-sm);
  cursor: pointer;
}
.shell-user-menu .user-menu-appearance__select:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.shell-user-menu .user-menu-meta {
  padding: 6px 10px 4px;
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-muted);
  line-height: 1.6;
}
.shell-user-menu .copyright-admin-menu {
  margin: 0;
  padding: 0 0 10px;
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
}
.shell-user-menu .copyright-admin-menu p {
  margin: 0;
  padding: 0;
}

/* account menu: regular-weight items; the serial row carries the bold */
.shell-user-menu .sl-menu-btn { font-weight: var(--sl-font-weight-regular); }
.shell-user-menu .user-menu-serial { white-space: nowrap; }

/* appearance toggle: the half-shaded circle flips over in dark mode */
.shell-topbar .topbar-theme i {
  transition: transform var(--sl-duration-base) var(--sl-easing-standard);
}
html[data-theme="dark"] .shell-topbar .topbar-theme i { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-reduce-motion="off"]) .shell-topbar .topbar-theme i { transition: none; }
}
html[data-reduce-motion="on"] .shell-topbar .topbar-theme i { transition: none; }

/* §19 addendum 2: Add License head row, info popover, aligned field grid */
body.sl-has-shell #addLicenseModal .al-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-3);
}
body.sl-has-shell #addLicenseModal .al-head__title {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
}
body.sl-has-shell #addLicenseModal .al-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: var(--sl-text-muted);
  font-size: 0.9375rem;
  cursor: pointer;
}
body.sl-has-shell #addLicenseModal .al-info:hover { color: var(--sl-text-link); }
body.sl-has-shell #addLicenseModal .al-info-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: var(--sl-z-dropdown);
  width: 300px;
  padding: 12px 14px;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-3);
  font-size: var(--sl-font-size-sm);
  line-height: 1.6;
  color: var(--sl-text-primary);
  cursor: pointer;
}
body.sl-has-shell #addLicenseModal .al-info-pop[hidden] { display: none; }
body.sl-has-shell #addLicenseModal .al-head-actions {
  display: flex;
  gap: var(--sl-space-2);
  flex-shrink: 0;
}
body.sl-has-shell #addLicenseModal .al-head-actions button {
  position: static;
  margin: 0;
}
body.sl-has-shell #addLicenseModal .al-head-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* License details: one grid per row — label column, then all input fields
   starting at the same left edge with the same width. */
body.sl-has-shell #al-panel-details .form-row,
body.sl-has-shell #al-panel-details .input-container {
  position: relative;              /* keeps the legacy error icon anchored */
  display: grid;
  grid-template-columns: 190px minmax(0, 280px);
  align-items: center;
  column-gap: var(--sl-space-3);
  margin: 0 0 14px;
  padding: 0;
}
body.sl-has-shell #al-panel-details label,
body.sl-has-shell #al-panel-details span:where(.sl-label-text) {
  margin: 0;
  text-align: left;
}
body.sl-has-shell #al-panel-details input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

/* Licensing page heading: the serial reads exactly like the account menu's
   row — app font, semibold, primary color — with the copy action inline.
   (Legacy styled .ph-sn in a serif at its own size.) */
body.sl-has-shell #page-heading .ph-label,
body.sl-has-shell #page-heading .ph-sn {
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
  letter-spacing: normal;
}
body.sl-has-shell #page-heading .ph-label { margin-left: var(--sl-space-4); margin-right: var(--sl-space-2); }
body.sl-has-shell #page-heading .copy-serial {
  border: 0;
  background: none;
  box-shadow: none;
  margin: 0 0 0 4px;
  padding: 2px 6px;
  color: var(--sl-text-link);
  border-radius: var(--sl-radius-xs);
  font-size: 0.8125rem;
  cursor: pointer;
  vertical-align: baseline;
}

/* Add a license: the serial is what support asks for first, so it reads as a
   blue chip under the title — larger, accent-colored, impossible to miss. */
body.sl-has-shell #addLicenseModal .al-serial {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  margin: 8px 0 0;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-has-shell #addLicenseModal .al-serial b {
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-link);
  background: var(--sl-surface-accent);
  padding: 3px 12px;
  border-radius: var(--sl-radius-sm);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
body.sl-has-shell #addLicenseModal .al-serial .copy-serial {
  border: 0;
  background: none;
  box-shadow: none;
  margin: 0;
  padding: 2px 6px;
  color: var(--sl-text-link);
  border-radius: var(--sl-radius-xs);
  font-size: 0.8125rem;
  cursor: pointer;
}

/* An open package keeps the standard name color. Only the current section
   (Package details, Hosts, …) uses the accent. Licenses still mark the
   current row with .active. */
.shell-sections .sl-pane-group--tree .sl-pane-pkg > .sl-pane-row > .sl-pane-item,
.shell-sections .sl-pane-group--tree .sl-pane-pkg > .sl-pane-row > .sl-pane-item.active,
.shell-sections .sl-pane-group--tree .sl-pane-pkg > .sl-pane-row > .sl-pane-item.active .nav-label {
  color: var(--sl-text-primary);
  font-weight: var(--sl-font-weight-regular);
  box-shadow: none;
}
.shell-sections .sl-pane-item.active .nav-label {
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
}

/* Editor pages: the identity band (breadcrumb, package meta, action bar)
   holds still; only the settings body scrolls beneath it. Extends the
   .page-identity stickiness with a closing divider so content visibly
   slides under the buttons. */
body.sl-has-shell .editor-identity {
  /* The whole top of an editor holds still: breadcrumb, package name and
     status, the action bar, and the tabs. Only what is under the tabs
     scrolls, sliding beneath an opaque band. */
  position: sticky;
  top: var(--sl-header-height);
  z-index: var(--sl-z-sticky);
  /* the same surface the settings sit on, so the band and the workspace read
     as one sheet; still opaque, so content slides cleanly beneath it */
  background: var(--sl-surface-page);
  border-bottom: 1px solid var(--sl-border-subtle);
  padding-bottom: var(--sl-space-2);
}

/* the settings area painted legacy purple-10 (#F3F0F5) from the old sheets;
   transparent lets the body's page surface through, matching the band */
body.sl-has-shell .settings-body { background: none; }
/* The action bar used to pin itself, back when it was the only part that
   held still. Inside a sticky band that would be a sticky child of a sticky
   parent, so it goes back to sitting in the flow. */
body.sl-has-shell .editor-identity .settings-header {
  margin-bottom: 0;
  position: static;
  top: auto;
}

/* ---------------------------------------------------------------------------
   21. Overscroll containment — a two-finger pull must not rubber-band the
       whole application (top bar included). The document never bounces, and
       inner scrollers (the pane list, the shell panes) do not chain their
       overscroll up to the page.
   -------------------------------------------------------------------------- */
html { overscroll-behavior-y: none; }
body.sl-has-shell { overscroll-behavior-y: none; }
.shell-sections .sl-pane-group__children,
body.sl-has-shell > .shell-sections { overscroll-behavior: contain; }

/* ---------------------------------------------------------------------------
   22. Editor action bar — one calm row, consistent order, clear hierarchy.
       Same buttons, same handlers; CSS only. Destructive stands alone on the
       left; quiet exits next; save actions; the primary decision rightmost.
       nav-actions wrappers flatten (display: contents) so flex order works
       across both legacy groups and every status combination.
   -------------------------------------------------------------------------- */
body.sl-has-shell .editor-identity .settings-action-bar {
  justify-content: flex-end;
  gap: var(--sl-space-2);
  margin: 0;
  padding: 0;
  border-bottom: 0;
  background: none;
}
body.sl-has-shell .editor-identity .settings-action-bar .nav-actions { display: contents; }

/* uniform geometry + type for every button in the bar */
body.sl-has-shell .editor-identity .settings-action-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sl-space-2);
  min-height: 34px;
  height: auto;
  margin: 0;
  padding: 0 14px;
  border-radius: var(--sl-radius-sm);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  box-shadow: none;
}
body.sl-has-shell .editor-identity #saveButton,
body.sl-has-shell .editor-identity #saveAndDownloadButton,
body.sl-has-shell .editor-identity #downloadButton,
body.sl-has-shell .editor-identity #publishButton {
  box-sizing: border-box;
  min-width: 7.5rem;
}
body.sl-has-shell .editor-identity .settings-action-bar button label,
body.sl-has-shell .editor-identity .settings-action-bar button span:where(.sl-label-text) {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  cursor: inherit;
}
body.sl-has-shell .editor-identity .settings-action-bar button i { font-size: var(--sl-font-size-sm); }

/* consistent order, whatever the package status shows */
body.sl-has-shell .editor-identity #deleteButton          { order: 0; margin-right: var(--sl-space-5); }
body.sl-has-shell .editor-identity #downloadButton        { order: 3; }
body.sl-has-shell .editor-identity #saveAndDownloadButton { order: 4; }
body.sl-has-shell .editor-identity #saveButton            { order: 5; }
body.sl-has-shell .editor-identity #unpublishButton       { order: 6; }
body.sl-has-shell .editor-identity #editAndVersionButton  { order: 7; }
body.sl-has-shell .editor-identity #publishButton         { order: 7; }

/* hierarchy: primary blue; secondaries outlined; exits quiet; delete danger */
body.sl-has-shell .editor-identity #publishButton,
body.sl-has-shell .editor-identity #editAndVersionButton {
  background: var(--sl-action-primary-bg);
  border: 1px solid transparent;
  color: var(--sl-text-on-accent);
}
body.sl-has-shell .editor-identity #publishButton:hover,
body.sl-has-shell .editor-identity #editAndVersionButton:hover {
  background: var(--sl-action-primary-bg-hover);
}
body.sl-has-shell .editor-identity #publishButton label,
body.sl-has-shell .editor-identity #publishButton i,
body.sl-has-shell .editor-identity #editAndVersionButton label,
body.sl-has-shell .editor-identity #editAndVersionButton i,
body.sl-has-shell .editor-identity #publishButton span:where(.sl-label-text),
body.sl-has-shell .editor-identity #editAndVersionButton span:where(.sl-label-text) { color: var(--sl-text-on-accent); }

body.sl-has-shell .editor-identity #saveButton,
body.sl-has-shell .editor-identity #saveAndDownloadButton,
body.sl-has-shell .editor-identity #downloadButton,
body.sl-has-shell .editor-identity #unpublishButton {
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-accent);
  color: var(--sl-text-link);
}
body.sl-has-shell .editor-identity #saveButton label,
body.sl-has-shell .editor-identity #saveAndDownloadButton label,
body.sl-has-shell .editor-identity #downloadButton label,
body.sl-has-shell .editor-identity #unpublishButton label,
body.sl-has-shell .editor-identity #saveButton span:where(.sl-label-text),
body.sl-has-shell .editor-identity #saveAndDownloadButton span:where(.sl-label-text),
body.sl-has-shell .editor-identity #downloadButton span:where(.sl-label-text),
body.sl-has-shell .editor-identity #unpublishButton span:where(.sl-label-text) { color: var(--sl-text-link); }

body.sl-has-shell .editor-identity #deleteButton {
  background: none;
  /* bordered like Download and Save beside it, in its own colour; was
     transparent when Delete stood apart as a quiet text action */
  border: 1px solid var(--sl-border-danger);
  color: var(--sl-text-danger);
}
body.sl-has-shell .editor-identity #deleteButton:hover { background: var(--sl-feedback-danger-bg); }
body.sl-has-shell .editor-identity #deleteButton label,
body.sl-has-shell .editor-identity #deleteButton span:where(.sl-label-text) { color: var(--sl-text-danger); }

/* ---------------------------------------------------------------------------
   23. Editor content: token typography and fluid fields, every tab.
       The settings panels stop using ad-hoc px type and fixed widths; fonts
       come from the scale (rem-based, so they follow the root size), fields
       fill their column to a readable cap.
   -------------------------------------------------------------------------- */
body.sl-has-shell .settings-panel .settings-heading {
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-lg);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--sl-text-primary);
  text-transform: none;
}
body.sl-has-shell .settings-panel .settings-heading.settings-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
body.sl-has-shell .section-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  color: var(--sl-action-primary-bg);
  text-decoration: none;
  font-size: var(--sl-font-size-md);
  line-height: 1;
}
body.sl-has-shell .section-help:hover,
body.sl-has-shell .section-help:focus-visible {
  background: var(--sl-surface-accent);
  color: var(--sl-action-primary-bg-hover, #1665B6);
}
body.sl-has-shell .section-help:focus-visible {
  outline: var(--sl-focus-ring-width, 2px) solid var(--sl-focus-ring-color, #1871CB);
  outline-offset: var(--sl-focus-ring-offset, 2px);
}
body.sl-has-shell .settings-panel label,
body.sl-has-shell .settings-panel span:where(.sl-label-text) {
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-primary);
  letter-spacing: normal;
}
body.sl-has-shell .settings-panel .text-field,
body.sl-has-shell .settings-panel select.text-field,
body.sl-has-shell .settings-panel textarea.text-field,
body.sl-has-shell .settings-panel .text-area,
body.sl-has-shell .section-panel .text-field,
body.sl-has-shell .section-panel select.text-field,
body.sl-has-shell .section-panel textarea.text-field,
body.sl-has-shell .section-panel .text-area {
  width: 100%;
  max-width: 525px;
  box-sizing: border-box;
  padding: 8px 12px;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-xs);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-field);
}
body.sl-has-shell .settings-panel .text-field:focus,
body.sl-has-shell .settings-panel .text-area:focus,
body.sl-has-shell .section-panel .text-field:focus,
body.sl-has-shell .section-panel .text-area:focus {
  outline: none;
  border-color: var(--sl-selected-border);
  box-shadow: 0 0 0 3px var(--sl-selected-ring-soft);
}
body.sl-has-shell .keyboard-input-container {
  width: 100%;
  max-width: 525px;
  box-sizing: border-box;
}
body.sl-has-shell .config-block-field .text-field,
body.sl-has-shell .config-block-field select.text-field,
body.sl-has-shell .keyboard-input-container .text-field {
  max-width: none;
}
body.sl-has-shell .section-panel .injection-link-section .text-field,
body.sl-has-shell .section-panel .injection-panel-link .text-field,
body.sl-has-shell .section-panel .file-operation-row .text-field,
body.sl-has-shell .section-panel .file-operation-source-cell .text-field,
body.sl-has-shell .section-panel .criteria-row .text-field,
body.sl-has-shell .section-panel .criterion-row .text-field {
  max-width: none;
}
body.sl-has-shell .settings-panel .field-hint,
body.sl-has-shell .settings-panel .required-field-note {
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-muted);
  max-width: 60ch;
}

/* ---------------------------------------------------------------------------
   Starting card (package list pages)
   With nothing open, the workspace shows a raised panel: where you are and
   the two ways in, matching the keyboard designer start card. Add Package
   and Import also sit in the left pane above Search. The right actions
   pane appears after a package is open. Hidden while the add form is up.
   -------------------------------------------------------------------------- */
/* Package start: title stays at the top; the card sits in the middle of
   the remaining workspace on every width. Licensing uses .lic-start and
   keeps its own flow. wrapWorkspaceBody moves .pkg-start into .ws-body. */
body.sl-has-shell:has(.ws-chrome) > #main-container:has(> .pkg-start:not(.lic-start)),
body.sl-has-shell:has(.ws-chrome) > #main-container:has(> .ws-body > .pkg-start:not(.lic-start)) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
body.sl-has-shell .ws-body:has(> .pkg-start:not(.lic-start)) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
body.sl-has-shell:has(.ws-chrome) > #main-container:has(> .pkg-start:not(.lic-start)) > .pkg-start:not(.lic-start),
body.sl-has-shell .ws-body > .pkg-start:not(.lic-start) {
  flex: 0 1 auto;
  align-self: center;
  margin-block: auto;
}
body.sl-has-shell:has(.ws-chrome) > #main-container:has(> .pkg-start:not(.lic-start)) > #content-container,
body.sl-has-shell .ws-body:has(> .pkg-start:not(.lic-start)) > #content-container {
  display: none;
  min-height: 0;
  height: 0;
  overflow: hidden;
}
body.sl-has-shell .pkg-start {
  box-sizing: border-box;
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: min(var(--sl-ws-start-max), calc(100% - 2 * var(--sl-content-gutter)));
  max-width: var(--sl-ws-start-max);
  max-height: calc(100% - 2 * var(--sl-space-6));
  min-height: 0;
  margin: 0;
  padding: var(--sl-space-10) var(--sl-space-8) var(--sl-space-8);
  overflow: auto;
  text-align: center;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-lg);
  box-shadow: var(--sl-elevation-start);
}
body.sl-has-shell .pkg-start__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sl-space-5);
  background: var(--sl-surface-accent);
  border-radius: var(--sl-radius-md);
  font-size: 1.625rem;
  color: var(--sl-action-primary-bg);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--sl-surface-accent) 70%, transparent);
}
body.sl-has-shell .pkg-start__title {
  margin: 0 0 var(--sl-space-2);
  font-size: var(--sl-font-size-2xl);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.02em;
  color: var(--sl-text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sl-space-2);
}
body.sl-has-shell .pkg-start__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  color: var(--sl-action-primary-bg);
  text-decoration: none;
  font-size: var(--sl-font-size-md);
  line-height: 1;
}
body.sl-has-shell .pkg-start__help:hover,
body.sl-has-shell .pkg-start__help:focus-visible {
  background: var(--sl-surface-accent);
  color: var(--sl-action-primary-bg-hover, #1665B6);
}
body.sl-has-shell .pkg-start__help:focus-visible {
  outline: var(--sl-focus-ring-width, 2px) solid var(--sl-focus-ring-color, #1871CB);
  outline-offset: var(--sl-focus-ring-offset, 2px);
}

/* Phone: title row matches the solid top bar so chrome reads as one block.
   Workspace height: later desktop rules pin #main-container to
   100dvh minus the header (and :has(#packageTable) repeats that as
   min-height). That box is taller than the main grid track, so it
   paints under the tab bar with nothing left to scroll — New package
   and My packages feel locked. Stay in the grid cell. */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell > #main-container,
  body.sl-has-shell > #main-frame,
  body.sl-has-shell > .page-content,
  body.sl-has-shell > main,
  body.sl-has-shell:has(.ws-chrome) > #main-container,
  body.sl-has-shell:has(.ws-chrome) > #main-frame,
  body.sl-has-shell:has(.ws-chrome) > .page-content,
  body.sl-has-shell:has(.ws-chrome) > main,
  body.sl-has-shell > #main-container:has(#packageTable) {
    align-self: stretch;
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
  body.sl-has-shell .ws-body,
  body.sl-has-shell .ws-body:has(> .pkg-mine) {
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  /* New package: two cards fill the slot. My packages still scrolls —
     .pkg-start stays in the DOM while hidden, so do not key off :has. */
  body.sl-has-shell:not(.sl-pkg-view-mine) .ws-body:has(> .pkg-start:not(.lic-start)) {
    justify-content: stretch;
    overflow: hidden;
    padding-block: var(--sl-space-3);
  }
  body.sl-has-shell:not(.sl-pkg-view-mine) .ws-body > .pkg-start:not(.lic-start) {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: auto;
    max-height: 100%;
    overflow: hidden;
    margin-block: 0;
    padding: var(--sl-space-3);
    box-sizing: border-box;
  }
  body.sl-has-shell .pkg-start.lic-start {
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    max-width: none;
    margin-block: var(--sl-space-3) var(--sl-space-6);
    box-sizing: border-box;
  }
  body.sl-has-shell .pkg-start .vi-dropzone--card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }
  body.sl-has-shell.sl-package-page .sl-pkg-view-switch,
  body.sl-has-shell.sl-package-page .sl-pkg-view-switch[hidden] {
    position: relative;
    z-index: calc(var(--sl-z-header) + 1);
  }
  body.sl-has-shell .ws-chrome {
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--sl-action-primary-bg);
    color: var(--sl-action-primary-fg);
  }
  /* Package jobs live in More on a phone. Keep the buttons in the DOM
     so the sheet can still click them. */
  body.sl-has-shell .editor-name-bar__actions,
  body.sl-has-shell .ws-chrome__package-row .ws-chrome__actions,
  body.sl-has-shell .editor-identity .settings-action-bar {
    display: none;
  }
  body.sl-has-shell .ws-chrome__title,
  body.sl-has-shell .ws-chrome #page-heading,
  body.sl-has-shell .ws-chrome #page-heading span,
  body.sl-has-shell .ws-chrome__title-meta,
  body.sl-has-shell .ws-chrome .editor-name-bar,
  body.sl-has-shell .ws-chrome .editor-name-bar .metadata-customer,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .ws-chrome .editor-name-bar .metadata-customer,
  body.sl-has-shell .ws-chrome .editor-name-bar .metadata-label-block,
  body.sl-has-shell .ws-chrome__package-row,
  body.sl-has-shell .ws-chrome__package-row .ws-chrome__title {
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome__back {
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome__back:hover {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome__back:focus-visible {
    outline-color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome__icon,
  body.sl-has-shell .ws-chrome .hub-start__icon {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    color: var(--sl-action-primary-fg);
    box-shadow: none;
  }
  body.sl-has-shell .ws-chrome .section-help,
  body.sl-has-shell .ws-chrome .hub-start__help,
  body.sl-has-shell .ws-chrome .pkg-start__help {
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome .section-help:hover,
  body.sl-has-shell .ws-chrome .section-help:focus-visible,
  body.sl-has-shell .ws-chrome .hub-start__help:hover,
  body.sl-has-shell .ws-chrome .hub-start__help:focus-visible,
  body.sl-has-shell .ws-chrome .pkg-start__help:hover,
  body.sl-has-shell .ws-chrome .pkg-start__help:focus-visible {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome .sl-layout-toggle {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    color: var(--sl-action-primary-fg);
    border-color: transparent;
  }
  body.sl-has-shell .ws-chrome .sl-layout-toggle:hover,
  body.sl-has-shell .ws-chrome .sl-layout-toggle.is-active {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 22%, transparent);
    border-color: var(--sl-action-primary-fg);
    color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome .sl-layout-toggle:focus-visible {
    outline-color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome__title-row .ws-chrome__title,
  body.sl-has-shell .ws-chrome__title-row #page-heading {
    min-width: 0;
    flex: 1 1 auto;
  }
  .ws-chrome .shell-phone-tools {
    display: flex;
    align-items: center;
    gap: var(--sl-space-1);
    flex: 0 0 auto;
    margin-inline-start: auto;
  }
  .shell-phone-menu__trigger { display: none; }
  .ws-chrome .topbar-search__open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sl-touch-min, 44px);
    min-width: var(--sl-touch-min, 44px);
    min-height: var(--sl-touch-min, 44px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-md);
    background: none;
    box-shadow: none;
    color: var(--sl-action-primary-fg);
    font-size: var(--sl-font-size-md);
    cursor: pointer;
    position: relative;
  }
  .shell-phone-menu__trigger:hover,
  .shell-phone-menu__trigger[aria-expanded="true"],
  .ws-chrome .topbar-search__open:hover,
  .ws-chrome .topbar-search.is-open .topbar-search__open {
    background: color-mix(in srgb, var(--sl-action-primary-fg) 16%, transparent);
    color: var(--sl-action-primary-fg);
  }
  .shell-phone-menu__trigger:focus-visible,
  .ws-chrome .topbar-search__open:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-action-primary-fg);
    outline-offset: 2px;
  }
  .ws-chrome .topbar-search {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
  }
  .ws-chrome .topbar-search__close { display: none; }
  .ws-chrome .topbar-search__panel { display: none; }
  .ws-chrome .topbar-search.is-open .topbar-search__panel {
    display: block;
    position: absolute;
    top: calc(100% + var(--sl-space-2));
    right: 0;
    left: auto;
    width: min(22rem, calc(100vw - 2 * var(--sl-space-4)));
    padding: var(--sl-space-2);
    background: var(--sl-surface-raised);
    border: 1px solid var(--sl-border-subtle);
    border-radius: var(--sl-radius-md);
    box-shadow: var(--sl-elevation-3);
    z-index: var(--sl-z-dropdown);
  }
  .ws-chrome .topbar-search__field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: var(--sl-touch-min, 44px);
    padding-right: var(--sl-space-1);
    border: 1px solid var(--sl-border-field);
    border-radius: var(--sl-radius-pill);
    background: var(--sl-surface-sunken);
  }
  .ws-chrome .topbar-search__field:focus-within {
    border-color: var(--sl-border-field);
    background: var(--sl-surface-sunken);
  }
  .ws-chrome .topbar-search__field > .fa-magnifying-glass {
    margin-inline: var(--sl-space-3) var(--sl-space-2);
    color: var(--sl-text-secondary);
  }
  .ws-chrome .topbar-search__field input {
    flex: 1 1 auto;
    min-width: 0;
    height: var(--sl-touch-min, 44px);
    border: 0;
    background: none;
    color: var(--sl-text-primary);
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-md);
  }
  .ws-chrome .topbar-search__field input:focus {
    outline: none;
    border: 0;
    box-shadow: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
  }
  body.sl-has-shell .ws-chrome .topbar-search__mic,
  body.sl-has-shell .ws-chrome button.topbar-search__mic {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sl-touch-min, 44px);
    min-width: var(--sl-touch-min, 44px);
    min-height: var(--sl-touch-min, 44px);
    height: auto;
    margin: 0;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--sl-text-primary);
    cursor: pointer;
  }
  body.sl-has-shell .ws-chrome .topbar-search__mic:hover,
  body.sl-has-shell .ws-chrome .topbar-search__mic:active,
  body.sl-has-shell .ws-chrome .topbar-search__mic.is-listening {
    background: none;
    box-shadow: none;
  }
  body.sl-has-shell .ws-chrome .topbar-search__mic.is-listening {
    color: var(--sl-action-primary-bg);
  }
  body.sl-has-shell .ws-chrome .topbar-search__mic:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
    outline-offset: var(--sl-focus-ring-offset);
  }
  body.sl-has-shell .ws-chrome .topbar-search__mic > i {
    font-size: var(--sl-font-size-xl);
    line-height: 1;
    pointer-events: none;
  }
  body.sl-has-shell .ws-chrome__actions .sl-btn--primary {
    background: var(--sl-action-primary-fg);
    color: var(--sl-action-primary-bg);
    border-color: var(--sl-action-primary-fg);
  }
  body.sl-has-shell .ws-chrome__actions .sl-btn--secondary {
    background: transparent;
    color: var(--sl-action-primary-fg);
    border-color: color-mix(in srgb, var(--sl-action-primary-fg) 45%, transparent);
  }
  body.sl-has-shell .ws-chrome:has(.ws-chrome__package-row, .editor-name-bar, .ws-chrome__tab, .editor-tabs .nav-link) > .ws-chrome__title-row::after {
    border-bottom-color: color-mix(in srgb, var(--sl-action-primary-fg) 28%, transparent);
  }
  body.sl-has-shell .ws-chrome__tab,
  body.sl-has-shell .ws-chrome .editor-tabs .nav-link,
  body.sl-has-shell .ws-chrome .nav-link {
    color: color-mix(in srgb, var(--sl-action-primary-fg) 80%, transparent);
  }
  @media (hover: hover) {
    body.sl-has-shell .ws-chrome__tab:hover,
    body.sl-has-shell .ws-chrome .editor-tabs .nav-link:hover,
    body.sl-has-shell .ws-chrome .nav-link:hover {
      color: var(--sl-action-primary-fg);
    }
  }
  body.sl-has-shell .ws-chrome__tab.active,
  body.sl-has-shell .ws-chrome__tab.is-current,
  body.sl-has-shell .ws-chrome__tab[aria-current="page"],
  body.sl-has-shell .ws-chrome .editor-tabs .nav-link.active,
  body.sl-has-shell .ws-chrome .nav-link.active {
    color: var(--sl-action-primary-fg);
    border-bottom-color: var(--sl-action-primary-fg);
  }

  /* Phone chrome idioms: Material on Android, Human Interface Guidelines on iOS.
     Desktop-width browsers stay `other` and keep the Material-leaning default. */
  html:not([data-sl-os="ios"]) body.sl-has-shell .shell-tabbar {
    box-shadow: var(--sl-elevation-1);
  }
  html:not([data-sl-os="ios"]) .shell-tabbar a,
  html:not([data-sl-os="ios"]) .shell-tabbar button.shell-tabbar__more {
    position: relative;
  }
  html:not([data-sl-os="ios"]) .shell-tabbar a.is-current::before,
  html:not([data-sl-os="ios"]) .shell-tabbar button.shell-tabbar__more[aria-expanded="true"]::before {
    content: "";
    position: absolute;
    top: var(--sl-space-1);
    left: 50%;
    width: 3.25rem;
    height: 1.75rem;
    border-radius: var(--sl-radius-pill);
    background: color-mix(in srgb, var(--sl-action-primary-bg) 16%, transparent);
    transform: translateX(-50%);
  }
  html:not([data-sl-os="ios"]) .shell-tabbar a i,
  html:not([data-sl-os="ios"]) .shell-tabbar button.shell-tabbar__more i,
  html:not([data-sl-os="ios"]) .shell-tabbar a span,
  html:not([data-sl-os="ios"]) .shell-tabbar button.shell-tabbar__more span {
    position: relative;
  }
  html[data-sl-os="ios"] body.sl-has-shell .ws-chrome__title-row .ws-chrome__title,
  html[data-sl-os="ios"] body.sl-has-shell .ws-chrome__title-row #page-heading {
    position: absolute;
    left: 50%;
    max-width: 54%;
    flex: 0 1 auto;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
  }
  html[data-sl-os="ios"] body.sl-has-shell .shell-tabbar {
    background: color-mix(in srgb, var(--sl-surface-raised) 92%, transparent);
    box-shadow: none;
  }
  html[data-sl-os="ios"] .shell-tabbar a.is-current,
  html[data-sl-os="ios"] .shell-tabbar button.shell-tabbar__more[aria-expanded="true"] {
    font-weight: var(--sl-font-weight-medium);
  }
  /* One More sheet: app tiles across the top, this-page rows below. */
  .shell-overflow-scrim.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: var(--sl-z-overlay);
    margin: 0;
    padding: 0;
    border: 0;
    background: color-mix(in srgb, var(--sl-text-primary) 20%, transparent);
    cursor: pointer;
  }
  #shell-phone-menu,
  #shell-phone-menu.is-open { display: none; }
  .shell-overflow-menu.is-open {
    top: auto;
    right: 0;
    bottom: var(--sl-tabbar-h);
    left: 0;
    z-index: var(--sl-z-modal);
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: min(
      var(--sl-sheet-max, 100svh),
      calc(100svh - var(--sl-tabbar-h) - max(var(--sl-space-8), env(safe-area-inset-top, 0px))),
      calc(100dvh - var(--sl-tabbar-h) - max(var(--sl-space-8), env(safe-area-inset-top, 0px)))
    );
    overflow: hidden;
    padding: 0 env(safe-area-inset-right, 0px) var(--sl-space-4) env(safe-area-inset-left, 0px);
    gap: 0;
    border: 0;
    border-radius: var(--sl-radius-xl) var(--sl-radius-xl) 0 0;
    background: var(--sl-surface-sunken);
    box-shadow: var(--sl-elevation-3);
    transform: translateY(var(--sl-sheet-drag, 0px));
  }
  .shell-overflow-menu.is-open.is-returning {
    transition: transform var(--sl-duration-base) ease-out;
  }
  .shell-overflow-menu.is-open.is-dragging {
    touch-action: none;
  }
  .shell-overflow-menu.is-open::before { display: none; }
  .shell-overflow-menu__handle,
  .shell-overflow-menu button.shell-overflow-menu__handle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: var(--sl-touch-min);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: grab;
    touch-action: none;
  }
  .shell-overflow-menu__handle::before {
    content: "";
    width: 2.25rem;
    height: 0.25rem;
    border-radius: var(--sl-radius-pill);
    background: var(--sl-border-subtle);
  }
  .shell-overflow-menu__handle:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
    outline-offset: calc(-1 * var(--sl-focus-ring-offset));
  }
  .shell-overflow-menu__title {
    display: none;
  }
  .shell-overflow-menu__title.sl-visually-hidden {
    display: block;
  }
  .shell-overflow-menu__rail {
    display: flex;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    gap: var(--sl-space-3);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 var(--sl-space-4) var(--sl-space-4);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .shell-overflow-menu__rail::-webkit-scrollbar { display: none; }
  .shell-overflow-menu__tile,
  .shell-overflow-menu a.shell-overflow-menu__tile,
  .shell-overflow-menu button.shell-overflow-menu__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 4.75rem;
    width: 4.75rem;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    gap: var(--sl-space-2);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--sl-text-primary);
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-xs);
    font-weight: var(--sl-font-weight-medium);
    line-height: var(--sl-line-height-tight);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    touch-action: pan-x;
  }
  .shell-overflow-menu__face {
    display: grid;
    place-items: center;
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--sl-radius-lg);
    background: var(--sl-surface-raised);
    color: var(--sl-action-primary-bg);
    box-shadow: var(--sl-elevation-1);
  }
  .shell-overflow-menu__tile i {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font-size: var(--sl-font-size-2xl);
    line-height: 1;
  }
  .shell-overflow-menu__tile .sl-link-mark {
    width: var(--sl-font-size-2xl);
    height: var(--sl-font-size-2xl);
    color: inherit;
  }
  .shell-overflow-menu__tile:focus-visible {
    outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
    outline-offset: var(--sl-focus-ring-offset);
  }
  .shell-overflow-menu__lists {
    display: flex;
    flex-direction: column;
    flex: 1 1 0%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 var(--sl-space-4);
    gap: var(--sl-space-3);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .shell-overflow-menu__group {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    overflow: hidden;
    background: var(--sl-surface-raised);
    border-radius: var(--sl-radius-lg);
  }
  .shell-overflow-menu__item,
  .shell-overflow-menu a.shell-overflow-menu__item,
  .shell-overflow-menu button.shell-overflow-menu__item {
    justify-content: space-between;
    gap: var(--sl-space-3);
    width: 100%;
    height: auto;
    min-height: calc(var(--sl-touch-min) + var(--sl-space-2));
    padding: var(--sl-space-3) var(--sl-space-4);
    border-radius: 0;
    font-size: var(--sl-font-size-md);
    text-align: start;
  }
  .shell-overflow-menu__item + .shell-overflow-menu__item {
    border-top: 1px solid var(--sl-border-subtle);
  }
  .shell-overflow-menu__item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: var(--sl-space-5);
    font-size: var(--sl-font-size-md);
    color: var(--sl-text-secondary);
  }
  .shell-overflow-menu__empty {
    text-align: start;
  }
  .shell-overflow-menu__cancel {
    display: none;
  }
}
body.sl-has-shell .pkg-start__lead {
  max-width: 46ch;
  margin: 0 auto var(--sl-space-8);
  color: var(--sl-text-secondary);
  line-height: 1.5;
}
body.sl-has-shell .pkg-start > .pkg-start__actions {
  /* moved into the left pane; keep out of the workspace card */
  display: none;
}
body.sl-has-shell .pkg-start__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--sl-ws-card-min)), 1fr));
  gap: var(--sl-ws-card-gap);
  width: 100%;
  margin-top: 0;
  align-items: stretch;
  text-align: left;
}
body.sl-has-shell .pkg-start__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-2);
  height: 100%;
  min-height: 13rem;
  padding: var(--sl-ws-card-pad);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-raised);
  box-shadow: var(--sl-elevation-start);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color var(--sl-duration-fast) ease, background-color var(--sl-duration-fast) ease;
}
body.sl-has-shell .pkg-start__card:hover {
  border-color: var(--sl-border-accent);
  background: var(--sl-feedback-info-bg);
}
body.sl-has-shell .pkg-start__card:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
body.sl-has-shell .pkg-start__card--drop {
  border-style: dashed;
  border-color: var(--sl-border-accent-soft);
  background: var(--sl-action-secondary-bg);
}
body.sl-has-shell .pkg-start .vi-dropzone--card {
  display: contents;
}
body.sl-has-shell .pkg-start__card--drop:has(.is-dragover) {
  border-color: var(--sl-action-primary-bg);
  border-style: solid;
  background: var(--sl-feedback-info-bg);
}
body.sl-has-shell .pkg-start__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  flex: none;
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-accent);
  color: var(--sl-action-primary-bg);
  font-size: var(--sl-font-size-lg);
}
body.sl-has-shell .pkg-start__card-title,
body.sl-has-shell .pkg-start .vi-dropzone__lead {
  margin: var(--sl-space-3) 0 0;
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-has-shell .pkg-start__card-hint,
body.sl-has-shell .pkg-start .vi-dropzone__sub {
  margin: 0;
  font-size: var(--sl-font-size-xs);
  line-height: 1.45;
  color: var(--sl-text-secondary);
}
body.sl-has-shell .pkg-start__card-action,
body.sl-has-shell .pkg-start .vi-dropzone--card .vi-dropzone__action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sl-space-2);
  width: 100%;
  margin-top: auto;
  padding-top: var(--sl-space-3);
}
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell .pkg-start__cards { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Big displays: a centred canvas at roughly 78% of the viewport, the same
   treatment the login page gives its card. Phone, tablet, and laptop-class
   screens stay full-bleed even when CSS width is high (14-inch MacBook
   More Space is often 1800px). html[data-sl-canvas] is stamped before paint
   (themeHead + SmartHubCanvas). Comfort = gaps; fill = edge to edge.
   -------------------------------------------------------------------------- */
@media (min-width: 1560px) {
  html[data-sl-canvas="comfort"]:has(body.sl-has-shell) { background: var(--sl-surface-canvas); }
  html[data-sl-canvas="comfort"] body.sl-has-shell {
    --sl-app-w: max(1512px, 78vw);
    --sl-app-gap: calc((100vw - var(--sl-app-w)) / 2);
    width: var(--sl-app-w);
    max-width: var(--sl-app-w);
    margin-inline: auto;
    box-sizing: border-box;
    border-inline: 1px solid var(--sl-border-subtle);
  }
}

/* ---------------------------------------------------------------------------
   Page header (packages pages)
   Title and a line saying what the page is, with the ways to add to it on the
   right, primary last. On the list pages it is its own sticky region; inside
   the editor band, §24 overrides position and border, and the band paints the
   surface. (Restored after an anchored deletion took it out with the retired
   pane styles: it renders on every packages page, so its absence broke all
   four at once.)
   -------------------------------------------------------------------------- */
body.sl-has-shell .page-head {
  position: sticky;
  top: var(--sl-header-height);
  z-index: var(--sl-z-sticky);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sl-space-6);
  padding: var(--sl-space-5) 0 var(--sl-space-4);
  background: var(--sl-surface-raised);
  border-bottom: 1px solid var(--sl-border-subtle);
}
body.sl-has-shell .page-head__title {
  margin: 0;
  font-size: var(--sl-font-size-2xl);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-has-shell .page-head__lead {
  margin: var(--sl-space-1) 0 0;
  color: var(--sl-text-secondary);
}
body.sl-has-shell .page-head__actions {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  flex: none;
}

/* ---------------------------------------------------------------------------
   24. Package workspace band — SINGLE SOURCE OF TRUTH.
       Rows: page header / package name / tabs / action lane. Every vertical
       gap in the band comes from the four knobs below; adjust those, never
       the individual rules. Elsewhere in this file and in the legacy sheets,
       .settings-tabs and .settings-header are styled as free-floating cards
       (border, radius, sticky, grey slab) from the pre-band layouts; each of
       those treatments is explicitly retired here, in one place, because
       patching them one property at a time is how this band kept breaking.
   -------------------------------------------------------------------------- */
body.sl-has-shell .editor-identity {
  --band-pad-top:       var(--sl-space-5);   /* above the page header      */
  --band-gap-head-name: var(--sl-space-4);   /* header text -> package name */
  --band-gap-name-tabs: var(--sl-space-3);   /* package name -> tabs        */
  --band-gap-tabs-lane: var(--sl-space-2h);  /* tabs divider -> action lane */

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  /* Placed by area, because sl-shell.js appends the tabs at runtime and DOM
     order would put them last. */
  grid-template-areas:
    "head   head"
    "name   name"
    "tabs   tabs"
    "status lane";
  column-gap: var(--sl-space-4);
  align-items: start;
}

/* Row 1: the page header, shared with the list pages. In the band it is not
   its own sticky region and draws no border; the tabs divider does that. */
body.sl-has-shell .editor-identity .page-head {
  grid-area: head;
  position: static;
  border-bottom: 0;
  background: none;                /* the band paints the surface */
  padding: var(--band-pad-top) 0 var(--band-gap-head-name);
}

/* Editors with no tool title/lead: package name occupies the first row.
   Import / Add Package live in the left pane. */
body.sl-has-shell .editor-identity:not(:has(.page-head__title)) {
  grid-template-areas:
    "name   head"
    "tabs   tabs"
    "status lane";
}
body.sl-has-shell .editor-identity:not(:has(.page-head__title)) .page-head {
  padding: var(--band-pad-top) 0 0;
  justify-content: flex-end;
  align-items: center;
}
body.sl-has-shell .editor-identity:not(:has(.page-head__title)) .metadata-label-block {
  padding-top: var(--band-pad-top);
  align-self: center;
}
body.sl-has-shell:has(.editor-name-bar) .editor-identity {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "tabs";
  padding-bottom: 0;
  border-bottom: 0;
  --band-pad-top: 0;
}
body.sl-has-shell:has(.editor-name-bar) .editor-identity:not(:has(.page-head__title)) {
  grid-template-areas: "tabs";
}
body.sl-has-shell:has(.editor-name-bar) .editor-identity .metadata-label-block {
  padding-top: 0;
  align-self: start;
}

.editor-name-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-3);
}
.editor-name-bar__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}
.editor-name-bar__meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}
.editor-name-bar__meta:not(:has(*)) { display: none; }
.editor-name-bar__meta .metadata-column {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  width: auto;
}
.editor-name-bar__meta .metadata-label-2 {
  margin: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-2xs);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-text-muted);
  white-space: nowrap;
}
.editor-name-bar__meta .metadata-value {
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
  background: none;
  padding: 0;
  white-space: nowrap;
}
.editor-name-bar__meta #package-status {
  color: var(--sl-text-link);
  font-weight: var(--sl-font-weight-semibold);
}
.editor-name-bar__meta .metadata-dirty {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.editor-name-bar__meta .metadata-dirty[hidden] { display: none; }
.editor-name-bar__meta .metadata-dirty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sl-feedback-warning-fg);
}
.editor-name-bar__meta .metadata-dirty-text {
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
  white-space: nowrap;
}
/* Package title row: name, status, and actions. Workspace-width only. */
@media (min-width: 901px) {
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) {
    /* 20px + 30px name + 20px + 1px border */
    --sl-pkg-name-row-h: 71px;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .page-content.settings-layout {
    position: relative;
    padding-top: 0;
  }
  /* Real bar that replaced the empty ::before — the package name lives here. */
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar {
    flex: 0 0 auto;
    align-self: start;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: var(--sl-pkg-name-row-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sl-space-3);
    padding: 20px 0;
    background: var(--sl-surface-page);
    border-bottom: 1px solid var(--sl-border-subtle);
    position: relative;
    z-index: 1;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar .metadata-label-block {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    gap: var(--sl-space-2);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar .metadata-label-title {
    display: none;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar .metadata-customer {
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-xl);
    font-weight: var(--sl-font-weight-semibold);
    letter-spacing: -0.01em;
    line-height: var(--sl-line-height-tight);
    color: var(--sl-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sl-space-2);
    margin-left: auto;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions.is-disabled {
    opacity: 0.45;
    pointer-events: none;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sl-space-2);
    width: auto;
    min-width: 0;
    min-height: var(--sl-control-height-sm);
    height: var(--sl-control-height-sm);
    margin: 0;
    padding: 0 var(--sl-space-3);
    border-radius: var(--sl-radius-sm);
    font-family: var(--sl-font-family);
    font-size: var(--sl-font-size-sm);
    font-weight: var(--sl-font-weight-semibold);
    line-height: var(--sl-line-height-tight);
    white-space: nowrap;
    box-shadow: none;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveAndDownloadButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #downloadButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #publishButton {
    box-sizing: border-box;
    min-width: 7.5rem;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions button label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions button span:where(.sl-label-text) {
    margin: 0;
    font-size: var(--sl-font-size-sm);
    font-weight: var(--sl-font-weight-semibold);
    line-height: var(--sl-line-height-tight);
    cursor: inherit;
    white-space: nowrap;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions button i {
    display: inline-flex;
    align-items: center;
    font-size: var(--sl-font-size-sm);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveButton { order: 1; }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveAndDownloadButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #downloadButton { order: 2; }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #unpublishButton { order: 3; }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #editAndVersionButton { order: 4; }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #publishButton { order: 5; }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #deleteButton { order: 6; }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveAndDownloadButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #downloadButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #unpublishButton {
    background: var(--sl-surface-raised);
    border: 1px solid var(--sl-border-accent);
    color: var(--sl-text-link);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveButton label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveAndDownloadButton label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #downloadButton label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #unpublishButton label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveButton i,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveAndDownloadButton i,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #downloadButton i,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #unpublishButton i,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveButton span:where(.sl-label-text),
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #saveAndDownloadButton span:where(.sl-label-text),
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #downloadButton span:where(.sl-label-text),
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #unpublishButton span:where(.sl-label-text) {
    color: var(--sl-text-link);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #deleteButton {
    background: var(--sl-surface-raised);
    border: 1px solid var(--sl-border-danger, var(--sl-text-danger));
    color: var(--sl-text-danger);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #deleteButton:hover {
    background: var(--sl-feedback-danger-bg);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #deleteButton label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #deleteButton span:where(.sl-label-text) {
    color: var(--sl-text-danger);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #publishButton,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #editAndVersionButton {
    background: var(--sl-action-primary-bg);
    border: 1px solid transparent;
    color: var(--sl-text-on-accent);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #publishButton:hover,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #editAndVersionButton:hover {
    background: var(--sl-action-primary-bg-hover);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #publishButton label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #editAndVersionButton label,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #publishButton i,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #editAndVersionButton i,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #publishButton span:where(.sl-label-text),
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-name-bar__actions #editAndVersionButton span:where(.sl-label-text) {
    color: var(--sl-text-on-accent);
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .page-content.settings-layout > form,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .page-content.settings-layout > form#smart-te-config-details,
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .page-content.settings-layout > form#smart-browser-config-details {
    position: relative;
    z-index: 1;
    min-height: 0;
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-identity {
    position: static;
    z-index: auto;
    grid-template-areas: "tabs";
  }
  body.sl-has-shell:has(.editor-identity):not(.sl-adding-package) .editor-identity .editor-tabs {
    margin-top: var(--sl-space-3);
  }
}

/* Row 2: the package name. Its wrapper dissolves (display: contents) so the
   name and the status land in different grid rows. */
body.sl-has-shell .editor-identity .metadata-header { display: contents; }
body.sl-has-shell .editor-identity .metadata-label-block {
  grid-area: name;
  min-width: 0;                    /* the ellipsis on long names still works */
}
body.sl-has-shell .editor-identity .metadata-label-title { display: none; }
body.sl-has-shell .editor-identity .metadata-customer {
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-2xl);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--sl-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Row 3: the tabs. No full-width divider under the row; the active tab
   still draws its own underline. */
body.sl-has-shell .editor-identity .editor-tabs {
  grid-area: tabs;
  margin-top: var(--sl-space-3);
  border-bottom: 0;
}
/* sl-shell.js lifts .nav-links out of the page's .settings-tabs nav and into
   the band; the nav left behind is an empty husk that still renders as the
   legacy floating card (border, radius, sticky) — the stray rounded fragment
   seen beside the tabs. A nav with no links has no job: hide it. */
body.sl-has-shell .settings-tabs:not(:has(.nav-links)) { display: none; }

body.sl-has-shell .editor-identity .editor-tabs .settings-tabs {
  position: static;
  top: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  width: auto;
}

/* Row 4: the action lane. Status left, the package-wide buttons right, one
   row, vertically centred on each other. No divider of its own: the tabs
   rule above opens the row, the band's border-bottom closes it. */
body.sl-has-shell .editor-identity .metadata-right-block {
  grid-area: status;
  align-self: center;
  margin: 0;
  padding-top: var(--band-gap-tabs-lane);
  border: 0;
}
body.sl-has-shell .editor-identity .settings-header {
  grid-area: lane;
  align-self: center;
  margin: 0;
  padding: var(--band-gap-tabs-lane) 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  position: static;
  top: auto;
  width: auto;
}

/* Below the band: ONE content card for whatever tab is open. It spans the
   workspace to match the band above, runs to the bottom of the viewport like
   the pane beside it, and scrolls its own content; the page itself no longer
   scrolls on editors. The card is .settings-body itself, so every tab fills
   it identically instead of each panel bringing its own width cap and frame. */
/* On editors .page-content is a direct child of the body grid, starting at
   the header's exact bottom edge (measured, 68px), so the viewport height
   anchors here. border-box: the element carries its own top padding, which a
   content-box height would push past the viewport, handing scroll back to
   the page. */
body.sl-has-shell .page-content.settings-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: calc(100dvh - var(--sl-header-height));
  min-height: 0;
  box-sizing: border-box;
}
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell .page-content.settings-layout,
  body.sl-has-shell:has(.editor-identity) .page-content.settings-layout,
  body.sl-has-shell:has(.ws-chrome) > .page-content.settings-layout {
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
}
/* Match the left pane's top inset so the package name sits on the same
   line as SmartBrowser / SmartTE. */
body.sl-has-shell:has(.editor-identity) .page-content.settings-layout,
body.sl-has-shell:has(.ws-chrome) > .page-content.settings-layout {
  padding-top: 0;
}
/* the form IDs join the selector because legacy sheets set the forms to
   display: block BY ID, which outranks any class chain */
body.sl-has-shell .page-content.settings-layout > form,
body.sl-has-shell .page-content.settings-layout > form#smart-te-config-details,
body.sl-has-shell .page-content.settings-layout > form#smart-browser-config-details {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
body.sl-has-shell .settings-layout .editor-identity { flex: none; }
body.sl-has-shell .settings-layout .settings-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  box-sizing: border-box;
  /* no bottom margin: .page-content's own padding-bottom is the gap */
  margin: var(--sl-space-3) 0 0;
  padding: var(--sl-space-5) var(--sl-space-6);
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-start);
}
/* the tab panels lose their own card chrome inside the shared card: the
   1500px cap, the frame border, and the tinted backgrounds all retire */
body.sl-has-shell .settings-body .settings-panel,
body.sl-has-shell .settings-body [class*="-background"],
body.sl-has-shell .settings-body [class*="-frame"] {
  max-width: none;
  width: auto;
  margin: 0;
  padding: 0;
  /* !important only because SmartBrowserConfig.css declares the panel border
     with !important itself; nothing weaker can retire it */
  border: 0 !important;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

/* meta line under the title: Status as a chip (the serial-chip pattern) */
body.sl-has-shell .editor-identity .metadata-right-block {
  display: flex;
  align-items: center;
  gap: var(--sl-space-5);
}
body.sl-has-shell .editor-identity .metadata-column {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--sl-space-2);
  margin: 0;
}
body.sl-has-shell .editor-identity .metadata-label-2 {
  margin: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
  text-transform: none;
}
body.sl-has-shell .editor-identity .metadata-value {
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-link);
  background: var(--sl-surface-accent);
  padding: 2px 10px;
  border-radius: var(--sl-radius-sm);
  white-space: nowrap;
}
/* the date reads quiet, not as a chip */
body.sl-has-shell .editor-identity #date-edited {
  background: none;
  padding: 0;
  color: var(--sl-text-secondary);
  font-weight: var(--sl-font-weight-regular);
}

/* unsaved-changes indicator beside the status chip (UXS-011/012 evolution) */
body.sl-has-shell .editor-identity .metadata-dirty { gap: 7px; }
body.sl-has-shell .editor-identity .metadata-dirty[hidden] { display: none; }
body.sl-has-shell .editor-identity .metadata-dirty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sl-feedback-warning-fg);
}
body.sl-has-shell .editor-identity .metadata-dirty-text {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
}

/* Editor tabs: the sections as a horizontal underline bar at the bottom of
   the pinned band (the Add License tab pattern). showSection() still owns
   switching; it toggles .active on these links. */
body.sl-has-shell .editor-identity .editor-tabs .nav-links {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
}
body.sl-has-shell .editor-identity .editor-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-secondary);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
body.sl-has-shell .editor-identity .editor-tabs .nav-link:hover {
  background: none;
  color: var(--sl-text-primary);
}
body.sl-has-shell .editor-identity .editor-tabs .nav-link.active {
  background: none;
  color: var(--sl-text-link);
  border-bottom-color: var(--sl-border-accent);
  font-weight: var(--sl-font-weight-semibold);
}

/* ---------------------------------------------------------------------------
   §12  Notices — the topbar bell
   The dot is the whole point: on any page, it says something changed and
   wants attention. Panel styling follows the account dropdown so the two
   read as the same kind of thing.
   --------------------------------------------------------------------------- */
.shell-topbar .topbar-notices { position: relative; display: flex; align-items: center; }

.shell-topbar .topbar-bell {
  position: relative;                       /* anchors the dot */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sl-surface-sunken);
  border: 0;
  color: var(--sl-text-secondary);
  font-size: 0.9375rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.shell-topbar .topbar-bell:hover { background: var(--sl-border-subtle); color: var(--sl-text-primary); }
.shell-topbar .topbar-bell:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

/* Solid, saturated, and the same red in both themes: an alert badge that
   dimmed in dark mode would be quieter exactly where it matters. Ringed in
   the header surface so it reads as a badge sitting on the bell. */
.shell-topbar .topbar-bell__dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sl-feedback-danger-solid);
  box-shadow: 0 0 0 2px var(--sl-surface-raised);
}

.shell-notices {
  position: fixed;
  top: calc(var(--sl-header-height) + 6px);
  right: calc(var(--sl-app-gap, 0px) + var(--sl-space-4));
  z-index: var(--sl-z-dropdown);
  width: min(22rem, calc(100vw - 2 * var(--sl-space-4)));
  max-height: min(24rem, calc(100vh - var(--sl-header-height) - var(--sl-space-8)));
  overflow-y: auto;
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  box-shadow: var(--sl-elevation-3);
  padding: var(--sl-space-3);
}
.shell-notices[hidden] { display: none; }
.shell-notices:has(.shell-notices__list) .shell-notices__empty,
.shell-notices:has(#shell-notices-resume:not([hidden])) .shell-notices__empty {
  display: none;
}
.shell-notices__resume {
  margin-top: var(--sl-space-3);
}
.shell-notices__resume-title {
  margin: 0 0 var(--sl-space-2);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shell-notices__resume-body {
  --sl-hub-resume-chip: 7.5rem;
  --sl-hub-resume-marks: 1.25rem;
}
.shell-notices__resume-body .hub-resume__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  overflow: hidden;
}
.shell-notices__resume-body .hub-resume__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: var(--sl-space-2);
  padding: var(--sl-space-2) var(--sl-space-3);
  min-height: var(--sl-touch-min, 44px);
  color: inherit;
  text-decoration: none;
}
.shell-notices__resume-body .hub-resume__row:hover {
  background: var(--sl-surface-sunken);
}
.shell-tabbar button.shell-tabbar__notices {
  position: relative;
}

.shell-notices__title {
  margin: 0 0 var(--sl-space-2);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shell-notices__empty,
.shell-notices__detail,
.shell-notices__notes,
.shell-notices__when { color: var(--sl-text-secondary); font-size: var(--sl-font-size-sm); }
.shell-notices__empty { margin: 0; }
.shell-notices__notes {
  margin: 2px 0 0;
  padding-left: 1.2em;
}
.shell-notices__notes li { margin: 2px 0; }

.shell-notices__list { list-style: none; margin: 0; padding: 0; }
.shell-notices__item {
  display: grid;
  gap: 2px;
  padding: var(--sl-space-2) var(--sl-space-2) var(--sl-space-2) var(--sl-space-3);
  border-radius: var(--sl-radius-sm);
  border-left: 2px solid transparent;       /* reserved so read/unread do not reflow */
}
.shell-notices__item + .shell-notices__item { margin-top: 2px; }
.shell-notices__item--unread { border-left-color: var(--sl-feedback-danger-solid); }
.shell-notices__item:hover { background: var(--sl-surface-sunken); }
.shell-notices__what { color: var(--sl-text-primary); font-size: var(--sl-font-size-sm); }
a.shell-notices__what { text-decoration: none; }
a.shell-notices__what:hover { text-decoration: underline; }
.shell-notices__key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--sl-space-3);
  margin-top: 2px;
}
.shell-notices__key-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-secondary);
}
/* Round halo+dot. Shared by notices, package-list rows, the import legend,
   and Keyboard Designer so the mark is the same everywhere. */
.vi-key-dot,
.pkg-imported-dot,
.shell-notices__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  position: relative;
}
.vi-key-dot::after,
.pkg-imported-dot::after,
.shell-notices__dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.vi-key-dot--imported,
.shell-notices__dot--imported {
  background: color-mix(in srgb, var(--sl-import-as-is) 28%, transparent);
}
.vi-key-dot--imported::after,
.shell-notices__dot--imported::after {
  background: var(--sl-import-as-is);
}
.vi-key-dot--adapted,
.shell-notices__dot--adapted,
.pkg-imported-dot {
  background: color-mix(in srgb, var(--sl-import-adapted) 32%, transparent);
}
.vi-key-dot--adapted::after,
.shell-notices__dot--adapted::after,
.pkg-imported-dot::after {
  background: var(--sl-import-adapted);
}
.shell-notices__log {
  color: var(--sl-text-link);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  text-decoration: none;
}
.shell-notices__log:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Text to speech (top bar) and Settings panel
   --------------------------------------------------------------------------- */
.shell-topbar .topbar-tts {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.shell-topbar .topbar-tts[hidden],
.shell-topbar .topbar-tts__btn[hidden] { display: none; }
.shell-topbar .topbar-tts__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sl-surface-sunken);
  border: 0;
  color: var(--sl-text-secondary);
  font-size: 0.9375rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}
.shell-topbar .topbar-tts__btn:hover {
  background: var(--sl-border-subtle);
  color: var(--sl-text-primary);
}
.shell-topbar .topbar-tts__btn:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.shell-topbar .topbar-tts__btn[aria-pressed="true"] {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
}

html[data-density="comfortable"] .shell-topbar .topbar-theme,
html[data-density="comfortable"] .shell-topbar .topbar-bell,
html[data-density="comfortable"] .shell-topbar .topbar-tts__btn,
html[data-density="comfortable"] .shell-topbar .topbar-user,
html[data-density="comfortable"] .shell-topbar .topbar-settings {
  width: 44px;
  height: 44px;
}

/* Extra chrome inset so large type (Low vision is 150%) is not clipped
   in the title row, left pane, or the pinned Settings chip. */
html[data-density="comfortable"] body.sl-has-shell {
  --sl-ws-title-row-h: 5.25rem;
}
html[data-density="comfortable"] body.sl-has-shell .ws-chrome__title-row {
  padding-block: var(--sl-space-6);
  gap: var(--sl-space-4);
}
html[data-density="comfortable"] body.sl-has-shell > .shell-sections,
html[data-density="comfortable"] body.sl-has-shell > .shell-config {
  padding: var(--sl-space-4) var(--sl-space-3);
}
html[data-density="comfortable"] .shell-sections .shell-sections__title,
html[data-density="comfortable"] .shell-config .shell-config__title {
  padding: var(--sl-space-2) var(--sl-space-2h) var(--sl-space-3);
}
html[data-density="comfortable"] .shell-sections .sl-pane-group__head,
html[data-density="comfortable"] .shell-config .sl-pane-group__head {
  min-height: var(--sl-touch-min);
  padding: var(--sl-space-2h) var(--sl-space-3);
}
html[data-density="comfortable"] .shell-sections .sl-menu-btn,
html[data-density="comfortable"] .shell-sections .nav-link,
html[data-density="comfortable"] .shell-config .sl-menu-btn {
  min-height: var(--sl-touch-min);
  padding: var(--sl-space-2h) var(--sl-space-3);
}
@media (min-width: 701px) {
  html[data-density="comfortable"] body.sl-has-shell.sections-collapsed .shell-sections .hub-settings-chip {
    padding-top: var(--sl-space-4);
    padding-bottom: var(--sl-space-3);
  }
}

body.sl-has-shell #content-container .reuseable-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sl-space-6);
  width: 100%;
  max-width: var(--sl-ws-hub-max);
  min-height: 0;
  margin: 0;
}
body.sl-has-shell #content-container .inner-container {
  display: none;
  box-sizing: border-box;
  flex: 0 1 auto;
  width: 100%;
  max-width: var(--sl-ws-start-max);
  height: auto;
  max-height: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.sl-has-shell #content-container .inner-container.active {
  display: flex;
}
body.sl-has-shell #content-container .inner-container.hub-card {
  align-items: stretch;
  gap: 0;
  min-width: 0;
  overflow: visible;
  padding: var(--sl-ws-card-pad);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-raised);
  box-shadow: var(--sl-elevation-start);
}
body.sl-has-shell #content-container .inner-container.hub-card .settings-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sl-space-4);
  min-width: 0;
  margin-top: var(--sl-space-4);
}
body.sl-has-shell #content-container .inner-container.hub-card .settings-restart-note {
  margin: 0;
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: var(--sl-line-height-body);
}
body.sl-has-shell .server-settings-modal .hub-card__tag--attention {
  align-self: flex-start;
}
body.sl-has-shell #content-container .inner-container.hub-card:hover {
  border-color: var(--sl-border-accent-soft);
}
body.sl-has-shell #content-container .hub-card__title {
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  flex: none;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-xl);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
  letter-spacing: normal;
  text-transform: none;
  color: var(--sl-text-secondary);
}
body.sl-has-shell #content-container:has(#loggingConfiguration.active) .reuseable-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  max-width: var(--sl-ws-hub-max);
}
@media (min-width: 901px) {
  body.sl-has-shell #content-container:has(#loggingConfiguration.active) .reuseable-container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  body.sl-has-shell #content-container:has(#loggingConfiguration.active) .inner-container.hub-card {
    max-width: none;
    height: 100%;
  }
}

/* Settings form interiors — keep every field inside the hub-card.
   Legacy style_settings.css used fixed widths, 50–60px indents, and
   absolutely positioned nested boxes (SmartHub details, SMTP auth). */
body.sl-has-shell #content-container .inner-container.hub-card > .pNormal,
body.sl-has-shell #content-container .inner-container.hub-card > .pBold,
body.sl-has-shell #content-container .inner-container.hub-card > .pLittle,
body.sl-has-shell #content-container .inner-container.hub-card h3,
body.sl-has-shell #content-container .inner-container.hub-card .standard-input,
body.sl-has-shell #content-container .inner-container.hub-card .input-container,
body.sl-has-shell #content-container .inner-container.hub-card .logging-level-container,
body.sl-has-shell #content-container .inner-container.hub-card .dropdown,
body.sl-has-shell #content-container .inner-container.hub-card .textarea-container {
  margin: 0;
  width: 100%;
  max-width: none;
}
body.sl-has-shell #content-container .inner-container.hub-card .pNormal,
body.sl-has-shell #content-container .inner-container.hub-card .pBold,
body.sl-has-shell #content-container .inner-container.hub-card .pLittle {
  color: var(--sl-text-secondary);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
}
body.sl-has-shell #content-container .inner-container.hub-card .pNormal {
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-md);
}
body.sl-has-shell #content-container .inner-container.hub-card h3 {
  color: var(--sl-text-primary);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
}
body.sl-has-shell #content-container .inner-container.hub-card i.fa.fa-asterisk {
  color: var(--sl-text-danger);
}
body.sl-has-shell #content-container .inner-container.hub-card .pending,
body.sl-has-shell #content-container .inner-container.hub-card .log-pending {
  color: var(--sl-feedback-warning-fg);
  font-size: var(--sl-font-size-xs);
}

body.sl-has-shell #content-container .inner-container.hub-card label:not(.toggle),
body.sl-has-shell #content-container .inner-container.hub-card .input-label,
body.sl-has-shell #content-container .inner-container.hub-card .DS-input-label,
body.sl-has-shell #content-container .inner-container.hub-card .DS-textarea-label,
body.sl-has-shell #content-container .inner-container.hub-card .dropdown-label,
body.sl-has-shell #content-container .inner-container.hub-card span:where(.sl-label-text):not(.toggle) {
  display: block;
  width: 100%;
  color: var(--sl-text-primary);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-body);
}
body.sl-has-shell #content-container .inner-container.hub-card .input-helper-text {
  height: auto;
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-xs);
  line-height: var(--sl-line-height-body);
}

body.sl-has-shell #content-container .inner-container.hub-card .standard-input,
body.sl-has-shell #content-container .inner-container.hub-card .input-container,
body.sl-has-shell #content-container .inner-container.hub-card .logging-level-container,
body.sl-has-shell #content-container .inner-container.hub-card .dropdown,
body.sl-has-shell #content-container .inner-container.hub-card .textarea-container {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sl-space-1);
  box-sizing: border-box;
}
body.sl-has-shell #content-container .inner-container.hub-card #portContainer {
  width: min(12rem, 100%);
}
body.sl-has-shell #content-container .inner-container.hub-card #max-log-size-container,
body.sl-has-shell #content-container .inner-container.hub-card #keep-logs-container,
body.sl-has-shell #content-container .inner-container.hub-card #total-capacity-container {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sl-space-2);
}
body.sl-has-shell #content-container .inner-container.hub-card #max-log-size-container label,
body.sl-has-shell #content-container .inner-container.hub-card #keep-logs-container label,
body.sl-has-shell #content-container .inner-container.hub-card #total-capacity-container label,
body.sl-has-shell #content-container .inner-container.hub-card #max-log-size-container span:where(.sl-label-text),
body.sl-has-shell #content-container .inner-container.hub-card #keep-logs-container span:where(.sl-label-text),
body.sl-has-shell #content-container .inner-container.hub-card #total-capacity-container span:where(.sl-label-text) {
  flex: 1 1 100%;
}
body.sl-has-shell #content-container .inner-container.hub-card #max-log-size-container input,
body.sl-has-shell #content-container .inner-container.hub-card #keep-logs-container input,
body.sl-has-shell #content-container .inner-container.hub-card #total-capacity-container input {
  width: 8rem;
  flex: 0 0 auto;
}

body.sl-has-shell #content-container .inner-container.hub-card input:not([type="checkbox"]):not([type="hidden"]),
body.sl-has-shell #content-container .inner-container.hub-card select,
body.sl-has-shell #content-container .inner-container.hub-card textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: var(--sl-control-height);
  margin: 0;
  padding: var(--sl-space-2h) var(--sl-space-3);
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-xs);
  box-shadow: none;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-field);
  outline: none;
}
body.sl-has-shell #content-container .inner-container.hub-card textarea {
  min-height: 6rem;
  resize: vertical;
}
body.sl-has-shell #content-container .inner-container.hub-card input:not([type="checkbox"]):not([type="hidden"]):focus,
body.sl-has-shell #content-container .inner-container.hub-card select:focus,
body.sl-has-shell #content-container .inner-container.hub-card textarea:focus {
  border-color: var(--sl-selected-border);
  box-shadow: inset 0 0 0 1px var(--sl-selected-border);
}
body.sl-has-shell #content-container .inner-container.hub-card input:not([type="checkbox"]):not([type="hidden"]):focus-visible,
body.sl-has-shell #content-container .inner-container.hub-card select:focus-visible,
body.sl-has-shell #content-container .inner-container.hub-card textarea:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
body.sl-has-shell #content-container .inner-container.hub-card input:disabled,
body.sl-has-shell #content-container .inner-container.hub-card select:disabled,
body.sl-has-shell #content-container .inner-container.hub-card textarea:disabled {
  background: var(--sl-surface-disabled);
  border-style: dashed;
  color: var(--sl-text-muted);
  cursor: not-allowed;
}
body.sl-has-shell #content-container .inner-container.hub-card input:read-only:not(:disabled) {
  background: var(--sl-surface-disabled);
}
body.sl-has-shell #content-container .inner-container.hub-card input.invalid,
body.sl-has-shell #content-container .inner-container.hub-card textarea.invalid {
  border-color: var(--sl-border-danger);
}
body.sl-has-shell #content-container .inner-container.hub-card #max-log-size-container > span,
body.sl-has-shell #content-container .inner-container.hub-card #keep-logs-container > span,
body.sl-has-shell #content-container .inner-container.hub-card #total-capacity-container > span {
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
}

body.sl-has-shell #content-container .inner-container.hub-card .time-container,
body.sl-has-shell #content-container .inner-container.hub-card .email-container,
body.sl-has-shell #content-container .inner-container.hub-card .email-continer-p2,
body.sl-has-shell #content-container .inner-container.hub-card .authentication-container,
body.sl-has-shell #content-container .inner-container.hub-card .reminders-container {
  position: static;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sl-space-4);
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: var(--sl-space-4);
  flex-shrink: 1;
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
  box-shadow: none;
}
body.sl-has-shell #content-container .inner-container.hub-card .email-continer-p2 {
  border: 0;
  background: transparent;
  padding: 0;
}
body.sl-has-shell #content-container .inner-container.hub-card #timeout-input-container {
  margin: 0;
  width: 100%;
}

body.sl-has-shell #content-container .inner-container.hub-card label.toggle,
body.sl-has-shell #content-container .inner-container.hub-card span:where(.sl-label-text).toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  width: auto;
  max-width: 100%;
  cursor: pointer;
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle-label {
  width: auto;
  margin-left: var(--sl-space-2h);
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle .slider {
  flex: none;
  background: var(--sl-surface-sunken);
  border-color: var(--sl-border-field);
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle .knob {
  background: var(--sl-text-muted);
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle .knob i {
  color: var(--sl-action-primary-bg);
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle input:checked + .slider {
  background: var(--sl-action-primary-bg);
  border-color: var(--sl-action-primary-bg);
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle input:checked + .slider .knob {
  background: var(--sl-surface-raised);
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle input:focus-visible + .slider {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
  box-shadow: none;
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle input:disabled + .slider,
body.sl-has-shell #content-container .inner-container.hub-card .toggle input:disabled:checked + .slider {
  background: var(--sl-surface-disabled);
  border-style: dashed;
  border-color: var(--sl-border-field);
}
body.sl-has-shell #content-container .inner-container.hub-card .toggle input:disabled + .slider .knob,
body.sl-has-shell #content-container .inner-container.hub-card .toggle input:disabled:checked + .slider .knob {
  background: var(--sl-text-muted);
}

body.sl-has-shell #content-container .inner-container.hub-card .btn-container,
body.sl-has-shell #content-container .inner-container.hub-card .btn-container.save-email {
  position: static;
  left: auto;
  bottom: auto;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: 0;
  padding-top: var(--sl-space-4);
  border-top: 1px solid var(--sl-border-subtle);
  justify-content: flex-end;
  gap: var(--sl-space-3);
}
body.sl-has-shell #content-container .inner-container.hub-card .btn-container button {
  margin: 0;
}
body.sl-has-shell #content-container #emailConfigurations {
  height: auto;
  max-height: none;
  overflow: visible;
  padding-bottom: 0;
}
body.sl-has-shell #content-container #emailConfigurations :is(#errorFrame, .sl-id-errorFrame) {
  width: 100%;
  margin: 0;
  padding: var(--sl-space-3);
  border-color: var(--sl-border-danger);
  background: var(--sl-feedback-danger-bg);
  color: var(--sl-feedback-danger-fg);
  border-radius: var(--sl-radius-sm);
}
body.sl-has-shell #content-container #emailConfigurations :is(#errorFrame, .sl-id-errorFrame) ul li {
  width: auto;
  margin: 0;
  color: inherit;
}

body.sl-has-shell[data-topbar-link="0"] .topbar-search__command { display: none; }
body.sl-has-shell[data-topbar-notices="0"] .topbar-notices,
body.sl-has-shell[data-topbar-notices="0"] .shell-notices { display: none; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell[data-topbar-notices="0"] .topbar-notices {
    display: flex;
  }
  body.sl-has-shell[data-topbar-notices="0"] .shell-notices[hidden] {
    display: none;
  }
  body.sl-has-shell[data-topbar-notices="0"] .shell-notices:not([hidden]) {
    display: block;
  }
  .shell-notices {
    top: var(--sl-phone-chrome-h, env(safe-area-inset-top, 0px));
    right: 0;
    left: 0;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - var(--sl-phone-chrome-h, 0px) - var(--sl-tabbar-h, 0px));
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: var(--sl-space-4);
    padding-left: max(var(--sl-space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--sl-space-4), env(safe-area-inset-right, 0px));
  }
  .shell-tabbar button.shell-tabbar__notices .topbar-bell__dot {
    top: 2px;
    right: calc(50% - 14px);
    box-shadow: 0 0 0 2px var(--sl-surface-raised);
  }
  .shell-tabbar button.shell-tabbar__more .topbar-bell__dot {
    top: 2px;
    right: calc(50% - 14px);
    box-shadow: 0 0 0 2px var(--sl-surface-raised);
  }
  body.sl-has-shell[data-topbar-account="0"] .shell-user-menu.open {
    display: block;
  }
  .shell-user-menu {
    top: calc(var(--sl-phone-chrome-h, env(safe-area-inset-top, 0px)) + 6px);
  }
}
body.sl-has-shell[data-topbar-theme="0"] .topbar-theme { display: none; }
body.sl-has-shell[data-topbar-settings="0"] .topbar-settings { display: none; }
body.sl-has-shell[data-topbar-account="0"] .topbar-user,
body.sl-has-shell[data-topbar-account="0"] .shell-user-menu { display: none; }

body.sl-has-shell #a11yPreferences.inner-container,
body.sl-has-shell #topbarPreferences.inner-container {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: min(100%, var(--sl-ws-a11y-max));
  max-width: var(--sl-ws-a11y-max);
  height: auto;
  max-height: none;
  overflow-y: auto;
  gap: var(--sl-space-5);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.sl-has-shell #content-container:has(#a11yPreferences.active) .reuseable-container,
body.sl-has-shell #content-container:has(#topbarPreferences.active) .reuseable-container {
  width: 100%;
  max-width: var(--sl-ws-a11y-max);
  margin-left: 0;
}
body.sl-has-shell #a11yPreferences label,
body.sl-has-shell #topbarPreferences label,
body.sl-has-shell #a11yPreferences span:where(.sl-label-text),
body.sl-has-shell #topbarPreferences span:where(.sl-label-text) {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}
body.sl-has-shell #a11yPreferences input[type="radio"],
body.sl-has-shell #a11yPreferences input[type="checkbox"],
body.sl-has-shell #topbarPreferences input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
body.sl-has-shell #a11yPreferences .pNormal,
body.sl-has-shell #a11yPreferences .pLittle,
body.sl-has-shell #topbarPreferences .pNormal,
body.sl-has-shell #topbarPreferences .pLittle {
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
  margin: 0;
}
body.sl-has-shell #a11yPreferences .pNormal,
body.sl-has-shell #topbarPreferences .pNormal {
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-md);
}
body.sl-has-shell #a11yPreferences a,
body.sl-has-shell #topbarPreferences a {
  color: var(--sl-text-link);
}

body.sl-has-shell #a11yPreferences .a11y-lead,
body.sl-has-shell #topbarPreferences .a11y-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-3);
  min-width: 0;
}
body.sl-has-shell #a11yPreferences .a11y-lead__title,
body.sl-has-shell #topbarPreferences .a11y-lead__title {
  margin: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-2xl);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.02em;
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
}
body.sl-has-shell #a11yPreferences .a11y-custom-note {
  margin: 0;
  padding: var(--sl-space-2) var(--sl-space-3);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-feedback-info-bg);
  color: var(--sl-feedback-info-fg);
  font-size: var(--sl-font-size-sm);
}

body.sl-has-shell #a11yPreferences .a11y-fieldset,
body.sl-has-shell #topbarPreferences .a11y-fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-4);
  margin: 0;
  min-width: 0;
  min-inline-size: 0;
  padding: var(--sl-ws-card-pad);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-raised);
  box-shadow: var(--sl-elevation-start);
}
/* Keep the title inside the card so it does not cut the top border. */
body.sl-has-shell #a11yPreferences .a11y-fieldset legend,
body.sl-has-shell #topbarPreferences .a11y-fieldset legend {
  display: contents;
}
body.sl-has-shell #a11yPreferences .a11y-fieldset__title,
body.sl-has-shell #topbarPreferences .a11y-fieldset__title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
}

body.sl-has-shell #a11yPreferences .a11y-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--sl-ws-card-min)), 1fr));
  gap: var(--sl-ws-card-gap);
}
body.sl-has-shell #a11yPreferences .a11y-preset {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--sl-space-2);
  margin: 0;
  padding: var(--sl-space-3);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
  box-shadow: none;
  cursor: pointer;
  font-size: var(--sl-font-size-sm);
  line-height: var(--sl-line-height-body);
  transition:
    border-color var(--sl-duration-fast) var(--sl-easing-standard),
    background-color var(--sl-duration-fast) var(--sl-easing-standard);
}
body.sl-has-shell #a11yPreferences .a11y-preset:hover {
  border-color: var(--sl-border-accent);
}
body.sl-has-shell #a11yPreferences .a11y-preset:has(input:checked) {
  border-color: var(--sl-selected-border);
  background: var(--sl-selected-bg);
}
body.sl-has-shell #a11yPreferences .a11y-preset:focus-within {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
body.sl-has-shell #a11yPreferences .a11y-preset input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
body.sl-has-shell #a11yPreferences .a11y-preset__body {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  min-width: 0;
}
body.sl-has-shell #a11yPreferences .a11y-preset__body strong {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-has-shell #a11yPreferences .a11y-preset__body span {
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-regular);
  color: var(--sl-text-secondary);
}

body.sl-has-shell #a11yPreferences .a11y-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sl-space-1);
  min-width: 0;
}
body.sl-has-shell #a11yPreferences .a11y-field__label {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-primary);
}

body.sl-has-shell #a11yPreferences .a11y-segment {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-self: flex-start;
  max-width: 100%;
  padding: var(--sl-space-1);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
  overflow: hidden;
}
body.sl-has-shell #a11yPreferences label.a11y-segment__opt,
body.sl-has-shell #a11yPreferences span:where(.sl-label-text).a11y-segment__opt {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  width: auto;
  margin: 0;
  cursor: pointer;
}
body.sl-has-shell #a11yPreferences .a11y-segment__opt + .a11y-segment__opt {
  border-left: 0;
}
body.sl-has-shell #a11yPreferences .a11y-segment__opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
body.sl-has-shell #a11yPreferences .a11y-segment__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: var(--sl-control-height);
  padding: 0 var(--sl-space-3);
  border: 1px solid transparent;
  border-radius: var(--sl-radius-sm);
  background: transparent;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-secondary);
}
body.sl-has-shell #a11yPreferences .a11y-segment__opt:hover span {
  color: var(--sl-text-primary);
  background: var(--sl-action-secondary-bg-hover);
}
body.sl-has-shell #a11yPreferences .a11y-segment__opt:has(input:checked) span {
  background: var(--sl-surface-raised);
  border-color: var(--sl-border-subtle);
  box-shadow: var(--sl-elevation-1);
  color: var(--sl-text-primary);
}
body.sl-has-shell #a11yPreferences .a11y-segment:focus-within {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

body.sl-has-shell #a11yPreferences .a11y-scale {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  flex-wrap: wrap;
}
body.sl-has-shell #a11yPreferences .a11y-scale .btn-secondary {
  min-height: var(--sl-control-height);
  min-width: var(--sl-control-height);
  padding: 0 var(--sl-space-3);
  margin: 0;
}
body.sl-has-shell #a11yPreferences .a11y-scale__value {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: var(--sl-control-height);
  padding: 0 var(--sl-space-3);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-xs);
  background: var(--sl-surface-raised);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}

body.sl-has-shell #a11yPreferences label.toggle.a11y-toggle,
body.sl-has-shell #topbarPreferences label.toggle.a11y-toggle,
body.sl-has-shell #a11yPreferences span:where(.sl-label-text).toggle.a11y-toggle,
body.sl-has-shell #topbarPreferences span:where(.sl-label-text).toggle.a11y-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  margin: 0;
  cursor: pointer;
}
body.sl-has-shell #a11yPreferences .a11y-toggle .toggle-label,
body.sl-has-shell #topbarPreferences .a11y-toggle .toggle-label {
  width: auto;
  margin-left: var(--sl-space-2h);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-primary);
}
body.sl-has-shell #a11yPreferences .a11y-toggle .slider,
body.sl-has-shell #topbarPreferences .a11y-toggle .slider {
  flex: none;
  background: var(--sl-surface-sunken);
  border-color: var(--sl-border-field);
}
body.sl-has-shell #a11yPreferences .a11y-toggle .knob,
body.sl-has-shell #topbarPreferences .a11y-toggle .knob {
  background: var(--sl-text-muted);
}
body.sl-has-shell #a11yPreferences .a11y-toggle .knob i,
body.sl-has-shell #topbarPreferences .a11y-toggle .knob i {
  color: var(--sl-action-primary-bg);
}
body.sl-has-shell #a11yPreferences .a11y-toggle input:checked + .slider,
body.sl-has-shell #topbarPreferences .a11y-toggle input:checked + .slider {
  background: var(--sl-action-primary-bg);
  border-color: var(--sl-action-primary-bg);
}
body.sl-has-shell #a11yPreferences .a11y-toggle input:checked + .slider .knob,
body.sl-has-shell #topbarPreferences .a11y-toggle input:checked + .slider .knob {
  background: var(--sl-surface-raised);
}
body.sl-has-shell #a11yPreferences .a11y-toggle input:focus-visible + .slider,
body.sl-has-shell #topbarPreferences .a11y-toggle input:focus-visible + .slider {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
  box-shadow: none;
}
body.sl-has-shell #a11yPreferences .a11y-toggle input:disabled + .slider,
body.sl-has-shell #a11yPreferences .a11y-toggle input:disabled:checked + .slider {
  background: var(--sl-surface-disabled);
  border-style: dashed;
  border-color: var(--sl-border-field);
}
body.sl-has-shell #a11yPreferences .a11y-toggle input:disabled + .slider .knob,
body.sl-has-shell #a11yPreferences .a11y-toggle input:disabled:checked + .slider .knob {
  background: var(--sl-text-muted);
}
body.sl-has-shell #a11yPreferences .a11y-toggle:has(input:disabled) {
  cursor: not-allowed;
}

body.sl-has-shell #a11yPreferences .a11y-select-wrap {
  position: relative;
  width: 100%;
}
body.sl-has-shell #a11yPreferences .a11y-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--sl-space-3);
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--sl-text-secondary);
  border-bottom: 2px solid var(--sl-text-secondary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
body.sl-has-shell #a11yPreferences .a11y-select {
  display: block;
  width: 100%;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: var(--sl-space-8);
  cursor: pointer;
}
body.sl-has-shell #a11yPreferences .a11y-select::-ms-expand {
  display: none;
}

body.sl-has-shell #a11yPreferences .a11y-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-2);
  min-width: 0;
  padding-top: var(--sl-space-2);
}
body.sl-has-shell #a11yPreferences .btn-container {
  position: static;
  display: flex;
  left: auto;
  bottom: auto;
  width: auto;
  height: auto;
  margin: 0;
  justify-content: flex-start;
}
body.sl-has-shell #a11yPreferences .btn-container .btn-warning {
  margin: 0;
}

body.sl-has-shell #missInbox.inner-container {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: min(100%, var(--sl-ws-hub-max));
  max-width: var(--sl-ws-hub-max);
  height: auto;
  max-height: none;
  overflow-y: auto;
  gap: var(--sl-space-5);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.sl-has-shell #content-container:has(#missInbox.active) .reuseable-container {
  width: 100%;
  max-width: var(--sl-ws-hub-max);
  margin-left: 0;
}
body.sl-has-shell #missInbox .pNormal,
body.sl-has-shell #missInbox .pLittle {
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
  margin: 0;
}
body.sl-has-shell #missInbox .pNormal {
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-md);
}
body.sl-has-shell #missInbox a {
  color: var(--sl-text-link);
}
body.sl-has-shell #missInbox .miss-inbox__lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-3);
  min-width: 0;
}
body.sl-has-shell #missInbox .miss-inbox__title {
  margin: 0;
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-2xl);
  font-weight: var(--sl-font-weight-semibold);
  letter-spacing: -0.02em;
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
}
body.sl-has-shell #missInbox .miss-inbox__fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-4);
  margin: 0;
  min-width: 0;
  min-inline-size: 0;
  padding: var(--sl-ws-card-pad);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-raised);
  box-shadow: var(--sl-elevation-start);
}
body.sl-has-shell #missInbox .miss-inbox__fieldset legend {
  display: contents;
}
body.sl-has-shell #missInbox .miss-inbox__legend {
  display: block;
  width: 100%;
  margin: 0;
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
}
body.sl-has-shell #missInbox .miss-inbox__field {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
  min-width: 0;
}
body.sl-has-shell #missInbox .miss-inbox__label {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-has-shell #missInbox .miss-inbox__segment {
  display: inline-flex;
  flex-wrap: nowrap;
  align-self: flex-start;
  max-width: 100%;
  padding: var(--sl-space-1);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
  overflow: hidden;
}
body.sl-has-shell #missInbox .miss-inbox__opt {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  margin: 0;
  cursor: pointer;
}
body.sl-has-shell #missInbox .miss-inbox__opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
body.sl-has-shell #missInbox .miss-inbox__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: var(--sl-control-height);
  padding: 0 var(--sl-space-3);
  border: 1px solid transparent;
  border-radius: var(--sl-radius-sm);
  background: transparent;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-secondary);
}
body.sl-has-shell #missInbox .miss-inbox__opt:hover span {
  color: var(--sl-text-primary);
  background: var(--sl-action-secondary-bg-hover);
}
body.sl-has-shell #missInbox .miss-inbox__opt:has(input:checked) span {
  background: var(--sl-surface-raised);
  border-color: var(--sl-border-subtle);
  box-shadow: var(--sl-elevation-1);
  color: var(--sl-text-primary);
}
body.sl-has-shell #missInbox .miss-inbox__segment:focus-within {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
body.sl-has-shell #missInbox .miss-inbox__toolbar,
body.sl-has-shell #missInbox .miss-inbox__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sl-space-3);
}
body.sl-has-shell #missInbox .miss-inbox__toolbar {
  justify-content: space-between;
}
body.sl-has-shell #missInbox .miss-inbox__summary {
  margin: 0;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-has-shell #missInbox .miss-inbox__confirm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-3);
  padding: var(--sl-space-3);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  background: var(--sl-feedback-info-bg);
  color: var(--sl-feedback-info-fg);
}
body.sl-has-shell #missInbox .miss-inbox__confirm[hidden] {
  display: none;
}
body.sl-has-shell #missInbox .miss-inbox__status {
  margin: 0;
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-secondary);
}
body.sl-has-shell #missInbox .miss-inbox__status.is-error {
  color: var(--sl-feedback-danger-fg);
}
body.sl-has-shell #missInbox .miss-inbox__scroll {
  width: 100%;
}
body.sl-has-shell #missInbox .miss-inbox__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sl-font-size-sm);
  color: var(--sl-text-primary);
}
body.sl-has-shell #missInbox .miss-inbox__table th,
body.sl-has-shell #missInbox .miss-inbox__table td {
  padding: var(--sl-space-3);
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--sl-border-subtle);
}
body.sl-has-shell #missInbox .miss-inbox__table th {
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-secondary);
}
body.sl-has-shell #missInbox .miss-inbox__query {
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
  word-break: break-word;
}
body.sl-has-shell #missInbox .miss-inbox__meta {
  margin-top: var(--sl-space-1);
  color: var(--sl-text-secondary);
  word-break: break-word;
}
body.sl-has-shell #missInbox .miss-inbox__num,
body.sl-has-shell #missInbox .miss-inbox__when {
  white-space: nowrap;
}
body.sl-has-shell #missInbox .miss-inbox__row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sl-space-2);
}
body.sl-has-shell #missInbox .miss-inbox__row-actions .btn-secondary {
  text-decoration: none;
}
body.sl-has-shell #missInbox .miss-inbox__empty {
  margin: 0;
  padding: var(--sl-ws-card-pad);
  border: 1px solid var(--sl-border-accent-soft);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-raised);
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
}
body.sl-has-shell #missInbox .miss-inbox__empty[hidden],
body.sl-has-shell #missInbox .miss-inbox__table[hidden] {
  display: none;
}
body.sl-has-shell #missInbox .btn-container,
body.sl-has-shell #missInbox .btn-secondary,
body.sl-has-shell #missInbox .btn-warning {
  position: static;
  margin: 0;
}

@media (max-width: 700px) {
  body.sl-has-shell #missInbox.inner-container {
    width: 100%;
    padding: 0;
  }
  body.sl-has-shell #missInbox .miss-inbox__segment {
    width: 100%;
  }
  body.sl-has-shell #missInbox .miss-inbox__opt {
    flex: 1;
  }
  body.sl-has-shell #missInbox .miss-inbox__opt span {
    min-width: 0;
  }
  body.sl-has-shell #missInbox .miss-inbox__num,
  body.sl-has-shell #missInbox .miss-inbox__when {
    white-space: normal;
  }
}

@media (max-width: 700px) {
  body.sl-has-shell #a11yPreferences.inner-container,
  body.sl-has-shell #topbarPreferences.inner-container {
    width: 100%;
    padding: 0;
  }
  body.sl-has-shell #a11yPreferences .a11y-presets {
    grid-template-columns: 1fr;
  }
  body.sl-has-shell #a11yPreferences .a11y-segment {
    width: 100%;
  }
  body.sl-has-shell #a11yPreferences label.a11y-segment__opt,
  body.sl-has-shell #a11yPreferences span:where(.sl-label-text).a11y-segment__opt {
    flex: 1;
  }
  body.sl-has-shell #a11yPreferences .a11y-segment__opt span {
    min-width: 0;
  }
  .shell-topbar .topbar-tts__btn {
    width: 44px;
    height: 44px;
  }
}

/* ---------------------------------------------------------------------------
   Command box — foreground do/go/learn dialog
   Matches shell-modal chrome, Help search field/chips, and Help result rows.
   Page CSS often styles every `button` and `input`; reset those inside .cmdbox.
   --------------------------------------------------------------------------- */
.shell-topbar .topbar-command {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sl-link-mark {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: inherit;
}
.shell-topbar .topbar-command__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sl-space-2);
  background: var(--sl-surface-sunken);
  border: 0;
  color: var(--sl-text-secondary);
  width: auto;
  min-width: var(--sl-control-height-sm);
  min-height: var(--sl-control-height-sm);
  height: var(--sl-control-height-sm);
  padding-inline: var(--sl-space-2);
  border-radius: var(--sl-radius-md);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
  cursor: pointer;
  box-shadow: none;
  flex-shrink: 0;
}
.shell-topbar .topbar-command__toggle .sl-link-mark {
  width: calc(var(--sl-control-height-sm) - var(--sl-space-2));
  height: calc(var(--sl-control-height-sm) - var(--sl-space-2));
}
.shell-topbar .topbar-command__toggle:hover {
  background: var(--sl-border-subtle);
  color: var(--sl-text-primary);
}
.shell-topbar .topbar-command__toggle:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.shell-topbar .topbar-command__toggle[aria-expanded="true"] {
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
}
.shell-topbar .topbar-command__kbd {
  display: inline-flex;
  align-items: center;
  gap: var(--sl-space-1);
  line-height: 1;
  white-space: nowrap;
}
.sl-shortcut {
  display: inline-flex;
  align-items: center;
  gap: var(--sl-space-1);
}
.sl-shortcut__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25em;
  min-height: 1.25em;
  padding: var(--sl-space-1) var(--sl-space-2);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface-raised);
  color: var(--sl-text-muted);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-2xs);
  font-weight: var(--sl-font-weight-semibold);
  line-height: 1;
}
html[data-modkey="meta"] .sl-mod--ctrl,
html:not([data-modkey="meta"]) .sl-mod--meta {
  display: none;
}

body.sl-command-box-open {
  overflow: hidden;
}

.cmdbox {
  position: fixed;
  inset: 0;
  z-index: var(--sl-z-modal);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--sl-header-height) + var(--sl-space-6)) var(--sl-space-4) var(--sl-space-6);
  background: color-mix(in srgb, var(--sl-surface-inverse) 45%, transparent);
}
.cmdbox.is-open {
  display: flex;
}
.cmdbox[hidden] {
  display: none;
}
.cmdbox.is-open[hidden] {
  display: flex;
}

.cmdbox button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-shrink: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font-family: var(--sl-font-family);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  line-height: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.cmdbox input {
  display: block;
  height: auto;
  width: 100%;
  margin: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.cmdbox__dialog {
  width: min(32rem, 100%);
  max-height: min(36rem, calc(100vh - var(--sl-header-height) - var(--sl-space-12)));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-4);
  padding: var(--sl-space-4);
  background: var(--sl-surface-raised);
  color: var(--sl-text-primary);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-lg);
  box-shadow: var(--sl-elevation-3);
}

.cmdbox__close {
  width: var(--sl-control-height-sm);
  height: var(--sl-control-height-sm);
  border-radius: var(--sl-radius-sm);
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
}
.cmdbox__close:hover {
  background: var(--sl-surface-sunken);
  color: var(--sl-text-primary);
}
.cmdbox__close:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

.cmdbox__field {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  flex-shrink: 0;
  padding-bottom: var(--sl-space-3);
  border-bottom: 1px solid var(--sl-border-subtle);
}
.cmdbox__combo {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--sl-control-height);
  border: 1px solid var(--sl-border-field);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
}
.cmdbox__combo:focus-within {
  background: var(--sl-surface-raised);
  border-color: var(--sl-selected-border);
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.cmdbox__combo > .cmdbox__icon,
.cmdbox__combo > .sl-link-mark {
  position: absolute;
  left: var(--sl-space-3);
  font-size: var(--sl-font-size-sm);
  line-height: 1;
  color: var(--sl-text-muted);
  pointer-events: none;
}
.cmdbox__combo > .sl-link-mark {
  width: 1.25rem;
  height: 1.25rem;
}
.cmdbox__field-kbd {
  flex: 0 0 auto;
}
.cmdbox button.cmdbox__mic {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin-right: var(--sl-space-2);
  width: var(--sl-control-height-sm);
  min-width: var(--sl-control-height-sm);
  height: var(--sl-control-height-sm);
  min-height: var(--sl-control-height-sm);
  border-radius: 50%;
  color: var(--sl-text-muted);
  pointer-events: auto;
  touch-action: manipulation;
}
.cmdbox__mic > i {
  pointer-events: none;
}
.cmdbox__mic:hover {
  background: var(--sl-border-subtle);
  color: var(--sl-text-primary);
}
.cmdbox__mic:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.cmdbox__mic.is-listening {
  color: var(--sl-action-primary-bg);
  background: var(--sl-surface-accent);
}
.cmdbox__field input {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: var(--sl-control-height);
  padding: var(--sl-space-2) var(--sl-space-2) var(--sl-space-2) var(--sl-space-8);
  border: 0;
  border-radius: var(--sl-radius-md);
  background: transparent;
  color: var(--sl-text-field);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
}
.cmdbox__field input::placeholder {
  color: var(--sl-text-muted);
}
.cmdbox__field input:focus,
.cmdbox__field input:focus-visible {
  background: transparent;
  outline: none;
}
.cmdbox__field input[type="search"]::-webkit-search-decoration,
.cmdbox__field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.cmdbox__chips {
  flex-shrink: 0;
}
.cmdbox__chips[hidden] { display: none; }
.cmdbox__intro {
  margin: 0 0 var(--sl-space-3);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-secondary);
}
.cmdbox__prompt {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
}
.cmdbox__prompt[hidden] { display: none; }
.cmdbox__prompt .cmdbox__crumbs {
  margin-bottom: var(--sl-space-2);
}
.cmdbox__crumbs {
  margin: 0;
}
.cmdbox__crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sl-space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmdbox__crumbs li {
  display: inline-flex;
  align-items: center;
  gap: var(--sl-space-1);
  min-width: 0;
}
.cmdbox__crumbs li + li::before {
  content: "\203A";
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-xs);
}
.cmdbox__crumb {
  border: 0;
  padding: 0;
  background: none;
  color: var(--sl-text-link);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-regular);
  cursor: pointer;
}
.cmdbox__crumb:hover { text-decoration: underline; }
.cmdbox__crumb:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.cmdbox__crumb-now {
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
}
.cmdbox .cmdbox__chip.cmdbox__continue {
  margin-top: var(--sl-space-2);
  border-color: var(--sl-border-accent-soft);
  background: var(--sl-surface-raised);
  color: var(--sl-text-link);
  box-shadow: var(--sl-elevation-start);
}
.cmdbox .cmdbox__chip.cmdbox__continue .cmdbox__go {
  color: var(--sl-text-link);
}
.cmdbox .cmdbox__chip.cmdbox__continue:hover {
  border-color: var(--sl-border-accent);
  background: var(--sl-feedback-info-bg);
  color: var(--sl-text-link);
}
.cmdbox .cmdbox__chip.cmdbox__continue:hover .cmdbox__go {
  color: var(--sl-text-link);
}
.cmdbox__suggest-label {
  margin: 0 0 var(--sl-space-2);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-regular);
  color: var(--sl-text-muted);
}
.cmdbox__chips .cmdbox__chip-row + .cmdbox__suggest-label {
  margin-top: var(--sl-space-4);
}
.cmdbox__chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sl-space-2);
}
.cmdbox__chip-row--stack {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: var(--sl-space-2);
}
.cmdbox__prompt .cmdbox__chip-row {
  width: 100%;
}
.cmdbox .cmdbox__chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sl-space-3);
  width: 100%;
  padding: var(--sl-space-2) var(--sl-space-3);
  min-height: var(--sl-control-height);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-sunken);
  color: var(--sl-text-primary);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  text-align: left;
  line-height: var(--sl-line-height-tight);
}
.cmdbox .cmdbox__chip .cmdbox__title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.cmdbox .cmdbox__go {
  flex: 0 0 auto;
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-xs);
}
.cmdbox .cmdbox__chip:hover .cmdbox__go {
  color: var(--sl-text-primary);
}
.cmdbox__chip:hover {
  border-color: var(--sl-border-strong);
  background: var(--sl-surface-raised);
  color: var(--sl-text-primary);
}
.cmdbox__chip.is-on {
  border-color: var(--sl-border-accent);
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
}
.cmdbox__chip:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

.cmdbox__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: calc(var(--sl-space-2) * -1);
  padding: var(--sl-space-2);
}
.cmdbox__results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-1);
}
.cmdbox__results--stack {
  gap: var(--sl-space-2);
}
.cmdbox__item--chip .cmdbox__run {
  width: 100%;
}
.cmdbox__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-radius: var(--sl-radius-md);
}
.cmdbox__item:hover,
.cmdbox__item[aria-selected="true"] {
  background: var(--sl-surface-sunken);
}
.cmdbox__run {
  grid-column: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--sl-space-2) var(--sl-space-3);
  width: 100%;
  min-width: 0;
  min-height: var(--sl-control-height);
  padding: var(--sl-space-2) var(--sl-space-3);
  color: var(--sl-text-primary);
  text-align: left;
}
.cmdbox__run-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sl-space-1);
  min-width: 0;
}
.cmdbox__run-keys {
  flex-shrink: 0;
}
.cmdbox__badge {
  font-size: var(--sl-font-size-2xs);
  font-weight: var(--sl-font-weight-medium);
  letter-spacing: var(--sl-letter-spacing-label);
  color: var(--sl-text-link);
}
.cmdbox__run:only-child {
  grid-column: 1 / -1;
}
.cmdbox__kicker {
  font-size: var(--sl-font-size-2xs);
  font-weight: var(--sl-font-weight-medium);
  letter-spacing: var(--sl-letter-spacing-label);
  color: var(--sl-text-muted);
}
.cmdbox__title {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-primary);
}
.cmdbox__desc {
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-body);
  color: var(--sl-text-secondary);
}
.cmdbox__learn {
  grid-column: 2;
  margin-right: var(--sl-space-2);
  padding: var(--sl-space-1) var(--sl-space-2);
  border-radius: var(--sl-radius-sm);
  color: var(--sl-text-link);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
  white-space: nowrap;
}
.cmdbox__learn:hover { text-decoration: underline; }
.cmdbox__learn:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}

.cmdbox__empty {
  margin: 0;
  padding: var(--sl-space-3);
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-sm);
}

.cmdbox__foot {
  display: flex;
  flex-direction: column;
  gap: var(--sl-space-2);
  flex-shrink: 0;
  padding-top: var(--sl-space-2);
  border-top: 1px solid var(--sl-border-subtle);
}
.cmdbox__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sl-space-2) var(--sl-space-3);
  padding: var(--sl-space-2h) var(--sl-space-3);
  background: var(--sl-feedback-success-bg);
  border-radius: var(--sl-radius-sm);
  color: var(--sl-feedback-success-fg);
}
.cmdbox__status-row[hidden] { display: none; }
.cmdbox__status {
  margin: 0;
  flex: 1 1 auto;
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-feedback-success-fg);
}
.cmdbox__undo {
  padding: 0 var(--sl-space-3);
  min-height: var(--sl-control-height-sm);
  border: 1px solid var(--sl-action-secondary-border);
  border-radius: var(--sl-radius-md);
  background: var(--sl-action-secondary-bg);
  color: var(--sl-action-secondary-fg);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-semibold);
}
.cmdbox__undo:hover {
  background: var(--sl-action-secondary-bg-hover);
}
.cmdbox__undo[hidden] { display: none; }
.cmdbox__undo:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: var(--sl-focus-ring-offset);
}
.cmdbox__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sl-space-3) var(--sl-space-4);
}
.cmdbox__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sl-space-1);
  font-size: var(--sl-font-size-2xs);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-muted);
}
.cmdbox__hint {
  margin: 0;
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-muted);
}

@media (max-width: 700px) {
  .cmdbox {
    padding: var(--sl-header-height) 0 0;
    align-items: stretch;
  }
  .cmdbox__dialog {
    width: 100%;
    max-height: none;
    height: calc(100vh - var(--sl-header-height));
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: var(--sl-space-4);
  }
  .cmdbox__field-kbd,
  .cmdbox__legend,
  .cmdbox__run-keys { display: none; }
  .cmdbox button.cmdbox__mic {
    width: var(--sl-touch-min);
    min-width: var(--sl-touch-min);
    height: var(--sl-touch-min);
    min-height: var(--sl-touch-min);
  }
}

html[data-density="comfortable"] .cmdbox__close,
html[data-density="comfortable"] .cmdbox button.cmdbox__mic {
  width: var(--sl-touch-min);
  min-width: var(--sl-touch-min);
  height: var(--sl-touch-min);
  min-height: var(--sl-touch-min);
}
html[data-density="comfortable"] .cmdbox__combo,
html[data-density="comfortable"] .cmdbox__field input {
  min-height: var(--sl-touch-min);
}
html[data-density="comfortable"] .cmdbox__field input {
  padding-right: var(--sl-space-2);
}

.sl-testdata {
  padding: var(--sl-ws-card-pad);
}
.sl-testdata__card {
  max-width: 40rem;
}
.sl-testdata__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sl-space-3);
  margin-top: var(--sl-space-4);
}
.sl-testdata__result {
  margin-top: var(--sl-space-6);
}
.sl-testdata__result-title {
  margin: 0;
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
.sl-testdata__lines {
  list-style: none;
}
a.settings-card {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

/* ---- List and panel (SmartTE / SmartBrowser editors) --------------------- */
body.sl-has-shell.sl-list-pane:not(.sections-collapsed) {
  --sl-sections-w: var(--sl-pane-list);
}
body.sl-has-shell.sl-list-pane > .shell-sections.sl-list-pane-host {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
}
.shell-sections.sl-list-pane-host > .sl-list-pane-mount {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}
body.sl-list-pane .shell-sections.sl-list-pane-host > .shell-sections__title,
body.sl-list-pane .shell-sections.sl-list-pane-host > .hub-home-chip,
body.sl-list-pane .shell-sections.sl-list-pane-host > .shell-sections__body {
  display: none;
}
body.sl-list-pane:not(.sections-collapsed) .shell-sections-resizer {
  display: none;
}
body.sl-list-pane .sl-pane-list,
body.sl-list-pane .sl-pane-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--sl-surface-raised);
  gap: 0;
}
body.sl-list-pane .sl-pane-list {
  width: var(--sl-pane-list);
  flex: 0 0 var(--sl-pane-list);
  padding: var(--sl-space-3) 0;
  border-right: 1px solid var(--sl-border-subtle);
  overflow-x: hidden;
  overflow-y: auto;
}
body.sl-list-pane .sl-pane-panel {
  width: var(--sl-pane-panel);
  flex: 0 0 var(--sl-pane-panel);
  padding: var(--sl-space-4);
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--sl-border-subtle);
}
body.sl-list-pane :is(.page-content, #main-container) > .sl-pane-work {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
body.sl-list-pane :is(.page-content, #main-container) .sl-pane-card-slot {
  display: none;
  position: relative;
  flex: none;
  width: auto;
  height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}
body.sl-list-pane .sl-pane-list__head {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  padding: var(--sl-space-1) var(--sl-space-4) var(--sl-space-3);
  font-size: var(--sl-font-size-md);
  font-weight: var(--sl-font-weight-semibold);
  color: var(--sl-text-primary);
}
body.sl-list-pane .sl-pane-env {
  margin: 0 var(--sl-space-3) var(--sl-space-3);
  padding: var(--sl-space-2h) var(--sl-space-3);
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
}
body.sl-list-pane .sl-pane-env__name {
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.sl-list-pane .sl-pane-env__row {
  display: flex;
  align-items: baseline;
  gap: var(--sl-space-2);
  margin-top: var(--sl-space-1);
}
body.sl-list-pane .sl-pane-env__kind {
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-secondary);
}
body.sl-list-pane .sl-pane-env__action {
  margin-left: auto;
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-link);
  text-decoration: none;
}
body.sl-list-pane .sl-pane-env__action:hover {
  text-decoration: underline;
}
body.sl-list-pane .sl-pane-search {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  margin: 0 var(--sl-space-3) var(--sl-space-3);
  min-height: var(--sl-control-height-sm);
  padding: 0 var(--sl-space-3);
  background: var(--sl-surface-raised);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  color: var(--sl-text-muted);
}
body.sl-list-pane .sl-pane-panel .sl-pane-search {
  margin-left: 0;
  margin-right: 0;
}
body.sl-list-pane .sl-pane-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--sl-text-primary);
  font: inherit;
  font-size: var(--sl-font-size-input);
}
body.sl-list-pane .sl-pane-search input:focus {
  outline: none;
}
body.sl-list-pane .sl-pane-list .sl-pane-dest,
body.sl-list-pane .shell-sections .sl-pane-dest {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sl-space-2);
  width: auto;
  align-self: stretch;
  height: auto;
  min-height: var(--sl-control-height-sm);
  margin: 1px var(--sl-space-2);
  padding: var(--sl-space-2) var(--sl-space-2h);
  border: 0;
  border-radius: var(--sl-radius-md);
  background: transparent;
  box-shadow: none;
  color: var(--sl-text-primary);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: var(--sl-line-height-tight);
  letter-spacing: normal;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}
body.sl-list-pane .sl-pane-list .sl-pane-dest:hover,
body.sl-list-pane .shell-sections .sl-pane-dest:hover {
  background: var(--sl-surface-sunken);
}
body.sl-list-pane .sl-pane-list .sl-pane-dest.is-current,
body.sl-list-pane .sl-pane-list .sl-pane-dest[aria-current="page"],
body.sl-list-pane .shell-sections .sl-pane-dest.is-current,
body.sl-list-pane .shell-sections .sl-pane-dest[aria-current="page"] {
  /* The destination you are on. Purple marks position; the blue is kept for
     things you can act on, so the pane no longer reads as a row of buttons
     with one of them stuck down. */
  background: var(--sl-selected-bg);
  color: var(--sl-selected-fg);
}
body.sl-list-pane .sl-pane-dest .nav-icon,
body.sl-list-pane .sl-pane-panel__icon,
body.sl-list-pane .sl-pane-dest .nav-chevron,
body.sl-list-pane .sl-pane-job .nav-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1rem;
  color: var(--sl-text-secondary);
  font-size: var(--sl-font-size-xs);
}
body.sl-list-pane .sl-pane-dest.is-current .nav-icon,
body.sl-list-pane .sl-pane-dest[aria-current="page"] .nav-icon,
body.sl-list-pane .sl-pane-dest.is-current .nav-chevron,
body.sl-list-pane .sl-pane-dest[aria-current="page"] .nav-chevron {
  color: inherit;
}
body.sl-list-pane .sl-pane-dest-rule {
  margin: var(--sl-space-2) var(--sl-space-4) 0;
  padding-top: var(--sl-space-2);
  border-top: 1px solid var(--sl-border-subtle);
}
body.sl-list-pane .sl-pane-dest[hidden],
body.sl-list-pane .sl-pane-dest-rule[hidden] {
  display: none;
}
body.sl-list-pane .sl-pane-dest.is-muted:not(.is-current):not([aria-current="page"]) {
  color: var(--sl-text-muted);
}
body.sl-list-pane .sl-pane-dest.is-muted:not(.is-current):not([aria-current="page"]) .nav-icon,
body.sl-list-pane .sl-pane-dest.is-muted:not(.is-current):not([aria-current="page"]) .nav-chevron {
  color: var(--sl-text-muted);
}
body.sl-list-pane .sl-pane-dest .nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.sl-list-pane .sl-pane-dest--offer {
  flex-wrap: wrap;
  border: 1px solid var(--sl-border-accent-soft);
  background: var(--sl-surface-accent);
  color: var(--sl-text-link);
}
/* The offer sits in the pane's blue at rest, because an offer is something you
   can act on. Once it is the destination you are on it joins the purple, icon
   and hint included, so nothing is left reading blue on a purple ground. */
body.sl-list-pane .sl-pane-dest--offer.is-current,
body.sl-list-pane .sl-pane-dest--offer[aria-current="page"] {
  border-color: var(--sl-selected-border);
  background: var(--sl-selected-bg);
  color: var(--sl-selected-fg);
}
body.sl-list-pane .sl-pane-dest--offer.is-current .nav-icon,
body.sl-list-pane .sl-pane-dest--offer.is-current .nav-chevron,
body.sl-list-pane .sl-pane-dest--offer.is-current .sl-pane-dest__hint,
body.sl-list-pane .sl-pane-dest--offer[aria-current="page"] .nav-icon,
body.sl-list-pane .sl-pane-dest--offer[aria-current="page"] .nav-chevron,
body.sl-list-pane .sl-pane-dest--offer[aria-current="page"] .sl-pane-dest__hint {
  color: var(--sl-selected-fg);
}
body.sl-list-pane .sl-pane-dest--offer .nav-icon,
body.sl-list-pane .sl-pane-dest--offer .nav-chevron {
  color: var(--sl-text-link);
}
body.sl-list-pane .sl-pane-dest--offer .sl-pane-dest__hint {
  flex: 1 0 100%;
  margin: 0 0 0 calc(1rem + var(--sl-space-2));
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-regular);
  line-height: var(--sl-line-height-tight);
  color: var(--sl-text-link);
  white-space: normal;
}
body.sl-list-pane .sl-pane-job__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  white-space: normal;
}
body.sl-list-pane .sl-pane-dest .nav-chevron,
body.sl-list-pane .sl-pane-job .nav-chevron {
  margin-left: auto;
  color: var(--sl-text-muted);
}
body.sl-list-pane .sl-pane-panel__head {
  display: flex;
  align-items: center;
  gap: var(--sl-space-2);
  margin-bottom: var(--sl-space-3);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-primary);
}
body.sl-list-pane .sl-pane-panel__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.sl-has-shell.sl-list-pane .sl-pane-panel button.sl-pane-panel__close,
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel button.sl-pane-panel__close {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--sl-icon-button-size);
  height: var(--sl-icon-button-size);
  min-height: var(--sl-icon-button-size);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--sl-radius-md);
  background: transparent;
  box-shadow: none;
  color: var(--sl-text-muted);
  font-size: var(--sl-font-size-sm);
  cursor: pointer;
}
body.sl-has-shell.sl-list-pane .sl-pane-panel button.sl-pane-panel__close:hover,
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel button.sl-pane-panel__close:hover {
  background: var(--sl-surface-sunken);
  color: var(--sl-text-primary);
}
body.sl-list-pane .sl-pane-dest:focus-visible,
body.sl-list-pane .sl-pane-job:focus-visible,
body.sl-list-pane .sl-pane-panel__close:focus-visible,
body.sl-list-pane .sl-pane-env__action:focus-visible,
body.sl-list-pane .sl-pane-search input:focus-visible {
  outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);
  outline-offset: 2px;
}
body.sl-list-pane .sl-pane-jobs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
body.sl-list-pane .sl-pane-jobs__group {
  margin: 0 0 var(--sl-space-2);
}
body.sl-list-pane .sl-pane-jobs__label {
  display: flex;
  align-items: center;
  padding: var(--sl-space-2) 0 var(--sl-space-2h);
  font-size: var(--sl-font-size-xs);
  font-weight: var(--sl-font-weight-medium);
  color: var(--sl-text-primary);
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job),
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job) {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
  gap: var(--sl-space-2);
  width: 100%;
  height: auto;
  min-height: var(--sl-control-height);
  margin: 0 0 var(--sl-space-2);
  padding: var(--sl-space-2) var(--sl-space-3);
  border: 1px solid var(--sl-border-subtle);
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface-raised);
  box-shadow: none;
  color: var(--sl-text-primary);
  font-family: var(--sl-font-family);
  font-size: var(--sl-font-size-sm);
  font-weight: var(--sl-font-weight-medium);
  line-height: var(--sl-line-height-tight);
  letter-spacing: normal;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):link,
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):visited,
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):hover,
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):active,
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):link,
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):visited,
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):hover,
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):active {
  color: var(--sl-text-primary);
  text-decoration: none;
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):hover,
body.sl-has-shell.sl-list-pane :is(.page-content, #main-container) .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job):hover {
  background: var(--sl-surface-sunken);
}
body.sl-list-pane .sl-pane-job__hint {
  font-size: var(--sl-font-size-2xs);
  color: var(--sl-text-muted);
  margin-top: var(--sl-space-1);
  white-space: normal;
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job).sl-pane-job--step {
  align-items: flex-start;
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job).sl-pane-job--step.is-current {
  background: var(--sl-surface-accent);
  border-color: var(--sl-border-accent);
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job).sl-pane-job--step.is-done {
  background: var(--sl-feedback-success-bg);
  border-color: var(--sl-border-success);
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job).is-muted {
  color: var(--sl-text-muted);
  cursor: default;
}
body.sl-has-shell.sl-list-pane .sl-pane-panel :is(a.sl-pane-job, button.sl-pane-job).is-muted:hover {
  background: var(--sl-surface-raised);
}
body.sl-list-pane .sl-pane-job__num {
  flex: 0 0 var(--sl-space-6);
  width: var(--sl-space-6);
  height: var(--sl-space-6);
  margin-top: 1px;
  border-radius: var(--sl-radius-pill);
  background: var(--sl-action-primary-bg);
  color: var(--sl-action-primary-fg);
  font-size: var(--sl-font-size-2xs);
  font-weight: var(--sl-font-weight-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.sl-list-pane .sl-pane-job__tip {
  display: block;
  font-size: var(--sl-font-size-2xs);
  color: var(--sl-text-link);
  margin-top: var(--sl-space-1);
}
body.sl-list-pane .sl-pane-job--step.is-upcoming .sl-pane-job__num {
  background: var(--sl-text-muted);
  color: var(--sl-text-on-accent);
}
body.sl-list-pane .sl-pane-job--step.is-done .sl-pane-job__num {
  background: var(--sl-feedback-success-solid);
  color: var(--sl-text-on-accent);
}
body.sl-list-pane .sl-pane-job--step.is-done .sl-pane-job__tip {
  color: var(--sl-feedback-success-fg);
}
body.sl-list-pane .sl-pane-note {
  margin-top: auto;
  padding: var(--sl-space-2h) var(--sl-space-3);
  background: var(--sl-surface-sunken);
  border-radius: var(--sl-radius-md);
  font-size: var(--sl-font-size-xs);
  color: var(--sl-text-secondary);
  line-height: var(--sl-line-height-body);
}
@media (min-width: 701px) and (min-height: 501px) {
  body.sl-list-pane .shell-sections .sl-pane-panel {
    display: none;
  }
  body.sl-list-pane.sl-list-pane-card :is(.page-content, #main-container) > .sl-pane-work {
    flex-direction: row;
    align-items: stretch;
  }
  body.sl-list-pane.sl-list-pane-card :is(.page-content, #main-container) > .sl-pane-work > .sl-pane-card-slot {
    display: block;
    flex: 0 0 var(--sl-pane-panel);
    width: var(--sl-pane-panel);
    height: auto;
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
    pointer-events: auto;
  }
  body.sl-list-pane.sl-list-pane-card :is(.page-content, #main-container) > .sl-pane-work > .ws-body {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
  }
  body.sl-list-pane :is(.page-content, #main-container) .sl-pane-card-slot > .sl-pane-panel {
    display: none;
    pointer-events: auto;
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    flex: none;
    border: 0;
    border-top: 1px solid var(--sl-border-subtle);
    border-right: 1px solid var(--sl-border-subtle);
    border-radius: 0;
    box-shadow: var(--sl-elevation-none);
    background: var(--sl-surface-raised);
  }
  body.sl-list-pane.sl-list-pane-card :is(.page-content, #main-container) .sl-pane-card-slot > .sl-pane-panel {
    display: flex;
  }
}
body.sl-has-shell.sections-collapsed.sl-list-pane > .shell-sections.sl-list-pane-host,
body.sl-has-shell.sections-collapsed .shell-sections.sl-list-pane-host > .sl-list-pane-mount {
  flex-direction: column;
  align-items: center;
}
body.sl-has-shell.sections-collapsed.sl-list-pane .sl-pane-env,
body.sl-has-shell.sections-collapsed.sl-list-pane .sl-pane-list .sl-pane-search,
body.sl-has-shell.sections-collapsed.sl-list-pane .sl-pane-list__head,
body.sl-has-shell.sections-collapsed.sl-list-pane .sl-pane-dest .nav-label,
body.sl-has-shell.sections-collapsed.sl-list-pane .sl-pane-dest .nav-chevron,
body.sl-has-shell.sections-collapsed.sl-list-pane .sl-pane-dest .sl-pane-dest__hint {
  display: none;
}
body.sl-has-shell.sections-collapsed.sl-list-pane .sl-pane-list {
  width: 100%;
  flex: 1 1 auto;
  border-right: 0;
  padding: var(--sl-space-2) 0;
}
body.sl-has-shell.sections-collapsed.sl-list-pane .shell-sections .sl-pane-dest {
  width: var(--sl-sections-rail-w);
  margin: var(--sl-space-1) auto;
  justify-content: center;
  padding: var(--sl-space-2);
}

@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  body.sl-has-shell.sl-list-pane:not(.sections-collapsed) {
    --sl-sections-w: min(100%, 22rem);
  }
  body.sl-has-shell.sl-list-pane > .shell-sections.sl-list-pane-host {
    flex-direction: column;
  }
  .shell-sections.sl-list-pane-host > .sl-list-pane-mount {
    flex-direction: column;
  }
  body.sl-list-pane .sl-pane-list,
  body.sl-list-pane .sl-pane-panel {
    width: 100%;
    flex: 1 1 auto;
  }
  body.sl-list-pane:not(.sl-list-pane-jobs) .sl-pane-panel {
    display: none;
  }
  body.sl-list-pane.sl-list-pane-jobs .sl-pane-list {
    display: none;
  }
}


