/* =====================================================================================================================
   PS-GLASS-CORE-2: the light glass for the plain pages (Privacy, Terms, About, Contact, the account pages, the error pages),
   about 15% smaller. Spec: X:\PeerSlate\Claude\design\THEME_GLASS.md. Material and scale only: no wording, layout order or route changes.

   Every rule here is scoped by a page class that only these pages' templates put on <body> (through their own body_class block),
   so owner-only pages, Community, Interview Studio and the old Soon pages cannot change:
       body.glass-page--policy    Privacy, Terms, About, Contact (privacy.html and the three that extend it)
       body.glass-page--account   the account pages (auth_recovery, auth_unavailable, identity_storage_unavailable)
       body.glass-page--error     the 404 and 500 page (error.html)
   These pages also carry body.ps-scaled: glass-theme.css (GL-CORE-1) scales the root font on html:has(> body.ps-scaled), so rem sizes
   shrink by --ps-scale; every pixel length below is written calc(N px * var(--ps-scale)) and keeps the tap and text floors.
   Colour comes only from the --lg-* tokens. Load order does not matter: glass-theme.css only sets tokens on :root, and every rule here is page-class + element specific.
   ===================================================================================================================== */

/* 0. The page itself: plain near-white, not the old green or beige ---------------------------------------------------- */
html:has(> body.glass-page),
body.glass-page {
    background: var(--lg-page-bg);
    color: var(--lg-ink);
}
body.glass-page .main-content { background: transparent; }

/* 1. Policy pages --------------------------------------------------------------------------------------------------- */
body.glass-page--policy .cv1-policy {
    max-width: calc(760px * var(--ps-scale));
    margin: calc(32px * var(--ps-scale)) auto;
    padding: clamp(calc(24px * var(--ps-scale)), 6vw, calc(64px * var(--ps-scale)));
    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: 1px solid var(--lg-glass-edge);
    border-radius: var(--lg-r2);
    box-shadow: var(--lg-glass-rim);
    color: var(--lg-ink2);
    overflow-wrap: anywhere;          /* kept from the policy page's former inline style */
}
body.glass-page--policy .cv1-policy :is(h1, h2) { color: var(--lg-ink); }
body.glass-page--policy .cv1-policy strong { color: var(--lg-ink); }
body.glass-page--policy .cv1-policy a { color: var(--lg-lagoon-text); text-decoration-color: var(--lg-line-strong); text-underline-offset: calc(3px * var(--ps-scale)); }
body.glass-page--policy .cv1-policy a:hover { color: var(--lg-lagoon-deep); }
body.glass-page--policy .cv1-policy a:focus-visible { outline: 3px solid var(--lg-focus); outline-offset: calc(3px * var(--ps-scale)); border-radius: calc(3px * var(--ps-scale)); }
body.glass-page--policy .cv1-eyebrow { color: var(--lg-lagoon-text); font-size: max(var(--ps-text-min), .64rem); }
body.glass-page--policy .cv1-policy :is(p, ul, ol) + :is(p, ul, ol) { margin-top: 1em; }
/* the long legal lists and paragraphs are running text: never under the 12px floor after the scale */
body.glass-page--policy .cv1-policy :is(p, li, time) { font-size: max(var(--ps-text-min), 1rem); }

