/*
Theme Name:  Candide AI Hub
Theme URI:   https://github.com/candide-ai/candide-ai-hub
Author:      Candide Engineering
Author URI:  https://candide.example
Description: Block theme for the Candide AI Hub. Layout and styling are defined in theme.json + the templates/ + patterns/ directories.
Version:     0.1.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.2
License:     Proprietary
Text Domain: cah-theme
Tags:        block-theme, full-site-editing
*/

/* ========== EP-400 design tokens (T-EP01) ==========
   Source: docs/spec/brand-tokens-ep400.md
   Figma:  https://www.figma.com/design/RbzZT9K7oftHkCVPIQaiA4/EP-400-Candide-AI-Hub
           (node 97:4050 = stylesheet; node 57:2225 = design frames)

   Tier 1 = raw scales (brand-blue charcoal + brand-teal mint confirmed;
                        neutral / cream / utility APPROXIMATED — designer
                        confirms at T-EP22 aggregator review).
   Tier 2 = semantic role mappings pointing at Tier 1.
   Composite typography classes bundle family + size + line-height + weight
                                 + letter-spacing per ramp.

   The whole token block is inert until body.cah-ep400 is applied (T-EP19
   wires the body class). Until then this loads but renders nothing new.
   Workers in batch1 + batch2 reference tokens by slug only — corrected
   APPROX values drop in via a single Tier 1 commit later without ripple.
*/

@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('./assets/fonts/InstrumentSans-Variable.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('./assets/fonts/InstrumentSans-Italic-Variable.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/fonts/InstrumentSerif-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/fonts/InstrumentSerif-Italic.woff2') format('woff2');
}

:root {
    /* ---- Tier 1: brand-blue (charcoal grey-blue) ---- */
    --cah-t1-brand-blue-100: #8E98A8;
    --cah-t1-brand-blue-200: #BCBEC0;
    --cah-t1-brand-blue-300: #9C9EA1;
    --cah-t1-brand-blue-400: #6E7276;
    --cah-t1-brand-blue-500: #52575C;
    --cah-t1-brand-blue-600: #272D33;
    --cah-t1-brand-blue-700: #23292E;
    --cah-t1-brand-blue-800: #1C2024;
    --cah-t1-brand-blue-900: #15191C;

    /* ---- Tier 1: brand-teal (mint accent) ---- */
    --cah-t1-brand-teal-100: #E2F6EF;
    --cah-t1-brand-teal-200: #BEE8D9;
    --cah-t1-brand-teal-300: #9FDDC7;
    --cah-t1-brand-teal-400: #73CEAD;
    --cah-t1-brand-teal-500: #58C59D;
    --cah-t1-brand-teal-600: #2EB685;
    --cah-t1-brand-teal-700: #2AA679;
    --cah-t1-brand-teal-800: #21815E;
    --cah-t1-brand-teal-900: #196449;

    /* ---- Tier 1: neutral (APPROX — designer confirms) ---- */
    --cah-t1-neutral-white: #FFFFFF;
    --cah-t1-neutral-100: #F5F5F5;
    --cah-t1-neutral-200: #E5E5E5;
    --cah-t1-neutral-300: #D4D4D4;
    --cah-t1-neutral-400: #A0A0A0;
    --cah-t1-neutral-500: #737373;
    --cah-t1-neutral-600: #525252;
    --cah-t1-neutral-700: #404040;
    --cah-t1-neutral-800: #262626;
    --cah-t1-neutral-900: #171717;
    --cah-t1-neutral-black: #000000;

    /* ---- Tier 1: cream (APPROX) ---- */
    --cah-t1-brand-cream-100: #F8F4E8;

    /* ---- Tier 1: utility scales (APPROX) ---- */
    --cah-t1-utility-red-100: #FCE6E6;
    --cah-t1-utility-red-500: #C53030;
    --cah-t1-utility-red-600: #A02B2B;
    --cah-t1-utility-red-700: #8E2222;
    --cah-t1-utility-orange-100: #FAE9D5;
    --cah-t1-utility-orange-500: #E0993D;
    --cah-t1-utility-orange-600: #D38933;
    --cah-t1-utility-orange-700: #B97320;
    --cah-t1-utility-green-100: #DCEDD9;
    --cah-t1-utility-green-500: #4C8A4C;
    --cah-t1-utility-green-600: #3D7A4A;
    --cah-t1-utility-green-700: #2E5F2E;
    --cah-t1-utility-blue-100: #EEF1F4;
    --cah-t1-utility-blue-500: #52575C;
    --cah-t1-utility-blue-600: #23292E;
    --cah-t1-utility-blue-700: #1A1F23;

    /* ---- Tier 1: transparent ---- */
    --cah-t1-transparent-25: rgba(0, 0, 0, 0.25);
    --cah-t1-transparent-90: rgba(0, 0, 0, 0.90);

    /* ---- Tier 1: typography families ---- */
    --cah-t1-font-family-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --cah-t1-font-family-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

    /* ---- Tier 1: spacing scale (provisional defaults) ---- */
    --cah-t1-spacing-2: 2px;
    --cah-t1-spacing-4: 4px;
    --cah-t1-spacing-8: 8px;
    --cah-t1-spacing-12: 12px;
    --cah-t1-spacing-16: 16px;
    --cah-t1-spacing-20: 20px;
    --cah-t1-spacing-24: 24px;
    --cah-t1-spacing-32: 32px;
    --cah-t1-spacing-40: 40px;
    --cah-t1-spacing-48: 48px;
    --cah-t1-spacing-64: 64px;

    /* ---- Tier 1: border-radius scale (provisional) ---- */
    --cah-t1-radius-0: 0;
    --cah-t1-radius-2: 2px;
    --cah-t1-radius-4: 4px;
    --cah-t1-radius-8: 8px;
    --cah-t1-radius-12: 12px;
    --cah-t1-radius-pill: 999px;

    /* ---- Tier 2: background ---- */
    --cah-t2-bg-default: var(--cah-t1-neutral-white);
    --cah-t2-bg-default-hover: var(--cah-t1-neutral-100);
    --cah-t2-bg-subtle: var(--cah-t1-brand-blue-200);
    --cah-t2-bg-subtle-hover: var(--cah-t1-brand-blue-300);
    --cah-t2-bg-knockout: var(--cah-t1-brand-blue-600);
    --cah-t2-bg-disabled: var(--cah-t1-neutral-200);
    --cah-t2-bg-brand: var(--cah-t1-brand-teal-300);
    --cah-t2-bg-brand-hover: var(--cah-t1-brand-teal-400);
    --cah-t2-bg-brand-disabled: var(--cah-t1-neutral-200);
    --cah-t2-bg-brand-knockout: var(--cah-t1-brand-teal-500);
    --cah-t2-bg-brand-knockout-hover: var(--cah-t1-brand-teal-600);
    --cah-t2-bg-transparent-25: var(--cah-t1-transparent-25);
    --cah-t2-bg-transparent-90: var(--cah-t1-transparent-90);
    --cah-t2-bg-utility-error: var(--cah-t1-utility-red-100);
    --cah-t2-bg-utility-error-knockout: var(--cah-t1-utility-red-600);
    --cah-t2-bg-utility-warning: var(--cah-t1-utility-orange-100);
    --cah-t2-bg-utility-warning-knockout: var(--cah-t1-utility-orange-600);
    --cah-t2-bg-utility-success: var(--cah-t1-utility-green-100);
    --cah-t2-bg-utility-success-knockout: var(--cah-t1-utility-green-600);
    --cah-t2-bg-utility-info: var(--cah-t1-utility-blue-100);
    --cah-t2-bg-utility-info-knockout: var(--cah-t1-utility-blue-600);

    /* ---- Tier 2: content ---- */
    --cah-t2-content-default: var(--cah-t1-brand-blue-600);
    --cah-t2-content-default-hover: var(--cah-t1-brand-blue-700);
    --cah-t2-content-subtle: var(--cah-t1-neutral-700);
    --cah-t2-content-knockout: var(--cah-t1-brand-cream-100);
    --cah-t2-content-disabled: var(--cah-t1-neutral-700);
    --cah-t2-content-brand: var(--cah-t1-brand-teal-500);
    --cah-t2-content-brand-hover: var(--cah-t1-brand-teal-600);
    --cah-t2-content-brand-knockout: var(--cah-t1-brand-blue-100);
    --cah-t2-content-utility-error: var(--cah-t1-utility-red-700);
    --cah-t2-content-utility-warning: var(--cah-t1-utility-orange-700);
    --cah-t2-content-utility-success: var(--cah-t1-utility-green-700);
    --cah-t2-content-utility-info: var(--cah-t1-utility-blue-500);

    /* ---- Tier 2: border ---- */
    --cah-t2-border-default: var(--cah-t1-brand-blue-300);
    --cah-t2-border-default-hover: var(--cah-t1-brand-blue-400);
    --cah-t2-border-subtle: var(--cah-t1-neutral-300);
    --cah-t2-border-strong: var(--cah-t1-neutral-900);
    --cah-t2-border-knockout: var(--cah-t1-neutral-400);
    --cah-t2-border-disabled: var(--cah-t1-neutral-200);
    --cah-t2-border-brand: var(--cah-t1-brand-blue-700);
    --cah-t2-border-utility-error: var(--cah-t1-utility-red-700);
    --cah-t2-border-utility-warning: var(--cah-t1-utility-orange-700);
    --cah-t2-border-utility-success: var(--cah-t1-utility-green-700);
    --cah-t2-border-utility-info: var(--cah-t1-utility-blue-700);

    /* ---- Tier 2: button (outlined default) ---- */
    --cah-t2-btn-bg-default: var(--cah-t1-neutral-white);
    --cah-t2-btn-bg-hover: var(--cah-t1-neutral-white);
    --cah-t2-btn-bg-active: var(--cah-t1-neutral-white);
    --cah-t2-btn-bg-disabled: var(--cah-t1-neutral-white);
    --cah-t2-btn-content-default: var(--cah-t1-brand-blue-600);
    --cah-t2-btn-content-hover: var(--cah-t1-brand-blue-800);
    --cah-t2-btn-content-active: var(--cah-t1-brand-blue-800);
    --cah-t2-btn-content-disabled: var(--cah-t1-neutral-500);
    --cah-t2-btn-border-default: var(--cah-t1-brand-blue-600);
    --cah-t2-btn-border-hover: var(--cah-t1-brand-blue-700);
    --cah-t2-btn-border-active: var(--cah-t1-brand-blue-700);
    --cah-t2-btn-border-disabled: var(--cah-t1-neutral-400);

    /* ---- Tier 2: button (primary — solid dark pill) ---- */
    --cah-t2-btn-primary-bg-default: var(--cah-t1-brand-blue-600);
    --cah-t2-btn-primary-bg-hover: var(--cah-t1-brand-blue-700);
    --cah-t2-btn-primary-bg-active: var(--cah-t1-brand-blue-700);
    --cah-t2-btn-primary-bg-disabled: var(--cah-t1-neutral-500);
    --cah-t2-btn-primary-content-default: var(--cah-t1-neutral-white);
    --cah-t2-btn-primary-content-hover: var(--cah-t1-neutral-white);
    --cah-t2-btn-primary-content-active: var(--cah-t1-neutral-white);
    --cah-t2-btn-primary-content-disabled: var(--cah-t1-neutral-white);
    --cah-t2-btn-primary-border-default: var(--cah-t1-brand-blue-600);
    --cah-t2-btn-primary-border-hover: var(--cah-t1-brand-blue-700);
    --cah-t2-btn-primary-border-active: var(--cah-t1-brand-blue-700);
    --cah-t2-btn-primary-border-disabled: var(--cah-t1-neutral-400);

    /* ---- Tier 2: focus-ring ---- */
    --cah-t2-focus-ring-border-default: var(--cah-t1-brand-blue-500);
    --cah-t2-focus-ring-border-knockout: var(--cah-t1-neutral-white);

    /* ---- Tier 2: form ---- */
    --cah-t2-form-bg-default: var(--cah-t1-neutral-white);
    --cah-t2-form-bg-focus: var(--cah-t1-neutral-white);
    --cah-t2-form-bg-hover: var(--cah-t1-neutral-white);
    --cah-t2-form-bg-active: var(--cah-t1-neutral-white);
    --cah-t2-form-border-default: var(--cah-t1-neutral-500);
    --cah-t2-form-border-focus: var(--cah-t1-neutral-black);
    --cah-t2-form-border-hover: var(--cah-t1-neutral-black);
    --cah-t2-form-border-active: var(--cah-t1-neutral-black);

    /* ---- Tier 2: link (on light surface) ---- */
    --cah-t2-link-content-default: var(--cah-t1-brand-blue-600);
    --cah-t2-link-content-hover: var(--cah-t1-brand-blue-900);
    --cah-t2-link-content-active: var(--cah-t1-brand-blue-900);
    --cah-t2-link-content-visited: var(--cah-t1-brand-blue-600);

    /* ---- Tier 2: link (knockout — on dark surface) ---- */
    --cah-t2-link-knockout-content-default: var(--cah-t1-brand-blue-100);
    --cah-t2-link-knockout-content-hover: var(--cah-t1-brand-blue-200);
    --cah-t2-link-knockout-content-active: var(--cah-t1-brand-blue-200);
    --cah-t2-link-knockout-content-visited: var(--cah-t1-brand-blue-300);
}

/* ---- Composite typography classes (Tier 2) ---- */
.cah-c-display-default {
    font-family: var(--cah-t1-font-family-serif);
    font-size: 80px;
    line-height: 92px;
    font-weight: 400;
    letter-spacing: -0.02em;
}
.cah-c-display-default-mobile {
    font-family: var(--cah-t1-font-family-serif);
    font-size: 56px;
    line-height: 64px;
    font-weight: 400;
    letter-spacing: -0.02em;
}
.cah-c-display-sm {
    font-family: var(--cah-t1-font-family-serif);
    font-size: 56px;
    line-height: 64px;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.cah-c-display-sm-mobile {
    font-family: var(--cah-t1-font-family-serif);
    font-size: 40px;
    line-height: 48px;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.cah-c-headline-lg {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 32px;
    line-height: 40px;
    font-weight: 400;
}
.cah-c-headline-default {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
}
.cah-c-headline-sm {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 20px;
    line-height: 28px;
    font-weight: 400;
}
.cah-c-headline-xs {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}
.cah-c-title-lg {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 40px;
    line-height: 48px;
    font-weight: 400;
}
.cah-c-title-default {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}
.cah-c-title-sm {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}
.cah-c-body-lg {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
}
.cah-c-body-default {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}
.cah-c-body-sm {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}
.cah-c-label-lg {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}
.cah-c-label-default {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}
.cah-c-label-sm {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
}
.cah-c-label-xs {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 10px;
    line-height: 14px;
    font-weight: 400;
}
.cah-c-meta-lg {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}
.cah-c-meta-default {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}
.cah-c-meta-sm {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 9px;
    line-height: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* ---- body.cah-ep400 activates EP-400 across the page (wired by T-EP19) ---- */
body.cah-ep400 {
    background: var(--cah-t2-bg-default);
    color: var(--cah-t2-content-default);
    font-family: var(--cah-t1-font-family-sans);
}
body.cah-ep400 a {
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
}
body.cah-ep400 a:hover {
    color: var(--cah-t2-link-content-hover);
}

/* T-UI07: Top-10 retired the hex border for a card tile.
   ---- T-EP04/T-UI07 — Top 10 Most Used AI Tools (EP-400) ----
   5-col grid on desktop (>=1024px), 2-col tablet (>=600px), 1-col mobile.
   Each cell is a card tile: the tool icon in a soft rounded-square on
   `bg-subtle`, the 14px tool name (`.cah-c-label-default`) INSIDE a bordered
   white card. Section heading is the meta-lg eyebrow ramp. Markup lives in
   parts-php/top-tools.php; data via Candide\CAH\Core\TopToolsBlock (T-UX33).
   NOTE: the `.cah-top-tools-*` selectors are bare (NOT scoped under
   body.cah-ep400) and fire regardless of the body class — grep confirms they
   are used ONLY by this surface, so the in-place card swap is self-contained.
*/
.cah-top-tools {
    margin: 0;
    padding: 0;
    /* No horizontal overflow at 1024×768 — the row keeps each hex column
       within its grid track and the grid itself never exceeds the
       constrained parent width. */
    max-width: 100%;
    overflow: visible;
}
.cah-top-tools-eyebrow {
    margin: 0 0 var(--cah-t1-spacing-16);
    color: var(--cah-t2-content-subtle);
}
.cah-top-tools-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* 1-col mobile baseline. */
    grid-template-columns: 1fr;
    column-gap: var(--cah-t1-spacing-16);
    row-gap: var(--cah-t1-spacing-24);
}
@media (min-width: 600px) {
    .cah-top-tools-grid {
        /* Tablet — 2-col. */
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .cah-top-tools-grid {
        /* Desktop — 5-col, 2 rows × 5 cells = 10. minmax(0,…) lets each
           cell shrink below the hex intrinsic width on tight viewports
           without forcing horizontal scroll. */
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
.cah-top-tools-cell {
    margin: 0;
    padding: 0;
}
/* Card tile — white surface, 1px border, radius-12, padding. Mirrors the
   EP-400 toolkit/champion card recipe so the row reads as a grid of cards. */
.cah-top-tools-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--cah-t1-spacing-12);
    padding: var(--cah-t1-spacing-16) var(--cah-t1-spacing-12);
    text-align: center;
    text-decoration: none;
    color: var(--cah-t2-content-default);
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-12, 12px);
    transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}
.cah-top-tools-link:hover,
.cah-top-tools-link:focus-visible {
    border-color: var(--cah-t2-border-default-hover);
    color: var(--cah-t2-content-default-hover);
    text-decoration: none;
}
/* Icon container — soft rounded-square on bg-subtle (replaces the hex). */
.cah-top-tools-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: var(--cah-t1-radius-12, 12px);
    background: var(--cah-t2-bg-subtle);
}
.cah-top-tools-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: var(--cah-t1-radius-4, 4px);
}
.cah-top-tools-initial {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 20px;
    line-height: 24px;
    font-weight: 600;
    color: var(--cah-t2-content-default);
}
.cah-top-tools-name {
    display: block;
    color: var(--cah-t2-content-default);
    font-weight: 500; /* 14px medium per acceptance — composite class is 400 */
    /* Long brand names truncate gracefully instead of forcing a wider track. */
    overflow-wrap: anywhere;
}
/* /T-UI07 */

/* ========== /EP-400 design tokens ========== */

/* ---------- Header: top nav (T-V06) ---------- */

.cah-brand:hover,
.cah-nav-brand:hover { opacity: 0.85; }

/* Nav container — matches B1 mockup `.topnav` (lines 18-29). */
.cah-topnav {
    background: var(--wp--preset--color--surface);
    border-bottom: 1px solid var(--wp--preset--color--border);
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 0;
}

/* T-UX25 — sticky-nav fix. The header is rendered through
   `wp:template-part`, and WP core's render_block_core_template_part()
   wraps the part's content in its own `<header class="wp-block-template-part">`
   element. That wrapper — not `.wp-site-blocks` — is `.cah-topnav`'s parent,
   i.e. its sticky containing block. The wrapper is only as tall as the nav
   plus the comb strip (~84px), so `position: sticky` had almost no travel
   range and un-stuck after ~24px of scroll.
   `display: contents` removes the wrapper's box from the layout tree, so
   `.cah-topnav` (and the comb strip) become layout-children of the full-height
   `.wp-site-blocks` and the nav stays pinned for the whole page scroll.
   CSS-only — `theme.json` `useRootPaddingAwareAlignments` is not the cause. */
.wp-block-template-part:has(> .cah-topnav) {
    display: contents;
}

.cah-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 40px;
}

.cah-nav-brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.cah-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.cah-nav-link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--wp--preset--color--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.cah-nav-link:hover {
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--primary);
}

.cah-nav-link.is-active,
.cah-nav-link[aria-current="page"] {
    color: var(--wp--preset--color--primary);
    background: var(--wp--preset--color--primary-tint);
    font-weight: 600;
}

.cah-nav-link.is-disabled {
    color: #c0b9ae;
    cursor: not-allowed;
    pointer-events: none;
}

