/* =================================================================
   WF Portal — THE SHELL (portal-look-and-feel.md 3.4 - 3.6)
   -----------------------------------------------------------------
   Owns: the frame and the two shapes (.wf-shell--frame / --island),
   THE SHEET (main.wf-main - the one scroll container), the side rail
   (.wf-sidebar*), the shell bar (.wf-shellbar*), the shell's icon
   buttons, the bell (.wf-bell*), the jump palette (.wf-jumppal*) and
   the avatar. The top bar is nav.css; the page wrapper (.wf-page-area)
   and the content frames are pages.css; the one copilot dock
   (.copilot-*) is copilot.css.

   Every colour reads a --theme-* / --wf-* token, so a tenant theme -
   dark, grey, sharp or pill - re-skins all of it; the whole file is a
   token-only door (Tests/ShellTokensOnlyTests). Styles are global
   (not scoped) because the rail's links render outside any component
   CSS-isolation scope.

   z-order: the rail and the top bar sit at 40 (their menus overlay the
   sheet and the sticky shell bar at 30); a page's own sticky bars sit
   BELOW the shell bar - top: var(--wf-sticky-top), z-index 29 at most
   (Tests/ShellLayoutTests); a page's own fixed layers (dialogs 1050,
   the copilot 1025 - docked under the bar at --wf-dock-top) stay above
   both; the phone drawer is 1040; the jump palette 1060.
   ================================================================= */
/* @tokens-only */

/* ── The frame + the flex chain ───────────────────────────────────
   .wf-shell is the single flex child of #app (the Blazor wrapper is
   display:contents). !important on display: root.css once carried
   `#app > div:first-child { display: contents }`, which dissolved the
   shell; the rule is gone, the defence stays (it costs nothing). */
.wf-shell {
    display: flex !important;
    flex: 1;
    min-height: 0;
    background: var(--wf-frame);
}
.wf-shell--top { flex-direction: column; }
.wf-shell--side { flex-direction: row; }

/* WHERE A DOCKED PANEL STARTS (the one copilot dock, the Help copilot): under the shell bar with an 8px gap -
   above it sits the frame's 8px inset (side) or the 64px top bar (top). copilot.css reads it with a 3.5rem fallback
   (the builder's full-bleed layout has no shell bar - its row 1 is 56px). */
.wf-shell { --wf-dock-top: calc(8px + var(--wf-shellbar-h) + 8px); }
.wf-shell--top { --wf-dock-top: calc(64px + var(--wf-shellbar-h) + 8px); }
.wf-shell--top.wf-shell--island { --wf-dock-top: calc(8px + 64px + 8px + var(--wf-shellbar-h) + 8px); }

/* THE ISLAND (Kirk's decision 1 - a per-tenant choice): the page colour everywhere, the rail (or the top bar) a
   rounded card inset 8px. */
.wf-shell--island { background: var(--wf-sheet); }
.wf-shell--side.wf-shell--island { padding: 8px 0 8px 8px; }
.wf-shell--top.wf-shell--island { padding: 8px 8px 0; }

/* ── THE SHEET - every page lives on a rounded sheet inset into the brand frame ── */
.wf-main {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: auto;
    background: var(--wf-sheet);
    border-radius: var(--wf-radius-lg);
    box-shadow: 0 0 0 1px var(--theme-nav-border), var(--wf-elev-1);
}
/* THE SHELL BAR IS STICKY IN THIS SCROLL CONTAINER, so every page's own sticky bar (the Answer Center's view bar,
   the report designer's bar, a sticky copilot column) sits below it: page stylesheets write
   top: var(--wf-sticky-top) / calc(var(--wf-sticky-top) + ...) - 0px from root.css, the bar's height here while a bar
   is on screen (a page with <ShellBarHidden /> renders none, and the builder's layout has no sheet). An inner scroll
   box inside a page resets it (.wf-own-scroll, pages.css). scroll-padding keeps a focused or anchored element from
   landing under the bar. Tests/ShellLayoutTests holds every sticky to it. */
