/* =====================================================================================================================
   PS-GLASS-CORE-1-001: the LIGHT half of the PeerSlate glass theme ("Crystal clearer"), ported from the design file
   X:\PeerSlate\Claude\design\liquid-glass-2026-10-24\FINAL\glass-theme.css. Sections 1-6 only: the dark tokens ("Graphite clear",
   section 7) stay in the design file for DT-CORE, and there is deliberately no automatic dark-mode block (manager ruling:
   light only). Differences from the design file, each on purpose:
     - the root font size scales only on pages that carry body.ps-scaled (the converted pages); the --ps-scale variable itself is
       defined everywhere, so the shell bar (which is on every page) can scale with it;
     - :focus-visible is scoped to those pages (the shell has its own ring);
     - the footer binding lives in site-header.css (#site-footer), which has to work over the green legacy pages too.
   Original header follows.
   PeerSlate DS-GLASS: "Crystal clearer" (light, default) + "Graphite clear" (dark)
   Pete's final pick, 24 Oct 2026. Spec: X:\PeerSlate\Claude\design\THEME_GLASS.md (read it first).
   Load order: AFTER static/css/peerslate-lagoon.css (this file re-points the existing --lg-* tokens and adds --lg-glass-*).
   Nothing here is new design: the values are the approved mockups'
   (design/liquid-glass-2026-10-24/site/glass/crystal-clearer.css, graphite-clear.css, core.css, glass.js).

   Sections
     1. Scale: the whole UI about 15% smaller, as a root/token scale (no CSS zoom)
     2. Light tokens (Crystal clearer) on :root, layered on the existing --lg-* names
     3. The glass material, as role classes (.lg-glass, --inner, --frost, --bar), plus the AA rules
     4. Component bindings for the shared shell (header, footer). Page components re-skin through the tokens.
     5. Protected (left exactly as built): Career Constellation, photos and photo captions, logo A
     6. Fallbacks: no backdrop-filter, reduced transparency, more contrast, forced colours, reduced motion
   ===================================================================================================================== */


/* 1. SCALE ----------------------------------------------------------------------------------------------------------
   Pete: "the whole page should be ~15% smaller (font, spacing, widths, everything)".
   - rem-based sizes shrink through the root font size (16px -> 13.6px).
   - px-based sizes in page CSS must be written as calc(Npx * var(--ps-scale)). THEME_GLASS.md section 6 has the rules and a grep.
   - Never shrink tap targets below 44px; never shrink running text below 12px. Both floors are tokens. */
:root {
    --ps-scale: .85;
    --ps-scale-base: .85;          /* never stepped */
    --ps-tap-min: 44px;            /* minimum hit area for any control (not scaled) */
    --ps-text-min: 12px;           /* floor for the smallest meta text after scaling */
    /* The Guide Front door (guide-front-door.css, owned by O2b) reads these three names; they are the same scale and floors. */
    --gfd-scale: var(--ps-scale);   /* the Front door's px follow the page scale, steps included; its own zoom steps are cancelled below on these pages */
    --gfd-tap-min: var(--ps-tap-min);
    --gfd-text-min: var(--ps-text-min);
}
/* Big monitors: the scale steps up (THEME_LAGOON v2 steps x1.125, x1.25, x1.333 on the .85 base) so home, My Resume, My Story and
   the bar grow together. A token step, never CSS zoom. */
@media (min-width: 1800px) { :root { --ps-scale: .95625; } }
@media (min-width: 2200px) { :root { --ps-scale: 1.0625; } }
@media (min-width: 2500px) { :root { --ps-scale: 1.13305; } }
/* The root size follows the scale only on the converted pages (body.ps-scaled, set in base.html); legacy owner-only pages keep 16px.
   13.6px when the browser default is 16px; still honours the reader's own font size setting. */
html:has(> body.ps-scaled) { font-size: calc(100% * var(--ps-scale)); }


/* 2. LIGHT TOKENS: "Crystal clearer" --------------------------------------------------------------------------------
   Existing --lg-* names keep their meaning; only their values change. New glass tokens are --lg-glass-*. */