.cah-nav-soon {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #f0ece6;
    color: var(--wp--preset--color--text-faint);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 5px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.cah-nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* ---------- "Need Help" nav button (T-UX40) ----------
   Sits in `.cah-nav-right`, left of the estate/user dropdown. A pill
   button — same 20px radius as `.cah-estate-badge` — so the right
   cluster reads as one consistent group. The `.is-beehive` override
   below recolours it for the green-deep banner. */
.cah-nav-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--wp--preset--color--border);
    background: transparent;
    color: var(--wp--preset--color--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cah-nav-help:hover {
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
}

/* ---------- Dark banner variant (T-V11) ---------- */

.cah-topnav.is-dark {
    background: var(--wp--preset--color--ink-deep);
    border-bottom-color: var(--wp--preset--color--ink-deeper);
    color: #f1ece0;
}

.cah-topnav.is-dark .cah-nav-brand-logo {
    /* invert the dark-on-cream wordmark to render solid white */
    filter: brightness(0) invert(1);
}

.cah-topnav.is-dark .cah-nav-link               { color: rgba(255, 255, 255, 0.72); }
.cah-topnav.is-dark .cah-nav-link:hover         { background: rgba(255, 255, 255, 0.06); color: #fff; }
.cah-topnav.is-dark .cah-nav-link.is-active,
.cah-topnav.is-dark .cah-nav-link[aria-current="page"] { background: rgba(255, 255, 255, 0.10); color: #fff; }
.cah-topnav.is-dark .cah-nav-link.is-disabled   { color: rgba(255, 255, 255, 0.34); }
.cah-topnav.is-dark .cah-nav-soon               { background: rgba(255, 255, 255, 0.10); color: rgba(255, 255, 255, 0.72); }
.cah-topnav.is-dark .cah-estate-badge           { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.18); color: #f1ece0; }
.cah-topnav.is-dark .cah-user-btn               { color: #f1ece0; }
.cah-topnav.is-dark .cah-user-btn:hover         { background: rgba(255, 255, 255, 0.06); }
.cah-topnav.is-dark .cah-user-name              { color: #f1ece0; }
/* T-UI05: estate name moved INSIDE the button (T-UI06) — without this it
   inherits the body text colour and is invisible on the green-deep banner. */
.cah-topnav.is-dark .cah-user-estate            { color: rgba(255, 255, 255, 0.65); }
/* /T-UI05 */
.cah-topnav.is-dark .cah-chevron                { color: rgba(255, 255, 255, 0.6); }

/* Focus ring for keyboard users — browser default contrast is poor on dark surfaces */
.cah-topnav.is-dark .cah-nav-link:focus-visible,
.cah-topnav.is-dark .cah-nav-help:focus-visible,
.cah-topnav.is-dark .cah-user-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

/* ---------- Beehive redesign (T-UX08) ----------
   Sits on top of `.is-dark` — overrides the bg with the deeper
   #0F2A1F (green-deep) and replaces the raster bee-wordmark with the
   inline SVG hive logo. Decoupled from `.is-dark` so the previous
   `is-dark` rules keep working anywhere they're applied without the
   beehive variant. */

.cah-topnav.is-beehive {
    /* T-EP02 — repoint nav dark surface from forest-green (T-UX43) to the
       EP-400 charcoal grey-blue Tier 2 `bg/knockout` token (= brand/blue/600
       `#272D33`). Tokens consumed by slug; raw hex stays in style.css :root
       only (T-EP01 token foundation block at top of file). */
    background: var(--cah-t2-bg-knockout);
    border-bottom: none;
    /* Mockup `ep400/home-desktop-wide.png`: 16px vertical, 40px horizontal padding. */
    padding: var(--cah-t1-spacing-16) var(--cah-t1-spacing-40);
    min-height: 0;
    font-family: var(--cah-t1-font-family-sans);
}

.cah-topnav.is-beehive .cah-nav-brand--hive {
    margin-right: var(--cah-t1-spacing-32);
    line-height: 0;        /* image aligns to baseline; kill stray descender */
}

/* T-EP02 — horizontal bee + BEEHIVE lockup (133×30) replaces the stacked
   inline SVG hive-mark used by T-UX43. The image is the canonical
   beehive-logo-inverted.svg shipped by T-EP00 (Tier 1 brand asset).
   `.cah-hive-logo` rule kept as a hidden no-op for any consumer outside
   the EP-400 nav that still inlines the old SVG (none in this repo at
   ship time — grep confirmed). */
.cah-topnav.is-beehive .cah-nav-brand-logo {
    width: 133px;
    height: 30px;
    display: block;
}

/* Nav links — EP-400 knockout palette. Default = `content/knockout` cream
   tier muted to ~60% via color-mix so the active state can step up to
   solid cream. Active/hover land on full `content/knockout`. */
.cah-topnav.is-beehive .cah-nav-link {
    color: color-mix(in srgb, var(--cah-t2-content-knockout) 60%, transparent);
    font-family: var(--cah-t1-font-family-sans);
}
.cah-topnav.is-beehive .cah-nav-link:hover {
    background: transparent;
    color: var(--cah-t2-content-knockout);
}
.cah-topnav.is-beehive .cah-nav-link.is-active,
.cah-topnav.is-beehive .cah-nav-link[aria-current="page"] {
    background: transparent;
    color: var(--cah-t2-content-knockout);
}
.cah-topnav.is-beehive .cah-nav-link.is-disabled {
    color: color-mix(in srgb, var(--cah-t2-content-knockout) 40%, transparent);
}

/* Coming-Soon badge — meta/sm composite per plan §3.1 line 464: 10px / 700 /
   uppercase / letter-spacing 0.16em / 1px `border-knockout` outline / pill
   radius. Lives adjacent to the parent `.cah-nav-link.is-disabled` label. */
.cah-topnav.is-beehive .cah-nav-soon {
    background: transparent;
    color: var(--cah-t2-content-subtle);
    border: 1px solid var(--cah-t2-border-knockout);
    border-radius: var(--cah-t1-radius-pill);
    padding: 2px 6px;
    margin-left: var(--cah-t1-spacing-8);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 1;
}

/* T-EP02 — "Need help?" pill: outlined-on-dark per EP-400 mockup. Replaces
   the green-filled treatment from T-UX40. Transparent fill, 1px
   `border/knockout` (neutral/400), `content/knockout` (cream/100) text,
   pill radius. Hover deepens the surface to a faint cream wash. */
.cah-topnav.is-beehive .cah-nav-help {
    background: transparent;
    border: 1px solid var(--cah-t2-border-knockout);
    border-radius: var(--cah-t1-radius-pill);
    color: var(--cah-t2-content-knockout);
    font-family: var(--cah-t1-font-family-sans);
}
.cah-topnav.is-beehive .cah-nav-help:hover {
    background: color-mix(in srgb, var(--cah-t2-content-knockout) 8%, transparent);
    border-color: var(--cah-t2-content-knockout);
    color: var(--cah-t2-content-knockout);
}

/* T-EP02 — user-dropdown hex avatar on the EP-400 nav. `.is-ep400` class is
   set by NavUserDropdown when the nav variant is in play (see
   `cah-core/src/NavUserDropdown.php`). Override fills the hex with
   `brand/blue/800` (= `#1C2024`, one step darker than the surrounding
   `bg/knockout`) + white initial in Instrument Sans 700 — the
   knockout-on-knockout reads as a defined badge against the nav surface.
   The estate-coloured fallback (`.cah-user-avatar.estate-*` from T-UX22)
   still wins on non-EP400 surfaces because the `.is-ep400` qualifier is
   absent there. */
.cah-topnav.is-beehive .cah-user-avatar.is-ep400 {
    background: var(--cah-t1-brand-blue-800);
    color: var(--cah-t1-neutral-white);
    font-family: var(--cah-t1-font-family-sans);
    font-weight: 700;
}

/* Honeycomb strip — sits directly under the nav. Static SVG; pure
   decoration, hidden from AT via aria-hidden on the wrapper. */
.cah-comb-strip {
    height: 24px;
    background: var(--wp--custom--beehive--green-deep);
    position: relative;
    overflow: hidden;
}
.cah-comb-strip svg {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 24px;
}

@media (max-width: 900px) {
    .cah-topnav.is-beehive {
        padding: 14px 20px;
    }
    .cah-hive-logo {
        height: 38px;
    }
}

/* ---------- Masthead (T-UX08) ----------
   Mockup `.masthead` lines 105-127: centred hex icon → serif H1 →
   italic strap. Wraps the existing welcome-greeting block so the
   redesign visual lands without rewriting the personalisation logic. */

.cah-masthead {
    text-align: center;
    padding: 56px 40px 40px;
    border-bottom: 0.5px solid var(--wp--custom--beehive--border);
}

.cah-masthead-hex {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
    line-height: 0;
}
/* T-UX34 — official Beehive logo (assets/img/hive-logo.svg).
   T-UX43 — v2 logo is a tall stacked lockup (viewBox 0 0 22 31); sized by
   height (50px) to keep the masthead footprint close to the v1 mark while
   the bee-in-hive + "HIVE" wordmark read cleanly. */
.cah-masthead-logo {
    width: auto;
    height: 50px;
}

.cah-masthead-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 46px;
    font-weight: 400;
    letter-spacing: -0.8px;
    line-height: 1.05;
    margin: 0 0 12px;
    color: var(--wp--custom--beehive--text-primary);
}

.cah-masthead-strap {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 600px;
    color: var(--wp--custom--beehive--text-secondary);
}

/* T-UX34 — one-sentence Hive explainer directly below the strap. Mirrors
   the `.cah-masthead-strap` treatment so the two read as one block; an 8px
   top gap separates the sentences without breaking the masthead rhythm. */
.cah-masthead-intro {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    line-height: 1.55;
    margin: 8px auto 0;
    max-width: 600px;
    color: var(--wp--custom--beehive--text-secondary);
}

@media (max-width: 900px) {
    .cah-masthead { padding: 36px 20px 28px; }
    .cah-masthead-title { font-size: 34px; }
}
@media (max-width: 520px) {
    .cah-masthead-title { font-size: 26px; }
}

/* ---------- Taxonomy chips ---------- */

.cah-category-chip {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp--preset--color--primary);
}
.cah-category-chip a { color: inherit; text-decoration: none; }
.cah-category-chip a:hover { text-decoration: underline; }

.cah-tag-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
}
.cah-tag-list a {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--wp--preset--color--primary-tint);
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    font-weight: 500;
}
.cah-tag-list a:hover { background: var(--wp--preset--color--primary-tint-2); }

/* ---------- Status badges ---------- */

.cah-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}
.cah-status-badge.is-pending,
.cah-status-badge[data-status="pending"] {
    background: var(--wp--preset--color--status-pending-bg);
    color: var(--wp--preset--color--status-pending);
}
.cah-status-badge.is-published,
.cah-status-badge[data-status="published"] {
    background: var(--wp--preset--color--status-published-bg);
    color: var(--wp--preset--color--status-published);
}
.cah-status-badge.is-archived,
.cah-status-badge[data-status="archived"],
.cah-status-badge.is-archive {
    background: var(--wp--preset--color--status-archive-bg);
    color: var(--wp--preset--color--status-archive);
}
.cah-status-badge.is-planned {
    background: var(--wp--preset--color--status-pending-bg);
    color: var(--wp--preset--color--status-pending);
}

/* ---------- Tool / Champion cards (T-V02 mirrors C1 mockup lines 70-99) ---------- */

.cah-tool-card,
.cah-champion-card {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
    min-height: 230px;
    position: relative;
}

/* Stretched-link: title anchor expands to cover the card so clicks anywhere
   on the card open the tool. Keyboard users still tab to one real anchor.
   Elements that need their own hover/tooltip sit above the overlay via z-index. */
.cah-tool-card .cah-card-name a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}
.cah-tool-card .cah-estate-dots { position: relative; z-index: 1; }

.cah-tool-card:hover,
.cah-champion-card:hover {
    /* T-UX36: hover "pop" parity with the homepage `.cah-hub-card:hover`
       (lines ~827-830) — lift + shadow copied verbatim so Toolkit and
       Champion cards match the stronger homepage hub-card pop. The sage
       `#c8dbd4` hover border is kept from the original mockup C1:71
       treatment (no theme.json token — sage sits between primary-tint
       and primary — so inline). */
    border-color: #c8dbd4;
    transform: translateY(-3px); /* matches .cah-hub-card:hover lift */
    box-shadow: 0 6px 20px rgba(15, 42, 31, 0.12); /* matches .cah-hub-card:hover shadow */
}

.cah-tool-card h3 a,
.cah-champion-card h3 {
    color: var(--wp--preset--color--text-strong);
    text-decoration: none;
}
.cah-tool-card h3 a:hover { color: var(--wp--preset--color--primary); }

.cah-tool-card .cah-card-name {
    font-family: var(--wp--preset--font-family--serif);
    font-size: 15px;
    font-weight: 400;
    color: var(--wp--preset--color--text-strong);
    line-height: 1.3;
    margin: 2px 0 0 0;
}
.cah-tool-card .cah-card-name a { color: inherit; text-decoration: none; }
.cah-tool-card .cah-card-name a:hover { color: var(--wp--preset--color--primary); }

.cah-tool-card .cah-card-provider {
    font-size: 11.5px;
    color: var(--wp--preset--color--text-faint);
    margin-top: 2px;
}

.cah-tool-card .cah-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.cah-tool-card .cah-card-desc {
    font-size: 12.5px;
    color: #6b6259; /* mockup C1:82 — sits between text and text-muted, no exact token */
    line-height: 1.55;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cah-tool-card .cah-category-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 4px;
    background: var(--wp--preset--color--primary-tint);
    color: var(--wp--preset--color--primary);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: none;
}

.cah-tool-card.is-planned {
    border-style: dashed;
    border-color: var(--wp--preset--color--border-strong);
}

/* ---------- Tool logo (T-UX03 — single-tool view; card variant lives
   inline in parts-php/tool-card.php so it ships with the dynamic block) ---------- */

.cah-tool-head {
    display: flex;
    align-items: center;
    gap: 20px;
}
.cah-tool-head-meta { flex: 1 1 auto; min-width: 0; }

.cah-tool-logo--single {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    border-radius: 8px;
    background: var(--wp--preset--color--surface-2);
    object-fit: contain;
    padding: 6px;
    border: 1px solid var(--wp--preset--color--border);
}

@media (max-width: 600px) {
    .cah-tool-head { gap: 12px; }
    .cah-tool-logo--single {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
    }
}

/* ---------- Card row groups ---------- */

.cah-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--wp--preset--color--border);
}

/* ---------- Estate dots ---------- */

.cah-estate-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.cah-estate-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--wp--preset--color--text-faint);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.cah-estate-count {
    font-size: 0.6875rem;
    color: var(--wp--preset--color--text-subtle);
    margin-left: 4px;
}

.cah-estate-dot.estate-candide { background: var(--wp--preset--color--estate-candide); }
.cah-estate-dot.estate-babylonstoren { background: var(--wp--preset--color--estate-babylonstoren); }
.cah-estate-dot.estate-the-newt-in-somerset { background: var(--wp--preset--color--estate-newt); }
.cah-estate-dot.estate-vignamaggio { background: var(--wp--preset--color--estate-vignamaggio); }
.cah-estate-dot.estate-over-amstel-boerderij { background: var(--wp--preset--color--estate-overamstel); }
.cah-estate-dot.estate-the-story-of-emily { background: var(--wp--preset--color--estate-emily); }
.cah-estate-dot.estate-plataeon { background: var(--wp--preset--color--estate-plataeon); }

/* ---------- Star rating ---------- */

.cah-stars {
    display: inline-flex;
    gap: 2px;
    font-size: 0.875rem;
    line-height: 1;
    color: var(--wp--preset--color--rating-gold);
    letter-spacing: 1px;
}
.cah-stars .cah-star-empty { color: var(--wp--preset--color--border-strong); }
.cah-stars-label {
    margin-left: 6px;
    color: var(--wp--preset--color--text-muted);
    font-size: 0.75rem;
}

/* ---------- Champion card (T-V03 mirrors D1 mockup lines 69-127) ---------- */

.cah-champion-card {
    /* shared base from .cah-tool-card,.cah-champion-card above; override
       padding (mockup D1:73 = 22px 20px, not 20px 20px) and gap (D1:76 = 14px) */
    padding: 22px 20px;
    gap: 14px;
    min-height: 0; /* champion cards size to content; tool grid alignment doesn't apply */
}

.cah-champion-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    /* T-UX12: hex-clipped avatar per beehive-redesign mockup .champ-avatar
       (lines 640-648). 56×64.7 desktop / 48×55.4 mobile (ratio 1/1.155).
       Initials are cream on the per-estate accent fill — weight 600 ensures
       legibility on the deep estate fills (see design-extension-brief). */
    width: 56px;
    height: 65px;
    color: var(--wp--custom--beehive--cream);
    font-family: var(--wp--preset--font-family--sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0;
    background: var(--wp--preset--color--primary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    flex-shrink: 0;
}
@media (max-width: 700px) {
    .cah-champion-avatar {
        width: 48px;
        height: 55px;
        font-size: 14px;
    }
}
/* T-UI01: legacy per-estate avatar fills. These are bare selectors that
   previously only lost to EP-400's `transparent` rule by source order
   (the "lingering legacy theme" trap). Scope them `body:not(.cah-ep400)`
   so the EP-400 stylesheet unambiguously owns the hex avatar surface. */
body:not(.cah-ep400) .cah-champion-avatar.estate-candide { background: var(--wp--preset--color--estate-candide); }
body:not(.cah-ep400) .cah-champion-avatar.estate-babylonstoren { background: var(--wp--preset--color--estate-babylonstoren); }
body:not(.cah-ep400) .cah-champion-avatar.estate-the-newt-in-somerset { background: var(--wp--preset--color--estate-newt); }
body:not(.cah-ep400) .cah-champion-avatar.estate-vignamaggio { background: var(--wp--preset--color--estate-vignamaggio); }
body:not(.cah-ep400) .cah-champion-avatar.estate-over-amstel-boerderij { background: var(--wp--preset--color--estate-overamstel); }
body:not(.cah-ep400) .cah-champion-avatar.estate-the-story-of-emily { background: var(--wp--preset--color--estate-emily); }
body:not(.cah-ep400) .cah-champion-avatar.estate-plataeon { background: var(--wp--preset--color--estate-plataeon); }
/* /T-UI01 */

/* Estate brandmark logo inside the hex avatar — Recent Activity rows +
   Champion cards. `.has-logo` is set by activity-feed.php / champion-card.php
   when cah_estate_logo_url() resolves an asset; otherwise the initials
   fallback renders on the original fill. The logo sits on the warm
   honey-pale cell so a full-colour brandmark reads cleanly regardless of
   the per-estate accent. Specificity ties the per-estate `background`
   rules above; this rule is source-ordered after them so it wins. */
.cah-activity-avatar.has-logo,
.cah-champion-avatar.has-logo {
    background: var(--wp--custom--beehive--honey-pale);
}
.cah-activity-avatar img,
.cah-champion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* keep the brandmark inside the hexagon's safe inner zone — the
       clip-path on the container would otherwise shave the logo corners */
    padding: 18%;
    box-sizing: border-box;
}
/* T-UX46: group-level ("The group") activity rows use the Beehive bee
   mark. The bee glyph is a single compact shape — lighter than the
   estate brandmarks — so it sits with slightly less inset to read at a
   comparable weight inside the hexagon. Sits on the same honey-pale
   `.has-logo` fill (NORMAL dark-navy mark, per ADR-0019). */
.cah-activity-avatar.is-group-logo img {
    padding: 13%;
}

.cah-champion-card h3.cah-champ-name {
    /* Mockup D1:94-100: serif 16px/400/1.3, text-strong */
    font-family: var(--wp--preset--font-family--serif);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--wp--preset--color--text-strong);
    margin: 0;
}
/* T-UX48: the champion name links to the detail page (archive + search
   result cards). Inherit the h3 colour so the card layout is unchanged. */
.cah-champion-card h3.cah-champ-name a {
    color: inherit;
    text-decoration: none;
}
.cah-champion-card h3.cah-champ-name a:hover { text-decoration: underline; }
.cah-champion-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cah-champion-card .cah-champ-team {
    /* Mockup D1:116-119: 12.5px #6b6259 (no uppercase, despite acceptance) */
    font-size: 12.5px;
    color: #6b6259;
    text-transform: none;
    letter-spacing: 0;
}
.cah-champion-card .cah-champ-estate-badge {
    /* T-DR04 — champions-archive.png mockup: estate badge is a teal-OUTLINED
       pill (transparent surface, teal border + teal text), not a filled chip. */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 3px 10px;
    border-radius: 999px;
    width: fit-content;
    background: transparent;
    color: var(--cah-t1-brand-teal-700);
    border: 1px solid var(--cah-t1-brand-teal-400);
}
.cah-champion-card a.cah-mailto {
    /* Mockup D1:121-126 */
    display: inline-block;
    font-size: 12.5px;
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    word-break: break-all;
}
.cah-champion-card a.cah-mailto:hover { text-decoration: underline; }

/* ---------- Admin warning panel (T-V04: mirrors C1 mockup .admin-note line 114) ---------- */