.wf-main:has(> .wf-shellbar) {
    --wf-sticky-top: var(--wf-shellbar-h);
    scroll-padding-top: var(--wf-shellbar-h);
}
.wf-shell--side.wf-shell--frame > .wf-main { margin: 8px 8px 8px 0; }
.wf-shell--top.wf-shell--frame > .wf-main { margin: 0 8px 8px; }
.wf-shell--island > .wf-main { margin: 0; border-radius: 0; box-shadow: none; }

/* ── The rail ─────────────────────────────────────────────────────── */
/* THE SHELL'S LAYERS (the shell lane's second look verifier, 2026-10-02): the rail, the top bar and the shell bar
   each make a stacking context, so their popovers (the bell, the account menu, New) can never rise above the
   element's own z. They sit ABOVE the one copilot dock (.copilot-panel 1025 - which starts below the bar, so the
   bar itself never covers it) and BELOW an open in-page menu's click-catcher (1030+) and every
   dialog (1050+). Tests/ShellLayoutTests.TheShellsLayers_SitAboveTheDocks_AndBelowTheDialogs holds the order. */
.wf-sidebar {
    position: relative;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    flex: none;
    gap: 2px;
    width: 248px;
    /* Definite height: a stretch-only height let the column run past the fold on desktop and clip the account
       chip; height:100% of the definite-height shell pins the foot inside the viewport. */
    height: 100%;
    min-height: 0;
    padding: 12px 10px;
    background: var(--theme-nav-background);
    color: var(--theme-nav-text);
    transition: width 160ms var(--wf-ease);
}
.wf-shell--island .wf-sidebar {
    border: 1px solid var(--theme-nav-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-elev-2);
}

/* The head: the workspace switcher (moved up from the footer, where people never found it) + the fold. */
.wf-sidebar-head { display: flex; align-items: center; gap: 4px; }
.wf-sidebar-ws {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--wf-radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background var(--wf-motion);
}
.wf-sidebar-ws:hover { background: var(--theme-nav-hover-background); }
.wf-sidebar-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: var(--wf-radius-tile);
    /* The current-page pill's tint (16%): the theme engine reads the strong nav ink at AA on exactly that fill
       (Shared.Utilities/NavInk), so the brand initial does too. At 22% it measured 3.66:1 on the house green. */
    background: color-mix(in srgb, var(--theme-nav-text-active) 16%, var(--theme-nav-background));
    color: var(--theme-nav-text-hover);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.wf-sidebar-mark img { width: 100%; height: 100%; object-fit: contain; }
.wf-sidebar-ws-text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.2; }
.wf-sidebar-ws-text b {
    overflow: hidden;
    color: var(--theme-nav-text-hover);
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.wf-sidebar-ws-text small {
    overflow: hidden;
    color: var(--theme-nav-text);
    font-size: 11.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.wf-sidebar-ws-caret { flex: none; color: var(--theme-nav-text); font-size: 12px; }
.wf-sidebar-collapse {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: var(--wf-radius-sm);
    background: transparent;
    color: var(--theme-nav-text);
    cursor: pointer;
    transition: background var(--wf-motion), color var(--wf-motion);
}
.wf-sidebar-collapse:hover { background: var(--theme-nav-hover-background); color: var(--theme-nav-text-hover); }

/* New - a translucent pill on the nav colour with the ACCENT circle (accent = "make something new"). */
.wf-sidebar-newwrap { position: relative; margin: 10px 0 8px; }
.wf-sidebar-new {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 38px;
    padding: 0 10px 0 8px;
    text-align: left;
    border: 1px solid color-mix(in srgb, var(--theme-nav-text-hover) 18%, transparent);
    border-radius: var(--wf-radius-sm);
    background: color-mix(in srgb, var(--theme-nav-text-hover) 9%, transparent);
    color: var(--theme-nav-text-hover);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--wf-motion);
}
.wf-sidebar-new:hover { background: color-mix(in srgb, var(--theme-nav-text-hover) 15%, transparent); }
.wf-sidebar-plus {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: var(--wf-radius-pill);
    background: var(--theme-accent);
    color: var(--theme-text-on-accent);
    font-size: 13px;
}
.wf-sidebar-new kbd {
    margin-left: auto;
    padding: 1px 6px;
    border: 1px solid color-mix(in srgb, var(--theme-nav-text-hover) 22%, transparent);
    border-radius: var(--wf-radius-xs);
    background: transparent;
    /* The strong ink: the key sits on the New pill's tint, not the bare rail (the resting ink measured 3.14:1 there). */
    color: var(--theme-nav-text-hover);
    font: 600 11px var(--theme-font);
}

/* The groups - labelled sections shaped like the loop (Design / Launch / Listen), never accordions. */
.wf-sidebar-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    /* NO scrollbar on a short screen (Kirk, 2026-10-02: "any way to hide scroll bar and just use subtle arrows when
       needed?"): the wheel, touch and the keyboard still scroll; the two .wf-sidebar-more arrows below say when there
       is more. */
    scrollbar-width: none;
}
.wf-sidebar-body::-webkit-scrollbar { display: none; }
/* The two quiet arrows - sticky at the body's top and bottom edge, on a fade of the nav colour, taking no room (the
   negative margin) and never catching a click. They show ONLY while there is more to scroll that way: a scroll-driven
   animation on the body's own timeline fades the up arrow in once the rail has left its top and the down arrow out
   at its end; with nothing to scroll the timeline is inactive and both stay hidden. A browser without scroll-driven
   animations shows no arrows - the rail still scrolls. */
