/**
 * Gymnastics Plus — Site-wide Base Layer (gp-base)
 *
 * WS-2 Phase 1 (ADDITIVE). First-party base reset that will REPLACE the Kadence
 * parent's base CSS at the Phase 2 cutover. Unlike gp-core.css (which is scoped to
 * body.gp-app and only enqueued on page-template / gymnast_profile routes), this is
 * loaded UNSCOPED on EVERY page so non-template routes (default Pages, blog single,
 * archives, search, 404, the Kadence-block pages) get a first-party base.
 *
 * Authored to MIRROR Kadence's base (kadence/assets/css/all.min.css + Kadence's
 * system-font defaults, theme typography mods are unset) so that — with the parent
 * still enqueued in Phase 1 — this layers on top with NO visible change on pages
 * that already render styled. Pages that currently render bare (search, 404, the
 * abandoned podcast/founding-members block pages) may GAIN this base; that is the
 * expected, signed-off improvement, not a regression.
 *
 * Font is Poppins, loaded site-wide via the gp-fonts-poppins enqueue (WS-2 Phase 5 —
 * the first time Poppins is actually loaded anywhere; before this, Poppins declarations
 * silently fell back to the system stack). The system stack remains the fallback below.
 *
 * BASE ONLY. No component/layout/page styles — those live in gp-core.css and the
 * per-page stylesheets.
 *
 * @package Gymnastics_Plus
 */

/* Heading-scale tokens (WS-2.5 Task 4) — the structured Poppins ramp, defined ONCE here and
   consumed by the bare h1–h6 below AND by per-surface heading classes (portal/profile/single)
   so the scale lives in one place. Values mirror the Phase-5b scale, so this layer is
   byte-identical. Names are collision-free (taken: --gp-text-*, --gp-font, --gp-gray-*). Colors
   stay here for gp-base's own headings; surface COLOR unification is deferred to the
   --gp-color-* semantic layer (Task 6). */
:root {
    --gp-h1-size: 32px; --gp-h1-line: 1.15; --gp-h1-weight: 700; --gp-h1-tracking: -0.02em;  --gp-h1-color: #1A202C;
    --gp-h2-size: 28px; --gp-h2-line: 1.2;  --gp-h2-weight: 700; --gp-h2-tracking: -0.015em; --gp-h2-color: #1A202C;
    --gp-h3-size: 24px; --gp-h3-line: 1.25; --gp-h3-weight: 600; --gp-h3-tracking: -0.01em;  --gp-h3-color: #1A202C;
    --gp-h4-size: 22px; --gp-h4-line: 1.3;  --gp-h4-weight: 600; --gp-h4-tracking: -0.01em;  --gp-h4-color: #2D3748;
    --gp-h5-size: 20px; --gp-h5-line: 1.35; --gp-h5-weight: 600; --gp-h5-tracking: normal;   --gp-h5-color: #2D3748;
    --gp-h6-size: 18px; --gp-h6-line: 1.4;  --gp-h6-weight: 600; --gp-h6-tracking: normal;   --gp-h6-color: #4A5568;
}

/* ============================================================================
   COLOR TOKEN SYSTEM (WS-2.5 Task 6, Phase 1) — 3-tier, site-wide, dark-ready.
   Defined HERE in gp-base (loaded on EVERY page), not gp-core.css (which is
   scoped to .gp-app templates and only enqueued on some routes). ADDITIVE: in
   this phase NOTHING consumes these tokens, so light mode is byte-identical —
   this just establishes the seam. Tier-1 values mirror gp-core.css :root exactly;
   on .gp-app pages both files define them to the SAME values (no conflict).
   Later phases delete the ~24 local --gp-gold forks and repoint surfaces onto
   the Tier-2 semantics; the #1A202C/#171717 text reconciliation + the
   --gp-text-primary collision are folded in at the consume phase (Phase 3).
   ============================================================================ */