.cah-admin-warning {
    background: var(--wp--preset--color--amber-warn-bg);
    border: 1px solid var(--wp--preset--color--amber-warn-border);
    border-left: 4px solid var(--wp--preset--color--amber-warn-border);
    border-radius: 8px;
    padding: 16px;
    color: var(--wp--preset--color--amber-warn);
    font-size: 0.8125rem; /* 13px — matches mockup line 114 */
    line-height: 1.5;
}
.cah-admin-warning strong { color: var(--wp--preset--color--amber-warn); font-weight: 600; }

/* ---------- Aggregate stats bar (T-V04: per ticket acceptance — border-top + border-bottom, 24px serif values) ---------- */

.cah-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--wp--preset--color--border);
    border-bottom: 1px solid var(--wp--preset--color--border);
    margin: 16px 0 24px;
}
.cah-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cah-stat-value {
    font-family: var(--wp--preset--font-family--serif);
    font-size: 1.5rem; /* 24px */
    font-weight: 400;
    color: var(--wp--preset--color--text-strong);
    line-height: 1;
}
.cah-stat-label {
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    color: var(--wp--preset--color--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Per-estate submission card (T-V04: mirrors C1 mockup .submission-card lines 128-145) ---------- */

.cah-submission-card {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.cah-submission-card:last-child { margin-bottom: 0; }
.cah-submission-card .cah-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.cah-submission-card .cah-sub-estate {
    font-weight: 600;
    font-size: 0.875rem; /* 14px */
    color: var(--wp--preset--color--text-strong);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cah-submission-card .cah-sub-team {
    font-size: 0.75rem; /* 12px */
    font-weight: 400;
    color: var(--wp--preset--color--text-subtle);
}
.cah-submission-card .cah-sub-licence {
    font-size: 0.75rem; /* 12px */
    color: var(--wp--preset--color--text-muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--wp--preset--color--border);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.cah-submission-card .cah-sub-licence strong {
    color: var(--wp--preset--color--text-strong);
    font-weight: 600;
}
.cah-submission-card .cah-sub-usecases {
    font-size: 0.8125rem; /* 13px — mockup .sub-field p line 140 */
    color: var(--wp--preset--color--text);
    line-height: 1.5;
}
.cah-submission-card .cah-sub-usecases-label {
    margin: 0 0 4px 0;
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp--preset--color--text-subtle);
}
.cah-submission-card .cah-sub-usecases-body {
    margin: 0;
}
.cah-submission-card .cah-sub-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--wp--preset--color--border);
    font-size: 0.8125rem;
    color: var(--wp--preset--color--text);
}
.cah-submission-card .cah-sub-details > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--wp--preset--color--text-subtle);
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cah-submission-card .cah-sub-details > summary::-webkit-details-marker { display: none; }
.cah-submission-card .cah-sub-details > summary::before {
    content: "▸";
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}
.cah-submission-card .cah-sub-details[open] > summary::before { transform: rotate(90deg); }
.cah-submission-card .cah-sub-details-list {
    margin: 10px 0 0 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 14px;
    row-gap: 6px;
    line-height: 1.5;
}
.cah-submission-card .cah-sub-details-list dt {
    font-weight: 600;
    color: var(--wp--preset--color--text-strong);
}
.cah-submission-card .cah-sub-details-list dd { margin: 0; }

/* ---------- Home: section labels (T-V05 mirrors B1 mockup lines 279-286) ---------- */

.cah-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-faint);
    margin-bottom: 14px;
}

/* ---------- Home: welcome header ----------
   T-UX23: the pre-redesign T-V05 `.cah-welcome-*` typography rules sat here
   and overrode `.cah-masthead-*` at equal specificity (pinning the title at
   26px). They are retired — the masthead block (see "Masthead (T-UX08)"
   above) is now the single source of the centred Beehive treatment. The
   `cah/welcome-greeting` wrapper carries both `.cah-welcome-header` and
   `.cah-masthead`; `.cah-masthead` owns its padding + border-bottom. */

/* ---------- Home: hub section cards (T-UX24 — beehive-redesign mockup .hub-card) ---------- */

.cah-hub-cards {
    /* T-UX24: balanced single 3-column row on desktop (was the T-UX12 2×2
       880px grid — the AI Use Cases card was removed), 1-col mobile stack.
       Square rounded cards are kept by product decision; only the
       beehive-redesign typography/colour/spacing is taken from the
       hexagonal mockup .hub-grid, not its hex geometry. */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1040px;
    margin: 0 auto 44px;
}
@media (max-width: 640px) {
    .cah-hub-cards {
        grid-template-columns: 1fr;
        max-width: none;
    }
}
.cah-hub-card {
    /* white fill + honey-deep hairline — T-UX35 brought the hub cards
       onto the white surface used by the Toolkit/Champion cards; the
       honey-deep hairline, radius, shadow and hover lift are kept. */
    background: var(--wp--preset--color--surface);
    border: 1px solid #b8911e;
    border-radius: 12px;
    padding: 24px 22px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}
.cah-hub-card:hover {
    box-shadow: 0 6px 20px rgba(15, 42, 31, 0.12);
    transform: translateY(-3px); /* mockup .hub-card:hover lift */
}
.cah-hub-card.is-disabled {
    /* mockup .hub-card.soon — white fill (T-UX35), dashed honey
       hairline; the opacity below conveys the disabled state. */
    background: var(--wp--preset--color--surface);
    border-style: dashed;
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}
.cah-hub-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cah-hub-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.cah-hub-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cah-hub-card-title {
    font-family: var(--wp--preset--font-family--serif);
    font-size: 15px;
    font-weight: 500;            /* mockup .hub-title */
    line-height: 1.2;
    color: var(--wp--preset--color--text-strong);
}
.cah-hub-card-desc {
    font-size: 12.5px;
    line-height: 1.55;
    /* text-muted (not the mockup's lighter tertiary): the square card
       carries longer descriptions, so contrast on the honey-pale fill
       is prioritised per the T-UX24 design-extension brief. */
    color: var(--wp--preset--color--text-muted);
}
.cah-hub-card-action {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;          /* mockup .hub-cta */
    text-transform: uppercase;
    color: var(--wp--preset--color--primary);
}
.cah-hub-card-soon {
    /* mockup .hub-phase-badge — deep-ink pill, honey text. */
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: var(--wp--preset--color--ink-deeper);
    color: var(--wp--preset--color--rating-gold);
    border-radius: 3px;
    padding: 3px 8px;
    width: fit-content;
}

/* ---------- Welcome + hub-card grid — EP-400 (T-EP03) ----------
   Mockup: site/tests/playwright/mockups/ep400/home-desktop-wide.png
           lines 80-320 (welcome + 4-col hub-card grid).
   Token convention: Tier 2 colour slugs, Tier 1 radius slugs, composite
   typography classes on the markup side. All rules below are gated by
   `body.cah-ep400` so the legacy Beehive masthead + 3-col hub-card grid
   stays the active treatment until T-EP19 wires the body class. ---- */

/* The EP-400 welcome wrapper is rendered alongside the legacy
   `.cah-masthead` wrapper inside `parts-php/welcome-greeting.php`. CSS
   below swaps which one is visible based on the body class. */
.cah-welcome.is-ep400 { display: none; }
body.cah-ep400 .cah-masthead { display: none; }
body.cah-ep400 .cah-welcome.is-ep400 {
    display: block;
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 48px 24px 0;
}
body.cah-ep400 .cah-welcome__heading {
    /* composite class `.cah-c-headline-lg` carries the size/lh/weight;
       only colour + margin live here. */
    margin: 0 0 8px;
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-welcome__sub {
    margin: 0;
    color: var(--cah-t2-content-subtle);
}

/* The hub-card hex SVG icon ships in the markup but stays hidden until
   the EP-400 body class flips on; the legacy PNG <img> stays visible
   until then. */
.cah-hub-card__icon-svg { display: none; }
body.cah-ep400 .cah-hub-card-icon img { display: none; }
body.cah-ep400 .cah-hub-card__icon-svg { display: block; }

body.cah-ep400 .cah-hub-cards {
    /* 4-col grid at >= 1024px per the mockup; tablet drops to 2-col,
       mobile to 1-col. The legacy 3-col grid above is replaced via a
       cascade overwrite (same selector under `body.cah-ep400`). */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
@media (max-width: 1023.98px) {
    body.cah-ep400 .cah-hub-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    body.cah-ep400 .cah-hub-cards {
        grid-template-columns: 1fr;
    }
}

body.cah-ep400 .cah-hub-card--active {
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-12);
    padding: 24px;
    gap: 16px;
    color: var(--cah-t2-content-default);
    box-shadow: none;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}
body.cah-ep400 .cah-hub-card--active:hover {
    border-color: var(--cah-t2-border-default-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

body.cah-ep400 .cah-hub-card__icon {
    /* hex-icon top-left, 32 × 32 — no rounded square box behind it. */
    width: 32px;
    height: 32px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}
body.cah-ep400 .cah-hub-card__icon-svg {
    width: 32px;
    height: 32px;
}

body.cah-ep400 .cah-hub-card__title {
    /* composite class `.cah-c-headline-sm` (20/28, weight 400) drives the
       ramp; the snap-diff window allows 18-20px to absorb font-rendering
       drift between the Figma stylesheet and the deployed font face. */
    color: var(--cah-t2-content-default);
    margin: 0;
}
body.cah-ep400 .cah-hub-card__desc {
    color: var(--cah-t2-content-subtle);
    margin: 0;
    /* Clamp to 2 lines per the mockup. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.cah-ep400 .cah-hub-card__action {
    margin-top: auto;
}
body.cah-ep400 .cah-hub-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    background: var(--cah-t2-btn-primary-bg-default);
    color: var(--cah-t2-btn-primary-content-default);
    border: 1px solid var(--cah-t2-btn-primary-border-default);
    border-radius: var(--cah-t1-radius-pill);
    text-decoration: none;
    /* text rendered via the markup's composite class is unset on this
       inline span; explicit Tier 1 typography lives in the composite
       classes already in use across the theme. */
}
body.cah-ep400 .cah-hub-card--active:hover .cah-hub-card__cta {
    background: var(--cah-t2-btn-primary-bg-hover);
    border-color: var(--cah-t2-btn-primary-border-hover);
}

/* ---------- Recent Activity feed — EP-400 (T-EP05) ----------
   Body-scoped redesign of the homepage `.cah-activity-feed`. Activates
   only when `body.cah-ep400` is applied (T-EP19 wires the body class
   later in the wave). Legacy Beehive styling above continues to render
   on unflagged surfaces.

   Spec: docs/superpowers/plans/2026-05-31-wave-ep400-redesign.md §6
   T-EP05; mockup `ep400/home-desktop-wide.png` lines 540–720.

   Reuse contract: keep the existing `.cah-activity-feed` markup wired
   to home.html `<!-- wp:cah/activity-feed /-->`. The PHP part-file
   emits one inline-SVG hex avatar (`.cah-activity-avatar-ep400`)
   alongside the legacy logo `<img>` / two-letter initials; the EP-400
   selectors below hide the legacy artwork and reveal the SVG. */

/* Hide the legacy chrome from templates/home.html so the EP-400 header
   the part-file emits below the `<header class="cah-activity-ep400-
   header">` takes over without duplicating section titles. */
body.cah-ep400 .cah-activity-header,
body.cah-ep400 .cah-activity-footer { display: none; }

/* Show the EP-400 header (hidden by default for legacy renders). */
.cah-activity-ep400-header { display: none; }
body.cah-ep400 .cah-activity-ep400-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 0;
}
body.cah-ep400 .cah-activity-ep400-title {
    margin: 0;
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-activity-ep400-helper {
    margin: 0;
    color: var(--cah-t2-content-subtle);
    text-align: right;
}

/* Feed list — compact rows. 5 rows × ~56px = 280px (fits the
   home-desktop-wide.png 1440×900 region without scroll). */
body.cah-ep400 .cah-activity-feed {
    background: transparent;
    border: 1px solid var(--cah-t2-border-subtle);
    border-radius: var(--cah-t1-radius-lg, 12px);
    overflow: hidden;
}
body.cah-ep400 .cah-activity-feed .cah-activity-item {
    position: relative;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--cah-t2-border-subtle);
    cursor: pointer;
    transition: background-color 0.15s;
}
body.cah-ep400 .cah-activity-feed .cah-activity-item:last-child {
    border-bottom: none;
}
body.cah-ep400 .cah-activity-feed .cah-activity-item:hover {
    background: var(--cah-t2-bg-default-hover);
    padding-left: 16px; /* override legacy 4px nudge */
}

/* Row link overlays the whole row so the activity entry navigates on
   click. Sits above the visual layer but below the type tag so the tag
   stays semantic. */
body.cah-ep400 .cah-activity-row-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-decoration: none;
    overflow: hidden;
    text-indent: -9999px;
}

/* Hex avatar — 24×24 inline SVG, brand-blue fill, white initial.
   Legacy `.cah-activity-avatar` div is collapsed to 24×24 in EP-400 so
   the SVG sits flush with the grid track. */
body.cah-ep400 .cah-activity-feed .cah-activity-avatar {
    width: 24px;
    height: 24px;
    background: transparent;
    clip-path: none;
    overflow: visible;
    position: relative;
    z-index: 0;
}
/* T-UI02: only suppress the legacy logo image / initials-text fallback
   under EP-400 when NO estate brandmark resolved. When `.has-logo` is set
   the `<img>` brandmark renders inside the hex (see the `.has-logo` block
   below) and the inline SVG hex is the one that gets hidden instead. */
body.cah-ep400 .cah-activity-feed .cah-activity-avatar:not(.has-logo) > img,
body.cah-ep400 .cah-activity-feed .cah-activity-avatar:not(.has-logo)::before {
    display: none;
}
/* /T-UI02 */
body.cah-ep400 .cah-activity-feed .cah-activity-avatar {
    /* hide the text node of the legacy initials fallback */
    font-size: 0;
    color: transparent;
}
.cah-activity-avatar-ep400 { display: none; }
/* T-UI02: the inline-SVG initials hex is the fallback — it only renders
   when no estate brandmark resolved. `.has-logo` rows show the brandmark
   `<img>` (clipped to the hex below) and keep the SVG hidden. */
body.cah-ep400 .cah-activity-feed .cah-activity-avatar:not(.has-logo) .cah-activity-avatar-ep400 {
    display: block;
    width: 24px;
    height: 24px;
}
/* /T-UI02 */
body.cah-ep400 .cah-activity-feed .cah-activity-avatar-ep400 > polygon {
    fill: var(--cah-t1-brand-blue-800);
}
body.cah-ep400 .cah-activity-feed .cah-activity-avatar-ep400-initial {
    fill: #ffffff; /* knockout white — initial sits on brand-blue-800 hex */
    font-weight: 700;
    font-size: 11px;
}

/* T-UI02: estate-brandmark rows under EP-400. The base `.cah-activity-avatar`
   rule above zeroes the hex (transparent, clip-path:none) so the inline SVG
   can own the cell; for `.has-logo` rows we restore the 24×24 hexagon — the
   honey-pale fill and hex clip-path mirror the legacy `.has-logo` treatment
   (style.css ~1200) so a full-colour brandmark reads inside the hex shape. */
body.cah-ep400 .cah-activity-feed .cah-activity-avatar.has-logo {
    background: var(--wp--custom--beehive--honey-pale);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    overflow: hidden;
}
body.cah-ep400 .cah-activity-feed .cah-activity-avatar.has-logo > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18%; /* keep the brandmark inside the hex safe zone */
    box-sizing: border-box;
}
/* The Group bee mark is a compact single shape — slightly less inset so it
   reads at a comparable weight to the estate brandmarks. */
body.cah-ep400 .cah-activity-feed .cah-activity-avatar.is-group-logo > img {
    padding: 13%;
}
/* /T-UI02 */

/* Row body — verb phrase + actor in default body type. */
body.cah-ep400 .cah-activity-feed .cah-activity-body {
    min-width: 0;
    z-index: 0;
}
body.cah-ep400 .cah-activity-feed .cah-activity-text {
    color: var(--cah-t2-content-default);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.cah-ep400 .cah-activity-feed .cah-activity-text strong {
    font-weight: 600;
}
body.cah-ep400 .cah-activity-feed .cah-activity-text a {
    color: var(--cah-t2-content-default);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
body.cah-ep400 .cah-activity-feed .cah-activity-text a:hover {
    border-bottom-color: var(--cah-t2-content-default);
}

/* Right-aligned muted date — `.cah-c-label-sm` + content/subtle. */
body.cah-ep400 .cah-activity-feed .cah-activity-date {
    text-align: right;
    color: var(--cah-t2-content-subtle);
    margin: 0;
    z-index: 0;
}

/* The legacy `.cah-activity-tag` (Tool / Champion pill) is retired in
   EP-400 — the verb phrase already carries the type semantics, and the
   mockup row has no chip. The smoke check
   `activity-feed-type-tag-style` covers the legacy chrome only; under
   EP-400 the tag is hidden. */
body.cah-ep400 .cah-activity-feed .cah-activity-tag { display: none; }

/* Empty state — centered, 14px, muted. */
body.cah-ep400 .cah-activity-empty {
    text-align: center;
    color: var(--cah-t2-content-subtle);
    padding: 24px 0;
    margin: 0;
}

/* D4 (T-EPF02) — the outer Recent Activity panel kept its legacy honey-pale
   fill (live-QA D2026-05-31). Mockup is a white card on a white page. Override
   the panel surface to bg/default with a subtle border under EP-400 only. */
body.cah-ep400 .cah-activity-panel {
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
}

/* ---------- /Recent Activity feed — EP-400 ---------- */

/* ---------- Home: Top 10 most-used tools (T-UX33 — mockup beehive-redesign.html .toolkit / .hex-grid) ---------- */

.cah-top-tools {
    margin: 0 auto;
}
.cah-top-tools-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 32px;
    padding-bottom: 14px;
    border-bottom: 0.5px solid var(--wp--custom--beehive--border-strong);
}
.cah-top-tools-title {
    font-family: var(--wp--preset--font-family--serif);
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: var(--wp--custom--beehive--text-primary);
    margin: 0;
}
.cah-top-tools-strap {
    font-size: 12.5px;
    color: var(--wp--custom--beehive--text-tertiary);
}
.cah-top-tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px 16px;
    max-width: 1060px;
    margin: 0 auto;
    /* room for the offset bottom row's translateY */
    padding-bottom: 60px;
}
.cah-top-tools-grid .cah-hex-row-offset {
    transform: translateY(60px);
}

.cah-hex-cell {
    position: relative;
    aspect-ratio: 1 / 1.1547;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease;
}
.cah-hex-cell:hover {
    transform: translateY(-4px);
}
.cah-hex-cell-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.cah-hex-cell-bg polygon {
    /* T-UX44: white card fill matching `.cah-hub-card` / Hive Section
       cards — the honey-pale wash is dropped so the official tool icons
       sit on the same white surface the AI Toolkit cards use. The
       honey-deep hairline stroke is kept. */
    fill: var(--wp--preset--color--surface);
    stroke: var(--wp--custom--beehive--honey-deep);
    stroke-width: 1;
    stroke-linejoin: round;
    transition: fill 0.2s, stroke 0.2s;
}
.cah-hex-cell:hover .cah-hex-cell-bg polygon {
    /* Stays white on hover, mirroring `.cah-hub-card:hover` (lift +
       shadow only); the cell's translateY carries the hover feedback. */
    fill: var(--wp--preset--color--surface);
}
.cah-hex-cell-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18% 14%;
    text-align: center;
}
.cah-hex-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #fff;
}
.cah-hex-logo--img {
    /* T-UX44: the official tool icon (favicon) variant — same 34px hex
       slot, but the icon is contained on a white tile rather than the
       coloured initials chip. The chip palette/text rules above do not
       apply because the markup is an <img>, not a text <span>. */
    display: block;
    object-fit: contain;
    background: var(--wp--preset--color--surface);
    padding: 3px;
}
.cah-hex-name {
    font-family: var(--wp--preset--font-family--serif);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--wp--custom--beehive--text-primary);
    margin: 0 0 3px;
}
.cah-hex-meta {
    font-size: 9.5px;
    letter-spacing: 0.3px;
    color: var(--wp--custom--beehive--text-tertiary);
    margin: 0;
}

@media (max-width: 781px) {
    .cah-top-tools-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .cah-top-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        padding-bottom: 0;
    }
    .cah-top-tools-grid .cah-hex-row-offset {
        transform: none;
    }
}

/* ---------- Home: Recent Activity panel (T-UX26 — mockup beehive-redesign.html .activity-panel) ---------- */