.wf-sidebar-more {
    position: sticky;
    z-index: 1;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    height: 20px;
    color: var(--theme-nav-text-hover);
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
}
.wf-sidebar-more.is-up {
    top: 0;
    margin-bottom: -20px;
    background: linear-gradient(to bottom, var(--theme-nav-background) 35%, transparent);
}
.wf-sidebar-more.is-down {
    bottom: 0;
    margin-top: -20px;
    background: linear-gradient(to top, var(--theme-nav-background) 35%, transparent);
}
@supports (animation-timeline: scroll()) {
    .wf-sidebar-more { animation-duration: 1ms; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: scroll(nearest block); }
    .wf-sidebar-more.is-up { animation-name: wf-sidebar-more-up; }
    .wf-sidebar-more.is-down { animation-name: wf-sidebar-more-down; }
}
@keyframes wf-sidebar-more-up { 0% { opacity: 0; } 6%, 100% { opacity: .85; } }
@keyframes wf-sidebar-more-down { 0%, 94% { opacity: .85; } 100% { opacity: 0; } }
/* Tightened a touch (Kirk, 2026-10-02: "cut a little space between items ... so we can get two or three pins in max
   w/o scroll. The space under labels can tighten just a little"): links 30px (34 before), labels 9 / 2 (14 / 4). */
/* A group label reads in the resting ink at full strength (no opacity: at .85 it measured 3.02:1 on the house green) -
   its size and weight set it apart from the links. */
.wf-sidebar-grouplabel {
    margin: 9px 10px 2px;
    color: var(--theme-nav-text);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.wf-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.wf-sidebar-item { position: relative; }

/* Links (and the pinned groups' toggles, and Help) share .wf-sidebar-link: 30px (34 on touch), radius sm, 13.5/500,
   a 16px icon. */
.wf-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--wf-radius-sm);
    background: transparent;
    color: var(--theme-nav-text);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--wf-motion), color var(--wf-motion);
}
.wf-sidebar-link > i:first-child { flex: none; width: 18px; font-size: 16px; text-align: center; opacity: .9; }
/* THE HOVER - THE STRONGEST NAV INK, NEVER DIMMER THAN AT REST (Kirk, 2026-10-03: "all left nav roll overs don't work.
   All tenants ... it is currently dimmed"). This file is the ONE owner of a rail item's hover colour: root.css's
   prose-link hover (a:not(.btn):hover, specificity 0,2,1) used to outrank this rule (0,2,0) and repaint every hovered
   rail item in the PRIMARY ink - dark on a dark rail (1.01:1 on Acme's navy, 1.20:1 on Sal's red). It now leaves the
   shell's chrome alone. Tests/TheRailHoverReadsStrongTests. */
