/*
File: /apps/assets/header.css
Purpose: Canonical SOTS brand header styling shared by public and application pages
Version: v1.13.6
Changelog:
- v1.13.6: Phone Operator pill: content-driven width, 8–12px end padding, soft cap ~168px / 45vw (less squat).
- v1.13.5: Phone-only: bold tagline and Operator pill kicker lines (Signed in / and viewing as).
- v1.13.4: Logo always matches Operator login pill; desktop pill is two lines (Signed in and viewing as / Operator), phone stays three.
- v1.13.3: Desktop logo sized to title+tagline; phone logo still tracks Operator login pill.
- v1.13.2: Phone tagline breaks after “by” (more even two-line wrap beside the logo).
- v1.13.1: Gear logo box matches Operator login pill height (square logo, synced on resize).
- v1.13.0: Operator pill is three compact lines on all widths (same chip desktop and phone); stops hiding the kicker on phone.
- v1.12.5: Operator menu panel stacks above Vehicle ID so the menu stays usable while a drawer is open.
- v1.12.4: Phone tagline breaks after “chaos” for a balanced two-line wrap beside the logo.
- v1.12.3: Phone tagline sits under the brand beside the logo again (two wrapped lines), not a full-width header row.
- v1.12.2: Phone header keeps the full two-line tagline under the brand row (full width, no ellipsis cut-off).
- v1.12.1: Tighter mobile public header (smaller logo/padding, one-line tagline) so Operator chip fits cleanly.
- v1.12.0: Full-bleed site header above .sots-shell; app pages use the same public-nav Operator chip path as Home.
- v1.11.0: One blue site header for Home and all app pages (drops competing white is-app-shell theme).
- v1.10.0: App shells share the blue public site header (same Home banner + Operator chip look).
- v1.9.0: App-shell shows full Software On The Spot name plus quiet visible tagline under the brand row.
- v1.8.19: Phone headers: compact Operator login pill (hide long kicker) so brand + tagline keep a full nice banner.
- v1.8.18: Soft-nav Home ↔ Contact/legal (shared public-home.css toggle); no auto view-transitions.
- v1.8.17: Drop auto view-transitions (they caused the remaining footer-hop flash); soft-nav swaps main only.
- v1.8.16: Soft-nav main transition tuning for footer page swaps.
- v1.8.15: Public footer-page chrome + view transitions so Contact/About/legal switches stay smooth.
- v1.8.14: Operator session menu items support title + short description; Hard refresh button styling.
- v1.8.13: Canonical centered public site footer (links + copyright) shared via header.css.
- v1.8.12: Public Operator chip matches OpCon Signed in / Operator control; removes SO chip experiment.
- v1.8.11: App-shell SOTS Operator chip matches public SO mark + label (Log out stays in menu).
- v1.8.10: Public header SOTS Operator chip (platform session) top-right; Contact stays footer-only.
- v1.8.9: Footer clears floats with side inset (not a tall bottom pad that forces weird scroll).
- v1.8.8: Public footer clears floating Chat / Three Red Lines so copyright is not sandwiched off-screen.
- v1.8.7: More panel scrolls when tall; Operator tools moved to Admin Panel.
- v1.8.6: More menu rows support title + subtext for every shared item.
- v1.8.5: Screenshot redact toggle + opaque sensitive-detail masks for app shells.
- v1.8.4: Shows the site tagline in a hover tip on the logo from public and app shells.
- v1.8.3: App-shell SOTS wordmark links home; product label refreshes; public Return link styles.
- v1.8.2: Viewer chip type stays understated (10px) for Owner Admin and preview-as-member alike.
- v1.8.1: App-shell brand row title is a clickable refresh control (pointer + focus styles).
- v1.8.0: Styles shared session viewer chip in the app-shell topbar (Discovery-matching login chip for Workspace).
- v1.7.1: Keeps app-shell More menu above Discovery sticky toolbars/cards (raise topbar stacking + panel z-index; overflow visible).
- v1.7.0: Styles public Contact nav and auth-driven More destination links; app title via / label.
- v1.6.0: Styles shared app-shell More menu (Hard refresh + page tools slot) for phone/desktop.
- v1.5.1: Keeps app-shell topbar on one row at narrow widths; hides compact context so conversation chrome can dominate.
- v1.5.0: Light commercial app-shell chrome (soft surface, ink navy type) so Operator/Discovery no longer open under a heavy blue banner; public-home marketing banner unchanged.
- v1.4.0: Tightens compact context line for quieter workspace + identity chrome.
- v1.3.0: Adds segmented Operator/Discovery app switcher styles in the compact application shell.
- v1.2.0: Adds compact is-app-shell header for Operator/Discovery/future apps (smaller footprint, short brand, single-line context) while preserving is-public-home marketing banner.
- v1.1.0: Adds compact header context panel styling for workspace, identity, role, member count, resource count, and visitor home-only state.
- v1.0.0: Establishes the single source of truth for the SOTS topbar, logo, brand title, tagline, and workspace pill styling.
*/

