/* =====================================================================================================================
   PS-DARK-THEME-001: the DARK half of the PeerSlate glass theme, "Graphite clear" (Pete's final pick, 24 Oct 2026; pictures
   P-0091 / P-0092 / P-0093, hand-off Docs/design-handoff/dark-graphite: README.md, THEME_GLASS.md section 1, dark-graphite-clear.css,
   _stops-dark.txt). Pete, 30 Oct 2026: "let's implement the dark theme too, so we can choose between both... a visitor can also choose".

   How it switches: static/js/theme-switch.js puts data-theme="dark" on <html> (before the first paint) when the visitor has chosen
   dark; light is the attribute's ABSENCE. Every rule below (except the switch control's own look, section 0) is scoped under
   html[data-theme="dark"], so with the attribute absent the light pages are exactly what they were.
   Which pages: the glass pages, the ones whose <body> carries .ps-scaled or .glass-page (home, My Resume, My Story, About, Contact,
   Privacy, Terms, sign-in and the account pages, the error page, Settings, the owner Resume editor), and the signed-in shell
   (main > .owner-app: My PeerSlate, My Data, export). Every dark rule repeats that scope,
       html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)),
   so the older pages that are not on the glass theme yet (Interview Studio, Community, The Slate and the rest) stay whole and
   light rather than half dark; the switch is not shown on them (section 0).
   The older, paused Monochrome dark rule sets hang off body[data-theme="dark"]; <body> keeps data-theme="modern-blue", so they
   stay unreachable.

   Look rules (Pete's): glass COMPLETELY clear (fill 0, no tint, no blur: rim, edge line and shadow only); frost only where words
   sit on a photo; every text line 4.5:1 or better on its worst pixel (3:1 large); one smooth gradient with no shapes (the dark
   Soft edges: #1F252D column, #152340 edges, 26% each side, OKLab); the real header and footer; the Career Constellation and the
   photos unchanged.

   Load order: base.html links it right after glass-theme.css (site-header.css stays the last sheet, as the shell requires). Order
   does not decide the normal rules here: every dark rule carries the html[data-theme="dark"] scope below, which outranks the page
   sheets' own normal rules by specificity. Specificity never beats an !important rule, though: where a page sheet uses !important
   (glass-theme.css's body background), the dark rule here is !important too, and then its higher specificity decides.

   Sections
     0. The switch control (both themes; its own class only)
     1. Tokens (Graphite clear) on :root[data-theme="dark"]
     2. The page: the dark Soft edges gradient on every themed page
     3. The shell: top bar, wordmark, Menu sheet, account menu, footer, phone tab bar, chat panel
     4. Pages: home, My Resume, My Story, About / Contact / Privacy / Terms, sign-in and account pages, Settings,
        My PeerSlate (the signed-in shell), the error page
     5. Protected: the Career Constellation and photos keep their own colours exactly as built
     6. Fallbacks: reduced transparency, more contrast, forced colours
   ===================================================================================================================== */


/* 0. THE SWITCH -------------------------------------------------------------------------------------------------------
   One compact icon button in the top bar, beside Sign in (templates/partials/theme_switch.html, included by site_header.html as
   its own bar item just before the right-hand group). A 44px target with a 36px ring, the moon while light and the sun while dark,
   the name "Dark theme" in visually hidden text, role="switch" with aria-checked for the state, the site's 3px focus ring. It works only with script,
   so it shows only once theme-switch.js has run, and only on the themed pages; the account pages keep their bare, logo-only bar
   (Pete's P-0222 / P-0223), so it is not shown there (the stored choice still applies). Below, the bar's grid gets one more
   column for it, only while it is shown. */