.wf-sidebar-link:hover { background: var(--theme-nav-hover-background); color: var(--theme-nav-text-hover); }
/* The current page: a pill, the strongest nav ink at 600, the icon in the active colour as its FILL glyph.
   (The text takes nav-text-hover, not nav-text-active: a mid-grey active colour - HelloFresh's - would render the
   current page lighter than the rest.) */
.wf-sidebar-link.active {
    background: color-mix(in srgb, var(--theme-nav-text-active) 16%, transparent);
    color: var(--theme-nav-text-hover);
    font-weight: 600;
}
.wf-sidebar-link.active > i:first-child { color: var(--theme-nav-text-active); opacity: 1; }
.wf-sidebar-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Help | Guides share ONE row at the foot: two equal halves (either alone fills it) and a hairline between them. */
.wf-sidebar-split { display: flex; align-items: center; gap: 2px; }
.wf-sidebar-split > .wf-sidebar-link { flex: 1 1 0; min-width: 0; }
.wf-sidebar-splitbar { flex: none; width: 1px; height: 16px; background: var(--theme-nav-divider); }
.wf-sidebar-count {
    flex: none;
    padding: 0 7px;
    border-radius: var(--wf-radius-pill);
    background: color-mix(in srgb, var(--theme-nav-text-hover) 13%, transparent);
    color: var(--theme-nav-text-hover);
    font-size: 11px;
    font-weight: 650;
    line-height: 18px;
    font-variant-numeric: tabular-nums;
}
.wf-sidebar-link:focus-visible,
.wf-sidebar-ws:focus-visible,
.wf-sidebar-new:focus-visible,
.wf-sidebar-collapse:focus-visible,
.wf-sidebar-me:focus-visible {
    outline: 2px solid var(--theme-nav-text-active);
    outline-offset: -2px;
}

/* Pinned groups (a tenant menu item with children) stay a small accordion - the tenant built that shape. */
.wf-sidebar-caret { flex: none; font-size: 10px !important; opacity: .55 !important; transition: transform 200ms var(--wf-ease); }
.wf-sidebar-group.is-open > .wf-sidebar-grouptoggle .wf-sidebar-caret { transform: rotate(180deg); }
.wf-sidebar-sub {
    display: none;
    margin: 2px 0 4px 21px;
    padding: 0 0 0 8px;
    border-left: 1px solid var(--theme-nav-divider);
    list-style: none;
}
.wf-sidebar-group.is-open > .wf-sidebar-sub { display: block; }
.wf-sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--wf-radius-sm);
    color: var(--theme-nav-text);
    font-size: 13px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background var(--wf-motion), color var(--wf-motion);
}
.wf-sidebar-sublink:hover { background: var(--theme-nav-hover-background); color: var(--theme-nav-text-hover); }
.wf-sidebar-sublink > i:first-child { flex: none; width: 16px; font-size: 14px; text-align: center; opacity: .8; }
/* A pinned Header (type 6): a quiet sentence-case label, never UPPERCASE. */
.wf-sidebar-sectionlabel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 4px;
    color: var(--theme-nav-text);
    font-size: 11.5px;
    font-weight: 600;
}