:root {
    /* Tier 1 — PRIMITIVES (raw palette; the ONLY place raw hex lives) */
    --gp-white: #ffffff;
    --gp-black: #000000;
    --gp-gray-50: #fafafa;
    --gp-gray-100: #f5f5f5;
    --gp-gray-200: #e5e5e5;
    --gp-gray-300: #d4d4d4;
    --gp-gray-400: #a3a3a3;
    --gp-gray-500: #737373;
    --gp-gray-600: #525252;
    --gp-gray-700: #404040;
    --gp-gray-800: #262626;
    --gp-gray-900: #171717;
    --gp-gold: #DFB859;
    --gp-gold-hover: #c9a64e;
    --gp-gold-light: rgba(223, 184, 89, 0.1);
    --gp-purple-400: #a855f7;
    --gp-purple-500: #7c3aed;
    --gp-purple-600: #6d28d9;
    --gp-success: #22c55e;
    --gp-error: #ef4444;
    --gp-warning: #f59e0b;
    --gp-info: #3b82f6;
    --gp-avatar-ph-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* placeholder-avatar gradient (matches the profile .gp-cover-photo) */

    /* Tier 2 — SEMANTICS (--gp-color-*; the seam for one-place color + dark mode).
       Every value maps to a Tier-1 primitive, so light mode is byte-identical. */
    --gp-color-bg: var(--gp-gray-100);
    --gp-color-surface: var(--gp-white);
    --gp-color-surface-2: var(--gp-gray-50);
    --gp-color-text: var(--gp-gray-900);
    --gp-color-text-muted: var(--gp-gray-500);
    --gp-color-text-inverse: var(--gp-white);
    --gp-color-border: var(--gp-gray-200);
    --gp-color-border-strong: var(--gp-gray-300);
    --gp-color-primary: var(--gp-gray-900);        /* neutral default action */
    --gp-color-on-primary: var(--gp-white);
    --gp-color-accent: var(--gp-gold);             /* gold accent */
    --gp-color-accent-hover: var(--gp-gold-hover);
    --gp-color-on-accent: var(--gp-gray-900);
    --gp-cta: var(--gp-gold);                       /* KEY CTA = gold */
    --gp-cta-on: var(--gp-gray-900);
    --gp-cta-premium: linear-gradient(135deg, var(--gp-purple-500), var(--gp-purple-400)); /* checkout/membership */
    --gp-cta-premium-on: var(--gp-white);
    --gp-color-success: var(--gp-success);
    --gp-color-danger: var(--gp-error);
    --gp-color-warning: var(--gp-warning);
    --gp-color-info: var(--gp-info);
    --gp-color-focus: var(--gp-gold);
    --gp-color-shadow: rgba(0, 0, 0, 0.08);

    /* D2 (2026-07-23) — legacy-fork reconciliation semantics. gp-base's own bare `body` (#17)
       and the gp-profile.css legacy fork (Section 4.2 de-fork) each used a near-black/near-white
       shade that is NOT byte-identical to any existing Tier-1 primitive (a few hex units off —
       e.g. #1A202C vs --gp-gray-900's #171717). Per the byte-identical-light rule, these get their
       OWN semantic (light = the exact pre-existing value, so the de-fork is a zero-pixel-diff
       swap) rather than being force-mapped onto a near-but-not-exact existing token. Consolidating
       these near-duplicate shades onto ONE canonical value is a future Phase-4.9 owner call (a small
       deliberate pixel shift), not this slice's job. */
    --gp-color-text-strong: #1A202C;          /* gp-base's own body/heading ink (was raw in the body rule) */
    --gp-color-text-profile: #1c1e21;         /* gp-profile.css --gp-text-primary */
    --gp-color-text-muted-profile: #65676b;   /* gp-profile.css --gp-text-secondary */
    --gp-color-border-profile: #e4e6eb;       /* gp-profile.css --gp-border-color */
    --gp-color-bg-profile: #f0f2f5;           /* gp-profile.css --gp-bg-gray (page-canvas level, one step BELOW card-bg) */
    --gp-color-fill-ink: #1c1e21;             /* always-ink pill/chip fill (e.g. .gp-filter-btn.active) — intentionally NO dark
                                                 redefinition: the fill stays ink in both themes (already high-contrast white-on-ink
                                                 in both, so it was never part of the readability gap below) */

    /* UB (2026-07-24) — "selected fill" pair: the chip/ink-fill family gap flagged by D1/D2/CT
       (DS-2 #8/#9 + the --gp-color-fill-ink precedent above). Three ACTIVE-STATE surfaces (portal
       sidebar nav pill, College Tracker Board/List toggle, profile tab bar) each fill their selected
       state with an ink-toned or raw-gray background that goes dark-on-dark once the surface itself
       goes dark, instead of reading as a clearly ELEVATED chip. Light is untouched everywhere (each
       surface's existing light declarations are left exactly as they were — this pair is only ever
       consumed inside a [data-theme="dark"] override in the surface file, never in a light-affecting
       position). Dark flips the fill light-on-dark (gray-50 fill / gray-900 ink) — a clearly elevated
       chip against any gray-800/900 surround. Contrast: 17.2:1 label-to-fill (#171717 ink on #fafafa
       fill, WCAG AAA text) — the same pairing also clears the fill-vs-surround boundary against a
       gray-900 page canvas (17.2:1) and a gray-800 card surface (14.5:1); see the PR body for the
       full ratio table. */
    --gp-color-fill-selected: var(--gp-color-primary);      /* light default (unconsumed by the 3 fixed surfaces; matches the existing gp-core .gp-nav-item.active convention) */
    --gp-color-on-fill-selected: var(--gp-color-on-primary);

    /* UB (2026-07-25) — Podium interaction-state token (docs/plans/2026-07-25-gp-design-system-podium.md
       "Interaction states": hover is pointer-only, one wash token shared by both themes). Purely
       additive — no existing rule consumes this yet, so it changes NOTHING visually until a future
       slice opts a control into it; light value is Podium's Chalk-surface wash. */
    --gp-color-hover-wash: rgba(16, 22, 40, 0.05);

    /* D3 (2026-07-23) — College Tracker de-fork (WS-2.5 deferred slice, css/gp-college-tracker.css).
       That file's own local gray-700/purple/blue/ink values have no exact Tier-2 counterpart (either a
       genuinely distinct shade, like the D2 shades above, or a role gp-base has never named before, like
       the tracker's iOS-style blue "interactive accent" — the app's gold CTA intent doesn't fit a
       secondary-blue link/focus color). Each gets ONE semantic here, light = the exact pre-existing
       value (byte-identical), dark = a value verified against the plan's WCAG-AA contrast gate
       (docs/plans/2026-07-23-app-experience-motion.md §3.6) — see the PR body for the ratio table. */
    --gp-color-text-secondary: #404040;                 /* tracker's gray-700 text tier (between text-muted/500 and text/900) */
    --gp-color-accent-blue: #007AFF;                    /* tracker's iOS-blue interactive accent (links, focus rings, filled buttons) — distinct from the gold CTA */
    --gp-color-accent-blue-hover: #0066D6;
    --gp-color-accent-blue-tint: #EAF3FF;               /* pale-blue border/wash paired with the accent-blue family */
    --gp-color-accent-purple: #8b5cf6;                  /* tracker's "Pursuing" stage purple */
    --gp-color-highlight-bg: #fffbeb;                   /* "current step" tile highlight wash (checklist) */
    --gp-color-icon-ink: #000000;                       /* modal close-icon ink (a true #000, not gray-900 — kept its own token per the byte-identical rule) */
    --gp-color-btn-ink-bg: #111827;                     /* tracker's local ink-filled "Save" button (a Tailwind near-black, not gray-900 — same reconciliation pattern as D2) */
    --gp-color-btn-ink-bg-hover: #000000;

    /* Tier 3 — COMPONENT tokens (resolve to Tier-2; re-skin a component in one line) */
    --gp-btn-bg: var(--gp-color-primary);
    --gp-btn-on: var(--gp-color-on-primary);
    --gp-card-bg: var(--gp-color-surface);

    /* Glass material (WS-2.5 liquid-glass pilot) — frosted translucency for floating CHROME
       only (sheets, popovers, nav/utility bars, toasts), NEVER dense lists/tables. The rgba
       tints live here in the token home (Tier-1 exempt); components consume var(--gp-glass-*)
       with no raw hex. The opacity floor keeps text legible; saturate() gives the rich iOS look. */
    --gp-glass-bg: rgba(255, 255, 255, 0.6);
    --gp-glass-border: rgba(255, 255, 255, 0.5);
    --gp-glass-highlight: rgba(255, 255, 255, 0.85);   /* 1px top rim-light */
    --gp-glass-blur: blur(22px) saturate(180%);
    --gp-glass-shadow: 0 12px 40px rgba(28, 40, 80, 0.18);

    /* Always-dark glass — overlay chrome that carries LIGHT (white) content: the floating
       tab bar, control bars. Does NOT flip with theme, so white icons stay legible in both
       light and dark (the way iOS keeps its tab bar dark-translucent even in light mode). */
    --gp-glass-bg-dark: rgba(20, 22, 28, 0.58);     /* tint floor: lower = less "cloudy"/milky */
    --gp-glass-border-dark: rgba(255, 255, 255, 0.12);
    --gp-glass-highlight-dark: rgba(255, 255, 255, 0.16);
    --gp-glass-shadow-dark: 0 10px 34px rgba(0, 0, 0, 0.34);
    --gp-glass-blur-dark: blur(20px) saturate(180%) brightness(0.86);  /* saturate restores color (anti-cloudy); brightness deepens */
    --gp-glass-active: rgba(255, 255, 255, 0.18);   /* active "chip" fill on dark-glass chrome (nav tabs) */

    /* Floating tab bar — ALWAYS DARK frosted glass (Control Center / Instagram look), even on the
       light theme. Owner decision 2026-06-13: a dark anchor reads more premium and matches the refs.
       NOT theme-aware — renders dark glass + white ink regardless of [data-theme]. */
    --gp-nav-glass: rgba(22, 24, 30, 0.6);   /* LIQUID GLASS — translucent + backdrop-filter; hide-on-scroll keeps the blur off-screen mid-scroll so it doesn't smear */
    --gp-nav-blur: blur(20px) saturate(180%) brightness(0.9);   /* saturate restores color (anti-cloudy); brightness < 1 deepens the dark glass */
    --gp-nav-border: rgba(255, 255, 255, 0.1);
    --gp-nav-highlight: rgba(255, 255, 255, 0.16);
    --gp-nav-shadow: 0 -2px 12px rgba(0, 0, 0, 0.22);   /* upward (flush bottom bar); tight blur to avoid iOS scroll-smear */
    --gp-nav-ink: #ffffff;                       /* white icons always — dark glass anchors regardless of theme */
    --gp-nav-chip: rgba(255, 255, 255, 0.18);    /* active "glider" pill fill */
}