.cah-activity-panel {
    background: var(--wp--custom--beehive--amber-tint);
    border-radius: 6px;
    padding: 40px 48px;
}
.cah-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 0.5px solid var(--wp--custom--beehive--border-strong);
}
.cah-activity-eyebrow {
    font-size: 10.5px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--wp--custom--beehive--honey-deep);
    margin: 0 0 6px;
}
.cah-activity-h {
    font-family: var(--wp--preset--font-family--serif);
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.3;
    color: var(--wp--custom--beehive--text-primary);
    margin: 0;
}
.cah-activity-filter {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}
.cah-activity-filter-btn {
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--wp--custom--beehive--text-tertiary);
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    padding: 0 0 1px;
    cursor: pointer;
    transition: color 0.15s;
}
.cah-activity-filter-btn:hover { color: var(--wp--custom--beehive--text-primary); }
.cah-activity-filter-btn.is-active {
    color: var(--wp--custom--beehive--honey-deep);
    border-bottom-color: var(--wp--custom--beehive--honey-deep);
}

.cah-activity-feed { list-style: none; padding: 0; margin: 0; }
.cah-activity-feed .cah-activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    /* mockup .activity-item (lines 458-468): a single soft baseline divider,
       no comb-strip top edge — the redesigned panel reads cleaner. */
    border-bottom: 0.5px solid var(--wp--custom--beehive--border);
    transition: padding-left 0.2s;
}
.cah-activity-feed .cah-activity-item:last-child { border-bottom: none; }
.cah-activity-feed .cah-activity-item:hover { padding-left: 4px; }
.cah-activity-feed .cah-activity-item[hidden] { display: none; }

.cah-activity-avatar {
    width: 36px;
    height: 41px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp--custom--beehive--honey-pale);
    color: var(--wp--custom--beehive--green-deep);
    font-family: var(--wp--preset--font-family--serif);
    font-size: 12px;
    font-weight: 500;
    /* hex-clipped initials avatar — matches the .champ-avatar shape */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.cah-activity-body { flex: 1; min-width: 0; }
.cah-activity-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--wp--custom--beehive--text-primary);
    margin: 0 0 2px;
}
.cah-activity-text strong { font-weight: 500; }
.cah-activity-text a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    font-weight: 500;
}
.cah-activity-text a:hover { text-decoration: underline; }
.cah-activity-date {
    font-size: 11px;
    letter-spacing: 0.2px;
    color: var(--wp--custom--beehive--text-tertiary);
    margin: 0;
}
.cah-activity-tag {
    flex-shrink: 0;
    font-size: 9px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--wp--custom--beehive--honey-deep);
    background: var(--wp--custom--beehive--honey-pale);
    padding: 2px 7px;
    border-radius: 3px;
}
.cah-activity-footer {
    margin-top: 20px;
    padding-top: 16px;
    text-align: right;
}
.cah-activity-cta {
    font-size: 11.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--wp--custom--beehive--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--wp--custom--beehive--text-primary);
    padding-bottom: 2px;
}
.cah-activity-cta:hover {
    color: var(--wp--custom--beehive--honey-deep);
    border-bottom-color: var(--wp--custom--beehive--honey-deep);
}
.cah-activity-empty {
    font-size: 13px;
    color: var(--wp--custom--beehive--text-tertiary);
    margin: 0;
    padding: 14px 0;
}

/* ---------- /activity/ full activity view (T-UX32) ----------
   Reuses the homepage `.cah-activity-panel` + `.cah-activity-feed`
   visual language; only the page shell, heading block and pagination
   are new. Route + template: cah-core ActivityArchiveRoute →
   templates/page-activity.php. */

.cah-activity-main {
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--24)
        var(--wp--preset--spacing--60);
}
.cah-activity-archive-shell {
    max-width: 1080px;
    margin: 0 auto;
}
.cah-activity-archive-head {
    margin-bottom: 24px;
}
.cah-activity-archive-title {
    font-family: var(--wp--preset--font-family--serif);
    font-size: 38px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--wp--custom--beehive--text-primary);
    margin: 4px 0 0;
}
.cah-activity-archive-sub {
    font-size: 14px;
    line-height: 1.5;
    color: var(--wp--custom--beehive--text-tertiary);
    margin: 8px 0 0;
}

/* Pagination — newer/older + numbered pages below the feed. */
.cah-activity-pagination {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 0.5px solid var(--wp--custom--beehive--border-strong);
}
.cah-activity-pagination .page-numbers {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.cah-activity-pagination .page-numbers a,
.cah-activity-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    color: var(--wp--custom--beehive--text-primary);
}
.cah-activity-pagination .page-numbers a:hover {
    background: var(--wp--custom--beehive--honey-pale);
    color: var(--wp--custom--beehive--honey-deep);
}
.cah-activity-pagination .page-numbers span.current {
    background: var(--wp--custom--beehive--green-deep);
    color: var(--wp--custom--beehive--cream);
}

@media (max-width: 600px) {
    .cah-activity-archive-title { font-size: 28px; }
}

/* ---------- Tool card body content ---------- */

.cah-tool-card .cah-tool-excerpt {
    color: var(--wp--preset--color--text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 4px 0 0 0;
}

/* ---------- Single-tool body prose (T-V04: 15px body, serif h3s per ticket acceptance) ---------- */

.cah-tool-prose,
.cah-tool-prose p {
    color: var(--wp--preset--color--text);
    font-size: 0.9375rem; /* 15px */
    line-height: 1.6;
}
.cah-tool-prose p { margin: 0 0 12px; }
.cah-tool-prose h3 {
    color: var(--wp--preset--color--text-strong);
    font-family: var(--wp--preset--font-family--serif);
    font-weight: 400;
    font-size: 1rem; /* 16px */
    margin-top: 20px;
    margin-bottom: 6px;
}
.cah-tool-prose h3:first-child { margin-top: 0; }
.cah-tool-prose ul { margin: 0 0 12px; padding-left: 20px; }
.cah-tool-prose li { font-size: 0.9375rem; line-height: 1.6; color: var(--wp--preset--color--text); }

/* ---------- Welcome greeting (home) ---------- */

.cah-welcome-name { color: var(--wp--preset--color--primary); }

/* ---------- Search bar (T-FN02: mirrors C1 mockup lines 50-54) ----------
   Used by archive-tool.html (and later archive-champion via T-FN03). The
   wp:search block emits its own structural markup; we add the className
   `cah-search-bar` to the form so we can style without `!important`.
   ---------------------------------------------------------------------- */

.cah-search-bar {
    margin-bottom: 16px;
}

.cah-search-bar .wp-block-search__inside-wrapper {
    position: relative;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.cah-search-bar .wp-block-search__input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border-strong);
    border-radius: 10px;
    font-size: 14px;
    color: var(--wp--preset--color--text-strong);
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cah-search-bar .wp-block-search__input:focus {
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.08);
}
.cah-search-bar .wp-block-search__input::placeholder {
    color: #c0b9ae;
}

/* Magnifier icon — pseudo-element on the inside wrapper so it overlays
   the input's left padding without an extra DOM node. */
.cah-search-bar .wp-block-search__inside-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    opacity: 0.4;
    z-index: 1;
}

/* Submit button is hidden — Enter submits the form, magnifier hints intent.
   Mockup C1 has no visible Search button (oninput live-filtering). */
.cah-search-bar .wp-block-search__button {
    display: none;
}

/* ---------- T-UX14 — Beehive filter bar + chips + dropdown surface ----------
   Visual oracle: mockups/beehive-redesign.html — .toolkit-filter-row (1218),
   .champ-filter-row (1382), .champ-pill.active (622).
   Tokens come from theme.json `custom.beehive.*`. The wrapper class
   `.cah-filter-bar` is additive (sits alongside `.cah-toolkit-filterbar`)
   so toolkit-filters.js keeps targeting `[data-cah-toolkit-filters]`. */

.cah-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.cah-filter-bar__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wp--custom--beehive--honey-deep);
    margin: 0 0 2px;
}

/* Chip active state — cream foreground on honey-deep, mockup line 622
   semantics adapted to the beehive palette per ticket notes. */
.cah-filter-bar .cah-filter-chip.is-active,
.cah-active-bar .cah-filter-chip.is-active {
    background: var(--wp--custom--beehive--honey-deep);
    color: var(--wp--custom--beehive--cream);
    border-color: var(--wp--custom--beehive--honey-deep);
}

/* Chip hover — honey-pale tint + honey-deep border, mirrors .filter-pill:hover
   in mockup line 329. */
.cah-filter-bar .cah-filter-chip:hover {
    background: var(--wp--custom--beehive--honey-pale);
    border-color: var(--wp--custom--beehive--honey-deep);
    color: var(--wp--custom--beehive--green-deep);
}

/* Dropdown trigger pills inside the new bar — same family as the chip,
   active state harmonised. */
.cah-filter-dropdown .cah-dropdown__trigger.is-active {
    background: var(--wp--custom--beehive--honey-deep);
    color: var(--wp--custom--beehive--cream);
    border-color: var(--wp--custom--beehive--honey-deep);
}
.cah-filter-dropdown .cah-dropdown__trigger:hover {
    background: var(--wp--custom--beehive--honey-pale);
    border-color: var(--wp--custom--beehive--honey-deep);
    color: var(--wp--custom--beehive--green-deep);
}
.cah-filter-dropdown .cah-dropdown__trigger.is-active .cah-dropdown__count {
    background: rgba(244, 241, 228, 0.22);
    color: var(--wp--custom--beehive--cream);
}

/* Dropdown panel — cream-warm surface with 200ms ease-out reveal per ticket
   notes. The [hidden] attribute toggle is what JS flips; we keep the binary
   hide/show but animate the moment it un-hides. */
.cah-filter-dropdown .cah-dropdown__panel {
    background: var(--wp--custom--beehive--cream-warm);
    border-color: var(--wp--custom--beehive--border);
    animation: cah-filter-dropdown-in 200ms ease-out;
}
@keyframes cah-filter-dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cah-filter-dropdown .cah-dropdown__item:hover {
    background: var(--wp--custom--beehive--honey-pale);
    color: var(--wp--custom--beehive--green-deep);
}

/* "Clear all" ghost link — visible only when filters are active. Inline at
   the end of the filter row on chip-only surfaces, also appended after the
   dropdown row on the toolkit. */
.cah-filter-clear-all {
    align-self: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--wp--custom--beehive--honey-deep);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}
.cah-filter-clear-all:hover {
    background: var(--wp--custom--beehive--honey-pale);
    border-color: var(--wp--custom--beehive--border);
    color: var(--wp--custom--beehive--green-deep);
}
.cah-filter-clear-all[hidden] { display: none; }

/* On the toolkit (which has the inline dropdown row), surface the clear-all
   link at the end of the row of triggers. */
.cah-filter-row--inline > .cah-filter-clear-all {
    margin-left: auto;
}

/* ---------- Filter chips (T-V01: mirrors C1 mockup lines 56-61) ---------- */

.cah-filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.cah-filter-row--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

/* Belt-and-braces against any future stylesheet override forcing the
 * dropdowns to span 100% width inside the flex parent. With flex: 0 0 auto
 * each dropdown sits at its intrinsic width so all four sit side-by-side
 * on desktop and wrap naturally on narrow viewports. */
.cah-filter-row--inline > .cah-dropdown {
    flex: 0 0 auto;
}

.cah-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cah-filter-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-faint);
    white-space: nowrap;
    min-width: 60px;
}

.cah-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.cah-filter-chip {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--wp--preset--color--border-strong);
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
/* Hover sage border + grey-green tint — no exact theme.json token, so
   mirror the mockup hex (C1 line 60) inline. Keep these in sync if the
   palette ever gets a `chip-hover-*` token. */
.cah-filter-chip:hover {
    border-color: #b0c8c0;
    background: #f0f5f2;
    color: var(--wp--preset--color--primary);
}
.cah-filter-chip.is-active {
    background: var(--wp--preset--color--primary);
    color: #fff;
    border-color: var(--wp--preset--color--primary);
}

.cah-filter-tag-overflow {
    font-size: 11px;
    color: var(--wp--preset--color--text-faint);
    padding: 2px 4px;
    align-self: center;
}

.cah-filter-clear {
    font-size: 0.75rem;
    color: var(--wp--preset--color--text-subtle);
    text-decoration: underline;
}
.cah-filter-clear:hover { color: var(--wp--preset--color--primary); }

/* ---------- Toolkit filter bar (T-V11) ---------- */

.cah-toolkit-filterbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

/* Search input — replaces the wp:search block on /tools/. The <form>
   wrapper enables a real ?s= GET on Enter for no-JS users. */
.cah-toolkit-filterbar .cah-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border-strong);
    border-radius: 10px;
    padding: 10px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 0;
}
.cah-toolkit-filterbar .cah-search:focus-within {
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.08);
}
.cah-toolkit-filterbar .cah-search svg {
    color: var(--wp--preset--color--text-faint);
    flex: none;
}
.cah-search__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    color: var(--wp--preset--color--text-strong);
    height: 22px;
}
.cah-search__input::placeholder {
    color: var(--wp--preset--color--text-disabled);
}
.cah-search__clear {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--wp--preset--color--text-faint);
    font-size: 18px;
    padding: 0 4px;
    line-height: 1;
}

/* Dropdown trigger — a pill in the same family as .cah-filter-chip but
   with extra slot for caret + count. */
.cah-dropdown {
    position: relative;
}
.cah-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--wp--preset--color--border-strong);
    background: var(--wp--preset--color--surface);
    cursor: pointer;
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--wp--preset--color--text-muted);
    line-height: 1.4;
    transition: all 0.15s;
}
.cah-dropdown__trigger:hover {
    border-color: #b0c8c0;
    background: #f0f5f2;
    color: var(--wp--preset--color--primary);
}
.cah-dropdown__trigger.is-active {
    background: var(--wp--preset--color--primary);
    color: #fff;
    border-color: var(--wp--preset--color--primary);
}
.cah-dropdown__trigger[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.cah-dropdown__trigger svg {
    transition: transform 0.15s;
}
.cah-dropdown__count {
    background: var(--wp--preset--color--primary);
    color: #fff;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
}
.cah-dropdown__trigger.is-active .cah-dropdown__count {
    background: rgba(255, 255, 255, 0.18);
}

/* Dropdown panel */
.cah-dropdown__panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    max-height: 360px;
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(35, 30, 20, 0.06), 0 8px 24px -12px rgba(35, 30, 20, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cah-dropdown__panel[hidden] {
    display: none;
}
.cah-dropdown__list {
    overflow-y: auto;
    padding: 6px;
}
.cah-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 7px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    color: var(--wp--preset--color--text);
}
.cah-dropdown__item:hover {
    background: var(--wp--preset--color--background);
}
.cah-dropdown__check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--wp--preset--color--border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-position: center;
    background-repeat: no-repeat;
}
.cah-dropdown__item.is-on .cah-dropdown__check {
    background-color: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-size: 12px 12px;
}
.cah-dropdown__footer {
    border-top: 1px solid var(--wp--preset--color--border);
    padding: 6px 10px;
    display: flex;
    justify-content: flex-end;
}
.cah-dropdown__footer[hidden] {
    display: none;
}
.cah-dropdown__footer .cah-filter-clear {
    cursor: pointer;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 12px;
}

/* ---------- Champion archive — no-JS <details> filter dropdowns (T-UX47) ----------
   The AI Champions directory reuses the .cah-dropdown visual language but
   is navigation-based (single-select <a> links), so it needs no JS — the
   open/close affordance is the native <details>/<summary> disclosure.
   These rules adapt that markup to look identical to the toolkit's
   JS-hydrated dropdown. */
.cah-champion-filterbar .cah-dropdown__details {
    display: inline-block;
}
/* Strip the native disclosure triangle — <summary> carries .cah-dropdown__trigger. */
.cah-champion-filterbar summary.cah-dropdown__trigger {
    list-style: none;
}
.cah-champion-filterbar summary.cah-dropdown__trigger::-webkit-details-marker {
    display: none;
}
/* Caret flips when the <details> is open (mirrors the toolkit's
   [aria-expanded="true"] svg rule). */
.cah-champion-filterbar .cah-dropdown__details[open] .cah-dropdown__trigger svg {
    transform: rotate(180deg);
}
/* Panel items are <a> links here, not <button>s. */
.cah-champion-filterbar .cah-dropdown__item {
    text-decoration: none;
}

/* ---------- Champion archive pagination (T-UX47) ----------
   Scoped to the champion archive body class so it never touches the
   shared wp:query-pagination block on /tools/. Beehive palette, mirrors
   the .cah-activity-pagination treatment. */
.post-type-archive-champion .wp-block-query-pagination {
    margin-top: 8px;
    gap: 8px;
}
.post-type-archive-champion .wp-block-query-pagination .page-numbers,
.post-type-archive-champion .wp-block-query-pagination-previous,
.post-type-archive-champion .wp-block-query-pagination-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    color: var(--wp--custom--beehive--text-primary);
}
.post-type-archive-champion .wp-block-query-pagination a:hover {
    background: var(--wp--custom--beehive--honey-pale);
    color: var(--wp--custom--beehive--honey-deep);
}
.post-type-archive-champion .wp-block-query-pagination .page-numbers.current {
    background: var(--wp--custom--beehive--green-deep);
    color: var(--wp--custom--beehive--cream);
}

/* Active-chip bar */
.cah-active-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px dashed var(--wp--preset--color--border);
}
.cah-active-bar[hidden] {
    display: none;
}
.cah-active-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-faint);
    margin-right: 4px;
}
.cah-active-bar .cah-filter-chip.is-active {
    cursor: pointer;
    /* reuses existing .cah-filter-chip.is-active background+color */
}
.cah-active-bar .cah-active-key {
    opacity: 0.7;
    margin-right: 4px;
}
.cah-active-bar .cah-active-x {
    margin-left: 6px;
    opacity: 0.85;
}
.cah-active-bar .cah-filter-clear {
    cursor: pointer;
    border: none;
    background: transparent;
    font: inherit;
}

/* Loading state on the query wrapper while an AJAX swap is in flight.
   200ms delay in JS keeps this from flashing on fast LANs. */
.wp-block-query.cah-is-loading {
    position: relative;
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease;
}
.wp-block-query.cah-is-loading::after {
    content: "";
    position: absolute;
    top: 24px;
    left: 50%;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    border: 2px solid var(--wp--preset--color--border-strong);
    border-top-color: var(--wp--preset--color--primary);
    border-radius: 50%;
    animation: cah-spin 700ms linear infinite;
}
@keyframes cah-spin { to { transform: rotate(360deg); } }

/* Empty state when filters return zero matches */
.cah-empty {
    border: 1px dashed var(--wp--preset--color--border-strong);
    padding: 60px 20px;
    text-align: center;
    color: var(--wp--preset--color--text-muted);
    border-radius: 12px;
}
.cah-empty[hidden] {
    display: none;
}
.cah-empty strong {
    color: var(--wp--preset--color--text-strong);
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    font-family: var(--wp--preset--font-family--serif);
    font-weight: 400;
}

@media (max-width: 640px) {
    .cah-dropdown__trigger {
        min-height: 44px;
    }
    .cah-dropdown__item {
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .cah-dropdown__panel {
        min-width: 200px;
        max-width: calc(100vw - 32px);
    }
}

/* ---------- Nav user dropdown (T-A03 + T-V06 polish) ---------- */
/* Visual oracle: mockups/B1-landing-general-user.html lines 113-249. */

.cah-nav-user {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.cah-estate-badge {
    padding: 4px 12px;
    border-radius: 20px;
    background: #e4eeea;
    border: 1px solid #c2d9ce;
    color: #3a5a4e;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cah-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    color: var(--wp--preset--color--text);
    transition: background 0.15s;
}
.cah-user-btn:hover { background: var(--wp--preset--color--background); }

.cah-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* T-UX22: hex-clipped nav avatar per beehive-redesign mockup .avatar
       (lines 87-93). 28×32 (ratio 1/1.143) echoes the champion-card hex
       (.cah-champion-avatar, T-UX12) so the honeycomb motif is consistent
       wherever initials appear. Uniform honey-soft fill — the per-estate
       tint is dropped here; the .cah-estate-badge beside it already
       carries the estate signal. green-deep Lora initials per the
       design-extension-brief; the polygon clip supersedes border-radius. */
    /* T-UI05 (T-UI06): hex enlarged 28×32 → 34×38 per Figma top-right. The
       1/1.143 hex ratio is preserved so the polygon clip stays regular. */
    width: 34px;
    height: 38px;
    background: var(--wp--custom--beehive--honey-soft);
    color: var(--wp--custom--beehive--green-deep);
    font-family: 'Lora', Georgia, serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    flex-shrink: 0;
}

/* T-UI05 (T-UI06): estate name stacked under the username INSIDE the button
   (replaces the standalone .cah-estate-badge pill). */
.cah-user-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.25;
    min-width: 0;
}
.cah-user-estate {
    font-size: 11px;
    font-weight: 500;
    color: #6f7d76;
    letter-spacing: 0.01em;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* /T-UI05 */

.cah-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #3a3330;
}
.cah-chevron {
    /* T-UI05: enlarged 10 → 12px to balance the larger avatar/identity column. */
    font-size: 12px;
    color: #9e9589;
    transition: transform 0.2s;
}
.cah-nav-user[data-cah-dropdown="open"] .cah-chevron { transform: rotate(180deg); }

