/* Shell: the sidebar, the phone strip and the phone Menu dialog opt into .ph-app; page content keeps its existing
   token scope. Brief 34 removed the top bar: search, Help and feedback and the account menu are in the sidebar. */

/* Visually hidden, still read by screen readers (live-region announcer). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* #app-main takes focus after a shell navigation so keyboard and screen
   reader users start at the new content. Show where focus landed for keyboard
   users only (:focus-visible; a mouse click does not match). The app tokens
   are not available here, so this is the ring the legacy stylesheet already
   uses on its focus-visible controls (style.css: 2px solid var(--primary)).
   The offset is negative because .main-content has overflow-x: hidden, which
   would clip an outer ring. */
#app-main:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

/* Component dimensions; all colour, spacing, type and focus use app tokens. */
.app-sidebar-slot, .app-navigation-dialog {
    --nav-rail-width: 60px;
    --nav-label-width: 206px;
    --nav-rail-inner: calc(var(--nav-rail-width) - 1px - 2 * var(--space-3));   /* the rail's icon column: its width less the border and padding */
    --nav-brand-size: var(--ph-icon-md);   /* the logo mark and every icon share one size */
    --nav-lockup-height: 24px;             /* the full PropHop logo shown while the sidebar is expanded (1498 x 427 source) */
    --nav-active-width: 3px;
    --nav-phone-width: 320px;
    /* Brief 34: the workspace row and the account block */
    --nav-logo-full-width: 168px;          /* the most a company's full (wide) logo may take in the workspace row */
    --nav-logo-full-height: 28px;
    --nav-identity-inset: calc((var(--nav-rail-inner) - var(--nav-identity-size)) / 2 - 1px);   /* keeps a 28px tile on the rail's centre line while peeking (1px border) */
    --nav-icon-inset: calc((var(--control-h) - var(--ph-icon-md)) / 2);                          /* the same for a 20px icon */
}
.app-sidebar-slot, .app-navigation-dialog, .ph-app .app-shell-menu {
    --nav-identity-size: 28px;             /* the company's initials tile or square mark, and your avatar */
    --nav-company-tile: 18px;              /* the company's small tile beside its name in the account menu header */
}
.ph-app.app-phone-bar {
    --nav-phone-target: 44px;              /* the phone strip's Menu and search buttons */
    --nav-mobile-logo-height: 21px;
}
.app-sidebar-slot { position: sticky; top: 0; z-index: var(--z-dropdown); flex: 0 0 var(--nav-rail-width); width: var(--nav-rail-width); height: 100dvh; }
.ph-app .app-sidebar { box-sizing: border-box; display: flex; flex-direction: column; height: 100%; width: 100%; padding: var(--space-3); gap: var(--space-1); background: var(--surface); border-right: 1px solid var(--border); color: var(--ink); font-family: var(--font-body); }
/* The rail is the default look: logo, Expand button and nav items share one centre line, with a divider under the logo block. */
.ph-app .app-sidebar-top { display: flex; flex-direction: column; align-items: center; flex: none; gap: var(--space-1); padding-bottom: var(--space-2); margin-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.ph-app .app-sidebar-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: var(--control-h); flex: none; }
.ph-app .app-sidebar-logo-mark { display: block; width: var(--nav-brand-size); height: var(--nav-brand-size); }
.ph-app .app-sidebar-logo-full { display: none; width: auto; height: var(--nav-lockup-height); }
.ph-app .app-sidebar-toggle, .ph-app .app-navigation-close { display: none; align-items: center; justify-content: center; width: 100%; height: var(--control-h); padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); cursor: pointer; }
.ph-app .app-sidebar-toggle:hover, .ph-app .app-navigation-close:hover { background: var(--fill); color: var(--ink); }
.ph-app .app-sidebar-toggle[hidden] { display: none; }
.ph-app .app-sidebar-nav { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: var(--space-1); overflow-y: auto; scrollbar-width: thin; }
.ph-app .app-sidebar-item { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: var(--space-3); min-height: var(--control-h); padding: 0; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: var(--text-meta); font-weight: 500; line-height: var(--lh-ui); text-decoration: none; white-space: nowrap; }
.ph-app .app-sidebar-item .ph-icon { flex: none; }
.ph-app .app-sidebar-item:hover, .ph-app .app-sidebar-item.active { color: var(--ink); background: var(--fill); text-decoration: none; }
.ph-app .app-sidebar-item.active { font-weight: 600; }
.ph-app .app-sidebar-item.active::before { position: absolute; top: var(--space-2); bottom: var(--space-2); left: calc(-1 * var(--space-3)); width: var(--nav-active-width); border-radius: 0 var(--nav-active-width) var(--nav-active-width) 0; background: var(--shell-gradient); content: ''; }
.ph-app .app-sidebar-label { display: none; }
/* Brief 34. The rail is the default look here too: every new row is one icon column wide, centred on the rail's line.
   The workspace row: the company identity under the logo, not a link. Bordered when labelled. */