:root {
    color-scheme: light;

    /* page: plain near-white, no washes */
    --lg-page-bg: #f8fafb;                                  /* the plain near-white page colour (unchanged): under the wave, and what a browser without gradient support shows */
    --lg-flow: linear-gradient(#f8fafb, #f8fafb);          /* flat (consumers paint it as a background image); the wave itself is --lg-page-wave, drawn on the body (section 11) */
    --lg-page-wave: linear-gradient(to right in oklab,
        oklab(0.86488 -0.00387 -0.03426) 0.000%,
        oklab(0.86536 -0.00386 -0.03413) 1.042%,
        oklab(0.86676 -0.00383 -0.03375) 2.083%,
        oklab(0.86908 -0.00379 -0.03312) 3.125%,
        oklab(0.87227 -0.00373 -0.03225) 4.167%,
        oklab(0.87628 -0.00366 -0.03116) 5.208%,
        oklab(0.88106 -0.00357 -0.02986) 6.250%,
        oklab(0.88652 -0.00347 -0.02838) 7.292%,
        oklab(0.89258 -0.00335 -0.02673) 8.333%,
        oklab(0.89914 -0.00323 -0.02494) 9.375%,
        oklab(0.90611 -0.00310 -0.02305) 10.417%,
        oklab(0.91336 -0.00297 -0.02108) 11.458%,
        oklab(0.92079 -0.00283 -0.01906) 12.500%,
        oklab(0.92827 -0.00269 -0.01702) 13.542%,
        oklab(0.93569 -0.00255 -0.01500) 14.583%,
        oklab(0.94293 -0.00242 -0.01303) 15.625%,
        oklab(0.94988 -0.00229 -0.01114) 16.667%,
        oklab(0.95643 -0.00217 -0.00936) 17.708%,
        oklab(0.96247 -0.00206 -0.00772) 18.750%,
        oklab(0.96790 -0.00195 -0.00624) 19.792%,
        oklab(0.97265 -0.00187 -0.00495) 20.833%,
        oklab(0.97663 -0.00179 -0.00386) 21.875%,
        oklab(0.97979 -0.00173 -0.00300) 22.917%,
        oklab(0.98207 -0.00169 -0.00238) 23.958%,
        oklab(0.98344 -0.00167 -0.00201) 25.000%,
        oklab(0.98387 -0.00166 -0.00189) 26.000%,
        oklab(0.98387 -0.00166 -0.00189) 26.042%,
        oklab(0.98387 -0.00166 -0.00189) 27.083%,
        oklab(0.98387 -0.00166 -0.00189) 28.125%,
        oklab(0.98387 -0.00166 -0.00189) 29.167%,
        oklab(0.98387 -0.00166 -0.00189) 30.208%,
        oklab(0.98387 -0.00166 -0.00189) 31.250%,
        oklab(0.98387 -0.00166 -0.00189) 32.292%,
        oklab(0.98387 -0.00166 -0.00189) 33.333%,
        oklab(0.98387 -0.00166 -0.00189) 34.375%,
        oklab(0.98387 -0.00166 -0.00189) 35.417%,
        oklab(0.98387 -0.00166 -0.00189) 36.458%,
        oklab(0.98387 -0.00166 -0.00189) 37.500%,
        oklab(0.98387 -0.00166 -0.00189) 38.542%,
        oklab(0.98387 -0.00166 -0.00189) 39.583%,
        oklab(0.98387 -0.00166 -0.00189) 40.625%,
        oklab(0.98387 -0.00166 -0.00189) 41.667%,
        oklab(0.98387 -0.00166 -0.00189) 42.708%,
        oklab(0.98387 -0.00166 -0.00189) 43.750%,
        oklab(0.98387 -0.00166 -0.00189) 44.792%,
        oklab(0.98387 -0.00166 -0.00189) 45.833%,
        oklab(0.98387 -0.00166 -0.00189) 46.875%,
        oklab(0.98387 -0.00166 -0.00189) 47.917%,
        oklab(0.98387 -0.00166 -0.00189) 48.958%,
        oklab(0.98387 -0.00166 -0.00189) 50.000%,
        oklab(0.98387 -0.00166 -0.00189) 51.042%,
        oklab(0.98387 -0.00166 -0.00189) 52.083%,
        oklab(0.98387 -0.00166 -0.00189) 53.125%,
        oklab(0.98387 -0.00166 -0.00189) 54.167%,
        oklab(0.98387 -0.00166 -0.00189) 55.208%,
        oklab(0.98387 -0.00166 -0.00189) 56.250%,
        oklab(0.98387 -0.00166 -0.00189) 57.292%,
        oklab(0.98387 -0.00166 -0.00189) 58.333%,
        oklab(0.98387 -0.00166 -0.00189) 59.375%,
        oklab(0.98387 -0.00166 -0.00189) 60.417%,
        oklab(0.98387 -0.00166 -0.00189) 61.458%,
        oklab(0.98387 -0.00166 -0.00189) 62.500%,
        oklab(0.98387 -0.00166 -0.00189) 63.542%,
        oklab(0.98387 -0.00166 -0.00189) 64.583%,
        oklab(0.98387 -0.00166 -0.00189) 65.625%,
        oklab(0.98387 -0.00166 -0.00189) 66.667%,
        oklab(0.98387 -0.00166 -0.00189) 67.708%,
        oklab(0.98387 -0.00166 -0.00189) 68.750%,
        oklab(0.98387 -0.00166 -0.00189) 69.792%,
        oklab(0.98387 -0.00166 -0.00189) 70.833%,
        oklab(0.98387 -0.00166 -0.00189) 71.875%,
        oklab(0.98387 -0.00166 -0.00189) 72.917%,
        oklab(0.98387 -0.00166 -0.00189) 73.958%,
        oklab(0.98387 -0.00166 -0.00189) 74.000%,
        oklab(0.98348 -0.00166 -0.00199) 75.000%,
        oklab(0.98226 -0.00168 -0.00229) 76.042%,
        oklab(0.98022 -0.00171 -0.00279) 77.083%,
        oklab(0.97739 -0.00175 -0.00349) 78.125%,
        oklab(0.97382 -0.00181 -0.00437) 79.167%,
        oklab(0.96957 -0.00187 -0.00542) 80.208%,
        oklab(0.96471 -0.00194 -0.00662) 81.250%,
        oklab(0.95930 -0.00203 -0.00796) 82.292%,
        oklab(0.95344 -0.00211 -0.00941) 83.333%,
        oklab(0.94722 -0.00221 -0.01094) 84.375%,
        oklab(0.94074 -0.00230 -0.01254) 85.417%,
        oklab(0.93409 -0.00240 -0.01418) 86.458%,
        oklab(0.92739 -0.00250 -0.01584) 87.500%,
        oklab(0.92075 -0.00260 -0.01748) 88.542%,
        oklab(0.91425 -0.00270 -0.01908) 89.583%,
        oklab(0.90802 -0.00279 -0.02062) 90.625%,
        oklab(0.90214 -0.00288 -0.02207) 91.667%,
        oklab(0.89672 -0.00296 -0.02341) 92.708%,
        oklab(0.89183 -0.00304 -0.02462) 93.750%,
        oklab(0.88755 -0.00310 -0.02568) 94.792%,
        oklab(0.88396 -0.00315 -0.02656) 95.833%,
        oklab(0.88110 -0.00320 -0.02727) 96.875%,
        oklab(0.87903 -0.00323 -0.02778) 97.917%,
        oklab(0.87777 -0.00325 -0.02809) 98.958%,
        oklab(0.87735 -0.00325 -0.02819) 100.000%);   /* Round 9B Soft edges (Pete 10-28, P-0035): horizontal; 0% #C7D3EA, 26% #F8FAFB, 74% #F8FAFB, 100% #CDD7EA; OKLab */

    /* ink (unchanged v2.1 values; all hold AA on #f8fafb and on clear glass over it) */
    --lg-ink: #0b1d2a;             /* 16.4:1 */
    --lg-dev: #6b4400;             /* the "In development" tag brown, 8.5:1 on the page */
    --lg-live-dot: #12805c;        /* the green dot beside "Live" (a mark, not text) */
    --lg-live: #0d6a4c;            /* the "Live" tag green, 6.3:1 on the page */
    --lg-ink2: #374c5a;            /*  darkened for the wave (worst pixel 4.5:1 or better) */
    --lg-quiet: #7b92a2;           /* icons, rules, non-text marks only (3.0:1) */
    --lg-quiet-text: #3c5362;      /*  meta, dates, captions (darkened for the wave) */
    --lg-lagoon-text: #08528d;     /*  kickers, small links (darkened for the wave; holds 4.5:1 on its darkest stretch) */
    --lg-lagoon: #095ea2;          /*  links at 15px+ and marks; use --lg-lagoon-text below 15px (darkened for the wave) */
    --lg-lagoon-deep: #0a578d;     /*  role headline, big numbers, emphasis words (darkened for the wave: My Story's small eyebrows hold 4.5:1 at 390 wide) */
    --lg-mint: #0fb59b;            /*  marks and icons only (2.5:1); never text */
    --lg-amber: #a86400;           /*  marks; text uses --lg-amber-text */
    --lg-amber-text: #875000;      /*  dates and badges (darkened for the wave: 4.5:1 on the darkest stretch at 390 wide) */
    --lg-line: rgba(15, 23, 42, .10);          /* hairlines, dividers, chip outlines */
    --lg-line-strong: rgba(15, 23, 42, .16);

    /* accents: unchanged (the one gradient, the deep-blue button, the "you are here" mark) */
    --lg-grad: linear-gradient(100deg, #2b4ff0 0%, #0b9be0 42%, #11c4b0 74%, #22d07a 100%);
    --lg-btn: linear-gradient(180deg, #1676d6, #0a56c8);   /* white label 6.6:1 */
    --lg-btn-solid: #0a56c8;
    --lg-btn-ink: #fff;
    --lg-btn-glow: rgba(10, 86, 200, .5);
    --lg-btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 18px -10px rgba(10, 86, 200, .5);
    --lg-nav-on: linear-gradient(100deg, #1d3fd0, #0a74c9);
    --lg-focus: #0a66b0;           /* focus ring: 5.7:1 against the page (the old color-mix tint was 2.5:1) */
    --lg-focus-ring: 0 0 0 3px var(--lg-focus);

    /* logo A (unchanged) */
    --lg-stone-1: #2a62e4; --lg-stone-2: #1497b6; --lg-stone-3: #1eaf7a;
    --lg-word-1: #2b4ff0;  --lg-word-2: #0966b0;  --lg-word-3: #09735a;

    /* ---- the glass ---- */
    /* completely clear pane (Pete, round 6): fill exactly 0, blur 0, no tint, no sheen. Only three things draw: the 1.5px specular
       edge ring (::after, section 11), the back-face line (::before) and the shadow OUTSIDE the pane. */
    --lg-glass-fill: rgba(255, 255, 255, 0);
    --lg-glass-blur: 0px;
    --lg-glass-sheen: none;
    --lg-glass-edge: rgba(255, 255, 255, 0);              /* border colour where a pane has a border: none (the ring is drawn by ::after) */
    --lg-glass-rim:                                         /* shadow only, all outside the pane: outline, contact, ambient, lift */
        0 0 0 1px rgba(22, 44, 72, .07), 0 1px 2px rgba(20, 38, 62, .08), 0 6px 14px -4px rgba(20, 38, 62, .10), 0 24px 48px -18px rgba(20, 38, 62, .30);
    --lg-glass-rim-hover:
        0 0 0 1px rgba(22, 44, 72, .09), 0 1px 2px rgba(20, 38, 62, .1), 0 8px 18px -4px rgba(20, 38, 62, .13), 0 28px 54px -18px rgba(20, 38, 62, .34);
    /* inner pane (glass inside glass): no blur, a fainter rim */
    --lg-glass-fill-in: rgba(255, 255, 255, 0);
    --lg-glass-sheen-in: none;
    --lg-glass-rim-in: 0 0 0 1px rgba(22, 44, 72, .06), 0 1px 2px rgba(20, 38, 62, .07), 0 10px 22px -12px rgba(20, 38, 62, .24);
    /* a button-sized pane (Skills in Practice): the inner rim scaled down to the button */
    --lg-glass-rim-btn: 0 0 0 1px rgba(22, 44, 72, .06), 0 1px 2px rgba(20, 38, 62, .08), 0 6px 12px -7px rgba(20, 38, 62, .26);
    /* the specular edge ring: bright along the top and down the left, a darker refraction line along the bottom and right */
    --lg-glass-spec: linear-gradient(to bottom, rgba(255, 255, 255, .85) 0, rgba(255, 255, 255, 0) 22px),
        linear-gradient(to top, rgba(22, 44, 72, .22) 0, rgba(22, 44, 72, 0) 16px),
        linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, .95) 8%, rgba(255, 255, 255, .5) 24%, rgba(255, 255, 255, .12) 42%,
            rgba(255, 255, 255, 0) 52%, rgba(22, 44, 72, .10) 66%, rgba(22, 44, 72, .30) 86%, rgba(22, 44, 72, .40) 100%);
    --lg-glass-spec-width: 1.5px;
    --lg-glass-backface: linear-gradient(135deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, .55) 100%);
    /* frost: ONLY where words sit over a photo, over another card, or over content that scrolls beneath (AA) */
    --lg-glass-fill-frost: rgba(255, 255, 255, .72);
    --lg-glass-blur-frost: 10px;
    /* bars that content scrolls under (site header, phone Guide sheet, phone tab bars) */
    --lg-glass-fill-bar: rgba(248, 250, 251, .72);   /* the READING fill (unchanged): any bar or dock that words pass under or that floats over a photo keeps it */
    --lg-glass-blur-bar: 12px;
    --lg-glass-bar-shadow: inset 0 -1px 0 rgba(20, 175, 160, .32), 0 1px 0 rgba(20, 35, 55, .06);
    /* the top bar alone is clear while the page is at the top (section 11); its bar shadow there is the specular one */
    --lg-glass-bar-shadow-top: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(22, 44, 72, .20), 0 8px 20px -8px rgba(20, 38, 62, .16);
    --lg-glass-fill-solid: rgba(255, 255, 255, .95);  /* fallback / reduced transparency */
    --lg-glass-faint: rgba(255, 255, 255, 0);         /* replaces faint tints (hover and selection washes) */

    /* ---- the existing Lagoon surface tokens, re-pointed at the glass (this is what re-skins My Resume, Guide, etc.) ---- */
    --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);
    /* tinted washes go neutral: nothing is tinted in the glass itself */
    --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);

    /* radii, scaled with the page */
    --lg-r: calc(34px * var(--ps-scale));
    --lg-r2: calc(22px * var(--ps-scale));
}
/* the plain near-white page, on the converted pages (the editorial theme paints the legacy pages' html green with a rule of the same weight; this loads later) */
/* the page gradient: section 11 */