/* Dark mode — redefine Tier-2 ONLY (Tier-1 + every component rule stay byte-identical).
   INERT until a surface opts in via [data-theme="dark"]; the user toggle ships in a later phase.
   UB (2026-07-25) — repointed to the "Podium" Graphite palette, the owner-approved canonical dark
   direction (DESIGN.md + docs/plans/2026-07-25-gp-design-system-podium.md). Same seam, same
   Tier-2 names, same consumers — only the VALUES change, from placeholder --gp-gray-* re-tints to
   Podium's measured Graphite hex/rgba.

   ITERATION 2 (UB, 2026-07-25, same day) — the owner + his partner reviewed the pass directly
   above on dev and called it "almost there" with three precise problems: (1) body/secondary text
   still read as "gray on gray," not enough pop; (2) every active nav/tab/toggle got a solid gold
   FILL, which read "muddy," not premium, once stacked on the gray surfaces below it — their
   reference (a Lovable app sidebar) uses a clean elevated NEUTRAL pill + bright white text, gold
   nowhere in the fill; (3) panel/card colors still clashed. This block supersedes the OWNER
   OVERRIDE A/B values from the pass above with the values below — same seam, same consumers, only
   the numbers move again. Every pair is re-verified AA below (all comfortably ≥10:1 — see the PR
   body's full ratio table); gold is now reserved for primary-action fills, the progress-bar fill,
   and a single small accent detail on the active nav item (see css/gp-portal-sidebar.css) — never
   a large active-state fill. */
