/* The shared Keynote Lagoon tokens (--lg-*) and the light glass theme that re-points them (PS-GLASS-CORE-1-001) are linked from
   templates/base.html with the versioned url just ahead of this sheet, so every page that has the bar has them, from the one
   source (PS-HOMEPAGE-LAGOON-S2-001). They are not imported from this file: an import carries no ?v= stamp and Safari served a stale copy. */

/* ==========================================================================
   Site top bar and footer: the light glass shell, every base.html page.
   PS-GLASS-CORE-1-001 (Pete, 2026-10-24: "Crystal clearer" glass and a page 15% smaller) restyles the Lagoon bar of
   PS-HOMEPAGE-LAGOON-S2-001 (itself the round-5 bar, PS-SITE-SHELL-ROUND5-001): the markup, hooks, links and layout are
   unchanged. The bar is the glass "bar" role (about 72% fill, 12px blur, a teal underline); sizes are calc(Npx * var(--ps-scale))
   and so are 15% smaller on every page, the legacy owner-only pages included (their own content keeps its size); text never
   goes below var(--ps-text-min) (12px) and the Sign in and Menu controls keep the size they had (never shrunk below it).
   Locked authority: X:\PeerSlate\Claude\design\THEME_GLASS.md; Logo A "One flow of colour".

   Loads LAST in base.html (after public-navigation.css). Every selector is
   anchored on the #site-header wrapper (or the header element that holds it)
   so it outranks the ~370 legacy .global-header /
   .platform-* rules spread over style.css, public-navigation.css and page
   stylesheets (their strongest is body.x:not(.y):not(.z) .global-header,
   specificity 0,4,1; an id beats all of them without !important).
   ========================================================================== */