.cah-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    padding: 0;
    overflow: hidden;
    z-index: 200;
}
.cah-nav-user[data-cah-dropdown="open"] .cah-user-menu { display: block; }

.cah-menu-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f0ece6;
}
.cah-menu-name { font-weight: 600; color: var(--wp--preset--color--text-strong); font-size: 13.5px; margin-bottom: 2px; }
.cah-menu-email { color: var(--wp--preset--color--text-faint); font-size: 11.5px; }
.cah-role-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--wp--preset--color--primary-tint);
    color: #3a5a4e;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cah-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: #3a3330;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s;
}
.cah-menu-item:hover { background: #faf8f5; }
.cah-menu-item.is-danger { color: var(--wp--preset--color--danger); }
.cah-menu-item.is-danger:hover { background: #fdf4f3; }
/* T-UI05: inline Streamline menu icons — 16px, stroke inherits the item
   colour (incl. the danger red on Sign out) via stroke="currentColor". */
.cah-menu-item__icon { width: 16px; height: 16px; flex-shrink: 0; }
.cah-menu-divider { height: 1px; background: #f0ece6; margin: 2px 0; }

/* ---------- CTA button system (T-UX13 — re-skin of T-A04 onto beehive)
   Five variants — primary, secondary, ghost, danger, plus the legacy
   `.cah-cta-button` aliased onto primary so T-A04's existing markup +
   admin-e2e style assertions keep their selector. Sized for WCAG 2.5.5
   tap targets (44px min-height); focus-visible uses honey-soft at 2px
   offset per the T-UX13 design-extension-brief. */

.cah-cta-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.cah-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.cah-button:focus-visible {
    outline: 2px solid var(--wp--custom--beehive--honey-soft);
    outline-offset: 2px;
}

.cah-button[disabled],
.cah-button.is-disabled,
.cah-button[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary — honey-deep bg + cream text. The default CTA. */
.cah-button-primary,
.cah-cta-button {
    background: var(--wp--custom--beehive--honey-deep);
    color: var(--wp--custom--beehive--cream);
    border-color: var(--wp--custom--beehive--honey-deep);
}
.cah-button-primary:hover,
.cah-button-primary:focus,
.cah-cta-button:hover,
.cah-cta-button:focus {
    background: var(--wp--custom--beehive--green-deep);
    color: var(--wp--custom--beehive--cream);
    border-color: var(--wp--custom--beehive--green-deep);
}

/* D3 (T-EPF02) — the "Add Champion / Add Tool / Add usage record" CTAs in
   parts-php/add-*-cta.php (.cah-cta-row .cah-button-primary) kept the legacy
   honey-deep fill (live-QA D2026-05-31). Re-skin to the EP-400 dark pill
   under body.cah-ep400 only; the legacy honeycomb CTA is untouched. */
body.cah-ep400 .cah-cta-row .cah-button-primary {
    background: var(--cah-t2-btn-primary-bg-default);
    color: var(--cah-t2-btn-primary-content-default);
    border-color: var(--cah-t2-btn-primary-bg-default);
    border-radius: var(--cah-t1-radius-pill);
}
body.cah-ep400 .cah-cta-row .cah-button-primary:hover,
body.cah-ep400 .cah-cta-row .cah-button-primary:focus {
    background: var(--cah-t2-btn-primary-bg-hover);
    color: var(--cah-t2-btn-primary-content-default);
    border-color: var(--cah-t2-btn-primary-bg-hover);
}

/* Secondary — green-deep bg + cream text. Lower-emphasis confirm. */
.cah-button-secondary {
    background: var(--wp--custom--beehive--green-deep);
    color: var(--wp--custom--beehive--cream);
    border-color: var(--wp--custom--beehive--green-deep);
}
.cah-button-secondary:hover,
.cah-button-secondary:focus {
    background: var(--wp--custom--beehive--honey-deep);
    color: var(--wp--custom--beehive--cream);
    border-color: var(--wp--custom--beehive--honey-deep);
}

/* Ghost — transparent surface with honey-deep border. Cancel / dismiss. */
.cah-button-ghost {
    background: transparent;
    color: var(--wp--custom--beehive--honey-deep);
    border-color: var(--wp--custom--beehive--honey-deep);
}
.cah-button-ghost:hover,
.cah-button-ghost:focus {
    background: var(--wp--custom--beehive--honey-pale);
    color: var(--wp--custom--beehive--honey-deep);
    border-color: var(--wp--custom--beehive--honey-deep);
}

/* Danger — deep red bg + cream text. Destructive confirm. */
.cah-button-danger {
    background: #992B1B;
    color: var(--wp--custom--beehive--cream);
    border-color: #992B1B;
}
.cah-button-danger:hover,
.cah-button-danger:focus {
    background: #7A1F12;
    color: var(--wp--custom--beehive--cream);
    border-color: #7A1F12;
}

/* ---------- Form fields (.cah-field) — T-UX18 ----------
   Public-side input styling for the Need Help mailto form. Mirrors the
   T-UX15 auth-shell inputs (`.cah-auth-input`) so the logged-in
   /need-help/ form reads as the same beehive system — auth.css itself
   only loads on wp-login.php, hence the parallel rules here. */

.cah-need-help-form { margin: 0; }

/* T-UX45 — support-request guidance text. Relocated above the Subject
   field (was between Subject and message box under T-UX39) so the form
   reads heading / guidance / Subject / message. */
.cah-need-help-guidance {
    margin: 0 0 22px;
}

.cah-need-help-guidance p {
    margin: 0 0 8px;
    font-size: 0.875rem; /* 14px */
    line-height: 1.55;
    color: var(--wp--preset--color--text-subtle);
}

.cah-need-help-guidance p:first-child {
    font-weight: 600;
    color: var(--wp--preset--color--text-strong);
}

.cah-need-help-guidance p:last-child {
    margin-bottom: 0;
}

/* T-UX45 — AI-Team contact block below the support-request form. */
.cah-need-help-contact {
    margin: 28px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--wp--preset--color--border-strong);
}

.cah-need-help-contact-title {
    margin: 0 0 8px;
    font-size: 1rem; /* 16px */
    font-weight: 600;
    color: var(--wp--preset--color--text-strong);
}

.cah-need-help-contact p {
    margin: 0 0 8px;
    font-size: 0.875rem; /* 14px */
    line-height: 1.55;
    color: var(--wp--preset--color--text-subtle);
}

.cah-need-help-contact-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.cah-need-help-contact-list li {
    margin: 0 0 6px;
    font-size: 0.875rem; /* 14px */
}

.cah-need-help-contact-list li:last-child {
    margin-bottom: 0;
}

.cah-need-help-contact-list a {
    color: var(--wp--preset--color--primary);
    font-weight: 600;
    text-decoration: none;
}

.cah-need-help-contact-list a:hover,
.cah-need-help-contact-list a:focus {
    text-decoration: underline;
}

.cah-field {
    display: block;
    margin: 0 0 18px;
}

.cah-field-label {
    display: block;
    font-size: 0.78125rem; /* 12.5px */
    font-weight: 600;
    color: var(--wp--preset--color--text-strong);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.cah-field-input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--wp--preset--color--border-strong);
    border-radius: 10px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem; /* 14px */
    color: var(--wp--preset--color--text);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input.cah-field-input { height: 46px; padding: 0 14px; }

.cah-field-input:focus,
.cah-field-input:focus-visible {
    border-color: var(--wp--custom--beehive--honey-deep);
    box-shadow: 0 0 0 3px rgba(184, 145, 30, 0.18);
}

/* ---------- Page back-link ---------- */

.cah-back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 0.8125rem;
    color: var(--wp--preset--color--text-subtle);
    text-decoration: none;
}
.cah-back-link:hover { color: var(--wp--preset--color--primary); }

/* ============================================================
   T-V07 — Mobile breakpoint (≤640px). Audits the V04-V06 mobile
   render at the spec viewport (390x844). Goals per acceptance:
     - no horizontal scroll
     - tap targets ≥44px (WCAG 2.5.5)
     - filter chips wrap into rows of 2-3
     - tool/champion/hub cards stack 1-column (already do via grid)
     - stats bar stacks 1-column on detail page
   ============================================================ */

@media (max-width: 640px) {

    /* Nav: shrink container padding + let links scroll horizontally
       so brand stays visible and overflow doesn't push the page wider
       than the viewport. SOON pills hidden — they're the widest text. */
    .cah-topnav {
        padding: 0 12px;
        gap: 8px;
    }
    .cah-nav-brand { margin-right: 8px; }
    .cah-nav-brand-logo { height: 32px; }
    .cah-nav-brand-name { display: none; }
    .cah-nav-links {
        gap: 4px;
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;       /* Firefox */
        -ms-overflow-style: none;    /* IE/Edge */
    }
    .cah-nav-links::-webkit-scrollbar { display: none; }
    .cah-nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 8px 10px;
        font-size: 12.5px;
    }
    .cah-nav-soon { display: none; }
    .cah-nav-right { flex-shrink: 0; }

    /* "Need Help" button: stays visible on mobile (acceptance — every
       page), compacted to a 44px tap target with tighter padding so
       the right cluster doesn't push the viewport wider. */
    .cah-nav-help {
        min-height: 44px;
        padding: 8px 12px;
        font-size: 12.5px;
    }

    /* Page wrapper: reduce horizontal padding so cards have room. */
    .wp-block-group.has-background,
    main { padding-left: 16px; padding-right: 16px; }

    /* Filter chips: bump touch height to 44px without changing
       computed visible style (style-prop checks remain green at
       1440 viewport since they only apply ≤640). */
    .cah-filter-chip { min-height: 44px; display: inline-flex; align-items: center; }
    .cah-filter-row { gap: 8px; }
    .cah-filter-group { gap: 8px; }

    /* Hub cards stack 1-column (mockup B1 is 4-col on desktop). */
    .cah-hub-cards { grid-template-columns: 1fr !important; }
    .cah-hub-card { min-height: 0; }

    /* Tool/Champion archives stack 1-column. WP block grids default
       to repeat(auto-fit, minmax(...)) — force 1fr on mobile. */
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stats bar (single-tool detail): stack values vertically. */
    .cah-stats-bar {
        flex-direction: column;
        align-items: flex-start;
        row-gap: 16px;
        column-gap: 0;
    }

    /* T-UX26 — mockup beehive-redesign.html lines 578-579: shrink the
       panel gutter and stack the header (heading over filter tabs) so
       the amber panel keeps its breathing room on narrow viewports. */
    .cah-activity-panel {
        padding: 28px 24px;
    }
    .cah-activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Mailto link bump for tap-target compliance. */
    .cah-champion-card a.cah-mailto {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* ---------- Footer: beehive 3-column (T-UX16) ----------
   Dark-on-cream inversion of the masthead: deep-green bg + cream
   foreground, three link columns + a wider brand column. A faint
   honey comb-strip (lower opacity than the header's) sits directly
   above the dark footer, marked .cah-comb-strip--footer in
   parts/footer.html. */

.cah-comb-strip--footer {
    background: var(--wp--custom--beehive--green-deep);
}
.cah-comb-strip--footer svg g {
    opacity: 0.18;
}

.cah-footer.is-beehive {
    background: var(--wp--custom--beehive--green-deep);
    color: var(--wp--custom--beehive--cream);
    padding: 56px 40px 32px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    border: 0;
}

.cah-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 56px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(244, 234, 211, 0.08);
}

.cah-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cah-footer__brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--wp--custom--beehive--cream);
}

.cah-footer__logo {
    /* T-UX43 — v2 stacked lockup (viewBox 0 0 22 31); sized by height to
       keep the footer brand footprint close to the v1 mark (~38px tall).
       Per-path fill ships inverted (#F8FAFC) for the dark-green footer. */
    width: auto;
    height: 38px;
    fill: var(--wp--custom--beehive--cream);
    display: block;
}

.cah-footer__wordmark {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.cah-footer__tag {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(244, 234, 211, 0.6);
    margin: 0;
    max-width: 32ch;
}

.cah-footer__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cah-footer__col-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp--custom--beehive--honey-soft);
    margin: 0;
    font-family: inherit;
}

.cah-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cah-footer__links a {
    font-size: 13.5px;
    color: rgba(244, 234, 211, 0.72);
    text-decoration: none;
    transition: color 0.15s;
}
.cah-footer__links a:hover {
    color: var(--wp--custom--beehive--honey-soft);
}

/* T-UX27 — the footer "Sign in" link is redundant once authenticated.
   WordPress adds `logged-in` to <body> for authenticated users, so a
   single rule hides the link with no new block registration or PHP. */
body.logged-in .cah-footer__signin {
    display: none;
}

.cah-footer__meta {
    max-width: 1120px;
    margin: 24px auto 0;
    padding-top: 0;
    font-size: 12px;
    color: rgba(244, 234, 211, 0.48);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cah-footer__sep { opacity: 0.6; }

@media (max-width: 900px) {
    .cah-footer.is-beehive { padding: 40px 24px 24px; }
    .cah-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px 24px;
    }
    .cah-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .cah-footer__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ---------- Footer: EP-400 dark band override (T-EP11) ----------
   Re-skins parts/footer.html under body.cah-ep400 to the charcoal
   grey-blue brand surface (`bg/knockout` = `--cah-t1-brand-blue-600`
   = #272D33). Legacy beehive-green block above stays active until
   T-EP19 wires the body class — both render in their own body scope
   so this is purely additive.

   Token consumption per docs/spec/brand-tokens-ep400.md "Token
   consumption convention" — surfaces consume Tier 2 slugs, composite
   typography classes carry family + size + weight, and Tier 1 is
   reserved for gaps. The column-title letter-spacing override (0.1em)
   deviates from `.cah-c-meta-default`'s 0.16em — called out in
   docs/tickets/T-EP11.pr.md "Notes for the orchestrator" so T-EP22
   can decide whether to widen the composite or add a -tight variant.

   The two logo variants (.cah-footer__logo--ep400 image and
   .cah-footer__logo--legacy inline SVG) sit inside the same brand
   link; default scope shows the legacy stacked mark, body.cah-ep400
   swaps to the BEEHIVE wordmark. T-UX52's `cah-footer__wordmark`
   absence check stays green (we don't reintroduce a separate
   <span>; the lockup is one SVG image). */

body.cah-ep400 .cah-comb-strip--footer {
    background: var(--cah-t2-bg-knockout);
}

/* T-UI03: EP-400 chrome cleanup — suppress the decorative honeycomb chevron
   strips entirely. The header variant (parts/header.html) had NO ep400 override
   so the green band + amber chevrons rendered live; the footer variant's ep400
   rule above only recoloured the band, leaving the chevron SVG ("triangles")
   visible. Both are removed for EP-400 per Figma home/footer (operator tickets
   3 + 4). Scoped to .cah-ep400 so the bare legacy base rules stay untouched. */
body.cah-ep400 .cah-comb-strip:not(.cah-comb-strip--footer) {
    display: none;
}
body.cah-ep400 .cah-comb-strip--footer {
    display: none;
}
/* /T-UI03 */

body.cah-ep400 .cah-footer.is-beehive {
    background: var(--cah-t2-bg-knockout);
    color: var(--cah-t2-content-knockout);
    padding: 64px 40px 32px;
    min-height: 240px;
}

/* Legacy stacked-mark SVG hides under EP-400; ep400 wordmark shows. */
body.cah-ep400 .cah-footer__logo--legacy {
    display: none;
}
.cah-footer__logo--ep400 {
    display: none;
}
body.cah-ep400 .cah-footer__logo--ep400 {
    display: block;
    width: 133px;
    height: 30px;
    margin-bottom: 4px;
}

body.cah-ep400 .cah-footer__brand-link {
    color: var(--cah-t2-content-knockout);
}

body.cah-ep400 .cah-footer__tag {
    color: var(--cah-t2-content-knockout);
    opacity: 0.72;
    max-width: 32ch;
}

body.cah-ep400 .cah-footer__col-title {
    /* `.cah-c-meta-default` provides family / size / weight; override
       letter-spacing to plan-spec 0.1em (composite default is 0.16em).
       Faded to 60 % opacity per plan §6 T-EP11 "on text-faint". */
    color: var(--cah-t2-content-knockout);
    opacity: 0.6;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.cah-ep400 .cah-footer__links a {
    color: var(--cah-t2-link-knockout-content-default);
    text-decoration: none;
    transition: color 0.15s, text-decoration-color 0.15s;
}
body.cah-ep400 .cah-footer__links a:hover {
    color: var(--cah-t2-link-knockout-content-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

body.cah-ep400 .cah-footer__inner {
    border-bottom-color: var(--cah-t2-bg-transparent-25);
}

body.cah-ep400 .cah-footer__meta {
    color: var(--cah-t2-content-knockout);
    opacity: 0.5;
    padding-top: 24px;
    border-top: 1px solid var(--cah-t2-bg-transparent-25);
    margin-top: 0;
}

/* ---------- Page shell: thin templates (T-UX16) ----------
   Wraps the post-title + post-content blocks of page.html and
   single.html in a 720px column with Lora display + Inter body. The
   single template also gets a post-date in honey-deep small-caps
   above the title. */

.cah-page-shell {
    max-width: 720px;
    margin: 0 auto;
}

.cah-page-shell__date {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp--custom--beehive--honey-deep);
    margin: 0 0 14px;
}

.cah-page-shell__title.wp-block-post-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.3px;
    margin: 0 0 28px;
    color: var(--wp--custom--beehive--text-primary);
}

.cah-page-shell__content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--wp--preset--color--text);
}

.cah-page-shell__content p,
.cah-page-shell__content ul,
.cah-page-shell__content ol {
    margin: 0 0 18px;
}

.cah-page-shell__content h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    margin: 36px 0 14px;
}

.cah-page-shell__content h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 19px;
    font-weight: 400;
    margin: 28px 0 10px;
}

.cah-page-shell__featured {
    margin: 0 0 28px;
}

.cah-page-shell__terms {
    font-size: 12px;
    color: var(--wp--preset--color--text-subtle);
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--wp--preset--color--border);
}

@media (max-width: 600px) {
    .cah-page-shell__title.wp-block-post-title { font-size: 28px; }
}

/* ---------- 404: Not in the hive (T-UX16) ----------
   Reuses the masthead-hex motif at ~120px scale as the visual
   anchor, with the Lora heading + italic Lora strap below + a
   primary CTA back to the hub. */

.cah-404 {
    text-align: center;
    padding: 24px 0 40px;
}

.cah-404__hex {
    display: flex;
    justify-content: center;
    margin: 0 0 28px;
    line-height: 0;
}

.cah-404__hex svg {
    width: 120px;
    height: auto;
}

.cah-404__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 14px;
    color: var(--wp--custom--beehive--text-primary);
}

.cah-404__strap {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    line-height: 1.55;
    color: var(--wp--custom--beehive--text-secondary);
    max-width: 480px;
    margin: 0 auto 28px;
}

.cah-404__cta {
    display: inline-block;
    padding: 12px 22px;
    background: var(--wp--custom--beehive--green-deep);
    color: var(--wp--custom--beehive--cream);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.cah-404__cta:hover {
    background: var(--wp--custom--beehive--green-mid);
}

@media (max-width: 600px) {
    .cah-404__title { font-size: 28px; }
    .cah-404__hex svg { width: 96px; }
}

/* ---------- Search: results grid (T-UX16) ----------
   Search-as-title masthead + .cah-tool-card result grid via
   wp:query/wp:post-template (cah/tool-card inserter:false block). The
   pre_get_posts hook in functions.php routes bare /?s=… queries to
   post_type=tool so the wp:query block hydrates with tool results. */

.cah-search__masthead {
    text-align: center;
    padding: 24px 0 36px;
    margin-bottom: 12px;
}

.cah-search__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-subtle);
    margin: 0 0 10px;
}

.cah-search__query.wp-block-query-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.1;
    margin: 0;
    color: var(--wp--custom--beehive--text-primary);
}

.cah-search__results {
    margin-top: 0;
}

.cah-search__empty {
    text-align: center;
    padding: 56px 24px;
    border: 1px dashed var(--wp--preset--color--border-strong);
    border-radius: 12px;
    background: var(--wp--preset--color--surface);
}

.cah-search__empty-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    margin: 0 0 8px;
    color: var(--wp--custom--beehive--text-primary);
}