.sots-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #ffffff;
    flex: 0 0 auto;
}

/* Application pages: same blue site header as Home (is-public-home owns the look).
   is-app-shell only adds stacking + brand-row / app-label structure. */
.sots-topbar.is-app-shell {
    position: relative;
    z-index: 20000;
    overflow: visible;
}

.sots-topbar.is-app-shell .sots-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.sots-topbar.is-app-shell .sots-brand-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.sots-topbar.is-app-shell .sots-brand-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.sots-topbar.is-public-home.is-app-shell .sots-brand-text-link,
.sots-topbar.is-public-home.is-app-shell .sots-app-label {
    color: #ffffff;
}

.sots-topbar.is-public-home.is-app-shell .sots-app-label {
    font-size: 16px;
    font-weight: 600;
}

/* App pages keep the same blue header; app label and brand-row need these styles
   even when we no longer mark the topbar as is-app-shell. */
.sots-topbar.is-public-home .sots-brand-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.sots-topbar.is-public-home .sots-brand-sep {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    font-weight: 500;
}

.sots-topbar.is-public-home .sots-app-label {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    letter-spacing: -0.02em;
    line-height: 1.1;
    cursor: pointer;
    border-radius: 4px;
    text-align: left;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.sots-topbar.is-public-home .sots-app-label:hover {
    color: rgba(255, 255, 255, 0.92);
}

.sots-topbar.is-public-home .sots-app-label:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 3px;
}

.sots-topbar.is-app-shell .sots-brand-sep {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    font-weight: 500;
}