#site-header {
    --ps-top-ink: var(--lg-ink, #0b1d2a);
    --ps-top-word: var(--lg-ink, #0b1d2a);
    --ps-top-soon: var(--lg-ink2, #41596a);
    --ps-top-line: var(--lg-line, rgba(15, 23, 42, .10));
    --ps-top-edge: var(--lg-line, rgba(15, 23, 42, .10));
    --ps-top-current: var(--lg-lagoon, #0b74c9);
    --ps-top-sans: var(--lg-sans, "Geist", "Segoe UI", system-ui, -apple-system, sans-serif);

    /* The wrapper just inside <header class="global-header"> (that tag stays
       exactly as before). The header element paints the bar (below); the
       wrapper paints it only where :has() is unavailable. */
    display: block;
    margin: 0;
    padding: 0;
    color: var(--ps-top-ink);
}
@supports not selector(:has(*)) {
    #site-header { background: var(--lg-glass-fill-solid, #fff); }
}

/* The header element itself: a reset of the legacy header surface
   (style.css 2525, public-navigation.css 323-332, living-resume-v2.css
   28/313, interview-studio, opportunity-slate-v2,
   ask-pete-resume-evidence). Specificity (1,1,1) settles every legacy rule.
   The glass "bar" role: it looks clear over the plain page and frosts once content scrolls under it (AA). */
header.global-header:has(> #site-header) {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background-color: var(--lg-glass-fill-bar, rgba(248, 250, 251, .72));
    background-image: none;
    border: 0;
    box-shadow: var(--lg-glass-bar-shadow, inset 0 -1px 0 rgba(20, 175, 160, .32), 0 1px 0 rgba(20, 35, 55, .06));
    -webkit-backdrop-filter: blur(var(--lg-glass-blur-bar, 12px));
    backdrop-filter: blur(var(--lg-glass-blur-bar, 12px));
    transform: none;
    color: var(--lg-ink, #0b1d2a);
}

/* Owner-only pages that keep the old look (a green page behind the bar): the bar is solid there so the wordmark stays readable. */
body:not(.ps-scaled) header.global-header:has(> #site-header) {
    background-color: #fff;   /* fully opaque: the translucent solid fill let the green through (wordmark 4.48:1) */
}

#site-header .ps-top {
    box-sizing: border-box;
    height: calc(64px * var(--ps-scale));
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: calc(28px * var(--ps-scale));
    align-items: center;
    padding: 0 calc(40px * var(--ps-scale));
    font-family: var(--ps-top-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#site-header .ps-top *,
#site-header .ps-top *::before,
#site-header .ps-top *::after { box-sizing: border-box; }

#site-header :focus-visible {
    outline: 3px solid var(--lg-focus, #0a66b0);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Lockup: Cairn + wordmark */
#site-header .ps-top__lockup {
    min-height: var(--ps-tap-min);
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: calc(10px * var(--ps-scale));
    text-decoration: none;
    color: var(--ps-top-word);
}
#site-header .ps-top__stones { width: calc(30px * var(--ps-scale)); height: calc(30px * var(--ps-scale)); fill: url(#ps-lagoon-stones); flex: none; }
/* Logo A, the wordmark in gradient text (THEME_LAGOON v2.1: the green end darkened to hold contrast). */
#site-header .ps-top__word {
    font: 700 calc(24px * var(--ps-scale)) var(--ps-top-sans);
    letter-spacing: -.025em;
    text-transform: none;
    background: linear-gradient(90deg, #2b4ff0, #0966b0 55%, #09735a);   /* the middle and end stops a shade deeper so the name holds 4.5:1 on the Soft edges gradient */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Links at the left beside the logo */
#site-header .ps-top__nav {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: calc(20px * var(--ps-scale));
    white-space: nowrap;
}
#site-header .ps-top__nav a {
    font: 500 max(var(--ps-text-min, 12px), calc(13.5px * var(--ps-scale))) var(--ps-top-sans); /* shorthand: line-height normal */
    text-decoration: none;
    color: var(--ps-top-soon);
    padding: calc(22px * var(--ps-scale)) 0 calc(20px * var(--ps-scale));
    border-bottom: 2px solid transparent;
}
#site-header .ps-top__nav a[aria-current] { color: var(--ps-top-ink); font-weight: 600; border-bottom-color: var(--ps-top-current); }
#site-header .ps-top__nav a:hover { border-bottom-color: rgba(11, 116, 201, .35); }
#site-header .ps-top__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Right: Menu (phone), Sign in or the existing account control. These keep the size they had (tap targets are never shrunk). */
#site-header .ps-top__right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: calc(10px * var(--ps-scale));
}
#site-header .ps-top__signin {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    min-height: 44px;   /* PS-LIVE-FIXES-SHELL-001: the site's 44px target. The link itself paints nothing; the pill is the ::before below, 38px tall, exactly as before */
    font: 600 max(var(--ps-text-min, 12px), calc(13px * var(--ps-scale))) var(--ps-top-sans);
    color: #fff;
    text-decoration: none;
    padding: 0 calc(18px * var(--ps-scale));
    border: 0;
    border-radius: 999px;
}
#site-header .ps-top__signin::before {
    content: "";
    position: absolute;
    inset: 3px 0;   /* 44px target minus 3px above and below: the 38px pill the bar always had */
    z-index: -1;
    border-radius: 999px;
    background: var(--lg-nav-on, linear-gradient(100deg, #1d3fd0, #0a74c9));
    box-shadow: var(--lg-btn-shadow, none);
}
#site-header .ps-top__signin:hover { filter: brightness(.92); }   /* PS-PROFILE-HEADER-FOLLOWUP-002: darker on hover, not lighter: brightening the pill's light right end (#0a74c9) took the white word to 4.2:1; this keeps it above 5:1 */
#site-header .ps-top__signin:focus-visible { outline-offset: -1px; }   /* the ring stays 2px outside the painted pill, as before */
#site-header .ps-top__signin[hidden],
#site-header .ps-top__account[hidden],
#site-header .ps-top__right [hidden] { display: none; }

#site-header .ps-top__menu {
    display: none;
    align-items: center;
    gap: calc(8px * var(--ps-scale));
    min-height: 44px;   /* PS-LIVE-FIXES-SHELL-001: the site's 44px target */
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background-color: var(--lg-glass-fill-in, rgba(255, 255, 255, .05));
    background-image: var(--lg-glass-sheen-in, none);
    box-shadow: var(--lg-glass-rim-in, 0 0 0 1px var(--ps-top-line));
    color: var(--ps-top-ink);
    font: 600 max(var(--ps-text-min, 12px), calc(13.5px * var(--ps-scale))) var(--ps-top-sans);
    cursor: pointer;
}
#site-header .ps-top__menu svg {
    width: 20px; height: 20px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none;
}

/* Existing account control (initial in a circle), sized to the Sign in button's footprint so
   the bar does not move between states. The circle keeps its 40px (a tap target). */
#site-header .ps-top__account { position: relative; }
#site-header .ps-top__account .platform-account__trigger {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ps-top-edge);
    border-radius: 50%;
    background: transparent;
    color: var(--ps-top-ink);
    cursor: pointer;
}
#site-header .ps-top__account .platform-account__initial {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--lg-nav-on, linear-gradient(100deg, #1d3fd0, #0a74c9));
    color: #fff;
    font: 700 max(var(--ps-text-min, 12px), calc(13px * var(--ps-scale))) var(--ps-top-sans);
}