[data-theme="dark"] {
    --gp-color-bg: #0b0c0e;              /* iter 2: was #0c0d10 — a hair deeper + slightly desaturated canvas floor, part of the calmer low-chroma ramp requested */
    --gp-color-surface: #16181d;         /* iter 2: was #1e2129 (owner override B's raised panel) — the owner's partner still read panel-vs-canvas as "clashing"; this settles on a cleaner, closer-to-canvas step so TEXT (now much brighter, below) carries the contrast instead of the boxes fighting each other */
    --gp-color-surface-2: #1e2127;       /* iter 2: was #262b34 — one clear, calmer step above the new surface */
    --gp-color-text: #ffffff;            /* iter 2: was #f5f6f8 (Podium --ink) — owner: "why are we just gray text on a dark background." Primary content now reads pure white; 17.76:1 vs the new surface, 16.13:1 vs new surface-2 */
    --gp-color-text-muted: #cfd4db;      /* iter 2: was #b2b8c2 (Podium --ink-2) — brightened so secondary/body text stops reading gray-on-gray; 11.92:1 vs the new surface, 10.82:1 vs new surface-2 (still a clear step down from --gp-color-text for hierarchy) */
    --gp-color-text-inverse: #0b0c0e;    /* dark ink for a light-color-filled badge (paired with --gp-color-text/-success/-danger/-info AS backgrounds, not with --gp-color-primary — that pairing is --gp-color-on-primary below); matches the iter-2 canvas */
    --gp-color-border: rgba(255, 255, 255, 0.12);        /* iter 2: was 0.15 — the brighter text above no longer needs as strong a hairline to read panel edges, and a lighter line reads calmer against the new surface */
    --gp-color-border-strong: rgba(255, 255, 255, 0.18); /* iter 2: was 0.20 — keeps the same two-tier step relationship at the new, subtler hairline */
    --gp-color-primary: var(--gp-gold);            /* on dark, primary goes gold — already matched Podium's "black on light, gold on dark" action law before Podium existed; unchanged. Gold stays HERE (real primary-action buttons) — it no longer floods active nav/tab/toggle fills, see --gp-color-fill-selected below */
    --gp-color-on-primary: #1b1306;       /* Podium --action-ink — the exact ink tuned to sit on gold (was the old gray-900 placeholder) */
    --gp-color-danger: #ff5a4d;           /* Podium Graphite --danger (was unset here, silently inheriting the light #ef4444 Tier-1) */
    --gp-color-success: #34c759;          /* Podium Graphite --success (was unset here, silently inheriting the light #22c55e Tier-1) */
    --gp-color-shadow: rgba(0, 0, 0, 0.4);

    /* Podium interaction-state token, dark side (see the :root definition above) — pointer-hover
       wash on a dark surface. Additive; no consumer yet. */
    --gp-color-hover-wash: rgba(255, 255, 255, 0.06);

    /* D2 legacy-fork reconciliation — dark side, repointed onto the Podium ink/canvas/line values
       above (same role as before: gp-base's own body ink, the gp-profile.css de-fork, its
       page-canvas). Iter 2: brightened alongside --gp-color-text/-text-muted above (same "text must
       pop" fix — these are the same ink role under a byte-identical-light-mode exemption, not a
       genuinely different color, so they track the primary pair). */
    --gp-color-text-strong: #ffffff;
    --gp-color-text-profile: #ffffff;
    --gp-color-text-muted-profile: #cfd4db;
    --gp-color-border-profile: rgba(255, 255, 255, 0.12);
    --gp-color-bg-profile: #0b0c0e;       /* page-canvas: same dark floor as the iter-2 --gp-color-bg */

    /* ITERATION 2 (UB, 2026-07-25) — replaces the OWNER OVERRIDE A solid-gold fill from the pass
       above. The owner + partner judged that pairing (gold bg, dark ink) as "muddy," not premium,
       once every active nav item / tab / toggle across the app filled solid gold on top of the
       gray surfaces below it — their reference (a Lovable app sidebar) uses a clean ELEVATED
       NEUTRAL pill + bright white text instead, no color flood. Redefining ONLY these two tokens
       fixes every wired consumer in one place: the portal sidebar active nav item
       (css/gp-portal-sidebar.css — which also gets the one remaining gold accent, the active
       item's icon, so gold isn't eliminated entirely, just no longer the fill), the profile tab bar
       (css/gp-profile.css), the College Tracker Board/List toggle (css/gp-college-tracker.css), the
       Recruiting Portal "Foundation" section tab + coach-dashboard "On Watchlist" KPI tile
       (css/gp-recruiting-portal.css, page-templates/page-recruiter.php), and Mind Lab's tag filter
       pill (page-templates/page-mind-lab.php) — all six already consumed
       var(--gp-color-fill-selected)/var(--gp-color-on-fill-selected) rather than hardcoding their
       own fill, so this one-place repoint fixes every one of them with no per-surface edit needed.
       Fill is a neutral step ABOVE --gp-color-surface-2 (elevation, not color, signals "selected");
       text is pure white. 13.61:1 white-to-fill (verified), AAA. */
    --gp-color-fill-selected: #2a2e36;
    --gp-color-on-fill-selected: var(--gp-color-text);

    /* D3 (2026-07-23) — College Tracker de-fork, dark side. Out of THIS slice's scope (College
       Tracker deep de-fork is explicitly deferred) and not part of Podium's color-law table, so
       left byte-identical; the darker Graphite canvas/panel behind these can only raise their
       already-verified contrast ratios, never lower them. */
    --gp-color-text-secondary: var(--gp-gray-300);   /* 12.1:1 vs page bg, 10.2:1 vs card surface */
    --gp-color-accent-blue: #409CFF;                 /* 6.3:1 vs page bg, 5.4:1 vs card surface (AA text) */
    --gp-color-accent-blue-hover: #0A84FF;           /* Apple's dark-mode systemBlue; a deliberately deeper "pressed" tone */
    --gp-color-accent-blue-tint: rgba(64, 156, 255, 0.4);   /* translucent so it reads on any dark surface, no fixed bg to solve for */
    --gp-color-accent-purple: #A78BFA;               /* 6.6:1 vs page bg, 5.6:1 vs card surface (AA text) */
    --gp-color-highlight-bg: rgba(245, 158, 11, 0.12);      /* amber wash (an existing --gp-warning tint) reads as "in progress" on a dark card */
    --gp-color-icon-ink: var(--gp-gray-50);          /* pure #000 on a dark surface would be invisible; matches --gp-color-text's dark value */
    --gp-color-btn-ink-bg: var(--gp-gold);           /* the app's existing dark-mode "primary action goes gold" convention (matches --gp-color-primary) */
    --gp-color-btn-ink-bg-hover: var(--gp-gold-hover);

    /* Glass material — dark variant (near-black tint + faint rim = the Control Center look).
       Chrome-only per Podium principle 4; out of this token-value slice's scope (glass is a
       separate material system, not the Tier-2 semantic color table) — left byte-identical. */
    --gp-glass-bg: rgba(30, 33, 42, 0.55);
    --gp-glass-border: rgba(255, 255, 255, 0.1);
    --gp-glass-highlight: rgba(255, 255, 255, 0.14);
    --gp-glass-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
    /* NOTE: the floating tab bar is ALWAYS dark glass now (defined once in :root), so it needs
       no [data-theme="dark"] override here — it already renders dark on every theme. */

    /* UB (2026-07-25) — leak-sweep root-cause fix. The bare h1-h6 heading rules below (Phase 5b)
       consume --gp-h1-color..--gp-h6-color, which were tokenized off raw hex at :root but NEVER
       given a [data-theme="dark"] override — every plain heading tag site-wide (no page/component
       color override of its own) rendered fixed near-black ink regardless of theme. This is why
       Mind Lab's page title (h1), module headers (h2), and lesson titles (h3) read as dark-on-dark
       even after the Podium dark palette shipped (PR #479): those elements have no explicit
       `color`, so the h1/h2/h3 element rule — not inherited body color — wins the cascade.
       Repointed onto --gp-color-text-strong (h1-h5; already dark-aware, PR #479) / --gp-color-
       text-muted (h6, to keep its original slightly-dimmer step vs h1-h5). Additive only inside
       this existing dark block — the :root literals above are untouched, so light is byte-identical. */
    --gp-h1-color: var(--gp-color-text-strong);
    --gp-h2-color: var(--gp-color-text-strong);
    --gp-h3-color: var(--gp-color-text-strong);
    --gp-h4-color: var(--gp-color-text-strong);
    --gp-h5-color: var(--gp-color-text-strong);
    --gp-h6-color: var(--gp-color-text-muted);
}