/* 3. THE GLASS MATERIAL --------------------------------------------------------------------------------------------
   Four roles. Pick by where the pane sits, not by what it is (THEME_GLASS.md section 3 has the decision table). */
.lg-glass {                                   /* clear pane: cards, tiles, rails, panels over the plain page */
    background-color: var(--lg-glass-fill);
    background-image: var(--lg-glass-sheen);
    -webkit-backdrop-filter: blur(var(--lg-glass-blur));
    backdrop-filter: blur(var(--lg-glass-blur));
    border-color: var(--lg-glass-edge);
    box-shadow: var(--lg-glass-rim);
    transition: box-shadow .35s ease;
}
.lg-glass--inner {                            /* glass inside glass: never a second blur */
    background-color: var(--lg-glass-fill-in);
    background-image: var(--lg-glass-sheen-in);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: var(--lg-glass-rim-in);
}
.lg-glass--frost {                            /* AA rule: a pane over a photo or over another card */
    background-color: var(--lg-glass-fill-frost);
    -webkit-backdrop-filter: blur(var(--lg-glass-blur-frost));
    backdrop-filter: blur(var(--lg-glass-blur-frost));
}
.lg-glass--bar {                              /* AA rule: a fixed/sticky bar that content scrolls under */
    background-color: var(--lg-glass-fill-bar);
    background-image: none;
    -webkit-backdrop-filter: blur(var(--lg-glass-blur-bar));
    backdrop-filter: blur(var(--lg-glass-blur-bar));
    box-shadow: var(--lg-glass-bar-shadow);
}
@media (hover: hover) {
    .lg-glass:not(.lg-glass--inner):not(.lg-glass--bar):hover { box-shadow: var(--lg-glass-rim-hover); }
}
/* faint hover/selection washes and hairline elements */
.lg-glass-faint { background: var(--lg-glass-faint); }
/* primary button: unchanged gradient, glass gloss on top */
.lg-btn-primary { background: var(--lg-btn); color: var(--lg-btn-ink); box-shadow: var(--lg-btn-shadow); min-height: var(--ps-tap-min); }
/* every control keeps a 44px hit area after the 15% scale. Opt-in (.lg-tap) so dense widgets such as the constellation stops
   are not reflowed; builders add it to buttons, chips, tabs and composer controls (THEME_GLASS.md section 6). */