@media (max-width: 1359px) {
    #site-header .ps-top { padding: 0 calc(32px * var(--ps-scale)); }
    #site-header .ps-top__nav { gap: calc(16px * var(--ps-scale)); }
    #site-header .ps-top__stones { width: calc(28px * var(--ps-scale)); height: calc(28px * var(--ps-scale)); }
    #site-header .ps-top__word { font-size: calc(22px * var(--ps-scale)); }
}
@media (max-width: 1100px) {
    #site-header .ps-top { grid-template-columns: auto 1fr auto; gap: calc(12px * var(--ps-scale)); padding: 0 calc(20px * var(--ps-scale)); }
    #site-header .ps-top__nav { justify-self: start; gap: calc(11px * var(--ps-scale)); }
    #site-header .ps-top__lockup { gap: calc(9px * var(--ps-scale)); }
    #site-header .ps-top__stones { width: calc(26px * var(--ps-scale)); height: calc(26px * var(--ps-scale)); }
    #site-header .ps-top__word { font-size: calc(20px * var(--ps-scale)); }
}
@media (max-width: 1000px) {
    #site-header .ps-top { grid-template-columns: auto 1fr; padding: 0 calc(20px * var(--ps-scale)); }
    #site-header .ps-top__nav { display: none; }
    #site-header .ps-top__menu { display: inline-flex; }
}
@media (max-width: 760px) {
    #site-header .ps-top { padding: 0 calc(16px * var(--ps-scale)); height: calc(64px * var(--ps-scale)); grid-template-columns: auto 1fr; }
    #site-header .ps-top__word { font-size: calc(20px * var(--ps-scale)); }
    #site-header .ps-top__stones { width: calc(28px * var(--ps-scale)); height: calc(28px * var(--ps-scale)); }
    #site-header .ps-top__signin { padding: 0 calc(16px * var(--ps-scale)); white-space: nowrap; }
}

/* Menu sheet (existing .platform-menu). It lists exactly the bar's own items and covers the page, so it is a frost pane (AA). */
#site-header .platform-menu {
    background-color: var(--lg-glass-fill-frost, rgba(255, 255, 255, .72));
    -webkit-backdrop-filter: blur(var(--lg-glass-blur-frost, 10px));
    backdrop-filter: blur(var(--lg-glass-blur-frost, 10px));
    border-top: 1px solid var(--ps-top-line);
}
#site-header .platform-menu__inner { padding: calc(8px * var(--ps-scale)) 16px calc(16px * var(--ps-scale)); }
#site-header .platform-menu__links { list-style: none; margin: 0; padding: 0; }
#site-header .platform-menu__links a {
    display: block; box-sizing: border-box; min-height: 44px; padding: 13px 4px; color: var(--ps-top-ink); text-decoration: none;   /* PS-LIVE-FIXES-SHELL-001: each row is a 44px target */
    font: 600 max(var(--ps-text-min, 12px), calc(15px * var(--ps-scale))) var(--ps-top-sans); border-bottom: 1px solid var(--ps-top-line);
}
/* The sheet's current page: a faint glass wash and a lagoon mark. */
#site-header .platform-menu__links a[aria-current="page"] { background: var(--lg-glass-faint, rgba(255, 255, 255, .05)); color: var(--ps-top-ink); }
#site-header .platform-menu__links a[aria-current="page"]::before { background: var(--ps-top-current); }
/* The signed-in account group in the same sheet (public-navigation.css draws
   it navy for its old white sheet). Ink on the light sheet; the hover/focus
   wash keeps it readable and the focus ring is the bar's own outline
   (#site-header :focus-visible). */