/* ============================================================================
   MOTION TOKEN SYSTEM (WS-12 app-experience, M0) — the standardized motion
   vocabulary. Defined HERE in gp-base (loaded on EVERY page, zero added bytes
   per surface) beside the color tokens above, and follows the SAME discipline:
   feature CSS consumes var(--gp-motion-*), never a raw duration or curve.
   --gp-motion-ease-spring is NOT a new curve — it is the literal
   cubic-bezier(0.32, 0.72, 0, 1) already hardcoded in css/gp-surface.css
   (cover/sheet transitions); this reconciles that value onto a named token so
   gp-surface.css can consume it instead of forking a second spring. See
   docs/plans/2026-07-23-app-experience-motion.md §1.2 for the full rationale
   and citations. Only transform/opacity are animated anywhere motion tokens
   are used — see MOBILE_DESIGN_SYSTEM.md and the motion plan §1.1/§1.3.
   ============================================================================ */
:root {
    /* Durations — short by design; <100ms reads as instant, <250ms as responsive. */
    --gp-motion-duration-instant: 100ms;  /* tap feedback, micro-state; the "did it register" range */
    --gp-motion-duration-fast:    200ms;  /* tab crossfade, small state change, hover/focus */
    --gp-motion-duration-base:    300ms;  /* screen enter (cover push / sheet rise) — matches shipped gp-surface */
    --gp-motion-duration-slow:    400ms;  /* rare: large/complex reveal, app-load handoff only */

    /* Easing — the allowed curves. ease-out is the 80% default. */
    --gp-motion-ease-out:    cubic-bezier(0.4, 0, 0.2, 1);    /* default; decisive start, soft settle */
    --gp-motion-ease-in:     cubic-bezier(0.4, 0, 1, 1);      /* exits only (element leaving screen) */
    --gp-motion-ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);  /* symmetric moves */
    --gp-motion-ease-spring: cubic-bezier(0.32, 0.72, 0, 1);  /* iOS-sheet emphasis; ALREADY in gp-surface — adopt, do not fork */

    /* Composite shorthands (optional convenience; resolve to the above) */
    --gp-motion-tap:  transform var(--gp-motion-duration-instant) var(--gp-motion-ease-out);
    --gp-motion-fade: opacity var(--gp-motion-duration-fast) var(--gp-motion-ease-out);
}