.cah-search__empty-strap {
    font-size: 14px;
    color: var(--wp--preset--color--text-muted);
    margin: 0;
}

.cah-search__empty-strap a {
    color: var(--wp--preset--color--primary);
}

@media (max-width: 600px) {
    .cah-search__query.wp-block-query-title { font-size: 28px; }
}

/* =====================================================================
   T-UX11 — Beehive tool views (card / detail / submissions)

   Adopts the beehive tokens landed by T-UX08. Replaces inline `style=""`
   on the three parts-php files with cascading classes; logo trays move
   from `surface-2` to `cream-warm` (mockup C1:367 — `.tool-logo` sits
   on the tonal cream background, not the structural surface-2 grey).
   Hover state animates the border to honey-deep over 150ms (mockup
   C1:346 .tool-card:hover transition).
   ===================================================================== */

/* ---------- Card head (replaces inline flex on .cah-card-head) ---------- */

.cah-tool-card .cah-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cah-tool-card .cah-card-head-meta {
    flex: 1 1 auto;
    min-width: 0;
}
.cah-tool-card .cah-card-name { margin: 0; }
.cah-tool-card .cah-stars-label--empty {
    color: var(--wp--preset--color--text-faint);
}

/* Logo tray — cream-warm per beehive (mockup uses solid white-on-cream
   feel; the surface-2 grey was a pre-beehive carryover). 64×64 with
   8px radius, 6px padding, beehive token border. */
.cah-tool-logo--card {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: var(--wp--custom--beehive--cream-warm);
    object-fit: contain;
    padding: 6px;
    border: 1px solid var(--wp--custom--beehive--border);
}

/* Hover — supersedes the sage `#c8dbd4` from the pre-beehive era.
   150ms matches the `.tool-card:hover` transition in mockup C1:343. */
.cah-tool-card {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cah-tool-card:hover {
    border-color: var(--wp--custom--beehive--honey-deep);
    box-shadow: 0 2px 14px rgba(26, 58, 42, 0.07);
    transform: translateY(-1px);
}

/* ---------- Tool detail surface ---------- */

.cah-tool-detail {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--custom--beehive--border);
    border-radius: 10px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
}

/* Hex motif above the title — design-extension brief. Mirrors the
   masthead-hex pattern at a smaller 28×32 scale so it reads as a token
   stamp rather than a full hero device. */
.cah-tool-detail-hex {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 14px;
    line-height: 0;
}
.cah-tool-detail-hex svg {
    width: 28px;
    height: 32px;
}

.cah-tool-detail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

/* Honey-soft category chip — overrides the default `.cah-category-chip`
   which is small-caps text, no fill. The detail view is the one place
   the chip is the primary visual anchor for taxonomy, so it gets a
   filled honey-soft surface. */
.cah-tool-detail .cah-category-chip.cah-tool-detail-cat {
    display: inline-block;
    background: var(--wp--custom--beehive--honey-soft);
    color: var(--wp--custom--beehive--green-deep);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Title — Lora 24px desktop / 20px mobile per acceptance #4. */
.cah-tool-detail .cah-tool-detail-title {
    margin: 4px 0 6px 0;
    font-family: var(--wp--preset--font-family--serif);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--wp--custom--beehive--text-primary);
}

.cah-tool-detail .cah-tool-detail-by {
    font-size: 14px;
    color: var(--wp--custom--beehive--text-secondary);
}

.cah-tool-detail .cah-tool-detail-tags {
    margin-top: 12px;
}

.cah-tool-detail-admin {
    /* T-UX56 — guarantee vertical separation from whatever sits above (tag
       list on tools without stats; stats bar otherwise). Tools with many
       tags (e.g. OpenClaw, ~20 tags) wrap onto multiple rows and used to
       visually crowd the panel. */
    margin-top: var(--wp--preset--spacing--16);
    margin-bottom: 20px;
}

/* ---------- Tool submissions list ---------- */

.cah-tool-submissions {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--custom--beehive--border);
    border-radius: 10px;
    padding: 24px;
}

.cah-tool-submissions-title {
    margin: 0 0 4px 0;
    font-family: var(--wp--preset--font-family--serif);
    font-size: var(--wp--preset--font-size--panel-title);
    font-weight: 400;
    color: var(--wp--custom--beehive--text-primary);
}

.cah-tool-submissions-strap {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--wp--custom--beehive--text-tertiary);
}

.cah-tool-submissions-empty {
    font-size: 14px;
    color: var(--wp--preset--color--text-muted);
    padding: 16px 0;
}

/* Subtle hex divider between rows — the comb motif scaled down to a
   12px-tall strip with one centre hex flanked by hairline rules.
   Acts as a continuity cue between adjacent estate submissions. */
.cah-tool-submissions-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 12px;
    margin: 12px 0;
    line-height: 0;
}
.cah-tool-submissions-divider svg {
    width: 100%;
    max-width: 240px;
    height: 12px;
}

/* ---------- Mobile (≤ 600px) ---------- */

@media (max-width: 600px) {
    .cah-tool-detail {
        padding: 20px;
    }
    .cah-tool-detail .cah-tool-detail-title {
        font-size: 20px;
    }
    .cah-tool-detail .cah-tool-detail-by {
        font-size: 13.5px;
    }
    .cah-tool-submissions {
        padding: 18px;
    }
}

/* ========== EP-400: AI Toolkit archive shell + filter chip row (T-EP06) ==========
   All rules below are body-class gated: they only resolve once T-EP19 wires
   `body.cah-ep400`. Until then the existing cream/beehive treatment from the
   blocks above keeps rendering. Token-driven — no raw hex, no inline font
   props. Composite typography classes (`.cah-c-*`) carry size/weight/family;
   colours come from `--cah-t2-*`; radii from `--cah-t1-radius-*`.

   Markup contracts (from tool-filter-dropdowns.php + archive-tool.html):
     .cah-toolkit-archive               — page wrapper (template root group)
     .cah-toolkit-archive__title        — H1 "AI Toolkit"
     .cah-toolkit-archive__intro        — 1-line description
     .cah-toolkit-archive__search       — full-width 44px pill search form
     .cah-toolkit-archive__chip-row     — 5-chip row sitting below the search
     .cah-filter-chip--ep400            — chip pill (summary OR plain anchor)
     .cah-filter-chip-details           — <details> wrapper around each chip
     .cah-filter-chip__panel            — disclosed panel of <a> options
     .cah-toolkit-archive__grid         — 4-col tool-card grid container
*/
body.cah-ep400 .cah-toolkit-archive {
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-toolkit-archive__title {
    /* T-DR05 — archive titles are large Instrument Serif (display) per the
       toolkit/champions mockups, not the shared headline-lg sans. */
    margin: 0 0 8px;
    font-family: var(--cah-t1-font-family-serif);
    font-size: 56px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}
body.cah-ep400 .cah-toolkit-archive__intro {
    margin: 0;
    color: var(--cah-t2-content-subtle);
}

/* ----- Pill search input (44px tall, white, neutral form-border) ----- */
body.cah-ep400 .cah-toolkit-filterbar .cah-search,
body.cah-ep400 .cah-toolkit-archive__search {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--cah-t2-form-bg-default);
    border: 1px solid var(--cah-t2-form-border-default);
    border-radius: var(--cah-t1-radius-pill); /* 999px */
    box-shadow: none;
    gap: 8px;
}
body.cah-ep400 .cah-toolkit-filterbar .cah-search:focus-within {
    border-color: var(--cah-t2-form-border-focus);
}
body.cah-ep400 .cah-toolkit-filterbar .cah-search .cah-search__glyph,
body.cah-ep400 .cah-toolkit-archive__search .cah-search__glyph {
    flex: 0 0 auto;
    color: var(--cah-t2-content-subtle);
}
body.cah-ep400 .cah-toolkit-filterbar .cah-search__input {
    flex: 1 1 auto;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-toolkit-filterbar .cah-search__input::placeholder {
    color: var(--cah-t2-content-subtle);
}

/* ----- Filter chip row (5 chips: Category, Tag, Estate, Sort, Reset) ----- */
body.cah-ep400 .cah-toolkit-archive__chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

/* Chip = 32px pill, 1px neutral border, label typography. Applies to
   both <summary> chips (Category/Tag/Estate/Sort) and the plain <a>
   reset chip. */
body.cah-ep400 .cah-filter-chip--ep400 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    background: var(--cah-t2-form-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-pill);
    color: var(--cah-t2-content-default);
    cursor: pointer;
    list-style: none;
    text-decoration: none;
    user-select: none;
}
body.cah-ep400 .cah-filter-chip--ep400::-webkit-details-marker {
    display: none;
}
body.cah-ep400 .cah-filter-chip--ep400:hover {
    border-color: var(--cah-t2-border-default-hover);
}
body.cah-ep400 .cah-filter-chip--ep400.is-active {
    border-color: var(--cah-t2-border-brand);
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-filter-chip__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--cah-t2-bg-brand);
    border-radius: var(--cah-t1-radius-pill);
    font-size: 11px;
    line-height: 1;
}
body.cah-ep400 .cah-filter-chip__caret {
    flex: 0 0 auto;
    color: var(--cah-t2-content-subtle);
    transition: transform 120ms ease;
}
body.cah-ep400 .cah-filter-chip-details[open] > .cah-filter-chip--ep400 .cah-filter-chip__caret {
    transform: rotate(180deg);
}

/* Disclosed panel — column of <a> options. Anchored to the chip via
   the parent <details> + an absolutely-positioned panel so it does not
   push siblings. */
body.cah-ep400 .cah-filter-chip-details {
    position: relative;
    display: inline-block;
}
body.cah-ep400 .cah-filter-chip__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    min-width: 200px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    background: var(--cah-t2-form-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
body.cah-ep400 .cah-filter-chip__item {
    display: block;
    padding: 8px 10px;
    border-radius: var(--cah-t1-radius-4);
    color: var(--cah-t2-content-default);
    text-decoration: none;
}
body.cah-ep400 .cah-filter-chip__item:hover {
    background: var(--cah-t2-bg-default-hover);
}
body.cah-ep400 .cah-filter-chip__item.is-on {
    background: var(--cah-t2-bg-brand);
    color: var(--cah-t2-content-default);
}

/* Hide the legacy JS-hydrated dropdown row + filter label when EP-400
   is active. The chip row above is the EP-400 affordance; the legacy
   row keeps rendering so non-EP400 deploys (pre-T-EP19) still work. */
body.cah-ep400 .cah-toolkit-filterbar > .cah-filter-bar__label,
body.cah-ep400 .cah-toolkit-filterbar > .cah-filter-row,
body.cah-ep400 .cah-toolkit-filterbar > .cah-active-bar {
    display: none;
}

/* ----- Tool-card grid: 4-col desktop / 2-col tablet / 1-col mobile -----
   Targets the wp:post-template grid layout inside .cah-toolkit-archive__grid
   (the wp:query block). The tool-card surface itself is T-EP07. */
body.cah-ep400 .cah-toolkit-archive__grid .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}
@media (max-width: 1024px) {
    body.cah-ep400 .cah-toolkit-archive__grid .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    body.cah-ep400 .cah-toolkit-archive__grid .wp-block-post-template.is-layout-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    body.cah-ep400 .cah-toolkit-archive__chip-row {
        gap: 6px;
    }
}
/* ========== /EP-400 toolkit archive (T-EP06) ========== */
/* =====================================================================
   T-EP07 — EP-400 Tool card variant
   Scoped under `body.cah-ep400` so it activates only once T-EP19 wires
   the body class. The DOM ships from `patterns/tool-card.php` with both
   legacy + EP-400 hooks; this block re-styles the legacy `.cah-tool-card`
   shell + the new `.cah-card-*-row` / `.cah-card-icon` /
   `.cah-card-category-pill` / `.cah-card-estate-count` hooks into the
   EP-400 spec (mockup `ep400/toolkit-archive.png` card detail, plan §6
   T-EP07).

   Spec:
   - 1px `--cah-t2-border-default` border, `--cah-t1-radius-12` radius,
     no shadow.
   - Top row: 28x28 brand icon + tool name (.cah-c-title-default weight 500)
     + category pill (mint or neutral, `--cah-t1-radius-pill`).
   - Middle: 2-line `.cah-c-body-default` description, 60ch max,
     `--cah-t2-content-subtle`.
   - Bottom row: 5-star rating + estate count `(N estates)`
     `.cah-c-label-default` muted.
   - Hover: 1px translate-up + soft shadow `0 4px 12px rgba(0,0,0,0.04)`.
   - Card height ~ 200px +/- 12px.
   ===================================================================== */

body.cah-ep400 .cah-tool-card {
    background: var(--cah-t1-neutral-white);
}

/* ========== T-EP10: EP-400 champion card + single champion ==========
   Scoped under body.cah-ep400 (wired by T-EP19) so beehive surfaces
   render unchanged. Tokens consumed by slug only — no raw hex.
   - Card: 1px var(--cah-t2-border-default), var(--cah-t1-radius-12),
     40×40 hex avatar (solid brand-blue-800), bee glyph, mint estate
     pill, hover lift + soft shadow.
   - Single-champion: hero band on bg-subtle with 96×96 hex avatar,
     display H1, mint pill, mailto, 64×64 bee accent. White-card
     content area: bio + small-tool grid + compact activity list.

   CONTRACT CHANGE (vs T-UX47): hex avatar fill no longer mirrors
   estate colour. EP-400 uses a single solid var(--cah-t1-brand-blue-800).
   Estate identity is carried by the mint pill below the name.
   ==================================================================== */

body.cah-ep400 .cah-champion-card {
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-12);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 188px;
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    position: relative;
}

body.cah-ep400 .cah-tool-card:hover {
    min-height: 0;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
body.cah-ep400 .cah-champion-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-color: var(--cah-t2-border-default-hover);
}

/* Top row */
body.cah-ep400 .cah-tool-card .cah-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
body.cah-ep400 .cah-tool-card .cah-card-top-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}
body.cah-ep400 .cah-tool-card .cah-card-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: var(--cah-t1-radius-4);
    object-fit: contain;
    background: transparent;
    border: none;
    padding: 0;
}

body.cah-ep400 .cah-tool-card .cah-card-title {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--cah-t2-content-default);
    margin: 0;
}

body.cah-ep400 .cah-champion-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
body.cah-ep400 .cah-champion-card__hex {
    /* Override the legacy disc treatment from T-UX47 so the SVG hex
       is the only visible avatar surface in EP-400. */
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    clip-path: none;
}
body.cah-ep400 .cah-champion-card__hex-svg {
    display: block;
    width: 40px;
    height: 40px;
}
body.cah-ep400 .cah-champion-card__hex-fill {
    fill: var(--cah-t1-brand-blue-800);
}
body.cah-ep400 .cah-champion-card__hex-text {
    fill: var(--cah-t1-neutral-white);
    font-family: var(--cah-t1-font-family-sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
body.cah-ep400 .cah-champion-card__bee {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: block;
}
/* T-UI01: estate brandmarks in the card corner read at a slightly larger
   weight than the compact bee glyph (which stays 16px for Candide). */
body.cah-ep400 .cah-champion-card__bee.is-estate {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    object-fit: contain;
}
/* /T-UI01 */
body.cah-ep400 .cah-champion-card__name {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--cah-t2-content-default);
    margin: 0;
}
body.cah-ep400 .cah-champion-card__name a {
    color: inherit;
    text-decoration: none;
}
body.cah-ep400 .cah-champion-card__name a:hover {
    text-decoration: underline;
}
body.cah-ep400 .cah-champion-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
body.cah-ep400 .cah-champion-card__pill {
    display: inline-flex;
    align-items: center;
    /* T-DR04 — champions-archive.png: teal-OUTLINED estate pill. */
    background: transparent;
    color: var(--cah-t1-brand-teal-700);
    border-radius: var(--cah-t1-radius-pill);
    border: 1px solid var(--cah-t1-brand-teal-400);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    width: auto;
}
body.cah-ep400 .cah-champion-card__team {
    font-size: 12px;
    color: var(--cah-t2-content-subtle);
    text-transform: none;
    letter-spacing: 0;
}
body.cah-ep400 .cah-champion-card__mailto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
    font-size: 14px;
}
body.cah-ep400 .cah-champion-card__mailto:hover {
    color: var(--cah-t2-link-content-hover);
}
body.cah-ep400 .cah-champion-card__envelope {
    flex: 0 0 16px;
    width: 16px;
    height: 12px;
    color: var(--cah-t2-link-content-default);
}

/* ---- single champion (T-EP10 / plan §3.1 derivation) ---- */

body.cah-ep400 .cah-champion-detail__main {
    background: var(--cah-t2-bg-default);
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-champion-detail__back {
    display: inline-block;
    padding: 24px 24px 0;
    color: var(--cah-t2-link-content-default);
    font-size: 14px;
    text-decoration: underline;
}
body.cah-ep400 .cah-champion-detail__hero {
    background: var(--cah-t2-bg-subtle);
    min-height: 320px;
    display: flex;
    align-items: center;
    padding: 48px 24px;
}
body.cah-ep400 .cah-champion-detail__hero-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
body.cah-ep400 .cah-champion-detail__hero-main {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1 1 auto;
    min-width: 0;
}
body.cah-ep400 .cah-champion-detail__hex {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    background: transparent;
    border-radius: 0;
    clip-path: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.cah-ep400 .cah-champion-detail__hex-svg {
    display: block;
    width: 96px;
    height: 96px;
}
body.cah-ep400 .cah-champion-detail__hex-fill {
    fill: var(--cah-t1-brand-blue-800);
}
body.cah-ep400 .cah-champion-detail__hex-text {
    fill: var(--cah-t1-neutral-white);
    font-family: var(--cah-t1-font-family-sans);
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
body.cah-ep400 .cah-champion-detail__heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
body.cah-ep400 .cah-champion-detail__name {
    font-family: var(--cah-t1-font-family-serif, var(--cah-t1-font-family-sans));
    font-size: 36px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--cah-t2-content-default);
    margin: 0;
}
body.cah-ep400 .cah-champion-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
body.cah-ep400 .cah-champion-detail__pill {
    background: var(--cah-t2-bg-brand);
    color: var(--cah-t2-content-brand);
    border-radius: var(--cah-t1-radius-pill);
    border: 0;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}
body.cah-ep400 .cah-champion-detail__team {
    font-size: 12px;
    color: var(--cah-t2-content-subtle);
}
body.cah-ep400 .cah-champion-detail__mailto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
    font-size: 14px;
}
body.cah-ep400 .cah-champion-detail__bee {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
}
body.cah-ep400 .cah-champion-detail__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 64px;
    background: var(--cah-t2-bg-default);
    display: flex;
    flex-direction: column;
    gap: 32px;
}
body.cah-ep400 .cah-champion-detail__bio {
    font-size: 18px;
    line-height: 1.55;
    color: var(--cah-t2-content-default);
    margin: 0;
}
body.cah-ep400 .cah-champion-detail__section-title {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 20px;
    font-weight: 500;
    color: var(--cah-t2-content-default);
    margin: 0 0 16px;
}
body.cah-ep400 .cah-champion-detail__tools-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
body.cah-ep400 .cah-champion-detail__tool {
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-12);
    background: var(--cah-t2-bg-default);
    padding: 12px;
}
body.cah-ep400 .cah-champion-detail__tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cah-t2-content-default);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
body.cah-ep400 .cah-champion-detail__tool-link:hover {
    color: var(--cah-t2-content-default-hover);
}
body.cah-ep400 .cah-champion-detail__tool-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}
body.cah-ep400 .cah-champion-detail__activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
body.cah-ep400 .cah-champion-detail__activity-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--cah-t2-border-subtle);
    font-size: 14px;
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-champion-detail__activity-item:first-child {
    border-top: 0;
}
body.cah-ep400 .cah-champion-detail__activity-verb {
    color: var(--cah-t2-content-subtle);
}
body.cah-ep400 .cah-champion-detail__activity-link {
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.cah-ep400 .cah-tool-card .cah-card-title a {
    color: inherit;
    text-decoration: none;
}
body.cah-ep400 .cah-tool-card .cah-card-title a:hover {
    color: var(--cah-t1-brand-blue-700);
}

/* Category pill */
body.cah-ep400 .cah-tool-card .cah-card-category-pill {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--cah-t1-radius-pill);
    background: var(--cah-t2-bg-subtle);
    color: var(--cah-t2-content-default);
    border: none;
    white-space: nowrap;
    letter-spacing: 0;
    text-transform: none;
}
body.cah-ep400 .cah-tool-card .cah-card-category-pill.is-brand {
    background: var(--cah-t2-bg-brand);
    color: var(--cah-t2-content-brand);
}
body.cah-ep400 .cah-tool-card .cah-card-category-pill.is-neutral {
    background: var(--cah-t2-bg-subtle);
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-tool-card .cah-card-category-pill:empty {
    display: none;
}

/* Description: 60ch max + 2-line clamp */
body.cah-ep400 .cah-tool-card .cah-card-desc {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: var(--cah-t2-content-subtle);
    margin: 0;
    max-width: 60ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bottom row: rating + estate count */
body.cah-ep400 .cah-tool-card .cah-card-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}
body.cah-ep400 .cah-tool-card .cah-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-tool-card .cah-stars {
    color: var(--cah-t1-utility-orange-500);
    letter-spacing: 1px;
}
body.cah-ep400 .cah-tool-card .cah-star-empty {
    color: var(--cah-t1-neutral-300);
}
body.cah-ep400 .cah-tool-card .cah-stars-label {
    color: var(--cah-t2-content-subtle);
    font-size: 12px;
    line-height: 16px;
}

body.cah-ep400 .cah-tool-card .cah-card-estate-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    color: var(--cah-t2-content-subtle);
}
body.cah-ep400 .cah-tool-card .cah-card-estate-count .cah-estate-dot {
    display: none;
}
body.cah-ep400 .cah-tool-card .cah-card-estate-count .cah-estate-count {
    font-weight: 400;
}