/* The foot: Settings, Help and ONE account chip (the language bar and the profile strip folded into it). */
.wf-sidebar-foot {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--theme-nav-divider);
}
.wf-sidebar-me {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--wf-radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background var(--wf-motion);
}
.wf-sidebar-me:hover { background: var(--theme-nav-hover-background); }
/* The initials sit on the current-page pill's tint (16%) - the fill the theme engine reads the strong ink on at AA. */
.wf-sidebar-me .wf-avatar {
    background: color-mix(in srgb, var(--theme-nav-text-active) 16%, var(--theme-nav-background));
    color: var(--theme-nav-text-hover);
}
.wf-sidebar-me-text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.2; }
.wf-sidebar-me-text b {
    overflow: hidden;
    color: var(--theme-nav-text-hover);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.wf-sidebar-me-text small { color: var(--theme-nav-text); font-size: 11.5px; }

/* The avatar - the rail's and the top bar's account chips. */
.wf-avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: var(--wf-radius-pill);
    background: var(--wf-primary-soft);
    color: var(--wf-primary-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

/* The rail's popovers (workspaces, New, the account): menus on the CARD surface (they track the page, not the nav
   colour), elevation 3, radius lg, a header naming the subject, 34px items, a 120ms rise. */
.wf-sidebar-pop {
    position: absolute;
    z-index: 1045;
    min-width: 248px;
    max-height: min(70vh, 560px);
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius-lg);
    background: var(--theme-background-float);
    box-shadow: var(--wf-elev-3);
    color: var(--theme-text);
    animation: wf-shell-pop 140ms var(--wf-ease) both;
}
.wf-sidebar-pop.is-top { top: 54px; left: 10px; right: 10px; }
.wf-sidebar-pop.is-new { top: calc(100% + 6px); left: 0; width: 300px; }
.wf-sidebar-pop.is-foot { bottom: calc(100% + 6px); left: 0; right: 0; }
@keyframes wf-shell-pop {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.wf-sidebar-pophdr { padding: 8px 10px 4px; color: var(--theme-text-muted); font-size: 12px; font-weight: 600; }
.wf-sidebar-popitem {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--wf-radius-sm);
    background: transparent;
    color: var(--theme-text);
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
}
.wf-sidebar-popitem:hover, .wf-sidebar-popitem:focus-visible { background: var(--wf-card-hover); outline: none; }
.wf-sidebar-popitem > i:first-child { flex: none; width: 18px; color: var(--theme-text-muted); font-size: 15px; text-align: center; }
.wf-sidebar-popitem.is-current { background: var(--wf-primary-soft); }
.wf-sidebar-popitem.is-signout { color: var(--wf-danger-ink); }
.wf-sidebar-popitem.is-signout > i:first-child,
.wf-sidebar-popitem.is-signout .wf-sidebar-poptext b { color: var(--wf-danger-ink); }
.wf-sidebar-poptile {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: var(--wf-radius-tile);
    background: var(--wf-neutral-soft);
    color: var(--theme-text-secondary);
    font-size: 13px;
    font-weight: 700;
}
.wf-sidebar-poptext { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.wf-sidebar-poptext b { color: var(--theme-text-emphasis); font-weight: 600; }
.wf-sidebar-poptext small { color: var(--theme-text-muted); font-size: 12px; }
.wf-sidebar-popdivider { height: 1px; margin: 5px 8px; background: var(--wf-line); }

/* The click-away layer behind the rail's popovers (transparent on desktop; the scrim behind the phone drawer). */
.wf-sidebar-backdrop { position: fixed; inset: 0; z-index: 1029; background: transparent; }

/* The folded rail (desktop): icons with tooltips, group labels become hairlines, New becomes its circle. */
@media (min-width: 768px) {
    .wf-sidebar.is-collapsed { width: 68px; }
    .wf-sidebar.is-collapsed .wf-sidebar-ws-text,
    .wf-sidebar.is-collapsed .wf-sidebar-ws-caret,
    .wf-sidebar.is-collapsed .wf-sidebar-text,
    .wf-sidebar.is-collapsed .wf-sidebar-count,
    .wf-sidebar.is-collapsed .wf-sidebar-caret,
    .wf-sidebar.is-collapsed .wf-sidebar-new kbd,
    .wf-sidebar.is-collapsed .wf-sidebar-me-text { display: none; }
    .wf-sidebar.is-collapsed .wf-sidebar-head { flex-direction: column; }
    .wf-sidebar.is-collapsed .wf-sidebar-ws,
    .wf-sidebar.is-collapsed .wf-sidebar-me { justify-content: center; padding: 6px 0; }
    .wf-sidebar.is-collapsed .wf-sidebar-new { justify-content: center; padding: 0; }
    .wf-sidebar.is-collapsed .wf-sidebar-link { justify-content: center; padding: 0; }
    .wf-sidebar.is-collapsed .wf-sidebar-split { gap: 0; }
    .wf-sidebar.is-collapsed .wf-sidebar-splitbar { display: none; }
    .wf-sidebar.is-collapsed .wf-sidebar-grouplabel {
        height: 1px;
        margin: 10px 6px;
        overflow: hidden;
        background: var(--theme-nav-divider);
        color: transparent;
    }
    .wf-sidebar.is-collapsed .wf-sidebar-sub,
    .wf-sidebar.is-collapsed .wf-sidebar-sectionlabel { display: none !important; }
    .wf-sidebar.is-collapsed .wf-sidebar-pop { right: auto; left: calc(100% + 8px); min-width: 260px; }
    .wf-sidebar.is-collapsed .wf-sidebar-pop.is-top { top: 4px; }
    .wf-sidebar.is-collapsed .wf-sidebar-pop.is-new { top: 0; }
    .wf-sidebar.is-collapsed .wf-sidebar-pop.is-foot { bottom: 0; }
}

/* ── The shell bar - sticky at the top of the sheet ───────────────── */
.wf-shellbar {
    position: sticky;
    top: 0;
    z-index: 1028;
    display: flex;
    flex: none;
    align-items: center;
    gap: 6px;
    height: var(--wf-shellbar-h);
    padding: 0 20px 0 32px;
    border-bottom: 1px solid transparent;
    transition: background var(--wf-motion), border-color var(--wf-motion);
}
.wf-shellbar.is-scrolled {
    border-bottom-color: var(--wf-line);
    background: color-mix(in srgb, var(--wf-sheet) 86%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.wf-shellbar-crumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    /* Secondary, not muted: the crumbs sit on the SHEET (not a card), where muted measured 4.23:1 (2026-10-03). */
    color: var(--theme-text-secondary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.wf-shellbar-crumbs a { color: var(--theme-text-secondary); text-decoration: none; }
.wf-shellbar-crumbs a:hover { color: var(--wf-primary-ink); text-decoration: underline; text-underline-offset: 3px; }
.wf-shellbar-crumbs .bi { font-size: 10px; opacity: .7; }
.wf-shellbar-crumbs [aria-current] { overflow: hidden; color: var(--theme-text-emphasis); font-weight: 600; text-overflow: ellipsis; }
.wf-shellbar-spacer { flex: 1; }
.wf-shellbar-jump {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
    width: 300px;
    height: 36px;
    padding: 0 8px 0 14px;
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius-pill);
    background: var(--wf-card);
    box-shadow: var(--wf-elev-1);
    color: var(--theme-text-muted);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: text;
    transition: border-color var(--wf-motion);
}
.wf-shellbar-jump:hover { border-color: var(--wf-line-strong); }
.wf-shellbar-jump-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-shellbar-ask {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    height: 36px;
    margin-left: 4px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--wf-radius-pill);
    background: var(--wf-primary-soft);
    color: var(--wf-primary-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--wf-motion);
}
.wf-shellbar-ask:hover,
.wf-shellbar-ask.is-on { background: color-mix(in srgb, var(--theme-primary) 22%, var(--wf-card)); }

.wf-shellbar kbd,
.wf-jumppal kbd {
    padding: 1px 6px;
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius-xs);
    background: var(--wf-inset);
    /* Secondary: the inset well is darker than a card - muted measured 3.86:1 on it. */
    color: var(--theme-text-secondary);
    font: 600 11px var(--theme-font);
}

/* The shell's icon buttons (the bell, chat, the phone bar): 36px, round with the tenant's button radius. */
.wf-shell-iconbtn {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--wf-radius-pill);
    background: transparent;
    color: var(--theme-text-secondary);
    font-size: 17px;
    cursor: pointer;
    transition: background var(--wf-motion), color var(--wf-motion);
}
.wf-shell-iconbtn:hover,
.wf-shell-iconbtn.is-on { background: var(--wf-card); color: var(--theme-text-emphasis); }
.wf-shell-dot {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    padding: 0 5px;
    border: 2px solid var(--wf-sheet);
    border-radius: var(--wf-radius-pill);
    background: var(--theme-primary);
    color: var(--theme-text-on-primary);
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}
.wf-shell-backdrop { position: fixed; inset: 0; z-index: 1044; background: transparent; }

/* ── The bell's popover - the compact Needs-you list (needs-you.css styles the list itself) ── */
.wf-bell { position: relative; flex: none; }
.wf-bell-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: -8px;
    z-index: 1045;
    width: 380px;
    max-width: calc(100vw - 16px);
    padding: 8px;
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius-lg);
    background: var(--theme-background-float);
    box-shadow: var(--wf-elev-3);
    color: var(--theme-text);
    animation: wf-shell-pop 140ms var(--wf-ease) both;
}
.wf-bell-head { padding: 6px 8px 8px; color: var(--theme-text-emphasis); font-size: 13px; font-weight: 650; }
.wf-bell-body { max-height: min(60vh, 520px); padding: 0 4px 4px; overflow-y: auto; }
.wf-bell-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 9px 8px 4px;
    border-top: 1px solid var(--wf-line);
    color: var(--wf-primary-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.wf-bell-foot:hover { text-decoration: underline; text-underline-offset: 3px; }
.wf-bell.is-on-nav .wf-shell-iconbtn { color: var(--theme-nav-text-hover); }
.wf-bell.is-on-nav .wf-shell-iconbtn:hover { background: var(--theme-nav-hover-background); }
/* On the nav colour (often the primary itself) the count wears the accent - the New button's circle - so it never
   vanishes into a primary-coloured bar: the bell's, and team chat's in the phone bars (ShellChatButton). */
.wf-bell.is-on-nav .wf-shell-dot,
.wf-shell-chat.is-on-nav .wf-shell-dot {
    border-color: var(--theme-nav-background);
    background: var(--theme-accent);
    color: var(--theme-text-on-accent);
}

/* ── The jump palette (Ctrl K) - one card over the scrim ─────────── */
.wf-jumppal-scrim {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background: var(--wf-scrim);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: wf-shell-fade 120ms ease both;
}
@keyframes wf-shell-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.wf-jumppal {
    display: flex;
    flex-direction: column;
    width: 620px;
    max-width: 100%;
    max-height: 76vh;
    overflow: hidden;
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius-xl);
    background: var(--theme-background-float);
    box-shadow: var(--wf-elev-3);
    color: var(--theme-text);
    animation: wf-shell-pop 160ms var(--wf-ease) both;
}
.wf-jumppal-input { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 16px; border-bottom: 1px solid var(--wf-line); }
.wf-jumppal-input .bi { color: var(--theme-text-muted); font-size: 16px; }
.wf-jumppal-input input {
    flex: 1;
    min-width: 0;
    height: 54px;
    border: 0;
    background: transparent;
    color: var(--theme-text-emphasis);
    font: inherit;
    font-size: 15px;
    outline: none;
}
.wf-jumppal-input input::placeholder { color: var(--theme-text-placeholder); }
.wf-jumppal-body { flex: 1; min-height: 0; padding: 6px; overflow-y: auto; }
.wf-jumppal-group { padding: 10px 10px 4px; color: var(--theme-text-muted); font-size: 12px; font-weight: 600; }
.wf-jumppal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--wf-radius-md);
    color: var(--theme-text);
    text-decoration: none !important;
    cursor: pointer;
}
.wf-jumppal-item[aria-selected="true"] { background: var(--wf-card-hover); }
.wf-jumppal-ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: var(--wf-radius-tile);
    background: var(--wf-primary-soft);
    color: var(--wf-primary-ink);
    font-size: 13px;
}
.wf-jumppal-text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.wf-jumppal-text b { overflow: hidden; color: var(--theme-text-emphasis); font-size: 13.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.wf-jumppal-text small { overflow: hidden; color: var(--theme-text-muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.wf-jumppal-item .wf-codechip { flex: none; margin-left: auto; }
.wf-jumppal-empty,
.wf-jumppal-loading { padding: 18px 12px; color: var(--theme-text-muted); font-size: 13px; }
.wf-jumppal-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 16px;
    border-top: 1px solid var(--wf-line);
    color: var(--theme-text-muted);
    font-size: 12px;
}

/* The shell's Ask dock (.wf-askdock*) retired with ONE DOCK (ONE COPILOT wave 4): the one copilot panel the layouts mount
   is copilot.css's (.copilot-panel, .copilot-dock-*). */

/* ── The phone (< 768px): full bleed, the mobile bar, the drawer ── */
.wf-sidebar-mobilebar { display: none; }
.wf-sidebar-mobiletitle { flex: 1; min-width: 0; overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) {
    .wf-shellbar-jump { width: 220px; }
}

/* The screen saver's button (docs/claude/AUTH.md "The screen saver"): the screen saver never shows under 1024px, so neither does it. */
@media (max-width: 1023.98px) {
    .wf-shellbar-saver { display: none; }
}

@media (max-width: 900px) {
    .wf-shellbar-jump { width: 36px; padding: 0; justify-content: center; }
    .wf-shellbar-jump-text,
    .wf-shellbar-jump kbd { display: none; }
}

@media (max-width: 767.98px) {
    .wf-shell--side { padding-top: 56px; }
    .wf-shell--side.wf-shell--island { padding: 56px 0 0; }
    .wf-shell > .wf-main,
    .wf-shell--side.wf-shell--frame > .wf-main,
    .wf-shell--top.wf-shell--frame > .wf-main { margin: 0; border-radius: 0; box-shadow: none; }
    .wf-shell--top.wf-shell--island { padding: 0; }
    .wf-shell--top.wf-shell--island > .wf-main { margin: 0; }
    /* ONE bar on a phone, in both layouts: the side layout's phone bar (below) and the top bar (nav.css) carry the
       burger, search and the bell, so the shell bar hides - and a page sticky sits at the sheet's own top again. */
    .wf-shellbar { display: none; }
    .wf-main:has(> .wf-shellbar) { --wf-sticky-top: 0px; scroll-padding-top: 0; }
    .wf-shell { --wf-dock-top: calc(var(--wf-shellbar-h) + 8px); }

    .wf-sidebar-mobilebar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1038;
        display: flex;
        align-items: center;
        gap: 8px;
        height: 56px;
        padding: 0 8px 0 6px;
        border-bottom: 1px solid var(--theme-nav-border);
        background: var(--theme-nav-background);
        color: var(--theme-nav-text-hover);
    }
    .wf-sidebar-mobilebar .wf-sidebar-mark { width: 28px; height: 28px; font-size: 14px; }
    .wf-sidebar-mobilebar > .wf-shell-iconbtn { color: var(--theme-nav-text-hover); }
    .wf-sidebar-mobilebar > .wf-shell-iconbtn:hover { background: var(--theme-nav-hover-background); }
    .wf-bell.is-on-nav .wf-bell-pop { position: fixed; top: 60px; right: 8px; left: 8px; width: auto; }

    .wf-sidebar-backdrop.is-drawer { z-index: 1039; background: var(--wf-scrim); }
    .wf-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        width: 280px;
        max-width: 86vw;
        height: auto;
        transform: translateX(-100%);
        transition: transform 200ms var(--wf-ease);
    }
    .wf-shell--island .wf-sidebar { border-radius: 0; }
    .wf-sidebar.is-mobile-open { transform: translateX(0); box-shadow: var(--wf-elev-3); }
    .wf-sidebar-collapse { display: none; }

}

@media (pointer: coarse) {
    .wf-jumppal-input input { font-size: 16px; }
    /* A finger keeps the rail's old 34px - the tightening is for a mouse. */
    .wf-sidebar-link { height: 34px; }
}

/* A finger on the phone bar: the burger, search, the "?", the bell and team chat are 44px targets (3.17); the gap
   tightens so the title keeps its room at 320px. */
@media (max-width: 767.98px) and (pointer: coarse) {
    .wf-sidebar-mobilebar { gap: 4px; }
    .wf-sidebar-mobilebar .wf-shell-iconbtn { width: 44px; height: 44px; }
}

/* The narrowest phones: the mark (decoration - the page's name is beside it) steps aside for the title. */
@media (max-width: 359.98px) and (pointer: coarse) {
    .wf-sidebar-mobilebar .wf-sidebar-mark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .wf-sidebar,
    .wf-sidebar-pop,
    .wf-bell-pop,
    .wf-jumppal,
    .wf-jumppal-scrim,
    .wf-shellbar {
        animation: none !important;
        transition: none !important;
    }
}
/* @end-tokens-only */