#site-header .platform-menu__account { border-top-color: var(--ps-top-line); }
#site-header .platform-menu__account-item { color: var(--ps-top-ink); }
#site-header .platform-menu__account-item:hover,
#site-header .platform-menu__account-item:focus-visible {
    background: var(--lg-glass-faint, rgba(255, 255, 255, .05));
    color: var(--ps-top-ink);
}

@media (forced-colors: active) {
    #site-header .ps-top__signin,
    #site-header .ps-top__menu { border-color: CanvasText; }
    #site-header .ps-top__signin { border: 1px solid CanvasText; }   /* forced colors drop the painted pill, so the link's own edge shows */
}

#site-header .platform-menu[hidden] { display: none; }
#site-header .platform-menu__inner { display: block; }

/* Pete's public profile tab strip (My Story / Resume) sits inside the header
   on his profile pages. Recoloured to the shared theme only: the rail-card
   beige with a frame-line edge, the resume page's ink and green current
   mark. Its layout and the compact Ask field are unchanged. */
#site-header .profile-tabs {
    background: var(--pt-rail-card);
    border-bottom: 1px solid var(--pt-frame-line);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}
#site-header .profile-tab { color: var(--pt-ink2); font-size: max(var(--ps-text-min, 12px), .78rem); }   /* the 12px text floor on the scaled pages */
#site-header .profile-tab[aria-current="page"] {
    color: var(--pt-head);
    border-bottom-color: var(--pt-green);
}

/* Narrow phones (WCAG 2.2 reflow at 320 CSS px). Round 5 is drawn down to
   390px; below 375px only the spacing and the wordmark tracking tighten so
   the lockup, Menu and Sign in still fit on one row. */
@media (max-width: 374px) {
    #site-header .ps-top { padding: 0 10px; gap: 6px; }
    #site-header .ps-top__lockup { gap: 6px; }
    #site-header .ps-top__stones { width: 22px; height: 22px; }
    #site-header .ps-top__word { font-size: calc(16px * var(--ps-scale)); }
    #site-header .ps-top__right { gap: 6px; }
    #site-header .ps-top__menu { padding: 0 9px; gap: 6px; font-size: var(--ps-text-min, 12px); }
    #site-header .ps-top__signin { padding: 0 10px; font-size: var(--ps-text-min, 12px); }
}

/* The two recovery states (Workspace waking, Account issue) carry a longer
   label than Sign in. On phones it sets on two short lines at the Menu
   button's height, and the right-hand spacing tightens a step, so the
   lockup, Menu and the recovery action all fit inside the 16px (12px below
   375px) side gutter with no sideways scroll. auth-state.js keeps
   data-ps-auth-state current, so this follows a state change on the page. */
@media (max-width: 760px) {
    #site-header [data-ps-auth-state="workspace_waking"],
    #site-header [data-ps-auth-state="account_issue"] { gap: 6px; }
    #site-header [data-ps-auth-state="workspace_waking"] .ps-top__menu,
    #site-header [data-ps-auth-state="account_issue"] .ps-top__menu { padding: 0 9px; gap: 6px; }
    #site-header [data-ps-auth-state="workspace_waking"] .ps-top__signin:not([hidden]),
    #site-header [data-ps-auth-state="account_issue"] .ps-top__signin:not([hidden]) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;   /* these two recovery labels paint their whole 44px box (they were 40px) */
        padding: 4px 8px;
        font-size: var(--ps-text-min, 12px);
        line-height: 1.15;
        text-align: center;
    }
}
@media (max-width: 760px) {
    #site-header [data-ps-auth-state="workspace_waking"] .ps-top__signin:not([hidden])::before,
    #site-header [data-ps-auth-state="account_issue"] .ps-top__signin:not([hidden])::before { inset: 0; }
}
@media (max-width: 374px) {
    #site-header [data-ps-auth-state="workspace_waking"],
    #site-header [data-ps-auth-state="account_issue"] { gap: 5px; }
    #site-header [data-ps-auth-state="workspace_waking"] .ps-top__menu,
    #site-header [data-ps-auth-state="account_issue"] .ps-top__menu { padding: 0 7px; gap: 5px; }
    #site-header [data-ps-auth-state="workspace_waking"] .ps-top__signin:not([hidden]),
    #site-header [data-ps-auth-state="account_issue"] .ps-top__signin:not([hidden]) { padding: 4px 6px; font-size: var(--ps-text-min, 12px); }
}