.lg-tap { min-height: var(--ps-tap-min); min-width: var(--ps-tap-min); }
/* focus: one visible ring on every theme */
body.ps-scaled :focus-visible { outline: 3px solid var(--lg-focus); outline-offset: 2px; }
/* -webkit-text-fill-color is inherited: words on buttons, badges and photos always paint in their own colour */
:is(.lg-btn-primary, .lg-keep, .lg-photo-caption), :is(.lg-btn-primary, .lg-keep, .lg-photo-caption) * { -webkit-text-fill-color: currentColor; }


/* 4. SHELL BINDINGS -------------------------------------------------------------------------------------------------
   The shared header and footer, using the real selectors on origin/main 195e43e4. Page components (My Resume .rp-*, the Guide
   .gfd / .ps-guide-*, intake .resume-intake__*) already read --lg-card / --lg-cardline / --lg-shadow / --lg-blur / --lg-tilebg, so
   section 2 re-skins them; THEME_GLASS.md section 4 lists each one and the few that need a role class. */
header.global-header:has(> #site-header) {
    background-color: var(--lg-glass-fill-bar);
    -webkit-backdrop-filter: blur(var(--lg-glass-blur-bar));
    backdrop-filter: blur(var(--lg-glass-blur-bar));
    box-shadow: var(--lg-glass-bar-shadow);
    color: var(--lg-ink);
}
#site-header .ps-top__word {                  /* logo A wordmark: the one flow of colour, unchanged */
    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;
}