/* Reduced motion — global, site-wide (harmless on the website, load-bearing in
   the app). Collapses every transition/animation to near-instant for users who
   set Reduce Motion, WITHOUT breaking end states: the opened sheet, the visible
   content, the error banner are all still fully present, just without the
   in-between motion. Generalizes the per-block reduced-motion guards already in
   css/gp-surface.css so no future animation can forget it. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Box-sizing — matches Kadence: html{box-sizing:border-box} *{box-sizing:inherit} */
html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* Body base — Poppins (loaded site-wide via gp-fonts-poppins), system stack as fallback.
   DS-2 #17 (2026-07-23): retokenized off raw hex — the page root now resolves through Tier-2
   (byte-identical in light: #1A202C/#ffffff are still exactly what render; dark-capable now that
   a surface opts into [data-theme="dark"]). Most templates override this with their own
   higher-specificity background (--gp-app, --gp-onboarding-page, --gp-profile-wrapper, etc.), so
   this fix mainly helps the routes that fall through to the bare gp-base layer (search, 404,
   plain Pages) — it does not change anything on already-styled templates. */
body {
    margin: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gp-color-text-strong); /* Kadence "Strongest text" (palette3) */
    background-color: var(--gp-color-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Media — matches Kadence: img{display:block;height:auto;max-width:100%} */
img {
    display: block;
    height: auto;
    max-width: 100%;
}

/* Headings — tight, structured scale tuned for Poppins (WS-2 Phase 5b).
   Owner-preferred compact sizes (h1 32 / h2 28 / h3 24 — the original Kadence sizes) with
   the modern treatment layered on, so they read STRUCTURED rather than shrunk:
     • TIGHT, descending line-heights (1.15 → 1.4) instead of the old uniform loose 1.5;
     • a WEIGHT LADDER — 700 for display h1/h2, 600 (semibold) for h3–h6, body stays 400;
     • slight NEGATIVE letter-spacing on the display sizes so Poppins reads crisp, not airy.
   Bare element selectors keep low specificity so per-page/block CSS still overrides.
   Colors retain the Phase-4 palette (palette3/4/5). WS-2.5 Task 4 TOKENIZED this — the values now
   live in the :root block at the top of this file; the rules below consume them. */
h1, h2, h3, h4, h5, h6 {
    padding: 0;
    margin: 0;
}
h1 { font-size: var(--gp-h1-size); line-height: var(--gp-h1-line); font-weight: var(--gp-h1-weight); letter-spacing: var(--gp-h1-tracking); color: var(--gp-h1-color); } /* palette3 */
h2 { font-size: var(--gp-h2-size); line-height: var(--gp-h2-line); font-weight: var(--gp-h2-weight); letter-spacing: var(--gp-h2-tracking); color: var(--gp-h2-color); }
h3 { font-size: var(--gp-h3-size); line-height: var(--gp-h3-line); font-weight: var(--gp-h3-weight); letter-spacing: var(--gp-h3-tracking); color: var(--gp-h3-color); }
h4 { font-size: var(--gp-h4-size); line-height: var(--gp-h4-line); font-weight: var(--gp-h4-weight); letter-spacing: var(--gp-h4-tracking); color: var(--gp-h4-color); } /* palette4 */
h5 { font-size: var(--gp-h5-size); line-height: var(--gp-h5-line); font-weight: var(--gp-h5-weight); color: var(--gp-h5-color); }
h6 { font-size: var(--gp-h6-size); line-height: var(--gp-h6-line); font-weight: var(--gp-h6-weight); color: var(--gp-h6-color); } /* palette5 */

/* Flow elements — mirror Kadence base spacing */
p {
    margin: 0 0 1.5em;
}
hr {
    height: 0;
    border: 0;
    border-bottom: 2px solid var(--gp-color-border); /* DS-2 #18: was raw #e5e5e5 — exact match to --gp-gray-200, byte-identical in light */
}
ul, ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}
ul { list-style: disc; }
ol { list-style: decimal; }
li > ul, li > ol {
    margin-bottom: 0;
    margin-left: 1.5em;
}
dt { font-weight: 700; }
dd { margin: 0 1.5em 1.5em; }
figure { margin: 0.5em 0; }
table {
    width: 100%;
    margin: 0 0 1.5em;
}

/* Links — accent gold, TOKENIZED 2026-06-13 (one-gold sweep; was the Kadence raw gold + a darker raw hover) */
a {
    color: var(--gp-color-accent);
    text-underline-offset: 0.1em;
    transition: color 0.1s linear;
}
a:hover, a:focus, a:active {
    color: var(--gp-gold-hover);
    text-underline-offset: 0.25em;
}

/* Forms & buttons — inherit type, sane normalization */
button, input, select, textarea {
    font: inherit;
    color: inherit;
}
button {
    cursor: pointer;
}

/* Shared avatar-initials placeholder tile — the purple-gradient (--gp-avatar-ph-bg)
   fallback rendered by gp_render_avatar() (inc/gp-helper-functions.php) everywhere a
   user has no real photo: never a gray/Gravatar silhouette, never a blank white box.
   gp_render_avatar() inlines width/height/font-size/background/color per-instance (the
   surfaces it drops into each already declare their OWN "no photo" background/sizing,
   so inlining is what makes this reliable regardless of any one surface's CSS); this
   class exists as a documented hook/marker, not the source of truth for those values. */
.gp-avatar--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--gp-avatar-ph-bg);
    color: var(--gp-white);
}