/* 2. Account pages (owner-app panels) -------------------------------------------------------------------------------- */
body.glass-page--account .owner-app { background: transparent; color: var(--lg-ink); }
body.glass-page--account .owner-app__panel {
    width: min(100%, calc(760px * var(--ps-scale)));
    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: 1px solid var(--lg-glass-edge);
    border-radius: var(--lg-r2);
    box-shadow: var(--lg-glass-rim);
    color: var(--lg-ink2);
}
body.glass-page--account .owner-app__panel :is(h1, h2) { color: var(--lg-ink); }
body.glass-page--account .owner-app__eyebrow { color: var(--lg-lagoon-text); font-size: max(var(--ps-text-min), .78rem); }
body.glass-page--account .owner-app__panel a:not([class]) { color: var(--lg-lagoon-text); }
body.glass-page--account :is(.owner-app__secondary, .owner-app__sign-out) {
    min-height: var(--ps-tap-min);
    background: var(--lg-glass-fill-in);
    background-image: var(--lg-glass-sheen-in);
    border: 1px solid var(--lg-line-strong);
    border-radius: 999px;
    color: var(--lg-ink);
    box-shadow: var(--lg-glass-rim-in);
}
body.glass-page--account :is(.owner-app__secondary, .owner-app__sign-out):hover { box-shadow: var(--lg-glass-rim-hover); }
body.glass-page--account .owner-app__primary {
    min-height: var(--ps-tap-min);
    background: var(--lg-btn);
    border: 0;
    border-radius: 999px;
    box-shadow: var(--lg-btn-shadow);
    color: var(--lg-btn-ink);
}
body.glass-page--account .owner-app__panel > p.owner-app__waking-status { color: var(--lg-quiet-text); }
body.glass-page--account .owner-app__panel :focus-visible { outline: 3px solid var(--lg-focus); outline-offset: calc(2px * var(--ps-scale)); }
body.glass-page--account .owner-app__waking-dot { background: var(--lg-lagoon); }

/* 3. Error pages ----------------------------------------------------------------------------------------------------- */
/* PS-PROFILE-HEADER-FOLLOWUP-002: the not-found page (404 only: body.glass-page--not-found; the 500 page shares this template and is left as it was) is as tall as its card needs. style.css gives every page's <main> a window-tall minimum
   (calc(100vh - 68px)), which left 470 to 550px of nothing between this small card and the footer and pushed the footer below the fold with a
   needless scrollbar. Here the footer simply follows the card at the page's own even gap (the platform-page padding above and below it). */
body.glass-page--not-found .main-content { min-height: 0; }
body.glass-page--error .platform-page__card {
    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: 1px solid var(--lg-glass-edge);
    border-radius: var(--lg-r2);
    box-shadow: var(--lg-glass-rim);
    color: var(--lg-ink2);
}
body.glass-page--error .platform-page__card h1 { color: var(--lg-ink); }
body.glass-page--error .section-eyebrow { color: var(--lg-lagoon-text); font-size: max(var(--ps-text-min), .7rem); }
body.glass-page--error .platform-page__lead { color: var(--lg-ink2); }
body.glass-page--error .btn-primary {
    background: var(--lg-btn);
    box-shadow: var(--lg-btn-shadow);
    border: 0;
    color: var(--lg-btn-ink);
}
body.glass-page--not-found .btn-primary:is(:hover, :focus-visible) { background: var(--lg-btn-solid); color: var(--lg-btn-ink); }   /* PS-PROFILE-HEADER-FOLLOWUP-002: style.css's light hover was white words on light gold (1.4:1); the same solid blue the dark page uses */
body.glass-page--error .btn-secondary {
    background: var(--lg-glass-fill-in);
    background-image: var(--lg-glass-sheen-in);
    border: 1px solid var(--lg-line-strong);
    color: var(--lg-ink);
    box-shadow: var(--lg-glass-rim-in);
}
body.glass-page--error .btn { min-height: var(--ps-tap-min); border-radius: 999px; font-size: max(var(--ps-text-min), .93rem); }   /* style.css drops .btn to .8rem on phones: 10.9px once scaled */
body.glass-page--error .btn:focus-visible { outline: 3px solid var(--lg-focus); outline-offset: calc(2px * var(--ps-scale)); }