/* 5. PROTECTED: leave exactly as built -----------------------------------------------------------------------------
   The Career Constellation is its own night-sky illustration (THEME_LAGOON exception). Restore the Lagoon values inside it so
   the token re-pointing above cannot reach it. Photos, photo captions and scrims on photos are never re-inked or glassed. */
.rp-band, .rp-const, #constellation {
    --lg-card: rgba(255, 255, 255, .58); --lg-cardline: rgba(255, 255, 255, .85);
    --lg-tilebg: rgba(255, 255, 255, .66); --lg-tileline: rgba(255, 255, 255, .9);
    --lg-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 30px 50px -34px rgba(10, 60, 120, .5);
    --lg-tileshadow: 0 12px 26px -20px rgba(20, 30, 70, .38);
    --lg-blur: 22px;
}


/* 6. FALLBACKS ------------------------------------------------------------------------------------------------------ */
/* no backdrop-filter: every pane that would frost uses the solid fill instead (clear panes over the plain page need nothing) */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    :root { --lg-glass-fill-frost: var(--lg-glass-fill-solid); --lg-glass-fill-bar: var(--lg-glass-fill-solid); }
}
/* reduced transparency: frostier everywhere (Apple's rule), no blur needed */
@media (prefers-reduced-transparency: reduce) {
    :root {
        --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);
    }
}
/* more contrast: solid panes, a real border, no sheen, strongest ink for secondary text */
@media (prefers-contrast: more) {
    :root {
        --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);
    }
}
/* forced colours (Windows High Contrast): let the system paint; keep pane edges */
@media (forced-colors: active) {
    .lg-glass, .lg-glass--inner, .lg-glass--frost, .lg-glass--bar, header.global-header:has(> #site-header) {
        background: Canvas; color: CanvasText; border: 1px solid CanvasText; box-shadow: none;
        -webkit-backdrop-filter: none; backdrop-filter: none;
    }
    body.ps-scaled :is(.rp-card, .rp-story, .rp-ahead, .rp-end, .rp-ask, .rp-hero, .profile-header__inner, .profile-about, .cv1-policy, .owner-app__panel, .platform-page__card, .rp-hl, .rp-role,
        .rp-creds__col, .rp-skill, .gx-pane)::before,
    body.ps-scaled :is(.rp-card, .rp-story, .rp-ahead, .rp-end, .rp-ask, .rp-hero, .profile-header__inner, .profile-about, .cv1-policy, .owner-app__panel, .platform-page__card, .rp-hl, .rp-role,
        .rp-creds__col, .rp-skill, .gx-pane)::after { display: none; }
    #site-header .ps-top__word { -webkit-text-fill-color: CanvasText; color: CanvasText; background: none; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-glass { transition: none; }
}


/* 7. SCALED-PAGE FLOORS AND GLASS FINISHES (reviewer F1, F4; 2026-10-26) ---------------------------------------------------
   The legacy rem-based sheets (style.css, public-navigation.css, chatbot.css) shrink with the 13.6px root on the converted pages.
   Controls keep the size they had before the scale (or the 44px floor), running text is never under 12px, and the two legacy
   cream surfaces left on these pages (the profile card and the phone tab bar) take the glass roles. Scoped to body.ps-scaled so
   the unscaled legacy pages are untouched. */
body.ps-scaled .skip-link { min-height: 46px !important; }   /* the floors win over the older, more specific rules */
/* PS-LIVE-FIXES-SHELL-001: the tabs are real 44px targets (were 40px). The tab row scrolls, so it clips whatever sticks out of it: the row itself is
   44px tall and takes 2px of negative margin above and below, so the sub-header keeps its height (the resume page's scroll offsets are measured from
   it) while all 44px answer a pointer. The underline moves up 2px to stay on the strip's edge. Where the strip also holds the Ask Pete AI button
   (My Story and the other /petec pages), that 44px button sets the strip's height and the row simply fills it, so nothing is moved. */