.ph-app .app-workspace { box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex: none; gap: var(--space-2); min-width: 0; min-height: var(--control-h); padding: var(--space-1) 0; overflow: hidden; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--ink); margin-bottom: var(--space-2); }
.ph-app .app-workspace-mark { display: grid; flex: 0 0 var(--nav-identity-size); width: var(--nav-identity-size); height: var(--nav-identity-size); place-items: center; border-radius: var(--radius-sm); background: var(--fill); color: var(--ink); font-size: var(--text-caption); font-weight: 700; }
.ph-app .app-workspace-name { min-width: 0; font-size: var(--text-meta); font-weight: 600; line-height: var(--lh-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The logo slot (the upload is a later brief): the square mark in the rail, the full logo alone when labelled. Never cropped. */
.ph-app .app-workspace-logo-mark { display: block; flex: none; width: var(--nav-identity-size); height: var(--nav-identity-size); object-fit: contain; }
.ph-app .app-workspace-logo-full { display: none; width: auto; height: auto; max-width: min(100%, var(--nav-logo-full-width)); max-height: var(--nav-logo-full-height); object-fit: contain; }
/* The search box: an ordinary link that opens the Search pop-up. A bordered magnifier in the rail. */
.ph-app .app-sidebar-search { box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex: none; gap: var(--space-2); min-height: var(--control-h); margin-bottom: var(--space-3); padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--surface); color: var(--text-secondary); font-size: var(--text-meta); line-height: var(--lh-meta); text-decoration: none; white-space: nowrap; }
.ph-app .app-sidebar .app-sidebar-search:hover { background: var(--fill); color: var(--ink); text-decoration: none; }  /* brief 34 polish: no border in the rail, like the other icons; bordered when labelled */
.ph-app .app-sidebar-search__key { margin-left: auto; padding: 0 var(--space-1); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-hover); color: var(--text-muted); font: inherit; font-size: var(--text-caption); line-height: var(--lh-caption); }
/* The bottom block, pinned under the scrolling list: Help and feedback, then the account block. */
.ph-app .app-sidebar-bottom { display: flex; flex: none; flex-direction: column; gap: var(--space-1); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.ph-app .app-sidebar-action { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: var(--space-3); width: 100%; min-height: var(--control-h); padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-family: inherit; font-size: var(--text-meta); font-weight: 500; line-height: var(--lh-ui); text-align: left; white-space: nowrap; cursor: pointer; }
.ph-app .app-sidebar-action:hover, .ph-app .app-sidebar-action[aria-expanded="true"] { background: var(--fill); color: var(--ink); }
.ph-app .app-account { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; min-width: 0; min-height: var(--control-h); padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font-family: inherit; text-align: left; cursor: pointer; }
.ph-app .app-account:hover, .ph-app .app-account[aria-expanded="true"] { background: var(--fill); }
.ph-app .app-account[aria-expanded="true"] { border-color: var(--border-strong); }
.ph-app .app-account .ph-avatar { --ph-avatar-size: var(--nav-identity-size); }
.ph-app .app-account-who { display: none; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.ph-app .app-account-name { overflow: hidden; font-size: var(--text-meta); font-weight: 600; line-height: var(--lh-meta); text-overflow: ellipsis; white-space: nowrap; }
.ph-app .app-account-email { overflow: hidden; color: var(--text-muted); font-size: var(--text-caption); line-height: var(--lh-caption); text-overflow: ellipsis; white-space: nowrap; }
.ph-app .app-account > .ph-icon { display: none; color: var(--icon-muted); }
.ph-app :is(.app-sidebar-search, .app-sidebar-action, .app-account):focus-visible { outline: var(--focus); outline-offset: calc(var(--focus-offset) * -1); }
/* Labelled desktop is the CSS default before JavaScript. */
@media (min-width: 1280px) {
    .app-sidebar-slot:not(.is-minimised) { flex-basis: var(--nav-label-width); width: var(--nav-label-width); }
    .ph-app .app-sidebar-toggle:not([hidden]) { display: flex; }
}
/* Labelled: the sidebar the person left expanded (wide screens) or the rail peeking open on hover or keyboard focus. */
@media (min-width: 1280px) {
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-label { display: inline; }
    .app-sidebar-slot:not(.is-minimised) .app-workspace-name { display: block; }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar { padding: var(--space-3) var(--space-2); }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-top { flex-direction: row; padding-bottom: 0; margin-bottom: var(--space-3); border-bottom: 0; }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-toggle { width: var(--control-h); }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-logo { width: auto; justify-content: flex-start; padding-left: var(--space-1); }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-logo-mark { display: none; }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-logo-full { display: block; }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-toggle { margin-left: auto; }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-item { justify-content: flex-start; padding: 0 var(--space-3); }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-item.active::before { left: 0; }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-nav { padding: var(--space-1); margin-inline: calc(-1 * var(--space-1)); }
    .app-sidebar-slot:not(.is-minimised) .app-workspace { justify-content: flex-start; padding: var(--space-1) var(--space-2); border-color: var(--border); background: var(--surface-hover); }
    .app-sidebar-slot:not(.is-minimised) .app-workspace--logo .app-workspace-logo-mark { display: none; }
    .app-sidebar-slot:not(.is-minimised) .app-workspace--logo .app-workspace-logo-full { display: block; }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-search { justify-content: flex-start; padding: 0 var(--space-3); border-color: var(--border-strong); color: var(--text-muted); }
    .app-sidebar-slot:not(.is-minimised) .app-sidebar-action { justify-content: flex-start; padding: 0 var(--space-3); }
    .app-sidebar-slot:not(.is-minimised) .app-account { justify-content: flex-start; padding: var(--space-2); border-color: var(--border); }
    .app-sidebar-slot:not(.is-minimised) .app-account-who { display: flex; }
    .app-sidebar-slot:not(.is-minimised) .app-account > .ph-icon { display: block; }
}
.app-sidebar-slot.is-peeking .app-sidebar-label { display: inline; }
.app-sidebar-slot.is-peeking .app-workspace-name { display: block; }
/* Brief 34: peeking keeps each new row's tile or icon on the rail's centre line; the border appears in place (it was transparent). */
.app-sidebar-slot.is-peeking .app-workspace { justify-content: flex-start; padding: var(--space-1) var(--nav-identity-inset); border-color: var(--border); background: var(--surface-hover); }
.app-sidebar-slot.is-peeking .app-workspace--logo .app-workspace-logo-mark { display: none; }
.app-sidebar-slot.is-peeking .app-workspace--logo .app-workspace-logo-full { display: block; }
.app-sidebar-slot.is-peeking .app-sidebar-search { justify-content: flex-start; padding: 0 calc(var(--nav-icon-inset) - 1px); border-color: var(--border-strong); color: var(--text-muted); }
.app-sidebar-slot.is-peeking .app-sidebar-action { justify-content: flex-start; padding: 0 var(--nav-icon-inset); }
.app-sidebar-slot.is-peeking .app-account { justify-content: flex-start; padding: var(--space-1) var(--nav-identity-inset); border-color: var(--border); }
.app-sidebar-slot.is-peeking .app-account-who { display: flex; }
.app-sidebar-slot.is-peeking .app-account > .ph-icon { display: block; }
/* Peeking keeps the rail's own layout (logo, button and icons do not move when it opens); only the labels are added. */
.app-sidebar-slot.is-peeking .app-sidebar-top { align-items: flex-start; }
.app-sidebar-slot.is-peeking .app-sidebar-toggle { width: var(--nav-rail-inner); }
/* The full logo starts where the mark was (the box is as wide as the rail's icon column plus the labels), so nothing jumps. */
.app-sidebar-slot.is-peeking .app-sidebar-logo { width: 100%; justify-content: flex-start; padding-left: calc((var(--nav-rail-inner) - var(--ph-icon-md)) / 2); }
.app-sidebar-slot.is-peeking .app-sidebar-logo-mark { display: none; }
.app-sidebar-slot.is-peeking .app-sidebar-logo-full { display: block; }
.app-sidebar-slot.is-peeking .app-sidebar-item { justify-content: flex-start; padding: 0 calc((var(--control-h) - var(--ph-icon-md)) / 2); }
/* Peeking: the rail's slot keeps its 60px, so the page does not move; the sidebar opens over the page. It stays in the
   slot's layer (--z-dropdown), below the task sheet's scrim and the dialogs. The animation uses --motion, which is 0ms under
   reduced motion, so it is then instant. */
.app-sidebar-slot.is-peeking .app-sidebar { position: absolute; inset-block: 0; left: 0; width: var(--nav-label-width); overflow: hidden; box-shadow: var(--shadow-pop); animation: ph-nav-peek var(--motion); }
@keyframes ph-nav-peek { from { width: var(--nav-rail-width); } to { width: var(--nav-label-width); } }
/* Brief 34 polish: a peek carried over a page load (a click inside it) is already open: no opening animation. */
.app-sidebar-slot.is-peeking.is-peek-carried .app-sidebar { animation: none; }
/* Nav polish 3: the Minimise / Expand button eases the sidebar. Only while .is-animating, which only the button sets
   (never on page load, the hover peek or a carried page), and only without reduced motion (--motion is also 0ms
   there). The slot's width eases, so the page beside it moves with it. Collapsing: the labels fade out first
   (.is-collapsing, the sidebar still wide), then the width eases to the rail with every icon, tile and avatar already
   on the rail's line (left-aligned with the peek's insets, so nothing slides sideways). Expanding: the width eases
   out and the labels fade in. The panel icon gives a short horizontal flip. */
@media (prefers-reduced-motion: no-preference) {
    .app-sidebar-slot.is-animating { transition: flex-basis var(--motion), width var(--motion); }
    .app-sidebar-slot.is-animating .app-sidebar { overflow: hidden; }
    .app-sidebar-slot.is-collapsing :is(.app-sidebar-label, .app-workspace-name, .app-account-who, .app-account > .ph-icon, .app-sidebar-logo-full) { opacity: 0; transition: opacity var(--motion); }
    .app-sidebar-slot.is-animating:not(.is-minimised):not(.is-collapsing) :is(.app-sidebar-label, .app-workspace-name, .app-account-who, .app-account > .ph-icon, .app-sidebar-logo-full) { animation: ph-nav-fade-in var(--motion) both; }
    .app-sidebar-slot.is-animating.is-minimised .app-sidebar-top { align-items: flex-start; }
    .app-sidebar-slot.is-animating.is-minimised .app-sidebar-toggle { width: var(--nav-rail-inner); }
    .app-sidebar-slot.is-animating.is-minimised .app-sidebar-logo { justify-content: flex-start; padding-left: calc((var(--nav-rail-inner) - var(--ph-icon-md)) / 2); }
    .app-sidebar-slot.is-animating.is-minimised :is(.app-sidebar-item, .app-sidebar-action) { justify-content: flex-start; padding: 0 var(--nav-icon-inset); }
    .app-sidebar-slot.is-animating.is-minimised .app-sidebar-search { justify-content: flex-start; padding: 0 calc(var(--nav-icon-inset) - 1px); }
    .app-sidebar-slot.is-animating.is-minimised .app-workspace { justify-content: flex-start; padding: var(--space-1) var(--nav-identity-inset); }
    .app-sidebar-slot.is-animating.is-minimised .app-account { justify-content: flex-start; padding: 0 var(--nav-identity-inset); }
    .app-sidebar-slot.is-animating .app-sidebar-toggle .ph-icon { animation: ph-nav-icon-flip var(--motion); }
}
@keyframes ph-nav-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ph-nav-icon-flip { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.2); } 100% { transform: scaleX(1); } }
/* The same navigation node moves here while the modal is open; it is never cloned. */
.app-navigation-dialog { box-sizing: border-box; inset: 0 auto 0 0; width: min(var(--nav-phone-width), calc(100% - var(--space-8))); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--surface); color: var(--ink); }
.app-navigation-dialog::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.app-navigation-dialog .app-sidebar-label { display: inline; }
.app-navigation-dialog .app-workspace-name { display: block; }
.app-navigation-dialog .app-navigation-close { display: flex; }
.app-navigation-dialog .app-sidebar-toggle { display: none; }
.app-navigation-dialog .app-sidebar { border-right: 0; }
/* The phone menu is the labelled sidebar: same geometry as the expanded one. */
.app-navigation-dialog .app-sidebar { padding: var(--space-3) var(--space-2); }
.app-navigation-dialog .app-sidebar-top { flex-direction: row; padding-bottom: 0; margin-bottom: var(--space-3); border-bottom: 0; }
.app-navigation-dialog .app-navigation-close { width: var(--control-h); }
.app-navigation-dialog .app-sidebar-logo { width: auto; justify-content: flex-start; padding-left: var(--space-1); }
.app-navigation-dialog .app-sidebar-logo-mark { display: none; }
.app-navigation-dialog .app-sidebar-logo-full { display: block; }
.app-navigation-dialog .app-navigation-close { margin-left: auto; }
.app-navigation-dialog .app-sidebar-item { justify-content: flex-start; padding: 0 var(--space-3); }
.app-navigation-dialog .app-sidebar-item.active::before { left: 0; }
.app-navigation-dialog .app-sidebar .app-sidebar-nav { padding: var(--space-1); margin-inline: calc(-1 * var(--space-1)); }
.app-navigation-dialog .app-workspace { justify-content: flex-start; padding: var(--space-1) var(--space-2); border-color: var(--border); background: var(--surface-hover); }
.app-navigation-dialog .app-workspace--logo .app-workspace-logo-mark { display: none; }
.app-navigation-dialog .app-workspace--logo .app-workspace-logo-full { display: block; }
.app-navigation-dialog .app-sidebar-search { justify-content: flex-start; padding: 0 var(--space-3); border-color: var(--border-strong); color: var(--text-muted); }
.app-navigation-dialog .app-sidebar-action { justify-content: flex-start; padding: 0 var(--space-3); }
.app-navigation-dialog .app-account { justify-content: flex-start; padding: var(--space-2); border-color: var(--border); }
.app-navigation-dialog .app-account-who { display: flex; }
.app-navigation-dialog .app-account > .ph-icon { display: block; }
html.app-navigation-open, html.app-navigation-open body { overflow: hidden; }
/* Brief 34: the phone strip, shown below 880px only: the Menu button (three lines, 44px), the logo and a search button. */
.ph-app.app-phone-bar { position: sticky; top: 0; z-index: var(--z-dropdown); display: none; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); background: var(--surface); }
.ph-app .app-navigation-menu, .ph-app .app-phone-search { box-sizing: border-box; display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--nav-phone-target); height: var(--nav-phone-target); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.ph-app .app-navigation-menu[hidden] { display: none; }
.ph-app .app-phone-search { margin-left: auto; text-decoration: none; }
.ph-app .app-navigation-menu:hover, .ph-app .app-phone-search:hover { background: var(--fill); text-decoration: none; }
.ph-app .app-mobile-logo { display: inline-flex; flex: 0 0 auto; align-items: center; text-decoration: none; }
.ph-app .app-mobile-logo img { display: block; width: auto; height: var(--nav-mobile-logo-height); }
.ph-app .app-phone-search:focus-visible, .ph-app .app-mobile-logo:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
@media (width < 880px) {
    .app-sidebar-slot { display: none; }
    .ph-app.app-phone-bar { display: flex; }
}