/* The phone section-tab bar (style.css shows .mobile-tabbar as flex below
   744px) honours its hidden attribute: public-mobile-nav.js unhides it only
   on a page that publishes section tabs. With the signed-in global bar
   retired (manager ruling 2026-10-15), no empty strip is left behind. */
.mobile-tabbar[hidden] { display: none; }

/* Scrolling to a control keeps it clear of the fixed floating buttons at the bottom (the Guide's reopen button is 52px
   tall, 22px from the bottom): WCAG 2.2 "Focus Not Obscured" (2.4.11), and a real fix for a click that landed under
   that button when the bar got 7px shorter (PS-HOMEPAGE-LAGOON-S2-001; the integrated MVP1 browser journey caught it
   on CI). Bottom only: a top padding would stack on the resume page's own anchor offsets (scroll-margin-top). */
html { scroll-padding-bottom: 96px; }

/* ==========================================================================
   Footer: the plain-page band on every page (PS-HOMEPAGE-LAGOON-S2-001, scaled and re-skinned by PS-GLASS-CORE-1-001). The markup is
   base.html's <footer class="footer" id="site-footer"> (privacy line, mark and copyright, About / Contact / Privacy / Terms);
   the id outranks the ~60 legacy .footer rules in the page stylesheets. It is the glass theme's page color, so on the converted
   pages it is the page itself and on the green legacy pages it is a clean readable band. The home page keeps its own minimal
   .ps-home-foot (home.css); both read the same colors.
   ========================================================================== */
#site-footer {
    display: block; width: auto; max-width: none; margin: 0; padding: calc(22px * var(--ps-scale)) 16px calc(26px * var(--ps-scale)); box-sizing: border-box;
    background: var(--lg-page-bg, #f8fafb); border: 0; border-top: 1px solid var(--lg-line, rgba(15, 23, 42, .10)); box-shadow: none; border-radius: 0;
    color: var(--lg-ink2, #41596a); font-family: var(--lg-sans, "Geist", "Segoe UI", system-ui, -apple-system, sans-serif);
    font-size: max(var(--ps-text-min, 12px), calc(14px * var(--ps-scale))); line-height: 1.5; text-align: center;
}
#site-footer p, #site-footer span, #site-footer .footer-container { color: var(--lg-ink2, #41596a); font-family: inherit; font-size: inherit; }
#site-footer .footer-privacy {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 calc(12px * var(--ps-scale)); padding: 0; background: none; border: 0;
}
#site-footer .footer-privacy svg { flex: none; color: var(--lg-ink2, #41596a); }
#site-footer .footer-container {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; width: 100%; box-sizing: border-box; margin: 0; padding: 0; max-width: none; background: none; border: 0;
}
#site-footer .footer-container p { display: block; margin: 0; text-align: center; }
#site-footer .footer-container p span { margin: 0 2px; color: var(--lg-quiet-text, #4d6a7e); }
#site-footer .ps-foot__stones { display: inline-block; width: calc(18px * var(--ps-scale)); height: calc(18px * var(--ps-scale)); margin-right: 8px; vertical-align: -3px; fill: url(#ps-lagoon-stones); }
#site-footer .ps-company-links, #site-footer .ps-policy-links { display: inline-flex; flex-wrap: nowrap; align-items: baseline; gap: 18px; margin: 0; }
#site-footer a, .ps-home-foot a { color: var(--lg-ink2, #41596a); font: inherit; display: inline-flex; align-items: center; min-height: 24px; line-height: 24px; padding: 0; text-decoration: underline; text-underline-offset: 4px; }
#site-footer a:hover { color: var(--lg-ink, #0b1d2a); }
#site-footer a:focus-visible, .ps-home-foot a:focus-visible { outline: 3px solid var(--lg-focus, #0a66b0); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 760px) {
    #site-footer { padding: 18px 16px 22px; }
}