/* Provider line */
body.cah-ep400 .cah-tool-card .cah-card-provider {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 12px;
    line-height: 16px;
    color: var(--cah-t2-content-subtle);
    margin: -4px 0 0 0;
}

body.cah-ep400 .cah-tool-card.is-planned {
    border-style: dashed;
    border-color: var(--cah-t2-border-subtle);
}

/* Override the inline `style=""` on the legacy wrapper so the EP-400
   cascade actually wins. The render markup ships defaults inline for
   pre-EP19 sites; once the body class lands we replace the four key
   shell properties (background, border, border-radius, min-height). */
body.cah-ep400 .cah-tool-card[style] {
    background: var(--cah-t1-neutral-white) !important;
    border: 1px solid var(--cah-t2-border-default) !important;
    border-radius: var(--cah-t1-radius-12) !important;
    min-height: 188px !important;
}
body.cah-ep400 .cah-tool-card[style]:hover {
    border-color: var(--cah-t2-border-default-hover) !important;
}

/* T-UI11: AI Toolkit archive card — Figma redesign ======================
   Larger card; the brand icon stands alone in the top row as a rounded-square
   avatar, the title drops to its own row, and estate usage renders as
   overlapping estate brandmark avatars + a `+N` overflow. Scoped under
   body.cah-ep400, later in the cascade than the T-EP07 block above so these
   win on equal specificity. The LIVE render (parts-php/tool-card.php) ships
   NO inline style, so the `.cah-tool-card[style]` overrides above do not match
   it — these rules drive the live card. Mockup: ep400/toolkit-archive.png. */
body.cah-ep400 .cah-tool-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-12);
    min-height: 248px;
}

/* Legacy blocker: the unscoped `.cah-tool-card:hover { border-color:#c8dbd4 }`
   (style.css ~993) fires on EP-400 because the only EP-400 hover-border rule
   targets `.cah-tool-card[style]`, which the no-inline-style LIVE card never
   matches. Scope the EP-400 hover border to the live card here. */
body.cah-ep400 .cah-tool-card:hover {
    border-color: var(--cah-t2-border-default-hover);
}

/* Top row: icon avatar (left) + category pill (right). */
body.cah-ep400 .cah-tool-card .cah-card-top-row {
    align-items: flex-start;
    gap: 12px;
}

/* Rounded-square brand icon avatar (~44px). */
body.cah-ep400 .cah-tool-card .cah-card-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: var(--cah-t1-radius-8);
    border: 1px solid var(--cah-t2-border-default);
    background: var(--cah-t1-neutral-white);
    object-fit: contain;
    box-sizing: border-box;
}
body.cah-ep400 .cah-tool-card .cah-card-icon--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    color: var(--cah-t1-brand-blue-700);
    background: var(--cah-t2-bg-brand);
    border-color: transparent;
    padding: 0;
}

/* Title now sits on its own row beneath the icon — larger than the inline
   top-row variant from T-EP07. */
body.cah-ep400 .cah-tool-card .cah-card-title {
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    margin: 0;
    overflow-wrap: anywhere;
}

/* Taller card → 3-line description clamp. */
body.cah-ep400 .cah-tool-card .cah-card-desc {
    -webkit-line-clamp: 3;
    max-width: none;
}

/* Estate indicators: overlapping brandmark avatars + `+N` overflow. */
body.cah-ep400 .cah-tool-card .cah-estate-logos {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
}
body.cah-ep400 .cah-tool-card .cah-estate-logos .cah-estate-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cah-t1-neutral-white);
    border: 1px solid var(--cah-t2-border-default);
    object-fit: contain;
    margin-left: -6px;
}
body.cah-ep400 .cah-tool-card .cah-estate-logos .cah-estate-logo:first-child {
    margin-left: 0;
}
/* Coloured-dot fallback (estate without a brandmark yet) — re-show the dot
   that the T-EP07 block hides, sized to sit in the avatar row. */
body.cah-ep400 .cah-tool-card .cah-estate-logos .cah-estate-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--cah-t1-neutral-white);
    margin-left: -6px;
}
body.cah-ep400 .cah-tool-card .cah-estate-logos .cah-estate-dot:first-child {
    margin-left: 0;
}
body.cah-ep400 .cah-tool-card .cah-estate-logos .cah-estate-more {
    margin-left: 6px;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 12px;
    line-height: 16px;
    color: var(--cah-t2-content-subtle);
}
/* /T-UI11 ============================================================== */

/* ============================================================
   T-EP08 — EP-400 single-tool detail surface.

   Scoped to `body.cah-ep400` so the legacy beehive-honey detail
   block above stays the source of truth on default requests until
   T-EP19 flips the body class globally. All values consume Tier 2
   semantic tokens or composite typography classes — never raw hex.
   ============================================================ */

body.cah-ep400 .cah-tool-detail__back {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 20px;
    color: var(--cah-t2-link-content-default);
    text-decoration: none;
}
body.cah-ep400 .cah-tool-detail__back:hover {
    color: var(--cah-t2-link-content-hover);
    text-decoration: underline;
}

/* ---- Surface ---- */

body.cah-ep400 .cah-tool-detail {
    display: block;
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

/* ---- Header (icon + title block on the left, blurb on the right) ---- */

body.cah-ep400 .cah-tool-detail__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 32px;
    margin-bottom: 16px;
}

body.cah-ep400 .cah-tool-detail__header-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

body.cah-ep400 .cah-tool-detail__logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    flex: 0 0 48px;
}

body.cah-ep400 .cah-tool-detail__title-wrap {
    min-width: 0;
}

body.cah-ep400 .cah-tool-detail__title {
    /* T-DR06 — tool-detail.png: the tool name is large Instrument Serif. */
    margin: 0;
    color: var(--cah-t2-content-default);
    font-family: var(--cah-t1-font-family-serif);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

body.cah-ep400 .cah-tool-detail__vendor {
    margin: 2px 0 0 0;
    color: var(--cah-t2-content-subtle);
}

body.cah-ep400 .cah-tool-detail__blurb {
    margin: 0;
    color: var(--cah-t2-content-subtle);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* ---- Tag chip row (neutral outline; reused by T-EP06/T-EP07) ---- */

body.cah-ep400 .cah-tool-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px 0;
    padding: 0;
    list-style: none;
}

body.cah-ep400 .cah-tag-chip--ep400 {
    display: inline-block;
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-pill, 999px);
    color: var(--cah-t2-content-subtle);
    text-decoration: none;
}
body.cah-ep400 .cah-tag-chip--ep400:hover {
    border-color: var(--cah-t2-border-default-hover);
    color: var(--cah-t2-content-default);
}

/* ---- Rating row: avg ★ · usage records · champions ---- */

body.cah-ep400 .cah-tool-detail__rating {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 0 24px 0;
    padding: 0;
}

body.cah-ep400 .cah-tool-detail__rating-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 64px;
}

body.cah-ep400 .cah-tool-detail__rating-item dt {
    color: var(--cah-t2-content-subtle);
    margin: 0 0 2px 0;
}

body.cah-ep400 .cah-tool-detail__rating-item dd {
    margin: 0;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-tool-detail__rating-star {
    color: var(--cah-t2-content-brand);
    margin-left: 4px;
}

/* ---- Status banner (success variant) ---- */

body.cah-ep400 .cah-tool-detail__banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    margin: 0 0 32px 0;
    border-left: 4px solid transparent;
    border-radius: 4px;
}

body.cah-ep400 .cah-tool-detail__banner--success {
    background: var(--cah-t2-bg-utility-success);
    color: var(--cah-t2-content-utility-success);
    border-left-color: var(--cah-t2-border-utility-success);
}

body.cah-ep400 .cah-tool-detail__banner-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--cah-t2-content-utility-success);
    margin-top: 2px;
}

body.cah-ep400 .cah-tool-detail__banner-copy {
    margin: 0;
    color: var(--cah-t2-content-utility-success);
}

/* ---- Key Use Cases + Strengths / Considerations ---- */

body.cah-ep400 .cah-tool-detail__section {
    margin: 0 0 32px 0;
}

body.cah-ep400 .cah-tool-detail__section-title {
    margin: 0 0 12px 0;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-tool-detail__bullets {
    margin: 0;
    padding-left: 20px;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-tool-detail__bullets li {
    margin-bottom: 4px;
}

body.cah-ep400 .cah-tool-detail__pros-cons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    margin: 0 0 32px 0;
}

/* ---- Estates Using {tool} table ---- */

body.cah-ep400 .cah-tool-detail__estates {
    margin-top: 32px;
}

body.cah-ep400 .cah-tool-detail__estates-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* T-UI08: estate-submission card chrome moved to the card wrapper so the
   collapsed row + expanded ("See more") region share one bordered surface;
   row regrid'd to 4 licence columns (License type / name / Access / Held by)
   plus the stars + the See-more toggle. */
body.cah-ep400 .cah-tool-detail__estate-card {
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: 12px;
    padding: 16px 20px;
}

body.cah-ep400 .cah-tool-detail__estate-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.3fr) repeat(4, minmax(0, 1fr)) auto auto;
    gap: 16px;
    align-items: center;
}
/* /T-UI08 */