/* Brief 34: the Help and feedback menu and the account menu (static/js/app-shell-menu.js; .ph-menu and menu.css for
   the popover, its items and placement). They open upward from the bottom block. */
.ph-app .ph-menu.app-shell-menu--help { --ph-menu-w: 16rem; }
/* About 340px (Sam, 10 Nov 2026): a normal email address fits on one line (up to about 40 characters); a longer one
   is cut with an ellipsis (full address on hover, and in the account button's hint on hover and focus).
   menu.css still limits it to the window's width. */
.ph-app .ph-menu.app-account-menu { --ph-menu-w: 21.25rem; }
.ph-app .app-shell-menu a.ph-menu__item { color: var(--ink); text-decoration: none; }
.ph-app .app-shell-menu .ph-menu__item .ph-icon { color: var(--text-secondary); }
.ph-app .app-shell-menu__divider { height: 1px; margin: var(--space-1) 0; background: var(--divider); }
.ph-app .app-account-menu__head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3); }
.ph-app .app-account-menu__head .ph-avatar { --ph-avatar-size: var(--nav-identity-size); }
.ph-app .app-account-menu__who { min-width: 0; }
.ph-app .app-account-menu__who p { margin: 0; }
.ph-app .app-account-menu__name { font-size: var(--text-ui); font-weight: 600; line-height: var(--lh-ui); overflow-wrap: anywhere; }
.ph-app .app-account-menu__email { overflow: hidden; color: var(--text-muted); font-size: var(--text-meta); line-height: var(--lh-meta); text-overflow: ellipsis; white-space: nowrap; }
.ph-app p.app-account-menu__company { display: flex; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-1); color: var(--text-secondary); font-size: var(--text-meta); line-height: var(--lh-meta); overflow-wrap: anywhere; }
.ph-app .app-company-tile { box-sizing: border-box; display: grid; flex: none; width: var(--nav-company-tile); height: var(--nav-company-tile); place-items: center; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--fill); color: var(--text-secondary); font-size: var(--text-caption); font-weight: 700; line-height: 1; letter-spacing: 0; }
.ph-app .app-company-tile img { width: 100%; height: 100%; object-fit: contain; }
@media (forced-colors: active) {
    .ph-app .app-sidebar-item.active { outline: 1px solid Highlight; outline-offset: -1px; }
}

/* Reserve the document gutter while the modal locks background scrolling. */
html:has(body.app-authenticated) { scrollbar-gutter: stable; }

/* Leave room for the existing focus ring inside the scrolling navigation. */
.ph-app .app-sidebar-nav { padding-inline: var(--space-3); margin-inline: calc(-1 * var(--space-3)); }   /* the rail's nav spans the sidebar, so the active bar reaches the edge unclipped */
.app-navigation-menu:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