body.ps-scaled .profile-tab { min-height: var(--ps-tap-min) !important; }
body.ps-scaled .profile-tabs__list { margin-block: -2px !important; }
body.ps-scaled .profile-tabs .profile-tab::after { bottom: 2px !important; }
body.ps-scaled .profile-tabs__inner:has(> .profile-tabs__ask-btn:not(.profile-tabs__ask-btn--resume)) .profile-tabs__list { margin-block: 0 !important; }
body.ps-scaled .profile-tabs__inner:has(> .profile-tabs__ask-btn:not(.profile-tabs__ask-btn--resume)) .profile-tab::after { bottom: 0 !important; }
body.ps-scaled .profile-tabs__ask-btn { min-height: var(--ps-tap-min) !important; }   /* PS-LIVE-FIXES-SHELL-001: 44px, was 40px */
body.ps-scaled .mobile-tabbar__item { min-height: var(--ps-tap-min) !important; }
body.ps-scaled :is(.profile-openchip, .profile-title, .profile-subtitle, .profile-subtitle span, .profile-meta span, .profile-meta a,
    .profile-about p, .profile-about .ps-link, .profile-about .ps-link span, .mobile-tabbar__item, .hero-ai-search__label,
    .profile-tabs__ask-btn span, #chat-header-text p, .chat-message, .suggestion-btn, #chat-send, #chat-disclaimer) { font-size: var(--ps-text-min); }
/* the owner Resume editor (/app/resume) is scaled too: its controls keep their old size and its small text reaches 12px */
body.ps-scaled .resume-editor__button { min-height: var(--ps-tap-min); font-size: max(var(--ps-text-min), .875rem); }
body.ps-scaled .resume-editor__sections a { min-height: 43.2px; }
body.ps-scaled .resume-editor :is(select, summary) { min-height: 40.4px; }
body.ps-scaled .resume-editor__status { font-size: max(var(--ps-text-min), .85rem); }
body.ps-scaled.ps-editorial-surface :is(.profile-header__inner, .profile-about) {
    background: var(--lg-card); border-color: var(--lg-cardline); box-shadow: var(--lg-shadow);
}
/* The phone tab bar is the glass "bar" role at its reading fill: 95% near-white, so its labels hold 4.5:1 over any content that scrolls under it
   (Mac re-check: the older rule left it almost clear, and the navy label measured 1.3:1 over a dark photo). */
body.ps-scaled .mobile-tabbar {
    background: var(--lg-glass-fill-solid); border-top: 1px solid var(--lg-line);
    -webkit-backdrop-filter: blur(var(--lg-glass-blur-bar)); backdrop-filter: blur(var(--lg-glass-blur-bar));
}


/* 8. THE OLD EDITORIAL PALETTE, RE-POINTED (reviewer F4, Mac WebKit check, Pete: "no old green or beige stays"; 2026-10-26) ------------
   peerslate-theme.css declares the old green-page palette as --pt-* tokens that the legacy sheets (style.css, editorial-glass.css,
   public-navigation.css, site-header.css's tab strip) still read. On the converted pages those tokens now hold the glass colors,
   so every user of them (the tab strip under the bar, the profile band, My Story's labels, links, body text and numbers, the
   phone tab bar) turns glass without a rule per element. Scoped to body.ps-scaled: the unscaled legacy pages keep their palette. */
body.ps-scaled {
    --pt-backdrop: var(--lg-page-bg);
    --pt-frame: transparent;
    --pt-frame-line: var(--lg-line);
    --pt-card: var(--lg-card);
    --pt-card-line: var(--lg-cardline);
    --pt-card-soft: rgba(255, 255, 255, .9);   /* labels and chips that sit over photos stay readable */
    --pt-rail-card: var(--lg-glass-fill);        /* the tab strip and rails are clear glass on the wave (they were the bar's reading fill) */
    --pt-rail-line: var(--lg-cardline);
    --pt-current: rgba(10, 102, 176, .10);
    --pt-current-line: rgba(10, 102, 176, .28);
    --pt-band: var(--lg-glass-fill-in);
    --pt-chip: var(--lg-glass-fill-in);
    --pt-box-line: var(--lg-line-strong);
    --pt-panel: var(--lg-glass-fill-in);
    --pt-head: var(--lg-ink);
    --pt-ink: var(--lg-ink);
    --pt-ink2: var(--lg-ink2);
    --pt-muted: var(--lg-quiet-text);
    --pt-green: var(--lg-lagoon);
    --pt-green-deep: var(--lg-lagoon-deep);
    --pt-link: #0a4f82;                       /* 6:1 even on the frosted card over a photo */
    --pt-num: #203767;
    --pt-gold-edge: var(--lg-lagoon-deep);   /* My Story's values-band icons; the gold buttons use --pt-btn-edge */
    --pt-accent-ink: var(--lg-lagoon-deep);
    --pt-badge: rgba(10, 102, 176, .08);
    --pt-badge-line: rgba(10, 102, 176, .25);
}
body.ps-scaled .mobile-tabbar__item { color: var(--lg-ink2); }
body.ps-scaled .mobile-tabbar__item[aria-current="page"] { color: var(--lg-lagoon-deep); background: rgba(10, 102, 176, .08); }   /* 6:1 or better over any content */


/* 9. THE GUIDE KEEPS ITS OWN PALETTE (2026-10-26) ----------------------------------------------------------------------
   The Guide (the intake dialog and its Front door) floats over the page, so it must stay opaque. It reads
   the same --pt-* tokens, which section 8 turned into clear glass for the page, so these containers get the original values back
   (copied from peerslate-theme.css). No Guide file is edited; the Guide re-skins through the --lg-* tokens it already reads. */
body.ps-scaled :is(.resume-intake, .gfd, #guide-fd-bar) {
    --pt-backdrop: #3f6a51;
    --pt-frame: #f3ece0;
    --pt-frame-line: #e3d7c1;
    --pt-card: #faf8f2;
    --pt-card-line: #e6dfd1;
    --pt-card-soft: #fffdf8;
    --pt-rail-card: #faf6ec;
    --pt-rail-line: #e3d7c1;
    --pt-current: #e8dfc9;
    --pt-current-line: #d6c9a9;
    --pt-gold-edge: #a8781e;
    --pt-band: #f0e9da;
    --pt-chip: #ece4d3;
    --pt-box-line: #cfc3a8;
    --pt-panel: #f3ecdd;
    --pt-head: #1d3527;
    --pt-ink: #2d3932;
    --pt-ink2: #495a51;
    --pt-muted: #596860;
    --pt-green: #3a6a4f;
    --pt-green-deep: #214e3c;
    --pt-link: #2f5640;
    --pt-num: #a8690a;
    --pt-accent-ink: #7d5916;
    --pt-badge: #e8efe6;
    --pt-badge-line: #c8d5bd;
    --pt-btn: #f4dfa6;
    --pt-btn-edge: #d6b968;
    --pt-btn-hover: #efd690;
    --pt-btn-press: #e8d08d;
}

/* The Front door (guide-front-door.css, O2b) steps its own CSS zoom x1.125 / x1.25 / x1.333 from 1800px. On the scaled pages the page's
   --ps-scale step (read through --gfd-scale, and the root size) already does that, so its zoom is held at 1 here: one step, never two
   (reviewer, 2026-10-26). More specific than its own `.gfd` rules, whichever sheet loads later. */
body.ps-scaled .gfd { --gfd-zoom: 1; --gfd-scale: var(--ps-scale); --gfd-tap-min: var(--ps-tap-min); --gfd-text-min: var(--ps-text-min); }
/* guide-front-door.css declares its own defaults (--gfd-scale: 1, 0px floors) on .gfd itself, which beat the :root mapping above, so the
   mapping is repeated here on .gfd with more specificity: this is what makes the Front door follow the page scale and floors. */

/* The open Ask Pete chat panel and its button sit above the phone tab bar (z-index 1150), so the bar never covers the question box or
   Send (reviewer F5); still under the site bar (1200). */
body.ps-scaled :is(#chat-panel, #chat-toggle) { z-index: 1160; }

/* 10. THE VISITOR "ASK PETE AI" CHAT PANEL IN GLASS (Mac final re-check; Pete 2026-10-25: "no old green or beige stays") ------------------------
   chatbot.css and the editorial layer paint the panel dark navy and gold, or beige with a forest-green header. Only the #chat-* ids of base.html
   are restyled here (the panel and its launcher); the Guide and the old intake pop-up are different elements and are not touched. The panel
   floats over the page, so it is the frost role at 94% (every word holds 4.5:1 over any content). Specificity (1,1,2) beats the editorial rules. */
html body:not(.ps-chat-original) #chat-toggle { color: var(--lg-btn-ink); background: var(--lg-btn); border: 0; border-radius: 999px; box-shadow: var(--lg-btn-shadow); }
html body:not(.ps-chat-original) #chat-panel { background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(var(--lg-glass-blur-frost, 10px)); backdrop-filter: blur(var(--lg-glass-blur-frost, 10px)); border: 1px solid var(--lg-line-strong); box-shadow: 0 22px 60px -24px rgba(10, 40, 80, .45), 0 0 0 1px rgba(255, 255, 255, .6) inset; }
html body:not(.ps-chat-original) #chat-header { background: rgba(255, 255, 255, .6); border-bottom: 1px solid var(--lg-line); }
html body:not(.ps-chat-original) #chat-header-text h3 { color: var(--lg-ink); }
html body:not(.ps-chat-original) #chat-header-text p { color: var(--lg-quiet-text); }
html body:not(.ps-chat-original) #chat-close { color: var(--lg-ink2); background: none; border-color: transparent; }
html body:not(.ps-chat-original) #chat-close:hover { color: var(--lg-ink); background: rgba(10, 102, 176, .08); border-color: rgba(10, 102, 176, .25); }
html body:not(.ps-chat-original) .bot-message { background: rgba(10, 102, 176, .07); color: var(--lg-ink); border: 1px solid var(--lg-line); }
html body:not(.ps-chat-original) .user-message { background: var(--lg-btn); color: var(--lg-btn-ink); border: 0; }
html body:not(.ps-chat-original) .suggestion-btn { background: #fff; color: var(--lg-ink2); border: 1px solid var(--lg-line-strong); }
html body:not(.ps-chat-original) .suggestion-btn:hover { background: rgba(10, 102, 176, .07); color: var(--lg-lagoon-deep); border-color: rgba(10, 102, 176, .4); }
html body:not(.ps-chat-original) #chat-input-area { background: rgba(255, 255, 255, .6); border-top: 1px solid var(--lg-line); }
html body:not(.ps-chat-original) #chat-disclaimer { background: transparent; color: var(--lg-quiet-text); }
html body:not(.ps-chat-original) #chat-input { background: #fff; color: var(--lg-ink); border: 1px solid var(--lg-line-strong); }
html body:not(.ps-chat-original) #chat-input:focus { border-color: var(--lg-focus); box-shadow: 0 0 0 2px var(--lg-focus); }
html body:not(.ps-chat-original) #chat-send { background: var(--lg-btn); color: var(--lg-btn-ink); border: 0; }
html body:not(.ps-chat-original) #chat-send:hover { background: var(--lg-btn); color: var(--lg-btn-ink); filter: brightness(1.08); }
@media (min-width: 521px) { html body:not(.ps-chat-original) #chat-panel { border-radius: 18px; } }
/* The panel's small controls reach the site's 44px tap floor (reviewer note on eff49a41; site manager: fix gaps now): the close x, the three
   suggestions, the text box and Send. Floors only (min sizes, never scaled); the layout and wording are unchanged. */
html body:not(.ps-chat-original) #chat-close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px !important; min-height: 44px !important; }
html body:not(.ps-chat-original) .suggestion-btn { min-height: 44px !important; display: flex; align-items: center; }
html body:not(.ps-chat-original) :is(#chat-input, #chat-send) { min-height: 44px !important; box-sizing: border-box; }


/* 11. CLEAR GLASS ON THE PALE NAVY WAVE (BG-DELTA; Pete 2026-10-26: round 6 option 5, "completely clear glass") ---------------------
   The tokens in section 2 make every pane transparent with no blur. This section paints the page gradient, takes the fill and
   blur off the few panes that set their own, and draws the glass: a 1.5px specular ring (::after) and a back-face line (::before)
   on each pane. None of these panes uses ::before/::after for anything else. Plain .rp-card.rp-sec wrappers (Skills, Experience,
   Credentials) are not panes and get no ring. Reduced transparency, more contrast and forced colours turn the ring off (section 6). */
html:has(> body.ps-scaled) { min-height: 100%; background: var(--lg-page-bg); }   /* the root keeps the plain page colour; the body draws the wave over it (below) */
body.ps-scaled, body.ps-scaled.rp-body {
    background-color: var(--lg-page-bg) !important;   /* what a browser without gradient support shows, and what the body's colour stays */
    background-image: var(--lg-page-wave) !important;
    background-size: 100% 100%; background-position: 0 0; background-repeat: no-repeat;
}
/* the page layers let the gradient through */
body.ps-scaled .main-content, body.ps-scaled #site-footer { background: transparent !important; }
body.ps-scaled.rp-body::before { display: none !important; }
/* the ring sits on the pane's own box */
body.ps-scaled :is(.profile-header__inner, .profile-about, .cv1-policy, .owner-app__panel, .platform-page__card, .rp-role, .rp-creds__col, .rp-skill, .gx-pane) { position: relative; }
/* PS-GCP-PRESENT-001: the new home and My Resume panes (.gx-pane) are clear glass like the rest: no fill, an edge and a shadow */
body.ps-scaled .gx-livedot { display: inline-block; width: calc(10px * var(--ps-scale)); height: calc(10px * var(--ps-scale)); border-radius: 50%; background: var(--lg-live-dot); box-shadow: 0 0 0 calc(4px * var(--ps-scale)) color-mix(in srgb, var(--lg-live-dot) 16%, transparent); flex: none; }
body.ps-scaled .gx-pane { background: var(--lg-glass-fill); border: 1px solid var(--lg-glass-edge); border-radius: var(--lg-r2); box-shadow: var(--lg-glass-rim); }
/* the older editorial sky picture stands down on every glass page so the Soft edges gradient shows (About still painted it) */
body.ps-scaled .site-sky { display: none !important; }
body.ps-scaled :is(.rp-card:not(.rp-sec), .rp-story, .rp-ahead, .rp-end, .rp-ask, .rp-hero, .profile-header__inner, .profile-about, .cv1-policy, .owner-app__panel, .platform-page__card,
    .rp-hl, .rp-role, .rp-creds__col, .rp-skill, .gx-pane)::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);
}
body.ps-scaled :is(.rp-card:not(.rp-sec), .rp-story, .rp-ahead, .rp-end, .rp-ask, .rp-hero, .profile-header__inner, .profile-about, .cv1-policy, .owner-app__panel, .platform-page__card,
    .rp-hl, .rp-role, .rp-creds__col, .rp-skill, .gx-pane)::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);
}
/* panes inside panes draw a fainter ring */
body.ps-scaled :is(.rp-hl, .rp-role, .rp-creds__col, .rp-skill)::after { opacity: .85; }
/* Skills in Practice buttons: the Experience cards' definition (ring + shadow) at button size; still no fill */
body.ps-scaled .rp-skill { box-shadow: var(--lg-glass-rim-btn); }
body.ps-scaled .rp-skill:hover { box-shadow: var(--lg-glass-rim-in); }
/* the sticky top bar: clear while the page is at the top (the look Pete picked). Its own state, not a token change: the bar keeps
   the reading fill (--lg-glass-fill-bar) and blur everywhere else and once the page scrolls, so words passing under it stay readable
   (4.5:1). An inline script in base.html keeps html.ps-at-top; without script the bar simply keeps its reading fill. Reduced
   transparency, more contrast and a missing backdrop-filter keep the solid fill at the top too. */
html.ps-at-top body.ps-scaled header.global-header:has(> #site-header) {
    background-color: rgba(255, 255, 255, 0);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: var(--lg-glass-bar-shadow-top);
}
body.ps-scaled header.global-header:has(> #site-header) { transition: background-color .2s ease; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    html.ps-at-top body.ps-scaled header.global-header:has(> #site-header) {
        background-color: var(--lg-glass-fill-solid); box-shadow: var(--lg-glass-bar-shadow);
    }
}
@media (prefers-reduced-motion: reduce) { body.ps-scaled header.global-header:has(> #site-header) { transition: none; } }
/* My Story's gold attribution lines were measured on near-white; a shade deeper holds 4.5:1 on the wave */
body.ps-scaled .sc-attrib { color: #70501c; }
/* page-level panes that carried their own white fill or blur: clear */
body.ps-scaled :is(.rp-skills__line, .rp-ask__tabs) { background-color: rgba(255, 255, 255, 0); }
body.ps-scaled :is(.rp-hero, .rp-ask, .rp-rail .rp-card, .profile-header, #site-footer) { -webkit-backdrop-filter: none; backdrop-filter: none; }