.ps-theme-switch { display: none; }
html.ps-theme-js:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .ps-theme-switch {
    position: relative; display: inline-grid; place-items: center; justify-self: end; flex: none;
    width: 44px; height: 44px; min-width: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--lg-ink2, #374c5a); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
html.ps-theme-js:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--account .ps-theme-switch { display: none; }
.ps-theme-switch::before {
    content: ''; position: absolute; inset: 4px; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 0 1px var(--lg-line-strong, rgba(15, 23, 42, .16));
}
.ps-theme-switch:hover { color: var(--lg-ink, #0b1d2a); }
.ps-theme-switch:hover::before { box-shadow: 0 0 0 1.5px currentColor; }
.ps-theme-switch:focus-visible { outline: 3px solid var(--lg-focus, #0a66b0); outline-offset: 0; }
.ps-theme-switch__icon { position: relative; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ps-theme-switch__icon--sun, .ps-theme-switch[aria-checked="true"] .ps-theme-switch__icon--moon { display: none; }
.ps-theme-switch[aria-checked="true"] .ps-theme-switch__icon--sun { display: block; }
.ps-theme-switch__label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* the bar (site-header.css: lockup | links | right-hand group) gets one more column, the switch's, only while the switch is shown */
html.ps-theme-js:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)):not(:has(> body.glass-page--account)) #site-header .ps-top:has(> .ps-theme-switch) { grid-template-columns: auto 1fr auto auto; }
@media (max-width: 1000px) {
    /* the links are hidden here, so the switch takes the flexible middle column and sits at its right end, beside Menu */
    html.ps-theme-js:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)):not(:has(> body.glass-page--account)) #site-header .ps-top:has(> .ps-theme-switch) { grid-template-columns: auto 1fr auto; }
}
@media (forced-colors: active) {
    .ps-theme-switch::before { box-shadow: 0 0 0 1px ButtonText; }
    .ps-theme-switch[aria-checked="true"]::before { box-shadow: 0 0 0 2px Highlight; }
}


/* 1. TOKENS: "Graphite clear" -----------------------------------------------------------------------------------------
   THEME_GLASS.md section 1 (dark column) and the README's token table, with the glass made completely clear (fill 0, no sheen,
   no blur; a light rim along the top and left, a darker line along the bottom and right, a faint back-face line and a deeper
   shadow so panes still read on graphite). <html> is also :root, so the aliases that glass-theme.css declares on :root
   (--lg-card: var(--lg-glass-fill) and the rest) resolve with these values; they are repeated here anyway so this block reads
   whole. */
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) {
    color-scheme: dark;

    /* page */
    --lg-page-bg: #1f252d;
    --lg-flow: linear-gradient(#1f252d, #1f252d);
    /* the dark Soft edges (_stops-dark.txt): #152340 at the far edges, #1F252D from 26% to 74%, cosine ease, OKLab, no shapes */
    --lg-page-wave: linear-gradient(to right in oklab,
        oklab(0.26027 -0.00663 -0.05763) 0.000%,
        oklab(0.26028 -0.00662 -0.05747) 1.042%,
        oklab(0.26030 -0.00659 -0.05699) 2.083%,
        oklab(0.26033 -0.00655 -0.05620) 3.125%,
        oklab(0.26038 -0.00648 -0.05510) 4.167%,
        oklab(0.26044 -0.00640 -0.05373) 5.208%,
        oklab(0.26051 -0.00631 -0.05209) 6.250%,
        oklab(0.26060 -0.00620 -0.05022) 7.292%,
        oklab(0.26069 -0.00609 -0.04814) 8.333%,
        oklab(0.26079 -0.00596 -0.04589) 9.375%,
        oklab(0.26089 -0.00582 -0.04350) 10.417%,
        oklab(0.26100 -0.00568 -0.04101) 11.458%,
        oklab(0.26111 -0.00553 -0.03847) 12.500%,
        oklab(0.26123 -0.00539 -0.03590) 13.542%,
        oklab(0.26134 -0.00524 -0.03336) 14.583%,
        oklab(0.26145 -0.00510 -0.03087) 15.625%,
        oklab(0.26155 -0.00496 -0.02849) 16.667%,
        oklab(0.26165 -0.00484 -0.02625) 17.708%,
        oklab(0.26174 -0.00472 -0.02418) 18.750%,
        oklab(0.26182 -0.00461 -0.02231) 19.792%,
        oklab(0.26190 -0.00452 -0.02068) 20.833%,
        oklab(0.26196 -0.00444 -0.01932) 21.875%,
        oklab(0.26200 -0.00438 -0.01824) 22.917%,
        oklab(0.26204 -0.00433 -0.01745) 23.958%,
        oklab(0.26206 -0.00431 -0.01699) 25.000%,
        oklab(0.26206 -0.00430 -0.01684) 26.000%,
        oklab(0.26206 -0.00430 -0.01684) 74.000%,
        oklab(0.26206 -0.00431 -0.01699) 75.000%,
        oklab(0.26204 -0.00433 -0.01745) 76.042%,
        oklab(0.26200 -0.00438 -0.01824) 77.083%,
        oklab(0.26196 -0.00444 -0.01932) 78.125%,
        oklab(0.26190 -0.00452 -0.02068) 79.167%,
        oklab(0.26182 -0.00461 -0.02231) 80.208%,
        oklab(0.26174 -0.00472 -0.02418) 81.250%,
        oklab(0.26165 -0.00484 -0.02625) 82.292%,
        oklab(0.26155 -0.00496 -0.02849) 83.333%,
        oklab(0.26145 -0.00510 -0.03087) 84.375%,
        oklab(0.26134 -0.00524 -0.03336) 85.417%,
        oklab(0.26123 -0.00539 -0.03590) 86.458%,
        oklab(0.26111 -0.00553 -0.03847) 87.500%,
        oklab(0.26100 -0.00568 -0.04101) 88.542%,
        oklab(0.26089 -0.00582 -0.04350) 89.583%,
        oklab(0.26079 -0.00596 -0.04589) 90.625%,
        oklab(0.26069 -0.00609 -0.04814) 91.667%,
        oklab(0.26060 -0.00620 -0.05022) 92.708%,
        oklab(0.26051 -0.00631 -0.05209) 93.750%,
        oklab(0.26044 -0.00640 -0.05373) 94.792%,
        oklab(0.26038 -0.00648 -0.05510) 95.833%,
        oklab(0.26033 -0.00655 -0.05620) 96.875%,
        oklab(0.26030 -0.00659 -0.05699) 97.917%,
        oklab(0.26028 -0.00662 -0.05747) 98.958%,
        oklab(0.26027 -0.00663 -0.05763) 100.000%);

    /* ink and accents (Graphite clear; none needed lightening: README, worst pixel 6.00 and up) */
    --lg-ink: #d6dce0;
    --lg-ink2: #b0c2cf;
    --lg-quiet: #8fa3b3;           /* marks only, never text */
    --lg-quiet-text: #abbecc;
    --lg-lagoon-text: #8cc5f2;
    --lg-lagoon: #8cc5f2;
    --lg-lagoon-deep: #7ec2f1;
    --lg-mint: #7ef1df;
    --lg-amber: #f1c27e;
    --lg-amber-text: #f1c27e;
    --lg-dev: #f1c27e;             /* the "In development" tag, as the other amber text */
    --lg-live: #7ee0b5;            /* the green "Signed in" / "Live" tag text: the lighter cut of the same green */
    --lg-live-dot: #46d49c;        /* a mark */
    --lg-line: rgba(255, 255, 255, .12);
    --lg-line-strong: rgba(255, 255, 255, .2);
    --lg-focus: #8cc5f2;
    --lg-focus-ring: 0 0 0 3px var(--lg-focus);
    /* the deep-blue primary button, its gradient, the one gradient and the "you are here" mark stay as they are (THEME_GLASS 5) */
    --lg-btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 18px -10px rgba(10, 86, 200, .5);
    /* logo A: the lighter cut of the same flow */
    --lg-stone-1: #6f97ff; --lg-stone-2: #3fc0e0; --lg-stone-3: #46d49c;
    --lg-word-1: #8aa8ff;  --lg-word-2: #5cc4ec;  --lg-word-3: #5ad8a6;

    /* glass: completely clear (fill 0, no sheen, no blur); the ring and the shadow draw it */
    --lg-glass-fill: rgba(255, 255, 255, 0);
    --lg-glass-blur: 0px;
    --lg-glass-sheen: none;
    --lg-glass-edge: rgba(255, 255, 255, 0);
    --lg-glass-rim: 0 0 0 1px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .45), 0 6px 14px -4px rgba(0, 0, 0, .5), 0 24px 48px -18px rgba(0, 0, 0, .7);
    --lg-glass-rim-hover: 0 0 0 1px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .5), 0 8px 18px -4px rgba(0, 0, 0, .55), 0 28px 54px -18px rgba(0, 0, 0, .75);
    --lg-glass-fill-in: rgba(255, 255, 255, 0);
    --lg-glass-sheen-in: none;
    --lg-glass-rim-in: 0 0 0 1px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .4), 0 10px 22px -12px rgba(0, 0, 0, .6);
    --lg-glass-rim-btn: 0 0 0 1px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .45), 0 6px 12px -7px rgba(0, 0, 0, .6);
    --lg-glass-spec: linear-gradient(to bottom, rgba(255, 255, 255, .34) 0, rgba(255, 255, 255, 0) 22px),
        linear-gradient(to top, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, 0) 16px),
        linear-gradient(135deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .46) 8%, rgba(255, 255, 255, .2) 24%, rgba(255, 255, 255, .05) 42%,
            rgba(255, 255, 255, 0) 52%, rgba(0, 0, 0, .25) 66%, rgba(0, 0, 0, .6) 86%, rgba(0, 0, 0, .72) 100%);
    --lg-glass-spec-width: 1.5px;
    --lg-glass-backface: linear-gradient(135deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, .14) 100%);
    /* frost: only where words sit on a photo (AA) */
    --lg-glass-fill-frost: rgba(24, 30, 38, .85);
    --lg-glass-blur-frost: 10px;
    /* bars that content scrolls under keep a reading fill (clear at the very top, as in light) */
    --lg-glass-fill-bar: rgba(31, 37, 45, .78);
    --lg-glass-blur-bar: 12px;
    --lg-glass-bar-shadow: inset 0 -1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(0, 0, 0, .4);
    --lg-glass-bar-shadow-top: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .5), 0 8px 20px -8px rgba(0, 0, 0, .5);
    --lg-glass-fill-solid: rgba(42, 49, 59, .97);
    --lg-glass-faint: rgba(255, 255, 255, 0);

    /* the Lagoon surface aliases (THEME_GLASS 1.2 "dark gotcha": re-declared with the dark block) */
    --lg-card: var(--lg-glass-fill);
    --lg-cardline: var(--lg-glass-edge);
    --lg-shadow: var(--lg-glass-rim);
    --lg-tilebg: var(--lg-glass-fill-in);
    --lg-tileline: rgba(255, 255, 255, 0);
    --lg-tileshadow: var(--lg-glass-rim-in);
    --lg-blur: var(--lg-glass-blur);
    --lg-wash-0: linear-gradient(var(--lg-glass-fill-in), var(--lg-glass-fill-in));
    --lg-wash-1: var(--lg-wash-0); --lg-wash-2: var(--lg-wash-0); --lg-wash-3: var(--lg-wash-0);
    --lg-role-0: var(--lg-wash-0); --lg-role-1: var(--lg-wash-0); --lg-role-2: var(--lg-wash-0);

    /* the shell bar's own names (site-header.css reads them through --lg-*, repeated so they never hold a light fallback) */
    --ps-top-ink: var(--lg-ink);
    --ps-top-word: var(--lg-ink);
    --ps-top-soon: var(--lg-ink2);
    --ps-top-current: var(--lg-lagoon);
}
/* the home page's own amber names (home.css) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body {
    --hp-amber: #f1c27e; --hp-amber-bg: rgba(241, 194, 126, .12);
}
/* No --pt-* token is redeclared here: those names belong to peerslate-theme.css (and glass-theme.css section 8 on the converted pages).
   The ones glass-theme.css points at --lg-* follow the dark tokens on their own; the few elements that read a light-only --pt-* value
   are given their dark colour directly below. */