body.cah-ep400 .cah-tool-detail__estate-id {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.cah-ep400 .cah-tool-detail__estate-hex {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

body.cah-ep400 .cah-tool-detail__estate-hex svg {
    width: 32px;
    height: 32px;
}

body.cah-ep400 .cah-tool-detail__estate-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

body.cah-ep400 .cah-tool-detail__estate-name {
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-tool-detail__estate-sector {
    color: var(--cah-t2-content-subtle);
}

body.cah-ep400 .cah-tool-detail__estate-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

body.cah-ep400 .cah-tool-detail__estate-col > span:first-child {
    color: var(--cah-t2-content-subtle);
}

body.cah-ep400 .cah-tool-detail__estate-col > span:last-child {
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-tool-detail__estate-stars {
    display: flex;
    gap: 2px;
    font-size: 14px;
    line-height: 1;
}

body.cah-ep400 .cah-tool-detail__star.is-on {
    color: var(--cah-t2-content-brand);
}

body.cah-ep400 .cah-tool-detail__star.is-off {
    color: var(--cah-t2-border-default);
}

/* T-UI08: dynamic Admin-note panel (amber warning) — replaces the hardcoded
   green "Approved…" banner. Wired to the tool's `admin_note` meta; suppressed
   when empty (see tool-detail.php). */
body.cah-ep400 .cah-tool-detail__banner--warning {
    background: var(--cah-t2-bg-utility-warning);
    color: var(--cah-t2-content-utility-warning);
    border-left-color: var(--cah-t2-border-utility-warning);
}
body.cah-ep400 .cah-tool-detail__banner--warning .cah-tool-detail__banner-icon {
    color: var(--cah-t2-content-utility-warning);
}
body.cah-ep400 .cah-tool-detail__banner-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
body.cah-ep400 .cah-tool-detail__banner-label {
    color: var(--cah-t2-content-utility-warning);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
body.cah-ep400 .cah-tool-detail__banner--warning .cah-tool-detail__banner-copy {
    color: var(--cah-t2-content-utility-warning);
}

/* T-UI08: estate brandmark avatar (champion-card parity; falls back to the
   inline initials polygon when cah_estate_logo_url() returns ''). */
body.cah-ep400 .cah-tool-detail__estate-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

/* T-UI09: See more / See less toggle + expanded submission region. */
body.cah-ep400 .cah-tool-detail__estate-toggle {
    justify-self: end;
    white-space: nowrap;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-pill, 999px);
    color: var(--cah-t2-link-content-default);
    cursor: pointer;
}
body.cah-ep400 .cah-tool-detail__estate-toggle:hover {
    border-color: var(--cah-t2-border-default-hover);
    color: var(--cah-t2-link-content-hover);
}
/* The button shows exactly one label depending on its expanded state. */
body.cah-ep400 .cah-tool-detail__estate-toggle .cah-tool-detail__estate-toggle-less,
body.cah-ep400 .cah-tool-detail__estate-toggle[aria-expanded="true"] .cah-tool-detail__estate-toggle-more {
    display: none;
}
body.cah-ep400 .cah-tool-detail__estate-toggle[aria-expanded="true"] .cah-tool-detail__estate-toggle-less {
    display: inline;
}

body.cah-ep400 .cah-tool-detail__estate-expand {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--cah-t2-border-default);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 32px;
}
body.cah-ep400 .cah-tool-detail__estate-expand-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
body.cah-ep400 .cah-tool-detail__estate-expand-label {
    color: var(--cah-t2-content-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
body.cah-ep400 .cah-tool-detail__estate-expand-text {
    margin: 0;
    color: var(--cah-t2-content-default);
}
/* /T-UI08 */

/* ---- Mobile collapse (≤ 640px per §3.1 universal rule 15) ---- */

@media (max-width: 640px) {
    body.cah-ep400 .cah-tool-detail {
        padding: 20px;
    }
    body.cah-ep400 .cah-tool-detail__header {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    body.cah-ep400 .cah-tool-detail__pros-cons {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    body.cah-ep400 .cah-tool-detail__estate-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    body.cah-ep400 .cah-tool-detail__estate-stars {
        justify-content: flex-start;
    }
    /* T-UI08: mobile — estate-grid single-column + See-more full-width on ≤640px. */
    body.cah-ep400 .cah-tool-detail__estate-toggle {
        justify-self: stretch;
        text-align: center;
    }
    body.cah-ep400 .cah-tool-detail__estate-expand {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    /* /T-UI08 */
}

/* ========== EP-400 champions archive (T-EP09) ==========
   Brings the AI Champions archive (`/champions/`) up to the EP-400
   visual language. Surface elements (from archive-champion.html +
   champion-filter-chips.php):
     .cah-champions-archive              — page wrapper (template root group)
     .cah-champions-archive__title       — H1 "AI Champions"
     .cah-champions-archive__intro       — 2-line description
     .cah-champions-archive__filterbar   — wrapper for the search form
     .cah-champions-archive__search      — full-width 44px pill search form
     .cah-champion-filterbar             — T-UI12 role-aware dropdown row
                                           (Team; +Estate for Master Admin)
     .cah-champions-archive__grid        — 4-col champion-card grid container
   T-UI12 replaced the team chip row with the `.cah-dropdown` dropdown row
   surfaced below the search (see the gating block lower down).
*/
body.cah-ep400 .cah-champions-archive {
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-champions-archive__title {
    /* T-DR05 — large Instrument Serif (display) per champions-archive.png. */
    margin: 0 0 8px;
    font-family: var(--cah-t1-font-family-serif);
    font-size: 56px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}
body.cah-ep400 .cah-champions-archive__intro {
    margin: 0;
    color: var(--cah-t2-content-subtle);
}

/* ----- Pill search input (44px tall, white, neutral form-border) -----
   Same geometry as the T-EP06 toolkit search so the two archives feel
   like one family. */
body.cah-ep400 .cah-champions-archive__search {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--cah-t2-form-bg-default);
    border: 1px solid var(--cah-t2-form-border-default);
    border-radius: var(--cah-t1-radius-pill); /* 999px */
    box-shadow: none;
    gap: 8px;
}
body.cah-ep400 .cah-champions-archive__search:focus-within {
    border-color: var(--cah-t2-form-border-focus);
}
body.cah-ep400 .cah-champions-archive__search .cah-search__glyph {
    flex: 0 0 auto;
    color: var(--cah-t2-content-subtle);
}
body.cah-ep400 .cah-champions-archive__search .cah-search__input {
    flex: 1 1 auto;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-champions-archive__search .cah-search__input::placeholder {
    color: var(--cah-t2-content-subtle);
}

/* ----- T-UI12 — Team/Estate filter dropdowns below the search -----
   The EP-400 affordance is now the role-aware `.cah-champion-filterbar`
   dropdown row (General/Estate Admin → Team; Master Admin → Estate +
   Team), styled by the shared `.cah-dropdown` language. We surface that
   row under EP-400 (it carries the correct 2-vs-1 role logic) and hide
   only its "Filters" label so it sits cleanly under the search bar. The
   chip row was removed from champion-filter-chips.php. */
body.cah-ep400 .cah-champion-filterbar > .cah-filter-bar__label {
    display: none;
}
body.cah-ep400 .cah-champion-filterbar {
    margin-top: 12px;
}
body.cah-ep400 .cah-champion-filterbar > .cah-filter-row--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Hide the EP-400 wrapper (search + chip row) on non-EP400 deploys so
   pre-T-EP19 the legacy dropdown row is the only affordance. */
body:not(.cah-ep400) .cah-champions-archive__filterbar {
    display: none;
}

/* ----- Champion-card grid: 4-col desktop / 2-col tablet / 1-col mobile -----
   Targets the wp:post-template grid layout inside .cah-champions-archive__grid
   (the wp:query block). The champion-card surface itself is T-EP10. */
body.cah-ep400 .cah-champions-archive__grid .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}
@media (max-width: 1024px) {
    body.cah-ep400 .cah-champions-archive__grid .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    body.cah-ep400 .cah-champions-archive__grid .wp-block-post-template.is-layout-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    /* T-UI12: stack the filter dropdowns tighter on narrow screens. */
    body.cah-ep400 .cah-champion-filterbar > .cah-filter-row--inline {
        gap: 6px;
    }
}
/* ========== /EP-400 champions archive (T-EP09) ========== */
body.cah-ep400 .cah-champion-detail__activity-date {
    color: var(--cah-t2-content-subtle);
    font-size: 12px;
    margin-left: auto;
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    body.cah-ep400 .cah-champion-detail__hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    body.cah-ep400 .cah-champion-detail__hero-main {
        flex-direction: column;
        align-items: flex-start;
    }
    body.cah-ep400 .cah-champion-detail__bee {
        align-self: flex-end;
    }
    body.cah-ep400 .cah-champion-detail__name {
        font-size: 28px;
    }
}

/* ========== /T-EP10 ========== */

/* ========== T-EP13 — EP-400 OTP cell-flash keyframes ==========
 *
 * The 2s border-flash on submit error is defined in auth.css; the
 * keyframes live here in style.css so they're available even when
 * auth.css is not enqueued (some flows reuse the cell markup outside
 * `wp-login.php`). Token-driven; no raw hex.
 */
@keyframes cah-otp-cell-flash {
    0%, 100% {
        border-color: var(--cah-t2-border-utility-error);
        box-shadow: 0 0 0 0 var(--cah-t2-border-utility-error);
    }
    50% {
        border-color: var(--cah-t2-border-utility-error);
        box-shadow: 0 0 0 3px var(--cah-t2-border-utility-error);
    }
}
/* ========== /T-EP13 ========== */
/* ========== EP-400 login + auth-card shell (T-EP12) ==========
   Mockup: site/tests/playwright/mockups/ep400/login-desktop.png.
   Spec:   docs/superpowers/plans/2026-05-31-wave-ep400-redesign.md
           §3.1 universal rules + §7 T-EP12.

   The full T-EP12 auth-shell ruleset lives in
   `assets/css/auth.css` because that file is what
   `LoginPage::enqueue_auth_styles` enqueues on /wp-login.php (the
   only surface T-EP12 renders pre-T-EP19). This style.css block
   reserves the `body.cah-ep400` + `.cah-auth-*--ep400` selectors
   so any front-end surface that includes them later (T-EP15
   account page renders the same shell on /account/) picks up the
   page background without re-loading auth.css.

   Token consumption: `var(--cah-t2-*)` only, per
   docs/spec/brand-tokens-ep400.md "Token consumption convention".
   ============================================================== */
body.cah-ep400.cah-auth-page {
    background: var(--cah-t2-bg-subtle);
    color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-auth-shell--ep400 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 48px 16px;
}
body.cah-ep400 .cah-auth-card--ep400 {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: 24px;
    padding: 48px 48px 40px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}
@media (max-width: 640px) {
    body.cah-ep400 .cah-auth-card--ep400 {
        max-width: 100%;
        padding: 32px 24px 28px;
        border-radius: 16px;
    }
}
/* ========== /T-EP12 ========== */
/* ========== T-EP15 — EP-400 Account / profile page ==========
   Auth-shell card scaled wider (720px) hosting the user-edit form.
   Renders via the `[cah_account_profile]` shortcode auto-injected
   onto `/account/` by Account\AccountPage. Tokens are inert until
   T-EP19 wires body.cah-ep400. Reusable bits — .cah-chip--brand,
   .cah-pill--{dark,dark-outlined,danger-outlined} — are defined
   here so T-EP16/T-EP17/T-EP18 can compose them.

   Plan §3.1 Account/profile (T-EP15):
   - Card max-width 720px on bg/subtle
   - H1 32px Instrument Sans "Account" via .cah-c-headline-lg
   - 5 form rows, 2-col label/control with 32px column-gap
   - Save bar: Cancel (outlined-dark) + Save (dark), gap-16
   ============================================================== */

body.cah-ep400 .cah-account-shell {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    background: var(--cah-t2-bg-subtle);
    padding: 48px 24px;
}

body.cah-ep400 .cah-account-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 720px;
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body.cah-ep400 .cah-account-title {
    /* composite class .cah-c-headline-lg supplies family / size / lh / weight */
    margin: 0 0 24px;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-account-notice {
    background: var(--cah-t2-bg-utility-success);
    color: var(--cah-t2-content-utility-success);
    border-left: 4px solid var(--cah-t2-border-utility-success);
    padding: 12px 16px;
    border-radius: 4px;
    margin: 0 0 24px;
}

body.cah-ep400 .cah-account-form {
    margin: 0;
}

body.cah-ep400 .cah-account-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    column-gap: 32px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--cah-t2-border-subtle);
}

body.cah-ep400 .cah-account-row:last-of-type {
    border-bottom: 0;
}

body.cah-ep400 .cah-account-label {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-account-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.cah-ep400 .cah-account-control--mfa {
    justify-content: space-between;
}

body.cah-ep400 .cah-account-input {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-form-border-default);
    border-radius: 4px;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 16px;
    line-height: 24px;
    color: var(--cah-t2-content-default);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

body.cah-ep400 .cah-account-input:focus,
body.cah-ep400 .cah-account-input:focus-visible {
    border-color: var(--cah-t2-form-border-focus);
    box-shadow: 0 0 0 2px var(--cah-t2-focus-ring-border-default);
}

body.cah-ep400 .cah-account-mfa-state {
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    color: var(--cah-t2-content-subtle);
}

body.cah-ep400 .cah-account-link {
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
    font-weight: 700;
}

body.cah-ep400 .cah-account-link:hover,
body.cah-ep400 .cah-account-link:focus-visible {
    color: var(--cah-t2-link-content-hover);
}

body.cah-ep400 .cah-account-muted {
    color: var(--cah-t2-content-subtle);
}

body.cah-ep400 .cah-account-savebar {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--cah-t2-border-default);
}

/* ---------- shared chip + pill primitives (T-EP15 introduces;
   T-EP16/17/18/19/21 compose) ----------- */

body.cah-ep400 .cah-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
}

/* mint estate chip — `bg/brand` fill + `content/brand` text */
body.cah-ep400 .cah-chip--brand {
    background: var(--cah-t2-bg-brand);
    color: var(--cah-t2-content-brand);
    border-color: var(--cah-t2-bg-brand);
}

body.cah-ep400 .cah-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--cah-t1-font-family-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

/* primary dark pill — `btn/primary/bg/default` */
body.cah-ep400 .cah-pill--dark {
    background: var(--cah-t2-btn-primary-bg-default);
    color: var(--cah-t2-btn-primary-content-default);
    border-color: var(--cah-t2-btn-primary-bg-default);
}
body.cah-ep400 .cah-pill--dark:hover,
body.cah-ep400 .cah-pill--dark:focus-visible {
    background: var(--cah-t2-btn-primary-bg-hover);
    border-color: var(--cah-t2-btn-primary-bg-hover);
}

/* outlined-dark secondary pill */
body.cah-ep400 .cah-pill--dark-outlined {
    background: var(--cah-t2-bg-default);
    color: var(--cah-t2-content-default);
    border-color: var(--cah-t2-content-default);
}
body.cah-ep400 .cah-pill--dark-outlined:hover,
body.cah-ep400 .cah-pill--dark-outlined:focus-visible {
    background: var(--cah-t2-bg-default-hover);
}

/* outlined-danger pill — Reset MFA + parity destructive CTAs */
body.cah-ep400 .cah-pill--danger-outlined {
    background: var(--cah-t2-bg-default);
    color: var(--cah-t2-content-utility-error);
    border-color: var(--cah-t2-border-utility-error);
}
body.cah-ep400 .cah-pill--danger-outlined:hover,
body.cah-ep400 .cah-pill--danger-outlined:focus-visible {
    background: var(--cah-t2-bg-utility-error);
}

/* anonymous-visitor fallback rendered before login */
body.cah-ep400 .cah-account-login {
    box-sizing: border-box;
    max-width: 480px;
    margin: 64px auto;
    padding: 32px;
    background: var(--cah-t2-bg-default);
    border: 1px solid var(--cah-t2-border-default);
    border-radius: 12px;
    text-align: center;
}

@media (max-width: 640px) {
    body.cah-ep400 .cah-account-row {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }
    body.cah-ep400 .cah-account-card {
        padding: 24px;
    }
}

/* ========== /T-EP15 ========== */
/* ========== EP-400 Need-Help block (T-EP18) ==========
   Centred white card max-width 720px on `bg/subtle` page background.
   Three routing cards stacked vertical (gap-16). Each card composes
   the §3.1 universal pattern: 1px `border/default` + 12px radius +
   24px padding + hex-icon top-left + title + 2-line description +
   accent-link bottom-right. Hover lift -1px + soft shadow.
   Outlined-dark fallback CTA "Or contact a human →" at the bottom of
   the card. Scoped to `body.cah-ep400` so the legacy `.cah-need-help-form`
   / `.cah-need-help-contact` rules above keep rendering pre-T-EP19.
   ====================================================== */
body.cah-ep400 .cah-need-help.is-ep400 {
    box-sizing: border-box;
    max-width: 720px;
    margin: 48px auto;
    padding: 48px;
    background: #fff;
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-12, 12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

body.cah-ep400 .cah-page-shell:has(.cah-need-help.is-ep400) {
    background: var(--cah-t2-bg-subtle);
    padding: 64px 24px;
    max-width: none;
    border-radius: 0;
}

body.cah-ep400 .cah-need-help__header {
    margin: 0 0 32px;
    text-align: left;
}

body.cah-ep400 .cah-need-help__heading {
    /* `.cah-c-headline-lg` composite carries the family + 36/44 size/lh
       + weight; here we only zero margin + set token colour. */
}

/* ========== T-EP19 — 404 + search + generic page + body-class activation ==========
 *
 * The `body.cah-ep400` class added by the `body_class` filter in
 * functions.php activates every selector in this block (and every
 * `body.cah-ep400 .xxx` selector shipped by T-EP02..T-EP18).
 *
 * Three surfaces with no canonical mockup (404, search results, generic
 * page) are re-skinned to the EP-400 visual under that body scope here.
 *
 * Token consumption: Tier 2 slugs exclusively, except the 96×96 404 hex
 * bullet which uses the Tier 1 `brand/blue/200` fill directly (no Tier 2
 * slug for that role yet — flagged in T-EP19.pr.md notes).
 *
 * Spec: docs/superpowers/plans/2026-05-31-wave-ep400-redesign.md §3.1
 *       (404 page, Search results page, Generic page template).
 * ============================================================== */

/* --- 404 page --- */

body.cah-ep400 .cah-404 {
    max-width: 640px;
    margin: 0 auto;
    padding: 96px 24px 64px;
    text-align: center;
    background: var(--cah-t2-bg-default);
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-404__hex {
    display: flex;
    justify-content: center;
    margin: 0 0 32px;
}

body.cah-ep400 .cah-404__hex svg {
    width: 96px;
    height: 96px;
}

body.cah-ep400 .cah-404__title {
    margin: 0 0 16px;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-404__strap {
    margin: 0 0 32px;
    color: var(--cah-t2-content-subtle);
}

body.cah-ep400 .cah-404__cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

body.cah-ep400 .cah-404__cta-link {
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 16px;
    line-height: 24px;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

body.cah-ep400 .cah-404__cta-link:hover {
    color: var(--cah-t2-link-content-default-hover);
}

/* --- Search results --- */

body.cah-ep400 .cah-search__masthead {
    background: var(--cah-t2-bg-default);
    padding: 32px 0 24px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--cah-t2-border-subtle);
}

body.cah-ep400 .cah-search__eyebrow {
    color: var(--cah-t2-content-subtle);
    margin: 0 0 8px;
}

body.cah-ep400 .cah-search__query.wp-block-query-title {
    margin: 0 0 8px;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-need-help__subtitle {
    margin: 0;
    color: var(--cah-t2-content-subtle);
    font-size: 14px;
    line-height: 1.5;
}

body.cah-ep400 .cah-need-help__routes {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.cah-ep400 .cah-need-help__route-card {
    margin: 0;
    padding: 0;
}

body.cah-ep400 .cah-need-help__route-link {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: start;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--cah-t2-border-default);
    border-radius: var(--cah-t1-radius-12, 12px);
    text-decoration: none;
    color: var(--cah-t2-content-default);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

body.cah-ep400 .cah-need-help__route-link:hover,
body.cah-ep400 .cah-need-help__route-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-color: var(--cah-t2-border-default-hover);
}

body.cah-ep400 .cah-need-help__hex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

body.cah-ep400 .cah-need-help__hex svg {
    width: 32px;
    height: 32px;
    display: block;
}

body.cah-ep400 .cah-need-help__route-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

body.cah-ep400 .cah-need-help__route-title {
    /* `.cah-c-headline-sm` composite gives 20/28 weight 400 — the spec
       calls for 18px medium so we tighten size + bump weight locally. */
    font-size: 18px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-need-help__route-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--cah-t2-content-subtle);
    /* clamp to 2 lines per §3.1 spec */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.cah-ep400 .cah-need-help__route-cta {
    align-self: end;
    grid-column: 2 / 4;
    justify-self: end;
    font-size: 14px;
    font-weight: 500;
    color: var(--cah-t2-link-content-default, var(--cah-t1-brand-blue-600));
    margin-top: 8px;
}

body.cah-ep400 .cah-need-help__route-link:hover .cah-need-help__route-cta,
body.cah-ep400 .cah-need-help__route-link:focus-visible .cah-need-help__route-cta {
    color: var(--cah-t2-link-content-hover, var(--cah-t1-brand-blue-900));
}

/* Written-request fallback collapses by default — the routing cards
   are the primary triage. Re-renders the legacy mailto form as the
   collapsed body so existing REST submit path stays wired. */
body.cah-ep400 .cah-need-help__form-fallback {
    margin: 0 0 24px;
    padding: 0;
    border-top: 1px solid var(--cah-t2-border-default);
    padding-top: 16px;
}

body.cah-ep400 .cah-need-help__form-toggle {
    cursor: pointer;
    color: var(--cah-t2-link-content-default, var(--cah-t1-brand-blue-600));
    text-decoration: underline;
    font-size: 14px;
    padding: 4px 0;
}

body.cah-ep400 .cah-need-help__form-body {
    margin-top: 16px;
}

/* Outlined-dark pill bottom CTA — white bg, brand/blue/600 border +
   text, 999px radius. Centred under the card stack. */
body.cah-ep400 .cah-need-help__fallback {
    margin: 0;
    text-align: center;
}

body.cah-ep400 .cah-need-help__fallback-link {
    display: inline-block;
    padding: 12px 24px;
    background: #fff;
    color: var(--cah-t2-content-default);
    border: 1px solid var(--cah-t2-content-default);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body.cah-ep400 .cah-need-help__fallback-link:hover,
body.cah-ep400 .cah-need-help__fallback-link:focus-visible {
    background: var(--cah-t2-content-default);
    color: #fff;
}

/* Hide the legacy `.cah-need-help-contact` block on EP-400 — the
   outlined-dark fallback above replaces the email list as the human
   route. The mailto form itself stays available inside the
   `<details>` fallback. */
body.cah-ep400 .cah-need-help.is-ep400 .cah-need-help-contact {
    display: none;
}

@media (max-width: 640px) {
    body.cah-ep400 .cah-need-help.is-ep400 {
        margin: 24px auto;
        padding: 32px 24px;
    }
    body.cah-ep400 .cah-need-help__heading {
        font-size: 28px;
        line-height: 1.2;
    }
    body.cah-ep400 .cah-need-help__route-link {
        grid-template-columns: 32px 1fr;
        gap: 12px;
    }
    body.cah-ep400 .cah-need-help__route-cta {
        grid-column: 1 / 3;
        justify-self: start;
    }
}
/* ========== /EP-400 Need-Help block (T-EP18) ========== */
body.cah-ep400 .cah-search__count {
    color: var(--cah-t2-content-subtle);
    margin: 0;
}

body.cah-ep400 .cah-search-results,
body.cah-ep400 .cah-search__results {
    background: var(--cah-t2-bg-default);
    padding: 0;
}

body.cah-ep400 .cah-search__results .wp-block-post-template {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

body.cah-ep400 .cah-search__results .wp-block-post-template > li {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--cah-t2-border-subtle);
}

body.cah-ep400 .cah-search__results .cah-tool-card,
body.cah-ep400 .cah-search__results .cah-champion-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 12px 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.cah-ep400 .cah-search__results .cah-tool-card:hover,
body.cah-ep400 .cah-search__results .cah-champion-card:hover {
    background: var(--cah-t2-bg-default-hover);
    transform: none;
}

body.cah-ep400 .cah-search__results .cah-tool-card__logo,
body.cah-ep400 .cah-search__results .cah-champion-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
}

body.cah-ep400 .cah-search__empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--cah-t2-bg-default);
}

body.cah-ep400 .cah-search__empty-title {
    color: var(--cah-t2-content-default);
    margin: 0 0 12px;
}

body.cah-ep400 .cah-search__empty-strap {
    color: var(--cah-t2-content-subtle);
    margin: 0;
}

body.cah-ep400 .cah-search__empty-strap a {
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
}

/* --- Generic page --- */

body.cah-ep400 .cah-page {
    background: var(--cah-t2-bg-default);
}

body.cah-ep400 .cah-page-shell {
    background: var(--cah-t2-bg-default);
    padding-top: 32px;
}

body.cah-ep400 .cah-page-shell__hero {
    position: relative;
    min-height: 96px;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
}

body.cah-ep400 .cah-page-shell__hero-splash {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    height: 96px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

body.cah-ep400 .cah-page-shell__hero .cah-page-shell__title.wp-block-post-title {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-page-shell__content {
    color: var(--cah-t2-content-default);
}

body.cah-ep400 .cah-page-shell__content a {
    color: var(--cah-t2-link-content-default);
    text-decoration: underline;
}

/* --- Mobile --- */

@media (max-width: 640px) {
    body.cah-ep400 .cah-404 {
        padding-top: 64px;
    }
    body.cah-ep400 .cah-404__hex svg {
        width: 80px;
        height: 80px;
    }
    body.cah-ep400 .cah-search__results .cah-tool-card,
    body.cah-ep400 .cah-search__results .cah-champion-card {
        min-height: 56px;
        padding: 10px 8px;
    }
    body.cah-ep400 .cah-page-shell__hero-splash {
        width: 200px;
        opacity: 0.2;
    }
}

/* ========== /T-EP19 ========== */
/* ========== T-EP20 — Coming-soon hub-card dashed variant + Academy/Use Cases holding pages ==========
   Spec: docs/superpowers/plans/2026-05-31-wave-ep400-redesign.md §3.1 + §7 T-EP20.
   Scope: `body.cah-ep400` only — legacy Beehive cards unchanged until T-EP19
   wires the body class. Composite tokens (`cah-c-meta-default`, `cah-c-headline-lg`)
   carry typography; this block only paints the dashed border, pill, and shell. */

body.cah-ep400 .cah-hub-card.is-coming-soon {
    /* Same dimensions as `.cah-hub-card--active` (above) but: 2px dashed
       border at 35% alpha of brand/blue/600, no shadow, content greyed,
       icon faded. The card stays clickable so the holding page is
       reachable; aria-disabled is set on the markup for SR users. */
    background: var(--cah-t2-bg-default);
    border: 2px dashed color-mix(in srgb, var(--cah-t1-brand-blue-600) 35%, transparent);
    border-radius: var(--cah-t1-radius-12);
    padding: 24px;
    gap: 16px;
    color: var(--cah-t2-content-disabled);
    box-shadow: none;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
body.cah-ep400 .cah-hub-card.is-coming-soon:hover {
    /* No lift, no shadow — distinct from active cards which lift on hover. */
    transform: none;
    box-shadow: none;
    border-color: color-mix(in srgb, var(--cah-t1-brand-blue-600) 50%, transparent);
}
body.cah-ep400 .cah-hub-card.is-coming-soon .cah-hub-card__icon,
body.cah-ep400 .cah-hub-card.is-coming-soon .cah-hub-card__icon-svg {
    opacity: 0.6;
}
body.cah-ep400 .cah-hub-card.is-coming-soon .cah-hub-card__title,
body.cah-ep400 .cah-hub-card.is-coming-soon .cah-hub-card__desc {
    color: var(--cah-t2-content-disabled);
}

/* `.cah-pill.is-disabled` — neutral-200 bg + neutral-700 text. The
   `.cah-c-meta-default` class on the markup carries the 10/14 700
   uppercase letter-spaced-0.16em typography. */
.cah-pill.is-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: var(--cah-t1-neutral-200);
    color: var(--cah-t1-neutral-700);
    border-radius: var(--cah-t1-radius-pill);
    text-decoration: none;
    cursor: default;
}

/* ---- Academy courses-archive holding page (`archive-sfwd-courses.html`) ----
   720px centred column on bg/default. The block-theme `<main>` already
   constrains width via `contentSize:720px`; these rules paint the hero
   stack (glyph + H1 + subtitle + dashed "What to expect" card) shown until
   the LearnDash course grid goes live. */
.cah-coming-soon-page {
    background: var(--cah-t2-bg-default);
}
.cah-coming-soon-page__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding-top: 32px;
}
.cah-coming-soon-page__glyph {
    width: 96px;
    height: 96px;
    flex: 0 0 auto;
}
.cah-coming-soon-page__title {
    margin: 8px 0 0;
    color: var(--cah-t2-content-default);
}
.cah-coming-soon-page__subtitle {
    margin: 0;
    max-width: 560px;
    font-size: 16px;
    line-height: 24px;
    color: var(--cah-t2-content-subtle);
}
.cah-coming-soon-page__card {
    /* Mirrors the dashed hub-card variant — full width of the 720px
       column, centred bullets text-aligned left. */
    width: 100%;
    margin-top: 32px;
    padding: 32px;
    background: var(--cah-t2-bg-default);
    border: 2px dashed color-mix(in srgb, var(--cah-t1-brand-blue-600) 35%, transparent);
    border-radius: var(--cah-t1-radius-12);
    box-shadow: none;
    text-align: left;
}
.cah-coming-soon-page__card-title {
    margin: 0 0 16px;
    color: var(--cah-t2-content-default);
}
.cah-coming-soon-page__bullets {
    margin: 0;
    padding: 0 0 0 20px;
    color: var(--cah-t2-content-subtle);
    font-size: 16px;
    line-height: 24px;
}
.cah-coming-soon-page__bullets li + li { margin-top: 8px; }

/* ========== /T-EP20 ========== */

/* ========== AI Academy landing (T-DR09 / wave-design-recon) ==========
 * On-brand /academy/ page (page.html shell). Intro lede + a "launching soon"
 * panel until the LearnDash course grid is wired by the go-live runbook. */
body.cah-ep400 .cah-academy__intro {
    font-size: 18px;
    line-height: 1.6;
    color: var(--cah-t2-content-subtle);
}
body.cah-ep400 .cah-academy__soon {
    margin-top: 16px;
    padding: 32px;
    border: 1px solid var(--cah-t2-border-default);
    border-radius: 16px;
    background: var(--cah-t2-bg-default);
    color: var(--cah-t2-content-subtle);
}
body.cah-ep400 .cah-academy__soon p { margin: 0; }
/* ========== /AI Academy ========== */