.sots-topbar.is-app-shell .sots-tagline {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    max-width: min(560px, 100%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sots-topbar.is-app-shell .sots-app-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
    padding: 3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.sots-topbar.is-app-shell .sots-app-switcher-item {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 11px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.sots-topbar.is-app-shell .sots-app-switcher-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.sots-topbar.is-app-shell .sots-app-switcher-item.is-active {
    color: #0f2d52;
    background: #ffffff;
    font-weight: 750;
    box-shadow: none;
}

.sots-topbar.is-app-shell .sots-app-label {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    letter-spacing: -0.02em;
    line-height: 1.1;
    cursor: pointer;
    border-radius: 4px;
    text-align: left;
}

.sots-topbar.is-app-shell .sots-app-label:hover {
    color: rgba(255, 255, 255, 0.92);
}

.sots-topbar.is-app-shell .sots-app-label:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 3px;
}

.sots-topbar.is-public-home .sots-return-slot {
    display: flex;
    align-items: center;
}

.sots-topbar.is-public-home .sots-return-slot[hidden] {
    display: none !important;
}

.sots-topbar.is-public-home .sots-return-link {
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.34);
}

.sots-topbar.is-public-home .sots-return-link:hover {
    border-bottom-color: #ffffff;
}

.sots-topbar.is-public-home .sots-topbar-public-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Match OpCon Signed in / Operator chip on public blue banner */
.sots-topbar.is-public-home .sots-operator-session-menu-public {
    position: relative;
    flex: 0 0 auto;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public > summary {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 12px;
    color: #486581;
    cursor: pointer;
    display: inline-flex;
    font-size: 10px;
    font-weight: 500;
    gap: 6px;
    line-height: 1.15;
    list-style: none;
    max-width: min(200px, 46vw);
    padding: 4px 8px 4px 4px;
    user-select: none;
    white-space: normal;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public > summary::-webkit-details-marker {
    display: none;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public > summary::after {
    color: #829ab1;
    content: '▾';
    flex: 0 0 auto;
    font-size: 9px;
    margin-left: 2px;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-kicker {
    color: #829ab1;
    display: block;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.15;
    white-space: nowrap;
}
.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-op-pill-line {
    display: inline;
}
.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-op-pill-signed::after {
    content: ' ';
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-avatar {
    align-items: center;
    background: #334e68;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 8px;
    font-weight: 500;
    height: 20px;
    justify-content: center;
    letter-spacing: 0.02em;
    min-width: 20px;
    padding: 0 4px;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-name-line {
    align-items: baseline;
    display: flex;
    gap: 4px;
    min-width: 0;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-label {
    color: #243b53;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.15;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 21000;
    min-width: 220px;
    padding: 10px;
    border: 1px solid #d8e1ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 45, 82, .16);
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-access-note {
    margin: 0 0 8px;
    color: #627d98;
    font: 12px/1.35 Arial, Helvetica, sans-serif;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #243b53;
    text-align: left;
    text-decoration: none;
    font: 650 12px/1.3 Arial, Helvetica, sans-serif;
    cursor: pointer;
    box-sizing: border-box;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-option-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #243b53;
    line-height: 1.25;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-option-desc {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #627d98;
    line-height: 1.35;
    max-width: 16rem;
}

.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-option:hover,
.sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-option:focus {
    background: #f0f4f8;
}

.sots-topbar.is-app-shell .sots-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.sots-app-more {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    overflow: visible;
}

.sots-topbar-viewer-chip {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(340px, 48vw);
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-session-viewer-chip,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu {
    flex: 0 0 auto;
    position: relative;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu > summary {
    align-items: center;
    background: #fff;
    border: 1px solid #d8e1ec;
    border-radius: 999px;
    color: #486581;
    cursor: pointer;
    display: inline-flex;
    font-size: 10px;
    font-weight: 500;
    gap: 7px;
    line-height: 1.2;
    list-style: none;
    max-width: min(320px, 46vw);
    padding: 3px 9px 3px 4px;
    user-select: none;
    white-space: nowrap;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu > summary::-webkit-details-marker {
    display: none;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu > summary::after {
    color: #829ab1;
    content: '▾';
    flex: 0 0 auto;
    font-size: 9px;
    margin-left: 2px;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-kicker {
    color: #829ab1;
    display: block;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.1;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-avatar {
    align-items: center;
    background: #334e68;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 8px;
    font-weight: 500;
    height: 20px;
    justify-content: center;
    letter-spacing: 0.02em;
    min-width: 20px;
    padding: 0 4px;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-name-line {
    align-items: baseline;
    display: flex;
    gap: 4px;
    min-width: 0;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-name-line strong:empty,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-label:empty {
    display: none;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-label,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-role,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu.is-previewing .sots-discovery-viewer-label,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu.is-previewing .sots-discovery-viewer-role {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.1;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-label {
    color: #243b53;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-role {
    color: #627d98;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-panel {
    background: #fff;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    display: grid;
    gap: 4px;
    margin-top: 6px;
    min-width: 260px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    z-index: 20002;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-access-note,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-help,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-empty {
    color: #627d98;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-option {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #243b53;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    padding: 7px 9px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-option-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #243b53;
    line-height: 1.25;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-option-desc {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #627d98;
    line-height: 1.35;
    max-width: 16rem;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-option:hover,
.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-option:focus {
    background: #f4f7fb;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-option.is-active {
    background: #eef4fb;
    border-color: #1f446d;
}

.sots-topbar.is-app-shell:not(.is-public-home) a.sots-discovery-viewer-logout {
    box-sizing: border-box;
    color: #7a1f1f;
    display: block;
    margin-top: 4px;
    text-decoration: none;
}

.sots-topbar.is-app-shell:not(.is-public-home) a.sots-discovery-viewer-logout:hover,
.sots-topbar.is-app-shell:not(.is-public-home) a.sots-discovery-viewer-logout:focus {
    background: #fdf2f2;
    border-color: #e2b6b6;
    color: #5c1212;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu.is-previewing > summary {
    background: #eef3f8;
    border-color: #c9dff5;
}

.sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu.is-previewing .sots-discovery-viewer-kicker {
    font-size: 9px;
    font-weight: 500;
}

.sots-app-more-button {
    appearance: none;
    border: 1px solid var(--shell-line, rgba(16, 42, 67, 0.10));
    background: #ffffff;
    color: var(--shell-ink, #102a43);
    border-radius: 8px;
    min-height: 32px;
    padding: 0 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.sots-app-more-button:hover {
    background: var(--shell-soft, #f4f7fb);
}

.sots-redact-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--shell-line, rgba(16, 42, 67, 0.10));
    border-radius: 8px;
    background: #ffffff;
    color: var(--shell-ink, #102a43);
    cursor: pointer;
}

.sots-redact-toggle:hover {
    background: var(--shell-soft, #f4f7fb);
}

.sots-redact-toggle.is-active {
    background: #102a43;
    border-color: #102a43;
    color: #ffffff;
}

.sots-redact-toggle .sots-redact-slash {
    display: none;
}

.sots-redact-toggle.is-active .sots-redact-slash {
    display: block;
}

/* Screenshot redact indicator only — content masking is character-level via JS. */
body.sots-redact-sensitive .person-avatar {
    filter: grayscale(1);
    opacity: 0.55;
}

body.sots-redact-sensitive::before {
    content: 'Screenshot redact on';
    position: fixed;
    z-index: 100000;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 42, 67, 0.92);
    color: #fff;
    font: 600 11px/1.2 system-ui, sans-serif;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.sots-app-more-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20001;
    min-width: 220px;
    max-width: min(92vw, 320px);
    max-height: min(70vh, 480px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--shell-line, rgba(16, 42, 67, 0.12));
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sots-app-more-panel[hidden] {
    display: none !important;
}

.sots-app-more-panel > button.is-refreshing,
.sots-app-more-panel > a[role="menuitem"].is-refreshing {
    color: #627d98;
    cursor: wait;
    opacity: 0.85;
}

body.sots-hard-refresh-pending {
    cursor: progress;
}

.sots-hard-refresh-status {
    background: #0f172a;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    left: 50%;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    pointer-events: none;
    position: fixed;
    top: 72px;
    transform: translateX(-50%);
    z-index: 100000;
}

.sots-hard-refresh-status[hidden] {
    display: none !important;
}

.sots-app-more-panel > button,
.sots-app-more-panel > a[role="menuitem"],
.sots-app-more-page-slot button,
.sots-app-more-page-slot a[role="menuitem"] {
    appearance: none;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--shell-ink, #102a43);
    border-radius: 8px;
    min-height: 36px;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
}

.sots-app-more-panel > button.sots-app-more-row,
.sots-app-more-panel > a.sots-app-more-row,
.sots-app-more-page-slot .operator-menu-row,
.sots-app-more-page-slot .sots-app-more-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-height: 0;
    font-weight: 500;
}

.sots-app-more-row-title,
.operator-menu-row-title {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: var(--shell-ink, #102a43);
    line-height: 1.25;
}

.sots-app-more-row-desc,
.operator-menu-row-desc {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--shell-muted, #5f7488);
    line-height: 1.35;
}

.sots-app-more-panel > button:hover,
.sots-app-more-panel > a[role="menuitem"]:hover,
.sots-app-more-page-slot button:hover,
.sots-app-more-page-slot a[role="menuitem"]:hover {
    background: var(--shell-soft, #f4f7fb);
}

.sots-topbar.is-public-home .sots-public-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: flex-end;
}

.sots-topbar.is-public-home .sots-public-nav a {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.sots-topbar.is-public-home .sots-public-nav a:hover {
    text-decoration: underline;
}

.sots-topbar.is-public-home .sots-brand-home-link,
.sots-topbar.is-public-home .sots-brand-text-link {
    color: inherit;
    text-decoration: none;
}

.sots-topbar.is-public-home .sots-brand-home-link {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.sots-topbar.is-app-shell .sots-brand-home-link {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.sots-brand-home-link[data-sots-tagline]::after {
    content: attr(data-sots-tagline);
    background: #102a43;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
    color: #f0f4f8;
    font-size: 11px;
    font-weight: 500;
    left: 0;
    letter-spacing: 0;
    line-height: 1.35;
    max-width: min(280px, 70vw);
    opacity: 0;
    padding: 8px 10px;
    pointer-events: none;
    position: absolute;
    text-transform: none;
    top: calc(100% + 8px);
    transform: translateY(-2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    white-space: normal;
    width: max-content;
    z-index: 13000;
}

.sots-brand-home-link[data-sots-tagline]:hover::after,
.sots-brand-home-link[data-sots-tagline]:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.sots-topbar.is-public-home .sots-brand-home-link[data-sots-tagline]::after {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(16, 42, 67, 0.12);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
    color: #243b53;
}

.sots-app-more-page-slot:empty {
    display: none;
}

.sots-topbar.is-app-shell .sots-context-panel-compact {
    display: flex;
    align-items: center;
    max-width: min(560px, 52vw);
}

.sots-topbar.is-app-shell .sots-context-panel-compact .sots-context-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    line-height: 1.2;
}

.sots-topbar.is-app-shell .sots-context-label {
    color: var(--shell-muted);
    font-weight: 600;
}

.sots-topbar.is-app-shell .sots-context-value,
.sots-topbar.is-app-shell .sots-context-link {
    color: var(--shell-ink);
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sots-topbar.is-app-shell .sots-context-meta {
    color: var(--shell-muted);
    font-weight: 600;
}

.sots-topbar.is-app-shell .sots-context-separator {
    color: rgba(16, 42, 67, 0.22);
    padding: 0;
}

.sots-topbar.is-app-shell .sots-context-link {
    border-bottom: 1px solid rgba(16, 42, 67, 0.18);
    text-decoration: none;
}

.sots-topbar.is-app-shell .sots-context-link:hover {
    border-bottom-color: var(--shell-ink);
}

.sots-topbar.is-app-shell .sots-workspace-pill {
    border: 1px solid var(--shell-line);
    background: var(--shell-soft);
    color: var(--shell-ink);
}

.sots-topbar.is-app-shell .sots-workspace-pill:hover {
    background: #eef2f7;
}

/* Public marketing banner */
.sots-topbar.is-public-home {
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
    padding: 12px 28px;
    background: linear-gradient(90deg, #0f2d52, #173f70);
    box-shadow: 0 6px 22px rgba(15, 45, 82, 0.18);
}

.sots-topbar.is-public-home .sots-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sots-topbar.is-public-home .sots-logo-wrap {
    width: var(--sots-logo-size, 40px);
    height: var(--sots-logo-size, 40px);
    border-radius: 10px;
    background: #ffffff;
    padding: 4px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.sots-logo,
.sots-mark {
    width: 100%;
    height: 100%;
    display: block;
}

.sots-topbar.is-public-home .sots-brand-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sots-topbar.is-public-home .sots-brand {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.sots-topbar.is-public-home .sots-tagline {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.25;
}

.sots-topbar.is-public-home .sots-tagline-a::after {
    content: ' ';
}

.sots-topbar.is-app-shell .sots-redact-toggle {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sots-topbar.is-app-shell .sots-redact-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sots-topbar.is-app-shell .sots-redact-toggle.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: #0f2d52;
}

.sots-topbar.is-app-shell .sots-app-more-button {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sots-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.sots-workspace-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.sots-workspace-pill:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sots-context-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.25;
    text-align: right;
    max-width: 420px;
}

.sots-context-line {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

.sots-context-label {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.sots-context-value,
.sots-context-link {
    color: #ffffff;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.sots-context-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.34);
}

.sots-context-link:hover {
    border-bottom-color: #ffffff;
}

.sots-context-separator {
    color: rgba(255, 255, 255, 0.48);
    padding: 0 2px;
}

@media (max-width: 960px) {
    .sots-topbar.is-app-shell {
        padding: 6px 10px;
        gap: 8px;
    }

    .sots-topbar.is-app-shell .sots-context-panel-compact {
        max-width: min(420px, 48vw);
    }

    .sots-topbar.is-app-shell .sots-context-meta {
        display: none;
    }

    .sots-topbar.is-public-home {
        padding: 10px 12px;
    }
}

@media (max-width: 720px) {
    .sots-topbar.is-app-shell .sots-brand,
    .sots-topbar.is-app-shell .sots-brand-text-link {
        font-size: 15px;
    }

    .sots-topbar.is-app-shell .sots-app-label {
        font-size: 13px;
    }

    .sots-topbar.is-app-shell .sots-tagline {
        font-size: 10px;
        max-width: min(340px, 58vw);
    }

    .sots-topbar.is-app-shell .sots-topbar-right {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
        gap: 6px;
    }

    .sots-topbar.is-app-shell .sots-context-panel-compact {
        display: none;
    }

    .sots-topbar.is-app-shell .sots-topbar-viewer-chip {
        max-width: min(160px, 42vw);
    }

    .sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-menu > summary {
        max-width: none;
        gap: 5px;
        padding: 2px 6px 2px 2px;
    }

    .sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-kicker {
        display: none;
    }

    .sots-topbar.is-app-shell:not(.is-public-home) .sots-discovery-viewer-avatar {
        height: 22px;
        min-width: 22px;
        font-size: 9px;
    }

    .sots-topbar.is-app-shell .sots-app-switcher-item {
        padding: 0 8px;
        font-size: 11px;
    }

    /* Public marketing banner: logo + brand/tagline left; Operator chip right. */
    .sots-topbar.is-public-home {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        min-height: 52px;
        padding: 6px 10px;
    }

    .sots-topbar.is-public-home.is-app-shell {
        min-height: 52px;
        padding: 6px 10px;
        gap: 8px;
    }

    .sots-topbar.is-public-home .sots-topbar-left {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        align-items: center;
        gap: 8px;
    }

    .sots-topbar.is-public-home .sots-brand-wrap {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        flex: 1 1 auto;
    }

    .sots-topbar.is-public-home .sots-logo-wrap {
        width: var(--sots-logo-size, 40px);
        height: var(--sots-logo-size, 40px);
        border-radius: 8px;
        padding: 2px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
    }

    .sots-topbar.is-public-home .sots-brand {
        font-size: 14px;
        font-weight: 600;
        letter-spacing: -0.02em;
    }

    .sots-topbar.is-public-home .sots-tagline {
        display: block;
        overflow: visible;
        margin-top: 2px;
        max-width: none;
        white-space: normal;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.25;
        color: rgba(255, 255, 255, 0.82);
    }

    .sots-topbar.is-public-home .sots-tagline-a,
    .sots-topbar.is-public-home .sots-tagline-b {
        display: block;
    }

    .sots-topbar.is-public-home .sots-tagline-a::after {
        content: none;
    }

    .sots-topbar.is-public-home .sots-topbar-public-nav,
    .sots-topbar.is-public-home .sots-topbar-right {
        flex: 0 0 auto;
        gap: 6px;
    }

    .sots-topbar.is-public-home .sots-operator-session-menu-public > summary {
        max-width: min(168px, 45vw);
        min-width: 48px;
        gap: 6px;
        padding: 4px 12px 4px 4px;
        min-height: 0;
    }

    .sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-kicker {
        display: flex;
        flex-direction: column;
        font-size: 8px;
        font-weight: 700;
        white-space: normal;
    }
    .sots-topbar.is-public-home .sots-operator-session-menu-public .sots-op-pill-line {
        display: block;
        font-weight: 700;
    }
    .sots-topbar.is-public-home .sots-operator-session-menu-public .sots-op-pill-signed::after {
        content: none;
    }

    .sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-avatar {
        height: 22px;
        min-width: 22px;
        font-size: 9px;
    }

    .sots-topbar.is-public-home .sots-operator-session-menu-public .sots-discovery-viewer-label {
        font-size: 11px;
    }
}

@media (max-width: 560px) {
    .sots-topbar.is-public-home {
        padding: 8px 10px;
    }

    .sots-topbar.is-public-home .sots-brand {
        font-size: 14px;
    }

    .sots-topbar.is-public-home .sots-operator-session-menu-public > summary::after {
        display: none;
    }
}

/* Canonical public site footer (home / tow / wait / legal chrome).
   Centered links + copyright. Contact lives here, not in the topbar. */
.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(16, 42, 67, 0.08);
    background: transparent;
    flex: 0 0 auto;
}

.site-footer-inner {
    width: min(1440px, calc(100% - 56px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: center;
    justify-items: center;
    max-width: 100%;
    min-width: 0;
    padding: 14px 0 16px;
}

.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    align-items: center;
    justify-content: center;
}

.site-footer .footer-links a {
    color: #5f6f86;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
}

.site-footer .footer-links a:hover {
    text-decoration: underline;
}

.site-footer .footer-copy {
    color: #5f6f86;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

/* Public pages with floating Chat / Three Red Lines:
   keep footer text out from under the corner floats (side inset), without inventing a tall empty scroll band. */
body:has(.sots-chat-offer-btn) .site-footer-inner,
body:has(.sots-three-lines-reopen) .site-footer-inner {
    padding-left: max(16px, 88px);
    padding-right: max(16px, 88px);
    padding-bottom: 14px;
}

@media (max-width: 900px) {
    body:has(.sots-chat-offer-btn) .site-footer-inner,
    body:has(.sots-three-lines-reopen) .site-footer-inner {
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .site-footer-inner {
        width: min(100% - 28px, 1440px);
    }
}

/* Shared chrome for Contact / About / Privacy / Terms / Ethics. */
body.sots-public-simple {
    --sots-blue: #173f70;
    --sots-blue-dark: #0f2d52;
    --sots-ink: #102542;
    --sots-muted: #5f6f86;
    --sots-border: #dbe4ee;
    --sots-bg: #eef3f8;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(180deg, #f8fbff 0%, var(--sots-bg) 100%);
    color: var(--sots-ink);
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

body.sots-public-simple *,
body.sots-public-simple *::before,
body.sots-public-simple *::after {
    box-sizing: border-box;
}

body.sots-public-simple .legal-shell {
    width: min(720px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 36px;
    flex: 1 0 auto;
}

body.sots-public-simple .legal-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--sots-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 45, 82, 0.06);
    padding: 22px 24px;
}

body.sots-public-simple .legal-updated {
    margin: 0 0 8px;
    color: var(--sots-muted);
    font-size: 12px;
    font-weight: 600;
}

body.sots-public-simple .legal-card h1 {
    margin: 0 0 12px;
    color: #0c2442;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

body.sots-public-simple .legal-card h2 {
    margin: 18px 0 6px;
    color: var(--sots-blue-dark);
    font-size: 14px;
    font-weight: 700;
}

body.sots-public-simple .legal-card p {
    margin: 0 0 10px;
    color: #43566d;
    font-size: 14px;
    line-height: 1.55;
}

body.sots-public-simple .legal-card p:last-child {
    margin-bottom: 0;
}

body.sots-public-simple .contact-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

body.sots-public-simple .sots-hp-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.sots-public-simple .contact-form label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #102542;
}

body.sots-public-simple .contact-form label span {
    font-weight: 400;
    color: #627d98;
}

body.sots-public-simple .contact-form input,
body.sots-public-simple .contact-form textarea {
    width: 100%;
    border: 1px solid var(--sots-border);
    border-radius: 12px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    min-height: 44px;
    color: #102542;
    background: #fff;
    outline: none;
}

body.sots-public-simple .contact-form textarea {
    min-height: 88px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

body.sots-public-simple .contact-form input::placeholder,
body.sots-public-simple .contact-form textarea::placeholder,
body.sots-public-simple .contact-form input::-webkit-input-placeholder,
body.sots-public-simple .contact-form textarea::-webkit-input-placeholder {
    color: #94a3b8;
    font-weight: 400;
    opacity: 1;
}

body.sots-public-simple .contact-form input:focus,
body.sots-public-simple .contact-form textarea:focus {
    border-color: var(--sots-blue);
    box-shadow: 0 0 0 4px rgba(23, 63, 112, 0.10);
}

body.sots-public-simple .contact-form button {
    justify-self: start;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--sots-blue-dark);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

body.sots-public-simple .contact-form button:disabled {
    opacity: 0.7;
    cursor: wait;
}

body.sots-public-simple .contact-note {
    margin: 10px 0 0;
    color: var(--sots-muted);
    font-size: 12px;
    line-height: 1.45;
}

body.sots-public-simple .contact-success {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #e8f7ee;
    border: 1px solid #b7e4c7;
    color: #087848;
    font-size: 14px;
}

@media (max-width: 560px) {
    body.sots-public-simple .legal-shell {
        width: min(100% - 24px, 720px);
        padding: 18px 0 28px;
    }

    body.sots-public-simple .legal-card {
        padding: 18px 16px;
    }

    body.sots-public-simple .legal-card h1 {
        font-size: 20px;
    }
}