/* the elements that read a light-only --pt-* value (editorial-glass.css): plain links and the policy pages' links (--pt-link) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .main-content a:not([class]), html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .cv1-policy a { color: var(--lg-lagoon-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .main-content a:not([class]):hover, html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .cv1-policy a:hover { color: var(--lg-lagoon-deep); }


/* 2. THE PAGE ---------------------------------------------------------------------------------------------------------
   One smooth gradient, no shapes: the dark Soft edges on every themed page. The converted pages (body.ps-scaled) already paint
   --lg-page-wave on the body (glass-theme.css section 11); the account pages' Dawn sky and the owner shell's green page get the
   same dark gradient here. The root keeps the plain page colour under it. */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) { background: var(--lg-page-bg); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body {
    background-color: var(--lg-page-bg) !important;
    background-image: var(--lg-page-wave) !important;
    background-size: 100% 100% !important; background-position: 0 0 !important; background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    color: var(--lg-ink);
}
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body::before, html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body::after { background: none !important; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .site-sky { display: none !important; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body :is(.main-content, #site-footer) { background: transparent !important; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) :is(h1, h2, h3) { text-shadow: none; }   /* the light page lifts headings with a white glow; no glow on graphite */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) ::placeholder { color: #a3b4c2 !important; opacity: 1; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) ::selection { background: rgba(140, 197, 242, .35); color: #fff; }


/* 3. THE SHELL --------------------------------------------------------------------------------------------------------- */
/* top bar: the bar role; clear at the very top (glass-theme.css section 11 keeps that state), graphite reading fill once content passes under */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body header.global-header:has(> #site-header) { background-color: var(--lg-glass-fill-bar); box-shadow: var(--lg-glass-bar-shadow); color: var(--lg-ink); }
html.ps-at-top[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled header.global-header:has(> #site-header) { background-color: rgba(31, 37, 45, 0); box-shadow: var(--lg-glass-bar-shadow-top); }
/* logo A wordmark: site-header.css paints it with the light-page blues; the Graphite clear logo cut instead (README item 4) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-header .ps-top__word {
    background: linear-gradient(90deg, var(--lg-word-1), var(--lg-word-2) 55%, var(--lg-word-3));
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-header :is(.ps-top__nav a, .ps-top__menu, .platform-menu__links a, .platform-menu__account-item) { color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-header .ps-top__soontag { background: rgba(241, 194, 126, .16); color: #f1c27e; box-shadow: 0 0 0 1px rgba(241, 194, 126, .4); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-header .platform-menu { background-color: var(--lg-glass-fill-solid); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-header .platform-account__menu { background: var(--lg-glass-fill-solid); color: var(--lg-ink); box-shadow: 0 0 0 1px var(--lg-line-strong), 0 18px 40px -16px rgba(0, 0, 0, .7); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-header .platform-account__item { color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-header .platform-account__trigger { box-shadow: 0 0 0 1px var(--lg-line-strong); }
/* the profile tab strip under the bar (My Story / Resume) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .profile-tabs { background: transparent; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .profile-tabs :is(.profile-tab, a) { color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .profile-tabs :is(.profile-tab, a)[aria-current="page"] { color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .profile-tabs__ask-btn { background: transparent; color: var(--lg-ink); box-shadow: 0 0 0 1.5px var(--lg-line-strong); border-color: transparent; }

/* the skip link (shown on keyboard focus): white on the deep button blue, not on the light lagoon */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .skip-link { background: var(--lg-btn-solid); color: #fff; }

/* footer (both footers) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-footer { border-top-color: var(--lg-line); color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) :is(#site-footer, .ps-home-foot) :is(p, span, a, .footer-container, .footer-privacy svg) { color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #site-footer .footer-container p span { color: var(--lg-quiet-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) :is(#site-footer, .ps-home-foot) a:hover { color: var(--lg-ink); }
/* logo A's stones (the one gradient defined once in base.html, #ps-lagoon-stones): the lighter cut of the same flow (THEME_GLASS 1.1) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #ps-lagoon-stones stop:nth-child(1) { stop-color: var(--lg-stone-1); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #ps-lagoon-stones stop:nth-child(2) { stop-color: var(--lg-stone-2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) #ps-lagoon-stones stop:nth-child(3) { stop-color: var(--lg-stone-3); }

/* phone tab bar (My Story / Resume at the foot of the phone screen): a bar, reading fill 97% graphite */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .mobile-tabbar { background: rgba(31, 37, 45, .97); border-top: 1px solid var(--lg-line); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .mobile-tabbar__item { color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .mobile-tabbar__item[aria-current="page"] { color: var(--lg-lagoon-deep); background: rgba(140, 197, 242, .12); }

/* the visitor "Ask Pete AI" chat panel floats over the page: frost at the graphite reading fill (glass-theme.css section 10 in dark) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) #chat-panel { background: rgba(31, 37, 45, .96); border-color: var(--lg-line-strong); box-shadow: 0 22px 60px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) :is(#chat-header, #chat-input-area) { background: rgba(255, 255, 255, .03); border-color: var(--lg-line); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) .bot-message { background: rgba(140, 197, 242, .08); color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) .suggestion-btn { background: transparent; color: var(--lg-ink2); border-color: var(--lg-line-strong); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) .suggestion-btn:hover { background: rgba(140, 197, 242, .08); color: var(--lg-ink); border-color: rgba(140, 197, 242, .45); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) #chat-input { background: transparent; color: var(--lg-ink); border-color: #6f8497; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) #chat-close:hover { background: rgba(140, 197, 242, .1); }
/* Send: its hover brightens the blue (white words 4.48:1); in dark it deepens instead */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-chat-original) #chat-send:hover { filter: none; background: var(--lg-btn-solid); }


/* 4. PAGES ------------------------------------------------------------------------------------------------------------ */

/* 4a. Home: tokens carry it; the invite card's outline button reads the light deep blue */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-home-page .gx-ghost { color: var(--lg-lagoon-deep); border-color: rgba(126, 194, 241, .55); }

/* 4b. My Resume (README items 1-7): the small controls were solid white pills; on graphite they are clear with a light ring */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled :is(.rp-chip, .rp-ask__box, .suggestion-btn, .rp-badge, .rp-tab__soon, .rp-soon__tag, .rp-pill, .rp-form__input, .rp-jump select, .ask-pete-direct__form textarea, .rp-turn__ai) {
    background: rgba(255, 255, 255, 0); color: var(--lg-ink); box-shadow: 0 0 0 1.5px var(--lg-line-strong);
}
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled :is(.rp-form__input, .ask-pete-direct__form textarea) { border-color: #6f8497; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled :is(.rp-ask__highlights li, .rp-soon, .rp-status, .rp-ask__log) { background: rgba(255, 255, 255, 0); box-shadow: 0 0 0 1px var(--lg-line-strong); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled :is(.rp-ask__box input, .rp-ask__box textarea, .rp-ask__box select, select, input, textarea) { background: transparent; color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-tab__soon { color: var(--lg-amber-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-tab[aria-selected="true"] .rp-tab__soon { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled :is(.rp-btn--outline, .rp-toolbar__guide) { background: rgba(255, 255, 255, 0); color: var(--lg-ink); box-shadow: 0 0 0 1.5px var(--lg-line-strong); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-scrollbar { background: rgba(255, 255, 255, .12); }
/* the Ask cards' hint line crosses the edge of the card's mountain art: the strongest ink holds it at 4.5:1 there */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask__hint { color: var(--lg-ink); }
/* the rail's section links: their hover wash was a near-white tint */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-secnav__a:hover { background: rgba(140, 197, 242, .12); color: var(--lg-ink); }
/* phone: the fixed section-chip row is a bar (reading fill), its chips clear with a ring; the selected chip keeps its blue */
@media (max-width: 959px) {
    html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .rp-tabs { background: rgba(31, 37, 45, .9); box-shadow: 0 6px 16px rgba(0, 0, 0, .45); border-bottom: 1px solid var(--lg-line); }
    html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .rp-tabs .rp-tab { background: rgba(255, 255, 255, 0); box-shadow: 0 0 0 1px var(--lg-line-strong); color: var(--lg-ink2); }
    html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .rp-tabs .rp-tab[aria-current="location"] { background-color: #0a74c9; background-image: var(--lg-nav-on); box-shadow: none; color: #fff; }
}

/* 4b1. My Resume approved dark fills; the AA-safe fills retain their top sheen. */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-hl:not(.rp-hl--waiting) { background: var(--rp-safe-sheen), linear-gradient(160deg, #2f5544, #4a6d5d); box-shadow: var(--rp-gloss); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-hl:not(.rp-hl--waiting) :is(strong, .rp-hl__label) { color: #fff; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-hl:not(.rp-hl--waiting) em { color: #d4f5e6; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask .rp-chip, html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask :is(.rp-ask__go, .rp-ask__toggle) { background: linear-gradient(160deg, #4a78a8, #3b6795); color: #fff; box-shadow: var(--rp-gloss); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask--main .rp-ask__art { opacity: 1; background-image: url("../images/resume-page/ask-mountains.png"); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask--main .rp-ask__art::after { background: linear-gradient(180deg, rgba(31,37,45,.9), rgba(31,37,45,.86) 20%, rgba(31,37,45,.42) 58%, transparent), linear-gradient(90deg, rgba(31,37,45,.98), rgba(31,37,45,.9) 35%, rgba(31,37,45,.65) 70%, rgba(31,37,45,.12)), linear-gradient(0deg, rgba(31,37,45,.55), transparent 45%); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask--main .rp-ask__box { background: rgba(31,37,45,.4); backdrop-filter: blur(3px); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask--main .rp-ask__note { color: var(--lg-quiet-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask__script { color: #fff; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__grid li .rp-skill { background: var(--rp-safe-sheen), linear-gradient(160deg, #b4dccb, #a6d2bf); color: #12302b; box-shadow: var(--rp-gloss); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__grid button.rp-skill[aria-pressed="true"], html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__grid button.rp-skill[aria-pressed="true"]:hover { box-shadow: 0 0 0 3px #1f252d, 0 0 0 5px #b4dccb, var(--rp-gloss); }
/* PS-LIVE-FIXES-RESUME-002 (live bug 4): the chosen skill chip has its own champagne face in dark, with the same dark ink; its mint ring stays. */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__grid li button.rp-skill[aria-pressed="true"], html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__grid li button.rp-skill[aria-pressed="true"]:hover { background: var(--rp-safe-sheen), linear-gradient(160deg, #f5d9a5, #e6bd76); color: #1f252d; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__line { box-shadow: 0 0 0 2px #b4dccb; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__head { background: var(--rp-safe-sheen), linear-gradient(160deg, #b4dccb, #a6d2bf); color: #12302b; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-role[data-band] .rp-role__top { background: linear-gradient(160deg, #16396a, #0d234a); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask-mark circle { fill: #4a78a8; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-skills__grid button.rp-skill:focus-visible { outline: none; box-shadow: 0 0 0 3px #1f252d, 0 0 0 6px #fff, var(--rp-gloss); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask .rp-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px #1f252d, 0 0 0 6px #b4dccb, var(--rp-gloss); }
@media (max-width: 959px) {
    html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled .rp-ask--main .rp-ask__art::after { background: linear-gradient(rgba(31,37,45,.96), rgba(31,37,45,.92) 55%, rgba(31,37,45,.88)); }
}
/* 4b2. My Story (story-acts.css's locked look holds its navy kickers, handwriting and gold as plain colours; specificity here
   outranks its #main-content rules). The story's own names take the Graphite clear values; the medallions stay navy with a white
   ring; the polaroid paper, photo captions and photo chips stay exactly as built (photos are protected). */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.story-acts-page #main-content .story-acts {
    --ms-kicker-blue: var(--lg-lagoon-text);
    --ms-hand: #a9c4f5;
}
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.story-acts-page #main-content .story-acts :is(.sc-paper, .sc-chapter.sc-var-ember) .sc-eyebrow { color: var(--lg-amber-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.story-acts-page #main-content .story-acts #act-next .sc-paper .sc-eyebrow { color: var(--ms-kicker-blue); }
/* the big faded number: large text at 3:1 against the page AND against the white ring of the medallion it overlaps on phones */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.story-acts-page #main-content .story-acts .sc-ghost { color: #5b8fd0; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.story-acts-page .sc-attrib { color: #e7c58f; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.story-acts-page #main-content .story-acts .story-chapter-path path { stroke-opacity: .3; }
/* Act One at desktop widths: its cards sit on the landscape photo, so they are frost (the graphite reading fill), as the light page frosts them white */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.story-acts-page #main-content .story-acts #act-now { --lg-glass-fill-frost: rgba(24, 30, 38, .85); }

/* 4c. About, Contact, Privacy, Terms; sign-in and account pages; the error page; Settings: glass-pages.css already reads the
   tokens. The account pages' Dawn sky (account-pages.css) stands down for the one dark gradient (section 2). */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page { color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)):has(> body.glass-page) { background: var(--lg-page-bg); }

/* the sign-in and account pages (account-pages.css) hold their light grey-blue text and white controls as plain hex: the dark tokens instead */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--account :is(.acct-card .acct-body, .acct-lede, .acct-sub) { color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--account :is(.acct-card .acct-meta, .acct-card .owner-app__waking-status, .acct-who, .acct-src, .acct-ask-note, .acct-trust, .acct-note) { color: var(--lg-quiet-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--account .acct-ico--warn { color: var(--lg-amber); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--account .acct-btn.owner-app__secondary { background: rgba(255, 255, 255, 0); border-color: #6f8497; color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--account .acct-input { background: rgba(255, 255, 255, 0); border-color: #6f8497; color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--account #site-header .ps-top__word { background: linear-gradient(90deg, var(--lg-word-1), var(--lg-word-2) 55%, var(--lg-word-3)); -webkit-background-clip: text; background-clip: text; }

/* 4d. My PeerSlate, My Data and export, the signed-in shell (owner-app.css, not on the 15% scale): the green page and its beige panel become
   the dark page with a clear pane. The sign-in and account pages share the owner-app classes but are glass pages already (glass-pages.css,
   account-pages.css), so these rules skip them (body:not(.ps-scaled)). */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .owner-app { background: transparent; color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app__panel {
    position: relative; background: var(--lg-glass-fill); background-image: none; border-color: var(--lg-glass-edge); box-shadow: var(--lg-glass-rim); color: var(--lg-ink2);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* the specular ring and back-face line, as glass-theme.css section 11 draws them on the converted pages' panes */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app__panel::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: var(--lg-glass-spec-width); pointer-events: none; z-index: 2;
    background: var(--lg-glass-spec);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app__panel::before {
    content: ''; position: absolute; inset: var(--lg-glass-spec-width); border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
    background: var(--lg-glass-backface);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :is(h1, h2, h3, dt, strong, .owner-app__destination-title) { color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :is(p, dd, li, .owner-app__destination-copy, .owner-app__privacy-note, .owner-app__launchpad-intro > p) { color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app .owner-app__eyebrow { color: var(--lg-lagoon-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app a:not([class]) { color: var(--lg-lagoon-text); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :is(.owner-app__privacy-note, .owner-app__section, .owner-app__status) { border-color: var(--lg-line); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app .owner-app__status { background: rgba(255, 255, 255, 0); box-shadow: 0 0 0 1px var(--lg-line-strong); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :is(.owner-app__status div, .owner-app__capture-methods, .owner-app__voice-status) { background: rgba(255, 255, 255, 0); }   /* the beige band wash (editorial-glass.css) */
/* the destination tiles are inner glass: no fill, the inner rim */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app .owner-app__destination { background: rgba(255, 255, 255, 0); border-color: transparent; box-shadow: var(--lg-glass-rim-in); color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app .owner-app__destination:hover { border-color: var(--lg-line-strong); box-shadow: var(--lg-glass-rim-hover); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app .owner-app__destination:focus-visible { outline-color: var(--lg-focus); }
/* buttons: the deep-blue primary stays; the secondary and sign-out pills are clear with a light ring */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :is(.owner-app__secondary, .owner-app__sign-out) { background: rgba(255, 255, 255, 0); background-image: none; border-color: #6f8497; color: var(--lg-ink); box-shadow: none; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app .owner-app__primary { background: var(--lg-btn); border-color: transparent; color: var(--lg-btn-ink); box-shadow: var(--lg-btn-shadow); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :focus-visible { outline-color: var(--lg-focus); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { background: rgba(255, 255, 255, 0); color: var(--lg-ink); border-color: #6f8497; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body:not(.ps-scaled) .owner-app :is(select option) { background: var(--lg-glass-fill-solid); color: var(--lg-ink); }

/* the error page's buttons: their hover states were the old gold (white words on light gold, 1.4:1; the light page has the same
   hover, outside this package) */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--error .btn-primary:is(:hover, :focus-visible) { background: var(--lg-btn-solid); color: #fff; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.glass-page--error .btn-secondary:is(:hover, :focus-visible) { color: var(--lg-ink); background: rgba(140, 197, 242, .08); border-color: rgba(140, 197, 242, .45); }

/* 4e. The member's resume editor and Publish Resume (resume-editor.css, resume-publication.css): the green note, the beige review
   card, the white field and the gold buttons become a faint note, a clear pane with a ring, a clear field and the site's buttons */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor__privacy-note { background: rgba(126, 224, 181, .08); color: var(--lg-ink2); border-left-color: var(--lg-live); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor--overview .resume-editor__panel .resume-editor__privacy-note { background: rgba(255, 255, 255, 0); border-left-color: var(--lg-lagoon); }   /* the Edit your Resume page: a clear note; Publish Resume keeps the rule above */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-publication-review { background: rgba(255, 255, 255, 0); border-color: var(--lg-line-strong); box-shadow: var(--lg-glass-rim-in); color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-publication-review :is(h2, h3, legend) { color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body :is(.resume-publication-review, .resume-editor) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { background: rgba(255, 255, 255, 0); color: var(--lg-ink); border-color: #6f8497; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor__button { background: var(--lg-btn); border-color: transparent; color: var(--lg-btn-ink); box-shadow: var(--lg-btn-shadow); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body :is(.resume-editor__button--secondary, .resume-editor__button--quiet) { background: rgba(255, 255, 255, 0); border-color: #6f8497; color: var(--lg-ink); box-shadow: none; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor__button:disabled { background: rgba(255, 255, 255, 0); border-color: var(--lg-line-strong); color: var(--lg-quiet-text); box-shadow: none; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor :is(h1, h2, h3) { color: var(--lg-ink); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor :is(p, label, summary, li, dd) { color: var(--lg-ink2); }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor__status { color: #ff9b9b; }
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body .resume-editor--overview .resume-editor__panel .resume-editor__status:not([data-kind="error"]) { color: var(--lg-ink2); }   /* the Edit your Resume page: only an error is salmon; Publish Resume keeps the rule above */

/* 5. PROTECTED -----------------------------------------------------------------------------------------------------------
   The Career Constellation keeps its own light-on-night colours exactly as built: the dark tokens would reach into it (its text
   reads the same --lg-ink names), so the light values are put back inside it (README "Career Constellation unchanged"). */
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) :is(.rp-band, .rp-const, #constellation) {
    --lg-ink: #0b1d2a; --lg-ink2: #374c5a; --lg-quiet: #7b92a2; --lg-quiet-text: #3c5362;
    --lg-lagoon-text: #08528d; --lg-lagoon: #095ea2; --lg-lagoon-deep: #0a578d; --lg-mint: #0fb59b; --lg-amber: #a86400; --lg-amber-text: #875000;
    --lg-line: rgba(15, 23, 42, .10); --lg-line-strong: rgba(15, 23, 42, .16); --lg-focus: #0a66b0;
    --lg-glass-fill-in: rgba(255, 255, 255, 0);
}
html[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-scaled :is(.rp-band, .rp-const) :is(h1, h2, h3) { text-shadow: rgba(255, 255, 255, .55) 0 1px 12px; }   /* its own headings, as built */


/* 5b. HOMEPAGE CARDS (PS-HOMEPAGE-CARDS-DARK; Pete, 2026-10-31 16:00: dark themes on all new pages) -----------------------------------
   The three "What PeerSlate does" cards are pictures of the light pages in a white frame, so tokens cannot darken them. In dark the
   frame turns graphite and a dark twin of each picture (the same artwork recoloured into this palette, photographs untouched, same
   sizes) is laid over the light one as a background image: it is only requested when dark is on, so light visitors never fetch it, the
   light markup and the light page are untouched, and the light picture still carries the alt text and the link. */
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hc-shot {
    position: relative; background: #1f252d;
    box-shadow: 0 0 0 1px rgba(214, 220, 224, .14), 0 18px 40px rgba(0, 0, 0, .4);
}
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hc-shot::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background-size: 100% 100%; background-repeat: no-repeat;
}
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hc-item--story .hc-shot::after {
    background-image: url("../images/home/card-story-dark.png");
    background-image: image-set(url("../images/home/card-story-dark.webp") 1x, url("../images/home/card-story-dark@2x.webp") 2.5x);
}
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hc-item--resume .hc-shot::after {
    background-image: url("../images/home/card-resume-dark.png");
    background-image: image-set(url("../images/home/card-resume-dark.webp") 1x, url("../images/home/card-resume-dark@2x.webp") 2.5x);
}
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hc-item--ask .hc-shot::after {
    background-image: url("../images/home/card-ask-dark.png");
    background-image: image-set(url("../images/home/card-ask-dark.webp") 1x, url("../images/home/card-ask-dark@2x.webp") 2.5x);
}

/* 5c. WHAT PEERSLATE WILL DO (PS-HOME-GOOGLE-001): the three coming-soon cards are pictures of the light designs in a glass frame. In dark the
   frame turns graphite and the dark twin of each picture (the approved dark design picture, same crop and size) is laid over the light one as
   a background image, so only a dark visitor requests it; the sheen softens, and the Coming soon tag is a clear ring with the amber text ink. */
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hs-shot { background: #1f252d; border-color: rgba(214, 220, 224, .16); box-shadow: 0 0 0 1px rgba(214, 220, 224, .12), 0 14px 26px -16px rgba(0, 0, 0, .6); }
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hs-shot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background-size: 100% 100%; background-repeat: no-repeat; z-index: 1; }
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hs-shot::after { background: linear-gradient(125deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 38%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hs-card--opps .hs-shot::before {
    background-image: url("../images/home/soon-opps-dark.png");
    background-image: image-set(url("../images/home/soon-opps-dark.webp") 1x, url("../images/home/soon-opps-dark@2x.webp") 1.4x);
}
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hs-card--interview .hs-shot::before {
    background-image: url("../images/home/soon-interview-dark.png");
    background-image: image-set(url("../images/home/soon-interview-dark.webp") 1x, url("../images/home/soon-interview-dark@2x.webp") 1.4x);
}
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) .hs-card--talent .hs-shot::before {
    background-image: url("../images/home/soon-talent-dark.png");
    background-image: image-set(url("../images/home/soon-talent-dark.webp") 1x, url("../images/home/soon-talent-dark@2x.webp") 1.4x);
}
:root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) body.ps-home-page .hs-chip { background: rgba(255, 255, 255, 0); color: var(--lg-amber-text); box-shadow: 0 0 0 1px var(--lg-line-strong); }

/* 6. FALLBACKS ---------------------------------------------------------------------------------------------------------- */
@media (prefers-reduced-transparency: reduce) {
    :root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) {
        --lg-glass-fill: var(--lg-glass-fill-solid); --lg-glass-fill-in: var(--lg-glass-fill-solid);
        --lg-glass-fill-frost: var(--lg-glass-fill-solid); --lg-glass-fill-bar: var(--lg-glass-fill-solid);
        --lg-glass-blur: 0px; --lg-glass-blur-frost: 0px; --lg-glass-blur-bar: 0px;
        --lg-glass-spec: none; --lg-glass-backface: none;
        --lg-glass-edge: var(--lg-line-strong); --lg-cardline: var(--lg-line-strong); --lg-tileline: var(--lg-line-strong);
    }
}
@media (prefers-contrast: more) {
    :root[data-theme="dark"]:is(:has(> body:is(.ps-scaled, .glass-page)), :has(> body > .main-content > .owner-app)) {
        --lg-glass-fill: var(--lg-glass-fill-solid); --lg-glass-fill-in: var(--lg-glass-fill-solid);
        --lg-glass-fill-frost: var(--lg-glass-fill-solid); --lg-glass-fill-bar: var(--lg-glass-fill-solid);
        --lg-glass-sheen: none; --lg-glass-sheen-in: none; --lg-glass-spec: none; --lg-glass-backface: none;
        --lg-glass-edge: var(--lg-ink2); --lg-cardline: var(--lg-ink2); --lg-tileline: var(--lg-ink2);
        --lg-glass-rim: 0 0 0 1px var(--lg-ink2); --lg-glass-rim-in: 0 0 0 1px var(--lg-ink2); --lg-glass-rim-hover: 0 0 0 2px var(--lg-ink);
        --lg-ink2: var(--lg-ink); --lg-quiet-text: var(--lg-ink); --lg-line: var(--lg-ink2);
    }
}