/* 3b. About: live today / in development, and the founder (PS-GCP-PRESENT-001, mockups P-0098 / P-0099) ------------------------------ */
body.glass-page--policy .gx-about-links { display: flex; flex-wrap: wrap; gap: 0 calc(24px * var(--ps-scale)); }
body.glass-page--policy .gx-about-links a { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--ps-tap-min); }
body.glass-page--policy .gx-status { list-style: none; margin: calc(12px * var(--ps-scale)) 0 0; padding: 0; display: grid; gap: calc(10px * var(--ps-scale)); }
body.glass-page--policy .gx-status li { display: grid; grid-template-columns: auto 1fr; gap: calc(12px * var(--ps-scale)); align-items: baseline; }
body.glass-page--policy .gx-pill { display: inline-block; padding: calc(1px * var(--ps-scale)) calc(9px * var(--ps-scale)); border-radius: 999px; font-size: max(var(--ps-text-min), .78rem); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
body.glass-page--policy .gx-pill--live { color: var(--lg-live); border: 1px solid color-mix(in srgb, var(--lg-live) 45%, transparent); }
body.glass-page--policy .gx-pill--dev { color: var(--lg-dev); border: 1px solid color-mix(in srgb, var(--lg-dev) 45%, transparent); }
body.glass-page--policy .gx-founder { display: grid; grid-template-columns: auto 1fr; gap: calc(24px * var(--ps-scale)); align-items: start; margin-top: calc(18px * var(--ps-scale)); }
body.glass-page--policy .gx-founder img { width: calc(132px * var(--ps-scale)); height: calc(132px * var(--ps-scale)); border-radius: calc(18px * var(--ps-scale)); object-fit: cover; box-shadow: var(--lg-glass-rim-in); }
body.glass-page--policy .gx-founder h3 { margin: 0; font-size: 1.45rem; color: var(--lg-ink); }
body.glass-page--policy .gx-role { margin: calc(2px * var(--ps-scale)) 0 calc(10px * var(--ps-scale)) !important; font-weight: 700; color: var(--lg-lagoon-deep) !important; letter-spacing: .02em; }
body.glass-page--policy .gx-verify { list-style: none; margin: calc(14px * var(--ps-scale)) 0 0; padding: 0; display: grid; gap: calc(2px * var(--ps-scale)); }
body.glass-page--policy .gx-verify li { display: flex; align-items: center; gap: calc(10px * var(--ps-scale)); min-height: var(--ps-tap-min); }
body.glass-page--policy .gx-verify svg { width: calc(20px * var(--ps-scale)); height: calc(20px * var(--ps-scale)); flex: none; fill: none; stroke: var(--lg-lagoon-deep); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.glass-page--policy .gx-verify a { font-weight: 700; }
body.glass-page--policy .cv1-policy + .cv1-policy { margin-top: calc(28px * var(--ps-scale)); }
@media (max-width: 640px) {
    body.glass-page--policy .gx-founder { grid-template-columns: 1fr; }
    body.glass-page--policy .gx-founder img { width: calc(112px * var(--ps-scale)); height: calc(112px * var(--ps-scale)); }
    body.glass-page--policy .gx-status li { grid-template-columns: 1fr; gap: calc(4px * var(--ps-scale)); justify-items: start; }
}

/* 3b. About and Contact: the words straight on the page, no cards (PS-PAGES-NOCARDS-001, Pete 2026-10-30: "just put it on the page itself").
   Only these two pages add body.glass-page--open (through privacy.html's page_body_class block), so Privacy and Terms keep their cards above.
   Each section keeps the policy column (same width, same left edge, same type and ink); the card's fill, edge, rim, blur and the two specular rings
   (glass-theme.css draws them on .cv1-policy) are gone, and the card's inner padding becomes plain spacing between sections. */
body.glass-page--policy.glass-page--open .cv1-policy {
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-block: 0;
    margin: 0 auto;
}
body.glass-page--policy.glass-page--open .cv1-policy::before,
body.glass-page--policy.glass-page--open .cv1-policy::after { display: none; }
body.glass-page--policy.glass-page--open .cv1-policy:first-child { padding-top: clamp(calc(24px * var(--ps-scale)), 5vw, calc(48px * var(--ps-scale))); }
body.glass-page--policy.glass-page--open .cv1-policy:last-child { padding-bottom: clamp(calc(32px * var(--ps-scale)), 6vw, calc(64px * var(--ps-scale))); }
body.glass-page--policy.glass-page--open .cv1-policy + .cv1-policy { margin-top: clamp(calc(32px * var(--ps-scale)), 5vw, calc(56px * var(--ps-scale))); }

/* 4. Fallbacks (THEME_GLASS section 6): no backdrop-filter is used on these pages (clear glass does not blur), reduced transparency
   and forced colours follow glass-theme.css, which re-points the tokens used above. */
