/* jay.marketing — restrained editorial type system.
 *
 * Design intent: this reads like the deck. Navy primary, severity-palette
 * red/amber/slate for earned emphasis, Source Serif Pro over Inter. Every
 * element earns its place. Decoration is rare; when it appears it's
 * load-bearing (severity pills, status chips). The expertise the site
 * claims is communicated through specificity, density, and careful
 * typography — not through color, animation, or imagery.
 *
 * Aesthetic ported from the deck 2026-04-19. Token names preserved so
 * the rest of this stylesheet inherits the new palette without change.
 */

:root {
    /* Palette — single source of truth for the site's color tokens. */
    /* Neutral palette = Tailwind zinc scale (true greyscale, no hue cast).
       Replaces the deck-inherited slate-blue tones 2026-05-03 to align with
       the brand's monochrome + HFG-green-only color story. See
       brand-standards.md "Color system". */
    --bg:               #fafafa;       /* zinc-50 — page surface */
    --bg-section-alt:   #f4f4f5;       /* zinc-100 — alt section bg */
    --bg-card:          #ffffff;       /* white — card surface */
    --ink:              #18181b;       /* zinc-900 — body ink */
    --ink-muted:        #52525b;       /* zinc-600 — secondary text */
    --ink-faint:        #71717a;       /* zinc-500 — muted captions / metadata */

    /* Primary (navy) — the deck's --primary. Used for headlines,
       horizontal rules, and button fills. Quiet, authoritative. */
    /* --primary / --accent now alias the monochrome ink stack —
       navy retired 2026-05-03 per brand-standards.md "Deprecated".
       Existing rules using var(--primary) / var(--accent) automatically
       resolve to ink-based values without a grep-and-replace. */
    --primary:          var(--ink);
    --primary-hover:    var(--ink-muted);

    /* Accent aliases map onto primary so legacy rules (.btn-accent,
       focus outlines) continue to work with the navy palette. */
    --accent:           var(--primary);
    --accent-hover:     var(--primary-hover);
    --accent-soft:      #f4f4f5;       /* zinc-100 — soft accent surface */

    --positive:         #1c5d3f;       /* hedge-fund deep green — canonical "good" / positive metric / wordmark accent. ALL site green now flows from this token. */
    --brand-ink:        #3c4043;       /* Google grey 800 — adaptive grey for wordmark base ("jay.") */


    /* Severity palette — matches the deck's critical/moderate/minor.
       Earned colors; never decorative. Use via .severity pill component
       (below) or priority-* aliases. */
    --critical:         #a1341f;
    --critical-bg:      #fdecec;
    --critical-bor:     #f4b5ab;
    --moderate:         #8b5a16;
    --moderate-bg:      #fdf5e6;
    --moderate-bor:     #edc88c;
    --minor:            #52525b;       /* zinc-600 — neutral grey */
    --minor-bg:         #f4f4f5;       /* zinc-100 */
    --minor-bor:        #d4d4d8;       /* zinc-300 */

    /* Priority-1..5 aliases — legacy from the earlier site palette;
       now mapped onto the severity scale so finding badges inherit
       deck colors. */
    --priority-1:       var(--critical);    /* critical */
    --priority-2:       var(--moderate);    /* moderate — heavy */
    --priority-3:       #a8830f;            /* moderate — medium (tint) */
    --priority-4:       var(--minor);
    --priority-5:       var(--ink-faint);

    /* Rules — thin dividers, zinc scale to match the neutral palette. */
    --rule:             #d4d4d8;            /* zinc-300 */
    --rule-soft:        #e4e4e7;            /* zinc-200 */
    --highlight:        #fffbea;

    /* CTA band — intentionally-dark emphasis section used at the bottom
       of most pages to drive the primary CTA. Needs its own tokens (not
       `--ink` inverted) because `--ink`↔`--bg` flipping in dark mode
       turns the band into a near-white slab that clashes with the rest
       of the surface. Tokens keep the "deep navy with light text"
       aesthetic in both color schemes. */
    --cta-band-bg:      var(--ink);
    --cta-band-ink:     var(--bg);
    --cta-band-muted:   rgba(255, 255, 255, 0.85);

    /* Type — matches the deck. Source Serif Pro for display/prose,
       Inter for UI/labels/chrome. Web-loaded via base.html so the
       look lands; Georgia + system-sans fall back gracefully. */
    --font-display:     'Source Serif Pro', Georgia, 'Palatino Linotype', 'Times New Roman', serif;
    --font-body:        'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono:        ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    /* Spacing */
    --container-w:      1100px;
    --pad-xl:           96px;
    --pad-lg:           64px;
    --pad-md:           32px;
    --pad-sm:           16px;
    --radius:           4px;
}

/* ---------- Severity pill component ----------
   Use for finding severity labels, priority badges on the findings
   page, anywhere a single-word severity-label needs standalone
   emphasis. Inline text counts should stay colored-bold without
   the pill. */
.severity {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 2px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
}
.severity.critical { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-bor); }
.severity.moderate { background: var(--moderate-bg); color: var(--moderate); border: 1px solid var(--moderate-bor); }
.severity.minor    { background: var(--minor-bg);    color: var(--minor);    border: 1px solid var(--minor-bor); }

/* Inline severity text (use when severity appears inside running prose,
   e.g. "2 critical, 1 moderate"). Bold + colored, no pill. */
.sev-text-critical { font-weight: 700; color: var(--critical); }
.sev-text-moderate { font-weight: 700; color: var(--moderate); }
.sev-text-minor    { font-weight: 700; color: var(--minor); }

* { box-sizing: border-box; }

/* ---------- Accessibility ---------- */

.skip-link {
    position: absolute;
    left: 8px;
    top: -100px;
    z-index: 999;
    padding: 8px 16px;
    background: var(--ink);
    color: var(--bg);
    border-radius: var(--radius);
    font-weight: 600;
    border-bottom: none;
    transition: top 0.12s ease;
}
.skip-link:focus {
    top: 8px;
    color: var(--bg);
    outline: 2px solid var(--accent);
}
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}
a:focus-visible { outline-offset: 4px; }
.btn:focus-visible { outline-offset: 3px; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-soft);
    transition: border-color 0.12s ease, color 0.12s ease;
}
a:hover { color: var(--accent-hover); border-bottom-color: var(--accent); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;     /* deliberate restraint — bold serifs feel shouty */
    line-height: 1.18;
    margin: 0 0 0.5em;
    color: var(--ink);
    letter-spacing: -0.012em;
}
h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1em; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); font-size: 0.9em; }

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 var(--pad-md);
}

/* ---------- Header ---------- */

.site-header {
    border-bottom: 1px solid var(--rule);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--pad-md);
}
/* Header overrides .container's max-width — the nav can use the full
   viewport because nothing in the header collides with body-content
   pills or showcase rails. Adds a minimum gap so the brand wordmark
   doesn't crowd the first nav item. */
.site-header > .container.header-inner {
    max-width: none;
    gap: 3rem;
}
.brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    border-bottom: none;
    letter-spacing: -0.01em;
}
/* Wordmark — "jay." in adaptive grey, "marketing" in canonical positive green.
   Period belongs to the name, not the TLD. Class kept as `.brand-mark` for the
   prefix; `.brand-tail` for the green accent suffix (renamed from `.brand-tld`
   2026-05-03 since the period moved). */
.brand-mark { color: var(--brand-ink); }
.brand-tail { color: var(--positive); }

/* Availability pill — DB-driven, signals current capacity */
.availability-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    border: 1px solid var(--rule);
    cursor: help;
}
.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink-faint);
}
.availability-open { color: var(--positive); border-color: #b8d8c4; }
.availability-open .availability-dot { background: var(--positive); }
.availability-limited { color: #8a5b00; border-color: #e2d3a3; }
.availability-limited .availability-dot { background: #c79100; }
.availability-waitlist { color: var(--accent); border-color: var(--accent-soft); }
.availability-waitlist .availability-dot { background: var(--accent); }

.site-nav {
    display: flex;
    gap: var(--pad-md);
    align-items: center;
}
.site-nav a,
.nav-trigger {
    color: var(--ink);
    border-bottom: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s;
}
.site-nav a:hover,
.nav-group:focus-within > .nav-trigger,
.nav-group:hover > .nav-trigger {
    color: var(--accent);
}
/* CTAs use monochrome inversion — contrast IS the accent. See brand-standards.md.
   Adapts automatically: light mode = near-black bg + cream text;
   dark mode = cream bg + near-black text. Both modes high-contrast.
   nowrap + flex-shrink:0 keeps the button on one line at any nav width;
   font-weight 700 makes the call-to-action read with weight. */
.site-nav a.cta {
    background: var(--ink);
    color: var(--bg);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.site-nav a.cta:hover { background: var(--ink-muted); color: var(--bg); }

/* ---- Hamburger toggle — visible at narrow widths (<= 900px) ----
   Three stacked bars; turns into an X when the nav is open. JS handles
   the .is-open class on the nav + aria-expanded; CSS handles everything
   else. See base.html inline script. */
.nav-toggle {
    display: none;                /* hidden at desktop, shown via media query below */
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}
.nav-toggle:hover { border-color: var(--ink-muted); }
.nav-toggle:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
.nav-toggle-bar {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform 0.18s ease, opacity 0.12s ease, top 0.18s ease;
}
.nav-toggle-bar:nth-child(1) { top: 13px; }
.nav-toggle-bar:nth-child(2) { top: 19px; }
.nav-toggle-bar:nth-child(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg);
        border-top: 1px solid var(--rule);
        border-bottom: 1px solid var(--rule);
        padding: var(--pad-sm) var(--pad-md);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
    .site-nav.is-open { display: flex; }
    /* Top-level links + nav-triggers display as full-width rows. The
       nested .nav-menu / .nav-submenu dropdowns are hidden — top-level
       hub pages still link from the trigger anchor. */
    .site-nav.is-open > a,
    .site-nav.is-open .nav-trigger {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--rule-soft);
        font-size: 1rem;
    }
    .site-nav.is-open .nav-group { display: contents; }
    .site-nav.is-open .nav-menu,
    .site-nav.is-open .nav-submenu { display: none; }
    .site-nav.is-open a.cta {
        margin-top: 0.5rem;
        padding: 0.85rem 1rem;
        text-align: center;
        border-bottom: none;
    }
    /* Header-inner layout adjusts so the brand + toggle sit on one row
       with the nav as a dropdown below. */
    .site-header > .container.header-inner {
        gap: 1rem;
        position: relative;
    }
}

.nav-group {
    position: relative;
}
.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-trigger::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transform: translateY(1px);
}
.nav-menu,
.nav-submenu {
    position: absolute;
    z-index: 30;
    display: none;
    min-width: 230px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    box-shadow: 0 16px 36px rgba(26, 39, 68, 0.12);
}
.nav-menu {
    top: calc(100% + 10px);
    left: -10px;
}
.nav-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}
.nav-menu li,
.nav-submenu li {
    position: relative;
}
.nav-menu a,
.nav-submenu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--radius);
    color: var(--ink);
    line-height: 1.25;
    white-space: nowrap;
}
.nav-menu a:hover,
.nav-submenu a:hover,
.nav-menu li:focus-within > a,
.nav-submenu li:focus-within > a {
    background: var(--bg-section-alt);
    color: var(--accent);
}
.nav-menu li:has(> .nav-submenu) > a::after,
.nav-submenu li:has(> .nav-submenu) > a::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 18px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
}
.nav-submenu {
    top: -9px;
    left: calc(100% + 8px);
}
.nav-submenu::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 10px;
}
.nav-group:hover > .nav-menu,
.nav-group:focus-within > .nav-menu,
.nav-menu li:hover > .nav-submenu,
.nav-menu li:focus-within > .nav-submenu,
.nav-submenu li:hover > .nav-submenu,
.nav-submenu li:focus-within > .nav-submenu {
    display: block;
}

/* ---------- Service pages ---------- */

.service-hero {
    padding: var(--pad-xl) 0 var(--pad-lg);
    border-bottom: 1px solid var(--rule-soft);
}
.service-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: var(--pad-lg);
    align-items: start;
}
.service-hero h1 {
    max-width: 780px;
}
.service-hero .lede {
    max-width: 720px;
    color: var(--ink-muted);
    font-size: 1.15rem;
}
.service-offer-card {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--accent);
    padding: var(--pad-md);
    box-shadow: 0 14px 34px rgba(26, 39, 68, 0.08);
}
.service-offer-card h2 {
    font-size: 1.35rem;
}
.service-offer-card ul {
    list-style: none;
    margin: var(--pad-sm) 0 0;
    padding: 0;
}
.service-offer-card li {
    padding: 12px 0;
    border-top: 1px solid var(--rule-soft);
}
.service-offer-card li:first-child {
    border-top: none;
}
.service-price {
    margin: var(--pad-sm) 0 0;
    padding-top: var(--pad-sm);
    border-top: 1px solid var(--rule);
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--accent);
}
.service-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pad-sm);
}
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--rule-soft);
    padding: var(--pad-sm);
}
.service-card p:last-child {
    margin-bottom: 0;
}
.service-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pad-sm);
    margin: var(--pad-md) 0 0;
    padding: 0;
    list-style: none;
    counter-reset: service-step;
}
.service-timeline li {
    counter-increment: service-step;
    position: relative;
    min-height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--rule-soft);
    padding: 44px var(--pad-sm) var(--pad-sm);
}
.service-timeline li::before {
    content: counter(service-step);
    position: absolute;
    top: var(--pad-sm);
    left: var(--pad-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
}

/* ---------- Hero ---------- */

.hero {
    padding: var(--pad-xl) 0 var(--pad-lg);
}
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 24px;
}
.hero-headline {
    font-size: 3rem;
    line-height: 1.1;
    max-width: 880px;
    margin-bottom: var(--pad-md);
    letter-spacing: -0.018em;
    font-weight: 500;
}
.hero-sub {
    font-size: 1.18rem;
    color: var(--ink-muted);
    max-width: 720px;
    margin-bottom: var(--pad-md);
    line-height: 1.6;
}
.hero-sub em {
    color: var(--ink);
    font-style: italic;
    font-weight: 500;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-actions {
    display: flex;
    gap: var(--pad-sm);
    margin: var(--pad-md) 0 var(--pad-lg);
    flex-wrap: wrap;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: var(--pad-lg);
    margin: var(--pad-md) 0 0;
    padding: var(--pad-md) 0 0;
    border-top: 1px solid var(--rule-soft);
}
.hero-stat dt {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}
.hero-stat dd {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border-bottom: none;
}
/* Primary CTA — monochrome inversion. See brand-standards.md "Interactive elements".
   Background is body ink (adapts), text is page surface (adapts). The contrast
   itself is the call-to-action; no chromatic accent needed. Protects --positive
   for outcome-only use. */
.btn-primary {
    background: var(--ink);
    color: var(--bg);
}
.btn-primary:hover {
    background: var(--ink-muted);
    color: var(--bg);
}
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule);
}
.btn-ghost:hover {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

.link-arrow {
    font-weight: 600;
    border-bottom: none;
}
.link-arrow:hover { transform: translateX(2px); display: inline-block; }

/* ---------- Sections ---------- */

/* Canonical block wrapper. ALL content sections use `.section`. Add
   `.section-alt` for the alternate background treatment. See
   brand-standards.md "Page section structure" — load-bearing rule. */
.section {
    padding: var(--pad-lg) 0;
    border-top: 1px solid var(--rule);
}
.section-alt { background: var(--bg-section-alt); }
/* Two adjacent alt-bg sections share a softer divider — same-bg sections
   don't need the visible rule between them. */
.section-alt + .section-alt { border-top-color: rgba(0,0,0,0.05); }
.section-contact-cta {
    background: var(--cta-band-bg);
    color: var(--cta-band-ink);
    text-align: center;
}
.section-contact-cta h2 { color: var(--cta-band-ink); }
.section-contact-cta a { color: var(--cta-band-ink); }
.section-contact-cta a.btn-primary {
    background: var(--ink);
    color: var(--bg);
    margin-top: var(--pad-sm);
    padding: 14px 36px;
}

.section-heading { margin-bottom: 0.4em; }
.section-lede {
    color: var(--ink-muted);
    font-size: 1.1rem;
    max-width: 720px;
    margin-bottom: var(--pad-md);
}

/* ---------- Finding cards (homepage principles) ---------- */

.finding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--pad-md);
    margin-top: var(--pad-md);
}
.finding-card {
    background: var(--bg-card);
    padding: var(--pad-md);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.finding-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1rem;
}
.finding-card p {
    color: var(--ink-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* ---------- Findings list (real audits) ---------- */

.findings-list {
    margin-top: var(--pad-md);
}
.finding-row {
    display: flex;
    gap: var(--pad-md);
    padding: var(--pad-md) 0;
    border-bottom: 1px solid var(--rule);
    align-items: flex-start;
}
.finding-row:last-child { border-bottom: none; }
.finding-meta {
    flex: 0 0 90px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.priority-badge, .category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    text-align: center;
}
.priority-badge {
    color: #fff;
    background: var(--priority-3);
}
.finding-priority-1 .priority-badge { background: var(--priority-1); }
.finding-priority-2 .priority-badge { background: var(--priority-2); }
.finding-priority-3 .priority-badge { background: var(--priority-3); }
.finding-priority-4 .priority-badge { background: var(--priority-4); }
.finding-priority-5 .priority-badge { background: var(--priority-5); }
.category-badge {
    background: var(--accent-soft);
    color: var(--accent);
}
.finding-body { flex: 1; }
.finding-body h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.05rem;
    line-height: 1.3;
    font-family: var(--font-body);
    font-weight: 600;
}
.finding-body p {
    color: var(--ink-muted);
    margin: 0;
    font-size: 0.95rem;
}

.section-cta-line {
    margin-top: var(--pad-md);
    text-align: right;
}

/* ---------- Verticals ---------- */

.verticals-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--pad-md);
    margin-top: var(--pad-md);
}
.vertical-card {
    background: var(--bg-card);
    padding: var(--pad-md);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    position: relative;
}
.vertical-card h3 { margin-top: 0; }
.vertical-status-line {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.vertical-status-active { border-color: var(--accent); }
.vertical-status-active .vertical-status-line { color: var(--accent); }
.vertical-status-next { border-style: dashed; }
.vertical-status-future { opacity: 0.7; }

/* ---------- Pricing summary ---------- */

.pricing-summary {
    background: var(--bg-card);
    padding: var(--pad-lg);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-top: var(--pad-md);
    max-width: 700px;
}
.price-tag {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 4px;
}
.price-meta {
    color: var(--ink-faint);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--pad-md);
}

/* ---------- Capability grid (capabilities tree) ----------
   Used on every page in the /capabilities/* tree: the hub, channel
   pages, platform pages, and discipline leaves. Cards are tiered
   (live / emerging / roadmap) with a left-border accent that makes
   the tier scannable at a glance. #}
*/
.capability-grid {
    display: grid;
    /* 280px min so two cards fit at the standard 720px container width;
       auto-fit collapses to 1 column on mobile. */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--pad-md);
    margin: var(--pad-md) 0;
}
.capability-card {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--minor-bor);
    border-radius: 8px;
    padding: var(--pad-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.capability-card header { margin-bottom: 4px; }
.capability-card-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin: 0 0 6px;
}
.capability-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.2;
}
.capability-card h3 a {
    color: var(--ink);
    text-decoration: none;
}
.capability-card h3 a:hover { color: var(--accent); }
.capability-card p {
    margin: 0;
    color: var(--ink);
    font-size: 0.95rem;
}
.capability-card-children {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.capability-card-children li {
    font-size: 0.82rem;
}
.capability-card-children a {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--rule);
    border-radius: 3px;
    color: var(--ink-muted);
    text-decoration: none;
    background: var(--bg);
}
.capability-card-children a:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.capability-card-stack {
    font-size: 0.82rem;
    margin-top: auto;  /* push to bottom so all cards align */
    padding-top: 8px;
    border-top: 1px solid var(--rule-soft);
}
.capability-card-stack code {
    font-size: 0.82rem;
    background: var(--bg);
    padding: 1px 4px;
    border-radius: 2px;
}

/* Tier accents — distinct left border + subtle tier label color */
/* ---------- Capability proof pages ----------
   Leaf capability pages are proof surfaces, not articles. These rules keep
   them dense, inspectable, and buyer-oriented. */
.capability-hero {
    padding: var(--pad-xl) 0 var(--pad-lg);
    border-bottom: 1px solid var(--rule-soft);
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-section-alt) 100%);
}
.capability-hero-grid,
.capability-split,
.capability-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: var(--pad-lg);
    align-items: start;
}
.capability-hero h1 {
    font-size: clamp(2.35rem, 5vw, 4.2rem);
    max-width: 880px;
    letter-spacing: 0;
}
.capability-hero .lede { max-width: 720px; }
.capability-proof-card {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-top: 4px solid var(--accent);
    border-radius: 8px;
    padding: var(--pad-md);
}
.capability-proof-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin: 0 0 12px;
}
.capability-proof-card ul,
.capability-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.capability-proof-card li,
.capability-check-list li {
    border-top: 1px solid var(--rule-soft);
    padding: 12px 0;
}
.capability-proof-card li:first-child,
.capability-check-list li:first-child { border-top: 0; padding-top: 0; }
.section-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr);
    gap: var(--pad-lg);
    align-items: end;
    margin-bottom: var(--pad-md);
}
.section-heading-row .section-lede {
    margin: 0;
    color: var(--ink-muted);
    font-size: 1.05rem;
}
.capability-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.capability-proof-tile {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 18px;
    min-height: 132px;
}
.capability-proof-tile p,
.capability-proof-tile strong { margin: 0; }
.tracking-health-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.tracking-health-item {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 16px;
}
.tracking-health-status {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--positive);
    background: rgba(46, 125, 91, 0.08);
    border: 1px solid rgba(46, 125, 91, 0.26);
    border-radius: 3px;
    padding: 2px 7px;
    margin-bottom: 10px;
}
.tracking-health-item p { margin: 0; font-size: 0.92rem; }
.capability-visual {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
    justify-self: center;
}
.capability-visual img {
    display: block;
    width: 100%;
    height: auto;
}
.capability-visual-wide {
    width: min(100%, 920px);
    max-width: 920px;
    margin: 0 auto var(--pad-md);
}
.capability-split-visual {
    grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1.22fr);
    align-items: center;
}

@media (max-width: 900px) {
    .capability-hero-grid,
    .capability-split,
    .capability-two-column,
    .section-heading-row {
        grid-template-columns: 1fr;
        gap: var(--pad-md);
    }
    .capability-card-grid,
    .tracking-health-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .capability-card-grid,
    .tracking-health-grid { grid-template-columns: 1fr; }
}

.capability-card-tier-live     { border-left-color: var(--positive); }  /* green — running */
.capability-card-tier-emerging { border-left-color: #b67a12; }  /* amber — in progress */
.capability-card-tier-roadmap  { border-left-color: #6b6b6b; }  /* gray — not yet */

.capability-tier-live     { color: var(--positive); }
.capability-tier-emerging { color: #b67a12; }
.capability-tier-roadmap  { color: #6b6b6b; }

@media (prefers-color-scheme: dark) {
    .capability-card-tier-live     { border-left-color: var(--positive); }
    .capability-card-tier-emerging { border-left-color: #e8a94a; }
    .capability-card-tier-roadmap  { border-left-color: var(--ink-faint); }
    .capability-tier-live     { color: var(--positive); }
    .capability-tier-emerging { color: #e8a94a; }
    .capability-tier-roadmap  { color: var(--ink-faint); }
}

/* ---------- Related-capabilities block (used on discipline leaves) ----
   Lightweight cross-link rail before the main CTA so visitors discover
   adjacent disciplines. Each link is a small pill — navigational, not
   decision-competing. #}
*/
.section-related {
    background: var(--bg-section-alt);
    padding: var(--pad-md) 0;
    border-top: 1px solid var(--rule-soft);
    border-bottom: 1px solid var(--rule-soft);
}
.related-heading {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 10px;
}
.related-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.related-links a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 20px;
    font-size: 0.88rem;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.related-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Contact CTA ---------- */

.contact-cta {
    max-width: 700px;
}
.contact-cta h2 {
    font-size: 2.2rem;
    margin-bottom: var(--pad-sm);
}
.contact-cta p {
    font-size: 1.05rem;
    color: var(--cta-band-muted);
    margin-bottom: var(--pad-md);
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--rule);
    padding: var(--pad-lg) 0 var(--pad-md);
    background: var(--bg);
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--pad-lg);
}
.footer-brand .brand {
    font-size: 1.25rem;
    margin-bottom: 8px;
    display: inline-block;
}
.footer-brand p {
    margin-top: 12px;
    font-size: 0.9rem;
    max-width: 360px;
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-nav a {
    color: var(--ink-muted);
    border-bottom: none;
    font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--accent); }
.footer-quiet { opacity: 0.6; font-style: italic; font-family: var(--font-display); }
.footer-quiet:hover { opacity: 1; }
.footer-meta p { font-size: 0.85rem; margin: 0 0 4px; }

/* ---------- Page header (sub-pages) ---------- */

.page-header {
    padding: var(--pad-xl) 0 var(--pad-md);
    border-bottom: 1px solid var(--rule);
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.page-header h1 {
    font-size: 3rem;
    line-height: 1.05;
    max-width: 800px;
}
.lede {
    font-size: 1.2rem;
    color: var(--ink-muted);
    max-width: 720px;
    margin-top: var(--pad-md);
    line-height: 1.55;
}

/* ---------- Methodology principles ---------- */

.principle {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--pad-md);
    padding: var(--pad-lg) 0;
    border-bottom: 1px solid var(--rule);
}
.principle:last-child { border-bottom: none; }
.principle-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--accent);
    font-weight: 700;
    line-height: 1;
}
.principle-body h2 {
    margin-top: 0;
    margin-bottom: var(--pad-sm);
    font-size: 1.7rem;
}
.principle-body p {
    color: var(--ink);
    margin-bottom: 1em;
    max-width: 720px;
}
.principle-test {
    margin-top: var(--pad-md);
    padding: var(--pad-sm) var(--pad-md);
    background: var(--bg-section-alt);
    border-left: 3px solid var(--accent);
    font-style: italic;
    color: var(--ink);
    max-width: 720px;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.test-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-right: 6px;
    font-style: normal;
}

/* `.section-stack-cta` retired 2026-05-03 — use `.section-alt` instead. */
.stack-list {
    list-style: none;
    padding: 0;
    margin: var(--pad-md) 0;
}
.stack-list li {
    padding: 12px 0 12px 28px;
    position: relative;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
}
.stack-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    width: 18px;
    height: 1px;
    background: var(--accent);
}
.stack-list li:last-child { border-bottom: none; }
.stack-list strong { color: var(--ink); }

/* ---------- Verticals detail ---------- */

.vertical-detail {
    padding: var(--pad-lg) 0;
    border-bottom: 1px solid var(--rule);
}
.vertical-detail:last-child { border-bottom: none; }
.vertical-detail-header {
    display: flex;
    align-items: center;
    gap: var(--pad-md);
    margin-bottom: var(--pad-sm);
}
.vertical-detail-header h2 {
    margin: 0;
    font-size: 2rem;
}
.vertical-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--rule);
}
.vertical-status-badge.vertical-status-active {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}
.vertical-status-badge.vertical-status-next {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}
.vertical-status-badge.vertical-status-future {
    color: var(--ink-faint);
}
.vertical-description {
    color: var(--ink);
    font-size: 1.1rem;
    max-width: 720px;
    margin-bottom: var(--pad-md);
}
.vertical-stats {
    display: flex;
    gap: var(--pad-lg);
    margin: var(--pad-md) 0;
    padding: var(--pad-md);
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.stat-block { text-align: left; }
.stat-block .stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-block .stat-label {
    font-size: 0.85rem;
    color: var(--ink-faint);
    margin-top: 4px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.services-list {
    margin: var(--pad-sm) 0;
    line-height: 2.2;
}
.service-chip {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-size: 0.85rem;
    margin-right: 6px;
    color: var(--ink);
    font-family: var(--font-mono);
}
.common-findings {
    list-style: none;
    padding: 0;
}
.common-findings li {
    padding: 12px 0 12px 28px;
    position: relative;
    border-bottom: 1px solid var(--rule);
}
.common-findings li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    width: 14px;
    height: 1px;
    background: var(--accent);
}
.vertical-cta {
    margin-top: var(--pad-md);
    padding: var(--pad-md);
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- Pricing ---------- */

/* `.pricing-hero` retired 2026-05-03 — use `.section-alt` instead. */
.pricing-card-big {
    background: var(--bg-card);
    padding: var(--pad-lg);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.price-big {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}
.price-period {
    font-size: 1.5rem;
    color: var(--ink-muted);
    font-weight: 500;
}
.price-tag-line {
    color: var(--ink-faint);
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: var(--pad-md);
}
.pricing-service-link {
    margin: var(--pad-md) auto 0;
    max-width: 640px;
    text-align: center;
    color: var(--ink-muted);
}
.pricing-includes {
    list-style: none;
    padding: 0;
    margin: var(--pad-md) 0 0;
}
.pricing-includes li {
    padding: var(--pad-sm) 0 var(--pad-sm) 32px;
    position: relative;
    border-top: 1px solid var(--rule);
    line-height: 1.5;
}
.pricing-includes li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: var(--pad-sm);
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}
.pricing-includes strong { color: var(--ink); }
.section-not-included { background: var(--bg); }
.not-included-list {
    list-style: none;
    padding: 0;
}
.not-included-list li {
    padding: var(--pad-sm) 0 var(--pad-sm) 32px;
    position: relative;
    border-bottom: 1px solid var(--rule);
}
.not-included-list li:before {
    content: "—";
    position: absolute;
    left: 0;
    top: var(--pad-sm);
    color: var(--ink-faint);
}

/* ---------- Case studies ---------- */

/* `.section-stats` retired 2026-05-03 — use `.section-alt` instead. */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--pad-md);
    text-align: center;
}
.stat-large {
    background: var(--bg-card);
    padding: var(--pad-md);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.stat-large .stat-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--accent);
    line-height: 1;
    font-weight: 700;
}
.stat-large .stat-label {
    color: var(--ink-muted);
    font-size: 0.95rem;
    margin-top: var(--pad-sm);
}

.finding-category {
    border-top: 1px solid var(--rule);
}
.category-blurb {
    margin-bottom: var(--pad-md);
    max-width: 720px;
}

/* ---------- Contact ---------- */

/* `.section-contact-form` retired 2026-05-03 — use `.section-alt` instead. */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--pad-lg);
}
.contact-form-wrap {
    background: var(--bg-card);
    padding: var(--pad-lg);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--pad-md);
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field-label {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.95rem;
}
.field-hint {
    font-size: 0.85rem;
    color: var(--ink-faint);
}
.contact-form input,
.contact-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg);
    color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}
.form-meta {
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Inline form-submit status (progressive-enhancement JS in contact.html).
   Empty by default; classes added on pending / success / error. */
.form-status {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 1.5em;
}
.form-status-pending { color: var(--ink-muted); font-style: italic; }
.form-status-success {
    color: var(--ink);
    padding: 10px 12px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.form-status-error {
    color: var(--critical);
    padding: 10px 12px;
    background: var(--critical-bg);
    border: 1px solid var(--critical-bor);
    border-radius: var(--radius);
}
.form-status-error a { color: var(--critical); font-weight: 600; }

/* Inline waitlist form on vertical cards (verticals.html). Compact
   row: email + optional business + submit. On mobile stacks vertically. */
.vertical-waitlist {
    margin-top: var(--pad-sm);
    padding-top: var(--pad-sm);
    border-top: 1px dashed var(--rule);
}
.waitlist-form {
    margin-top: 10px;
}
.waitlist-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.waitlist-row input[type="email"],
.waitlist-row input[type="text"] {
    flex: 1 1 180px;
    padding: 8px 10px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--ink);
}
.waitlist-row input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}
.waitlist-row .btn { flex: 0 0 auto; white-space: nowrap; }
.waitlist-form .form-status { margin-top: 10px; font-size: 0.9rem; }

/* =================================================================
   Dashboard (v1) — client-facing ROI dashboard. Rendered from
   site/templates/dashboard.html for /dashboard/<token>.html + the
   /dashboard/demo.html stand-in-data showcase.
   ================================================================= */
.dashboard-hero {
    padding: var(--pad-lg) 0 var(--pad-sm);
    border-bottom: 1px solid var(--rule-soft);
}
.dashboard-hero h1 {
    margin: 4px 0 6px;
    font-size: 2rem;
    font-family: var(--font-display);
}
.dashboard-hero-row {
    display: flex; justify-content: space-between;
    align-items: flex-end; gap: var(--pad-md); flex-wrap: wrap;
}
.dashboard-hero .eyebrow {
    text-transform: uppercase; letter-spacing: 0.12em;
    font-size: 0.72rem; color: var(--ink-muted);
    font-weight: 600; margin: 0;
}
.dashboard-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.demo-pill {
    display: inline-block; padding: 2px 10px; border-radius: 2px;
    background: var(--accent-soft); color: var(--primary);
    border: 1px solid var(--primary); font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}

.dashboard-kpis-section { padding-top: var(--pad-md); padding-bottom: var(--pad-md); }
.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--pad-sm);
}
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: var(--pad-sm) 18px;
}
.kpi-label {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-muted); font-weight: 600;
}
.kpi-value {
    font-family: var(--font-display);
    font-size: 1.8rem; font-weight: 600; color: var(--primary);
    margin-top: 6px; font-variant-numeric: tabular-nums;
}
.kpi-delta {
    margin-top: 4px; font-size: 0.85rem;
    font-variant-numeric: tabular-nums; font-weight: 600;
}
.kpi-delta-up { color: var(--positive); }
.kpi-delta-down { color: var(--critical); }
.kpi-delta-period {
    font-weight: 400; color: var(--ink-faint); text-transform: none;
    letter-spacing: 0; font-size: 0.75rem; margin-left: 4px;
}
.kpi-note { font-size: 0.75rem; margin-top: 6px; }

/* ---------- Dashboard tabs (3-page paging nav) ---------- */
.dashboard-tabs {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 100;
}
.dashboard-tabs-inner {
    display: flex;
    gap: 0;
    overflow-x: auto;
}
.dashboard-tab {
    display: flex;
    flex-direction: column;
    padding: 12px 18px 10px;
    border-right: 1px solid var(--rule);
    color: var(--ink-muted);
    text-decoration: none;
    min-width: 160px;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
}
.dashboard-tab:hover {
    background: var(--bg-section-alt);
    color: var(--ink);
}
.dashboard-tab[aria-selected="true"] {
    color: var(--ink);
    border-bottom-color: var(--accent);
    background: var(--bg);
}
.dashboard-tab-num {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}
.dashboard-tab-label {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 2px;
}
.dashboard-tab-sub {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 1px;
}

.dashboard-page[data-active="false"] { display: none; }

/* ---------- Dashboard edit mode ---------- */
.dashboard-edit-panel {
    border-bottom: 1px solid var(--rule);
    background: var(--bg-section-alt);
}
.dashboard-edit-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--pad-sm);
    align-items: center;
    padding-top: 14px;
    padding-bottom: 14px;
}
.dashboard-edit-inner h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 2px 0 0;
    color: var(--primary);
}
.dashboard-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.dashboard-edit-actions .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
}
.dashboard-widget-tray {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.dashboard-widget-tray [data-widget-add],
.widget-edit-controls button,
.widget-edit-controls select,
.widget-edit-title {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--ink);
    font: inherit;
}
.dashboard-widget-tray [data-widget-add] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg);
    user-select: none;
    touch-action: none;
}
.dashboard-widget-tray [data-widget-add]:hover {
    border-color: var(--ink);
    background: var(--bg-card);
}
.dashboard-widget-tray [data-widget-add]:active {
    cursor: grabbing;
}
.dashboard-widget-tray [data-widget-add][data-dragging="true"] {
    opacity: 0.55;
}
.widget-tray-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--rule-soft);
    border-radius: 5px;
    color: var(--primary);
    background: var(--bg-section-alt);
    line-height: 1;
    flex: 0 0 auto;
}
.widget-tray-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dashboard-drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    padding: 8px 12px;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
}
.dashboard-editing .widget {
    position: relative;
    outline: 1px dashed var(--rule);
    outline-offset: 3px;
    cursor: default;
    touch-action: auto;
    transition: outline-color 0.12s, box-shadow 0.12s;
}
.dashboard-editing .widget:hover {
    outline-color: var(--primary);
}
.dashboard-editing .widget .widget-header {
    cursor: grab;
    touch-action: none;
}
.widget-settings-button {
    display: none;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 5px;
    background: var(--bg);
    color: var(--ink-muted);
    cursor: pointer;
    flex: 0 0 auto;
}
.dashboard-editing .widget-settings-button {
    display: grid;
}
.widget-settings-button:hover,
.widget.is-selected .widget-settings-button {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-section-alt);
}
.widget-settings-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dashboard-editing .widget.is-moving .widget-header,
.dashboard-editing .widget.ui-draggable-dragging .widget-header {
    cursor: grabbing;
}
.dashboard-editing .widget.is-moving,
.dashboard-editing .widget.ui-draggable-dragging .grid-stack-item-content {
    opacity: 0.45;
    cursor: grabbing;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.dashboard-editing .widget.is-resizing,
.dashboard-editing .widget.ui-resizable-resizing {
    outline-color: var(--primary);
    cursor: nwse-resize;
}
.dashboard-editing .grid-stack-item:not(.ui-resizable-disabled):is(:hover, .is-selected, .ui-resizable-resizing) > .ui-resizable-handle {
    display: block;
}
.widget-edit-controls {
    display: none;
    grid-template-columns: minmax(140px, 1fr) minmax(120px, auto) minmax(120px, auto);
    gap: 6px;
    align-items: center;
    padding: 10px 18px 0;
    cursor: default;
}
.dashboard-editing .widget-edit-controls {
    display: grid;
}
.widget-edit-controls button,
.widget-edit-controls select,
.widget-edit-title {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.8rem;
}
.widget-edit-controls button {
    cursor: pointer;
    white-space: nowrap;
}
.widget-edit-title {
    min-width: 0;
}
.table-extra-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 8px;
}
.table-extra-controls[hidden] { display: none; }
.table-extra-controls fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.table-extra-controls legend {
    margin-bottom: 4px;
    display: grid;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--ink-muted);
    font-weight: 600;
}
.widget-check-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.widget-check-option {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 5px 6px;
    border-radius: 5px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
}
.widget-check-option:hover {
    background: var(--bg-section-alt);
}
.widget-check-option input {
    flex: 0 0 auto;
}
.widget-check-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.widget-config-summary {
    display: none;
    margin: 0 18px 10px;
    padding: 8px 10px;
    border: 1px solid var(--rule-soft);
    background: var(--bg-section-alt);
    color: var(--ink-muted);
    font-size: 0.78rem;
}
.dashboard-editing .widget-config-summary { display: none; }
.dashboard-settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    width: min(420px, calc(100vw - 24px));
    height: 100dvh;
    padding: 18px;
    border-left: 1px solid var(--rule);
    background: var(--bg-card);
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.16);
    overflow-y: auto;
}
.dashboard-settings-panel[hidden] { display: none; }
.dashboard-settings-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.dashboard-settings-head h2 {
    margin: 2px 0 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--primary);
}
.widget-settings-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 5px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}
.dashboard-settings-panel .widget-edit-controls {
    display: grid;
    padding: 0;
}
.widget-size-third { grid-column: span 4; }
.widget-size-half { grid-column: span 6; }
.widget-size-two-thirds { grid-column: span 8; }
.widget-size-full { grid-column: 1 / -1; }
.widget-height-compact .widget-body { min-height: 90px; }
.widget-height-normal .widget-body { min-height: 170px; }
.widget-height-tall .widget-body { min-height: 290px; }
.widget-resize-handle {
    display: none;
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 5px;
    background: var(--bg-card);
    cursor: nwse-resize;
    touch-action: none;
    z-index: 3;
}
.dashboard-editing .widget .widget-resize-handle,
.dashboard-editing .widget.is-resizing .widget-resize-handle {
    display: grid;
    place-items: center;
    opacity: 0.62;
}
.dashboard-editing .widget:hover .widget-resize-handle,
.dashboard-editing .widget.is-resizing .widget-resize-handle {
    opacity: 1;
    border-color: var(--primary);
}
.widget-resize-handle span {
    width: 10px;
    height: 10px;
    display: block;
    background:
        linear-gradient(135deg, transparent 0 45%, var(--ink-muted) 45% 55%, transparent 55% 100%),
        linear-gradient(135deg, transparent 0 68%, var(--ink-muted) 68% 78%, transparent 78% 100%);
}
.dashboard-editing .dashboard-grid {
    position: relative;
    padding: 8px;
    min-height: 640px;
    border: 1px dashed var(--rule);
    border-radius: var(--radius);
    background-image:
        linear-gradient(var(--rule-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
    background-size: 24px 24px;
    background-color: var(--bg);
}
.dashboard-grid.is-drop-target {
    border-color: var(--primary);
    background-color: var(--bg-section-alt);
}
.dashboard-editing .dashboard-grid::after {
    content: "Drop widgets anywhere in the grid";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    display: block;
    text-align: center;
    padding: 13px 10px;
    border: 1px dashed var(--rule-soft);
    border-radius: var(--radius);
    color: var(--ink-faint);
    font-size: 0.82rem;
    pointer-events: none;
}
.dashboard-grid .grid-stack-placeholder > .placeholder-content {
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    background: rgba(36, 92, 115, 0.09);
}
.dashboard-editing .widget > .ui-resizable-se,
.dashboard-editing .widget > .ui-resizable-sw,
.dashboard-editing .widget > .ui-resizable-ne,
.dashboard-editing .widget > .ui-resizable-nw {
    width: 28px;
    height: 28px;
}
.dashboard-editing .widget > .ui-resizable-se {
    right: 8px;
    bottom: 8px;
    cursor: nwse-resize;
}
.dashboard-editing .widget > .ui-resizable-sw {
    left: 8px;
    bottom: 8px;
    cursor: nesw-resize;
}
.dashboard-editing .widget > .ui-resizable-ne {
    right: 8px;
    top: 8px;
    cursor: nesw-resize;
}
.dashboard-editing .widget > .ui-resizable-nw {
    left: 8px;
    top: 8px;
    cursor: nwse-resize;
}
.dashboard-editing .widget > .ui-resizable-e { cursor: ew-resize; }
.dashboard-editing .widget > .ui-resizable-w { cursor: ew-resize; }
.dashboard-editing .widget > .ui-resizable-s { cursor: ns-resize; }
.dashboard-editing .widget > .ui-resizable-n { cursor: ns-resize; }
.widget.is-remove-candidate {
    outline-color: var(--critical);
    opacity: 0.55;
}

.custom-widget-chart {
    min-height: 160px;
}
.dashboard-pie-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: 16px;
    align-items: center;
}
.dashboard-pie {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--rule);
    position: relative;
}
.dashboard-pie::after {
    content: "";
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--rule-soft);
}
.dashboard-pie-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}
.dashboard-pie-legend li {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 0.84rem;
}
.dashboard-pie-legend strong {
    font-family: var(--font-mono);
    font-weight: 500;
}
.pie-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* ---------- Dashboard tables ---------- */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.dashboard-table th,
.dashboard-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--rule-soft);
    vertical-align: top;
}
.dashboard-table th {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    font-weight: 500;
    background: var(--bg-section-alt);
}
.dashboard-table tr:last-child td { border-bottom: none; }
.cell-primary { font-weight: 500; }
.cell-secondary { font-size: 0.78rem; margin-top: 2px; }
.cell-metric {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 500;
}
.cell-metric-warn { color: var(--critical); }

/* ---------- Ranked list widget ---------- */
.ranked-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ranked-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "primary metric" "secondary metric";
    gap: 2px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule-soft);
}
.ranked-list li:last-child { border-bottom: none; }
.ranked-list .cell-primary { grid-area: primary; }
.ranked-list .cell-secondary { grid-area: secondary; }
.ranked-list .cell-metric { grid-area: metric; align-self: center; }

/* ---------- Search-term health grid ---------- */
.search-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: var(--pad-sm);
}
.search-health-cell {
    padding: 10px 12px;
    background: var(--bg-section-alt);
    border-radius: 4px;
    border-left: 3px solid var(--rule);
}
.search-health-label { margin-bottom: 4px; }
.search-health-spend {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
}
.search-health-share { font-size: 0.75rem; margin-top: 2px; }

.widget-subheader {
    font-family: var(--font-display);
    font-size: 1rem;
    margin: var(--pad-sm) 0 6px;
    color: var(--ink);
}
.widget-empty {
    padding: var(--pad-sm);
    text-align: center;
    color: var(--ink-muted);
    font-style: italic;
}

.dashboard-grid-section { padding-top: 0; padding-bottom: var(--pad-lg); }
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--pad-sm);
    align-items: start;
}
.dashboard-grid.grid-stack {
    display: block;
    width: 100%;
    max-width: 100%;
}
.widget-wide { grid-column: 1 / -1; }
.widget-half { grid-column: span 6; }
.widget {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.grid-stack > .widget {
    background: transparent;
    border: 0;
    border-radius: 0;
}
.grid-stack > .widget > .grid-stack-item-content {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    min-width: 0;
}
.widget-header {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 14px 18px 0; gap: 12px;
}
.widget-header h2 {
    font-size: 1.05rem; font-family: var(--font-display);
    font-weight: 600; margin: 0; color: var(--primary);
}
.widget-period {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-muted); font-weight: 600;
    white-space: nowrap;
}
.widget-body { padding: 12px 18px 16px; }
/* Widget bodies that contain wide tables (dashboard media-spend) need
   horizontal overflow so the table doesn't force the viewport wider.
   Cleaner than wrapping every table in a container div per template. */
.widget-body:has(.dashboard-table) { overflow-x: auto; }
/* @supports fallback for browsers without :has() — still works, tables
   just scroll the whole widget-body unconditionally, which is harmless. */
@supports not selector(:has(*)) {
    .widget-body { overflow-x: auto; }
}
.widget-footnote { margin-top: 10px; font-size: 0.8rem; }

/* Trend chart */
.trend-svg {
    width: 100%; height: 180px; display: block;
    margin-top: 8px;
}
.trend-legend {
    margin-top: 10px; display: flex; gap: 16px; font-size: 0.8rem;
    color: var(--ink-muted);
}
.swatch {
    display: inline-block; width: 10px; height: 10px; border-radius: 2px;
    margin-right: 4px; vertical-align: middle;
}
.swatch-primary { background: var(--primary); }
.swatch-critical { background: var(--critical); }

/* Findings-state bars */
.findings-state { display: flex; flex-direction: column; gap: 10px; }
.findings-state-row {
    display: grid; grid-template-columns: 180px 40px 1fr;
    align-items: center; gap: 10px;
}
.findings-state-count {
    font-variant-numeric: tabular-nums; font-weight: 700;
    text-align: right; color: var(--primary);
}
.findings-state-bar {
    height: 8px; background: var(--rule-soft); border-radius: 999px;
    overflow: hidden;
}
.findings-state-bar-fill { height: 100%; }
.findings-state-bar-critical { background: var(--critical); }
.findings-state-bar-moderate { background: var(--moderate); }
.findings-state-bar-minor    { background: var(--minor); }

/* Bucket list */
.bucket-list { list-style: none; padding: 0; margin: 0; }
.bucket-list li {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 8px 0; border-bottom: 1px solid var(--rule-soft);
}
.bucket-list li:last-child { border-bottom: 0; }
.bucket-name { font-weight: 600; color: var(--primary); }
.bucket-spread { font-size: 0.85rem; }

/* Activity feed */
.activity-feed { list-style: none; padding: 0; margin: 0; }
.activity-row {
    display: grid; grid-template-columns: 110px 1fr;
    padding: 10px 0; border-bottom: 1px dashed var(--rule-soft);
    gap: 12px;
}
.activity-row:last-child { border-bottom: 0; }
.activity-when {
    font-size: 0.8rem; color: var(--ink-muted); font-weight: 600;
}
.activity-headline { font-weight: 600; color: var(--ink); }
.activity-detail { font-size: 0.88rem; margin-top: 2px; line-height: 1.4; }
.activity-kind-fix .activity-when::before    { content: "✓ "; color: var(--positive); }
.activity-kind-launch .activity-when::before { content: "→ "; color: var(--primary); }
.activity-kind-finding .activity-when::before{ content: "! "; color: var(--moderate); }
.activity-kind-report .activity-when::before { content: "· "; color: var(--ink-muted); }

/* Priority list */
.priority-list { list-style: none; padding: 0; margin: 0; }
.priority-item {
    display: grid; grid-template-columns: 90px 1fr;
    padding: 10px 0; border-bottom: 1px solid var(--rule-soft);
    gap: 12px; align-items: start;
}
.priority-item:last-child { border-bottom: 0; }
.priority-headline { font-weight: 600; color: var(--ink); }
.priority-note { font-size: 0.88rem; margin-top: 4px; line-height: 1.45; }

.dashboard-export-section {
    background: var(--bg-section-alt);
    padding-top: var(--pad-md);
    padding-bottom: var(--pad-lg);
}
.custom-page-title-row {
    margin-bottom: 10px;
}
.custom-page-title-input {
    width: min(100%, 420px);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    padding: 9px 12px;
}
.dashboard-feature-request-section {
    padding-top: var(--pad-md);
    padding-bottom: var(--pad-md);
}
.feature-request-form {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 18px;
    display: grid;
    gap: 14px;
}
.feature-request-form h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 2px 0 4px;
    color: var(--primary);
}
.feature-request-form label {
    display: grid;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink);
}
.feature-request-form textarea,
.feature-request-form select {
    width: 100%;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-weight: 400;
    padding: 10px 12px;
}
.feature-request-form textarea {
    resize: vertical;
    min-height: 96px;
}
.feature-request-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.feature-request-row .btn {
    padding: 10px 14px;
    white-space: nowrap;
}
.feature-request-status {
    min-height: 1.2em;
    margin: 0;
}

@media (max-width: 720px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .widget-half,
    .widget-size-third,
    .widget-size-half,
    .widget-size-two-thirds { grid-column: 1 / -1; }
    .dashboard-edit-inner { grid-template-columns: 1fr; }
    .dashboard-edit-actions { justify-content: flex-start; }
    .dashboard-widget-tray [data-widget-add] { flex: 1 1 calc(50% - 8px); }
    .dashboard-settings-panel {
        width: 100vw;
        max-width: none;
    }
    .widget-edit-controls { grid-template-columns: 1fr 1fr; }
    .widget-edit-title { grid-column: 1 / -1; }
    .table-extra-controls { grid-template-columns: 1fr; }
    .widget-check-list { grid-template-columns: 1fr; }
    .widget-resize-handle {
        width: 30px;
        height: 30px;
        right: 10px;
        bottom: 10px;
    }
    .widget-resize-handle span {
        width: 14px;
        height: 14px;
    }
    .dashboard-pie-row { grid-template-columns: 1fr; }
    .dashboard-pie { max-width: 180px; }
    .feature-request-row { grid-template-columns: 1fr; }
    .feature-request-row .btn { width: 100%; }
    .findings-state-row { grid-template-columns: 140px 36px 1fr; }
    .activity-row { grid-template-columns: 1fr; gap: 4px; }
    .priority-item { grid-template-columns: 1fr; gap: 4px; }
}

/* =================================================================
   On-page showcase cluster — four reveals per page (SEO+AEO / tracking /
   CRO / performance). Shared UI: floating button group + slide-in info
   box + annotation overlay + tooltips.
   ================================================================= */

/* Showcase color tokens — one family per showcase, HUD aesthetic.
   Each gets a main hue + soft-bg + border variants. Tuned for both
   light and dark themes (dark-mode override at the bottom). */
:root {
    --showcase-seo:         #4FD1E0;           /* cyan-teal */
    --showcase-seo-bg:      rgba(79, 209, 224, 0.08);
    --showcase-seo-bor:     rgba(79, 209, 224, 0.35);

    --showcase-tracking:    #4FE0B8;           /* green-cyan */
    --showcase-tracking-bg: rgba(79, 224, 184, 0.08);
    --showcase-tracking-bor:rgba(79, 224, 184, 0.35);

    --showcase-cro:         #F59E4F;           /* warm amber */
    --showcase-cro-bg:      rgba(245, 158, 79, 0.08);
    --showcase-cro-bor:     rgba(245, 158, 79, 0.35);

    --showcase-perf:        #A855F7;           /* purple */
    --showcase-perf-bg:     rgba(168, 85, 247, 0.08);
    --showcase-perf-bor:    rgba(168, 85, 247, 0.35);
}

/* Button cluster — fixed bottom-right floating group. Each button
   stacks vertically; label visible on hover. Hidden on mobile (click
   volume is low, screen real-estate is tight). */
.showcase-cluster {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-body);
}
.showcase-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.showcase-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); }
.showcase-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.showcase-btn-dot {
    display: inline-block;
    width: 10px; height: 10px; border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 8px currentColor;
}
.showcase-btn[data-showcase="seo"]        { border-color: var(--showcase-seo-bor); }
.showcase-btn[data-showcase="seo"] .showcase-btn-dot       { color: var(--showcase-seo);      background: var(--showcase-seo); }
.showcase-btn[data-showcase="tracking"]   { border-color: var(--showcase-tracking-bor); }
.showcase-btn[data-showcase="tracking"] .showcase-btn-dot  { color: var(--showcase-tracking); background: var(--showcase-tracking); }
.showcase-btn[data-showcase="cro"]        { border-color: var(--showcase-cro-bor); }
.showcase-btn[data-showcase="cro"] .showcase-btn-dot       { color: var(--showcase-cro);      background: var(--showcase-cro); }
.showcase-btn[data-showcase="perf"]       { border-color: var(--showcase-perf-bor); }
.showcase-btn[data-showcase="perf"] .showcase-btn-dot      { color: var(--showcase-perf);     background: var(--showcase-perf); }

/* Active state — when a showcase panel is open, its button reads pressed. */
.showcase-btn[aria-expanded="true"] {
    background: var(--ink);
    color: var(--bg);
}
.showcase-btn[aria-expanded="true"] .showcase-btn-dot {
    box-shadow: 0 0 0 2px var(--ink), 0 0 10px currentColor;
}

/* Warning icon on buttons whose metadata is missing (honesty layer —
   per spec, button doesn't silently hide; it shows ⚠). */
.showcase-btn[data-metadata-missing="true"] {
    opacity: 0.55;
}
.showcase-btn[data-metadata-missing="true"]::after {
    content: "⚠";
    font-size: 11px;
    color: var(--moderate);
}

/* ---- Content-area shrink when a panel is open ----
   Per Jay: the panel should push content aside rather than overlay it.
   Body picks up a `data-showcase-open` attribute when a panel opens;
   that compresses the content area to the left of the panel so
   everything the panel is annotating stays visible. Container max-width
   is also reduced so content reflows (H1 wraps tighter, grids collapse,
   hero stats stack) as if the browser were narrower.

   `--showcase-panel-w` is the single source of truth for panel width;
   body padding-right must equal it (previously diverged at narrow
   viewports, causing the panel to overlap content by up to ~60px at
   ~1000px wide). */
:root {
    --showcase-panel-w: min(460px, 90vw);
    --showcase-rail-w: 220px;
}
body {
    transition: padding-right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 1180px) {
    body:has(.showcase-cluster):not([data-showcase-open]) {
        padding-right: 0;
    }
    /* Showcase shrink applies to ALL containers including the header — the
       header needs to make room for the right-side rail/dock so its CTA
       doesn't sit underneath the showcase pills. When the showcase panel
       opens (`[data-showcase-open]`), body's `padding-right: var(--showcase-panel-w)`
       handles further shifting. (Earlier exclusion `:not(.header-inner)`
       removed 2026-05-03 — that fix overcorrected.) */
    body:has(.showcase-cluster):not([data-showcase-open]) .container {
        max-width: min(var(--container-w), calc(100vw - var(--showcase-rail-w) - (2 * var(--pad-md))));
        margin-left: auto;
        margin-right: var(--showcase-rail-w);
    }
}
body[data-showcase-open] {
    padding-right: var(--showcase-panel-w);
}
body[data-showcase-open] .container {
    max-width: min(840px, 100%);
}

/* ---- Info box (slide-in panel) ---- */
.showcase-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: var(--showcase-panel-w);
    background: var(--bg-card);
    border-left: 3px solid var(--ink);
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.12);
    z-index: 910;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
}
.showcase-panel[data-open="true"] { transform: translateX(0); }

/* Cluster also rides with the panel so the buttons stay on the visible
   edge of the shrunken viewport, not behind the panel. */
body[data-showcase-open] .showcase-cluster {
    right: calc(var(--showcase-panel-w) + 24px);
    transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.showcase-panel[data-showcase="seo"]      { border-left-color: var(--showcase-seo); }
.showcase-panel[data-showcase="tracking"] { border-left-color: var(--showcase-tracking); }
.showcase-panel[data-showcase="cro"]      { border-left-color: var(--showcase-cro); }
.showcase-panel[data-showcase="perf"]     { border-left-color: var(--showcase-perf); }

.showcase-panel-header {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--rule-soft);
}
.showcase-panel-title {
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 600; margin: 0;
    color: var(--primary);
}
.showcase-panel-close {
    background: transparent; border: 0; font-size: 22px;
    cursor: pointer; color: var(--ink-muted); line-height: 1;
    padding: 0 4px;
}
.showcase-panel-close:hover { color: var(--ink); }
.showcase-panel-body { padding: 16px 24px 28px; }

.showcase-section {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule-soft);
}
.showcase-section:last-child { border-bottom: 0; }
.showcase-section h3 {
    text-transform: uppercase; letter-spacing: 0.08em;
    font-size: 0.72rem; font-weight: 700; margin: 0 0 8px;
    color: var(--ink-muted);
}
.showcase-section p { margin: 4px 0; line-height: 1.5; font-size: 0.92rem; }
.showcase-section ul { padding-left: 18px; margin: 4px 0; }
.showcase-section code { font-family: var(--font-mono); font-size: 0.85em; }
.showcase-chip {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 0.78rem; font-weight: 600; margin: 2px 4px 2px 0;
    border: 1px solid var(--rule);
}
.showcase-chip-seo      { background: var(--showcase-seo-bg);      border-color: var(--showcase-seo-bor);      color: var(--primary); }
.showcase-chip-tracking { background: var(--showcase-tracking-bg); border-color: var(--showcase-tracking-bor); color: var(--primary); }
.showcase-chip-cro      { background: var(--showcase-cro-bg);      border-color: var(--showcase-cro-bor);      color: var(--primary); }
.showcase-chip-perf     { background: var(--showcase-perf-bg);     border-color: var(--showcase-perf-bor);     color: var(--primary); }

.showcase-stat-row {
    display: grid; grid-template-columns: 1fr auto;
    gap: 8px; padding: 4px 0; font-size: 0.9rem;
}
.showcase-stat-row .stat-label { color: var(--ink-muted); }
.showcase-stat-row .stat-value { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Annotation overlay on live page elements ---- */
/* Element selectors receive `data-showcase-annotated` + a kind attr
   when a showcase is active. CSS applies the HUD outline + shadow. */
[data-showcase-annotated="seo"] {
    outline: 2px solid var(--showcase-seo) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px var(--showcase-seo-bg) !important;
}
[data-showcase-annotated="tracking"] {
    outline: 2px solid var(--showcase-tracking) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px var(--showcase-tracking-bg) !important;
}
[data-showcase-annotated="cro"] {
    outline: 2px solid var(--showcase-cro) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px var(--showcase-cro-bg) !important;
}
[data-showcase-annotated="perf"] {
    outline: 2px solid var(--showcase-perf) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px var(--showcase-perf-bg) !important;
}

/* Tooltip on annotated elements (pure CSS via attr() + pseudo) */
.showcase-tooltip {
    position: absolute;
    background: var(--ink);
    color: var(--bg);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.82rem;
    line-height: 1.4;
    max-width: 280px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    z-index: 905;
    pointer-events: none;
    font-family: var(--font-body);
}
.showcase-tooltip::before {
    content: "";
    position: absolute;
    top: -5px; left: 16px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--ink);
}

/* Showcase toast — for live event-firing notifications (tracking). */
.showcase-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--ink);
    color: var(--bg);
    padding: 10px 16px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    z-index: 920;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}
.showcase-toast[data-visible="true"] {
    transform: translateY(0);
    opacity: 1;
}
.showcase-toast[data-showcase="tracking"] {
    border-left: 3px solid var(--showcase-tracking);
}

/* Responsive — hide cluster on narrow viewports (v1 scope per spec) */
@media (max-width: 720px) {
    .showcase-cluster { display: none; }
    .showcase-panel   { display: none; }
    [data-showcase-annotated] { outline: none !important; box-shadow: none !important; }
}
.contact-sidebar h3 { margin-top: 0; }
.contact-sidebar h3.mt-lg { margin-top: var(--pad-md); }
.contact-direct {
    font-size: 1.3rem;
    font-family: var(--font-display);
    margin-bottom: 4px;
}
.contact-direct a {
    color: var(--accent);
    border-bottom: 2px solid var(--accent-soft);
}
.timeline-list {
    counter-reset: item;
    list-style: none;
    padding: 0;
    margin-top: var(--pad-sm);
}
.timeline-list li {
    counter-increment: item;
    padding: 8px 0 8px 36px;
    position: relative;
    border-bottom: 1px dashed var(--rule);
}
.timeline-list li:before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 8px;
    width: 24px;
    height: 24px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
}
.contact-nots {
    list-style: none;
    padding: 0;
    margin-top: var(--pad-sm);
}
.contact-nots li {
    padding: 4px 0 4px 22px;
    position: relative;
    color: var(--ink-muted);
    font-size: 0.95rem;
}
.contact-nots li:before {
    content: "";
    position: absolute;
    left: 4px;
    top: 12px;
    width: 10px;
    height: 1px;
    background: var(--ink-faint);
}

/* ---------- Loose lists / per-town pills / per-vertical extras ---------- */

.loose-list {
    list-style: none;
    padding: 0;
    margin: var(--pad-md) 0;
}
.loose-list li {
    padding: 14px 0 14px 22px;
    position: relative;
    border-bottom: 1px solid var(--rule-soft);
    color: var(--ink);
    line-height: 1.55;
}
.loose-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 24px;
    width: 14px;
    height: 1px;
    background: var(--accent);
}
.loose-list li:last-child { border-bottom: none; }

.town-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: var(--pad-md);
}
.town-pill {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    transition: all 0.12s ease;
}
.town-pill:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}
.town-pill .town-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    font-family: var(--font-display);
}
.town-pill .town-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.service-group-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    margin: var(--pad-md) 0 8px;
    font-weight: 600;
}

.intent-windows {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--pad-md);
    margin-top: var(--pad-md);
}
.intent-window {
    padding: var(--pad-md);
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.intent-window h4 { margin-top: 0; }
.intent-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 6px 0 12px;
    display: flex;
    gap: var(--pad-md);
    flex-wrap: wrap;
}

.anti-service-grid, .value-props-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--pad-md);
    margin-top: var(--pad-md);
}
.anti-service-card, .value-prop-card {
    padding: var(--pad-md);
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.anti-service-card h4, .value-prop-card h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--accent);
}
.anti-service-card ul {
    margin: 0;
    padding-left: 18px;
    list-style: none;
}
.anti-service-card li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--ink-muted);
}
.anti-service-card code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: var(--bg-section-alt);
    padding: 1px 6px;
    border-radius: 3px;
    color: var(--ink);
}

.seasonal-calendar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: var(--pad-md) 0;
}
.seasonal-month {
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.85rem;
}
.seasonal-month-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.seasonal-month-theme {
    font-size: 0.75rem;
    color: var(--ink-muted);
    line-height: 1.3;
}
.seasonal-current {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.seasonal-current .seasonal-month-name { color: var(--accent); }

/* ---------- About / FAQ ---------- */

.prose { max-width: 720px; }
.prose p { margin-bottom: 1.2em; line-height: 1.7; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose blockquote {
    margin: 1.5em 0;
    padding: 0 var(--pad-md);
    border-left: 3px solid var(--accent);
    color: var(--ink);
    font-style: italic;
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.faq-list {
    margin-top: var(--pad-md);
    max-width: 760px;
}
.faq-item {
    padding: var(--pad-md) 0;
    border-bottom: 1px solid var(--rule-soft);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 12px;
    cursor: pointer;
}
.faq-a { color: var(--ink-muted); margin: 0; line-height: 1.65; }

/* ---------- Per-audit view (logged-in prospect view) ---------- */

.audit-header {
    background: var(--bg-section-alt);
    border-bottom: 2px solid var(--accent);
}
.audit-meta-row {
    display: flex;
    gap: 8px;
    margin-top: var(--pad-md);
    flex-wrap: wrap;
}
.audit-meta-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    color: var(--ink-muted);
}
.audit-meta-window { background: transparent; border-style: dashed; }

.section-audit-summary { background: var(--bg); }
.audit-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--pad-sm);
    margin-top: var(--pad-md);
}
.summary-card {
    padding: var(--pad-md);
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    border-left: 4px solid var(--ink-faint);
}
.summary-card.summary-good { border-left-color: var(--positive); }
.summary-card.summary-bad  { border-left-color: var(--accent); }
.summary-card.summary-neutral { border-left-color: var(--ink-faint); }
.summary-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    margin-bottom: 6px;
}
.summary-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
}

.audit-finding {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: var(--pad-md);
    padding: var(--pad-md) 0;
    border-bottom: 1px solid var(--rule-soft);
}
.audit-finding:last-child { border-bottom: none; }
.audit-finding-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.severity-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--rule);
    color: var(--ink-muted);
}
.severity-critical { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.severity-moderate { background: var(--bg-section-alt); color: var(--ink); }
.severity-low      { color: var(--ink-faint); }
.audit-finding-body h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-size: 1.1rem;
}
.audit-finding-detail {
    color: var(--ink);
    margin-bottom: 12px;
    line-height: 1.55;
}
.audit-evidence {
    margin: 12px 0;
    padding: 12px 16px;
    background: var(--bg-section-alt);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.audit-evidence summary {
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    user-select: none;
}
.audit-evidence summary:hover { color: var(--accent); }
.evidence-list {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 6px 16px;
}
.evidence-list dt {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.evidence-list dd {
    margin: 0;
    color: var(--ink);
    font-size: 0.9rem;
    word-break: break-word;
}
.audit-finding-cta {
    margin-top: 8px;
    font-size: 0.9rem;
}

/* ---------- Full-narrative finding slots (added 2026-04-27 with the
   Stage-6 surface-parity refactor; structurally parallels the operator
   dashboard's per-finding rendering and the deck's per-slide treatment).
   Visual hierarchy:
     - Subheadline (the hammer): bigger, weight-semi, accent border-left.
     - Description: body prose.
     - Impact + Recommendation: labeled blocks with subtle background.
     - Proof panel: 2-column table, status-color stripes.
---------- */

.audit-finding-subheadline {
    margin-top: 10px;
    margin-bottom: 14px;
    padding-left: 14px;
    border-left: 3px solid var(--accent, #d04a3b);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink);
}

.audit-finding-impact,
.audit-finding-recommendation {
    margin: 14px 0;
    padding: 12px 16px;
    background: var(--bg-section-alt);
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.55;
}

.audit-finding-recommendation {
    background: rgba(217, 187, 90, 0.18);
    border-left: 3px solid #c79b3a;
}

.audit-finding-label {
    display: inline-block;
    margin-right: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
}

.audit-finding-proof {
    margin: 14px 0;
}

.proof-panel-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--rule);
    background: var(--bg);
    font-size: 0.9rem;
}

.proof-panel-row {
    border-bottom: 1px solid var(--rule-soft);
}
.proof-panel-row:last-child { border-bottom: none; }

.proof-panel-row td {
    padding: 8px 12px;
    vertical-align: top;
}

.proof-panel-signal {
    width: 28%;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--ink);
    font-weight: 500;
}

.proof-panel-note {
    color: var(--ink);
    line-height: 1.5;
}

.proof-panel-where {
    width: 22%;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-faint);
    text-align: right;
}

/* Status-coded left border per row. Mirrors operator-dashboard severity
   strip treatment. */
.proof-panel-row.proof-panel-severity-critical .proof-panel-signal {
    border-left: 3px solid var(--accent, #d04a3b);
    padding-left: 9px;
}
.proof-panel-row.proof-panel-severity-moderate .proof-panel-signal {
    border-left: 3px solid #c79b3a;
    padding-left: 9px;
}
.proof-panel-row.proof-panel-severity-minor .proof-panel-signal {
    border-left: 3px solid var(--ink-faint);
    padding-left: 9px;
}

.audit-finding-proof-image img {
    max-width: 100%;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.audit-finding-proof-image figcaption {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--ink-faint);
}

.audit-meta-fresh {
    background: rgba(60, 140, 90, 0.15);
    color: var(--positive);
    border-color: var(--positive);
}

.priority-rank-1 { background: var(--priority-1); }
.priority-rank-2 { background: var(--priority-2); }
.priority-rank-3 { background: var(--priority-3); }
.priority-rank-4 { background: var(--priority-4); }
.priority-rank-5, .priority-rank-6, .priority-rank-7, .priority-rank-8 {
    background: var(--priority-5);
}

/* ---------- Comparison table ---------- */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--pad-md) 0;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
}
.comparison-table th, .comparison-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 0.95rem;
}
.comparison-table thead th {
    background: var(--bg-section-alt);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1rem;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
}
.comparison-table .col-jay { background: var(--accent-soft); position: relative; }
.comparison-table thead .col-jay { color: var(--accent); }
.comparison-table .row-label {
    font-weight: 600;
    color: var(--ink);
    font-family: var(--font-display);
}
.comparison-table tr:last-child td { border-bottom: none; }
.cell-yes::before { content: "yes — "; color: var(--accent); font-family: var(--font-mono); font-size: 0.8rem; }
.cell-no::before { content: "no — "; color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.8rem; }

/* ---------- Trust strip (footer-adjacent) ---------- */

.trust-strip {
    padding: var(--pad-md) 0;
    background: var(--bg-section-alt);
    border-top: 1px solid var(--rule);
}
.trust-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--pad-md);
    text-align: center;
    align-items: center;
}
.trust-item {
    color: var(--ink-muted);
}
.trust-item-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin-bottom: 4px;
}
.trust-item-value {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--ink);
}

/* ---------- Now page ---------- */

.now-list {
    list-style: none;
    padding: 0;
    margin: var(--pad-md) 0;
}
.now-list li {
    padding: 14px 0 14px 28px;
    border-bottom: 1px solid var(--rule-soft);
    position: relative;
    line-height: 1.55;
}
.now-list li:before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 22px;
}
.now-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--pad-md);
}

/* ---------- 404 ---------- */

.notfound {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.notfound-inner { max-width: 520px; padding: var(--pad-md); }
.notfound h1 {
    font-size: 6rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0;
}
.notfound h2 {
    font-size: 1.5rem;
    margin-top: var(--pad-sm);
    color: var(--ink);
    font-weight: 500;
}
.notfound p { color: var(--ink-muted); margin-bottom: var(--pad-md); }

/* ---------- Print ---------- */

@media print {
    .site-header, .site-footer, .site-nav, .skip-link,
    .availability-pill, .hero-actions, .section-contact-cta,
    .btn { display: none !important; }
    .container { max-width: none; padding: 0; }
    body { background: white; color: black; font-size: 11pt; }
    a { color: black; border: none; text-decoration: underline; }
    h1, h2, h3 { color: black; }
    .section { padding: var(--pad-md) 0; border-color: #ccc; }
    .priority-badge, .category-badge { background: white !important; color: black !important; border: 1px solid #999; }
}

/* ---------- Dark mode (auto, inherits OS preference) ----------
   Restored 2026-04-19 with deck-derived dark tokens. The earlier pass
   had removed dark mode because the tokens were from the old brick/
   warm palette that didn't map to the deck. These variants are designed
   against the deck's navy/severity palette so the site reads like "the
   deck at night" instead of a mismatched second skin.

   Design rules for this block:
   - Background: very dark navy-tinted (not pure black) so the severity
     palette still pops without screaming.
   - --primary (navy on light): inverts to a pale blue-gray on dark,
     since #1a2744 on dark bg is unreadable. Still reads as the same
     role (authoritative, primary).
   - Severity colors (critical/moderate/minor): shifted brighter so
     they remain legible on dark backgrounds, with darker bg + border
     variants tuned to maintain the 1.5px pill contrast the deck uses.
   - Rules: lighter on dark so the editorial density still reads. */
:root { color-scheme: light; }

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        /* Dark-mode neutrals — Tailwind zinc-950..800 scale. Matches
           Evidence's chosen black (#09090b) for visual continuity into
           the dashboard. Replaces the navy-black palette 2026-05-03. */
        --bg:             #09090b;       /* zinc-950 — Evidence's black */
        --bg-section-alt: #18181b;       /* zinc-900 */
        --bg-card:        #27272a;       /* zinc-800 — card surface */

        --ink:            #fafafa;       /* zinc-50 — body ink in dark */
        --ink-muted:      #a1a1aa;       /* zinc-400 — secondary text */
        --ink-faint:      #71717a;       /* zinc-500 — muted captions */

        /* Primary inverts — the deck's navy becomes a pale blue-gray
           so it still reads as authoritative on dark surfaces. */
        --primary:        var(--ink);
        --primary-hover:  var(--ink-muted);
        --accent:         var(--primary);
        --accent-hover:   var(--primary-hover);
        --accent-soft:    #27272a;       /* zinc-800 */

        --positive:       #3a8a5f;       /* HFG, lifted slightly for dark-mode legibility */
        --brand-ink:      #e8eaed;       /* Google grey 200 — wordmark base in dark mode */


        /* Severity — brighter hues for dark-bg legibility, darker bg/
           border variants so pills retain their "earned" texture. */
        --critical:       #e55a3d;
        --critical-bg:    #2a1612;
        --critical-bor:   #8a3020;
        --moderate:       #e8a94a;
        --moderate-bg:    #2a1e0f;
        --moderate-bor:   #8a6018;
        --minor:          #a1a1aa;       /* zinc-400 */
        --minor-bg:       #18181b;       /* zinc-900 */
        --minor-bor:      #3f3f46;       /* zinc-700 */

        /* Priority aliases re-map to the dark severity tokens. */
        --priority-1:     var(--critical);
        --priority-2:     var(--moderate);
        --priority-3:     #d9a33c;
        --priority-4:     var(--minor);
        --priority-5:     var(--ink-faint);

        --rule:           #3f3f46;       /* zinc-700 */
        --rule-soft:      #27272a;       /* zinc-800 */
        --highlight:      #2a2618;

        /* CTA band uses subtle elevation in dark mode — slightly lighter
           than body (zinc-950 → zinc-900) so the section reads as
           emphasized without becoming a giant cream slab. Navy retired
           2026-05-03; brand is monochrome zinc + HFG green only. */
        --cta-band-bg:    #18181b;       /* zinc-900 — elevation over body */
        --cta-band-ink:   #fafafa;       /* zinc-50 — body ink in dark */
        --cta-band-muted: rgba(250, 250, 250, 0.78);
    }
    /* Slightly dim images so photo content doesn't burn against the
       dark surface. */
    img, svg { filter: brightness(0.92); }
}

/* ---------- Reduce motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
    .header-inner { flex-direction: column; gap: 14px; align-items: flex-start; }
    .site-nav { flex-wrap: wrap; gap: 14px; font-size: 0.9rem; }
    .service-hero-grid,
    .service-card-grid,
    .service-timeline { grid-template-columns: 1fr; }
    .hero { padding: var(--pad-lg) 0 var(--pad-md); }
    .hero-headline { font-size: 2.1rem; }
    .hero-sub { font-size: 1.05rem; }
    .footer-inner { grid-template-columns: 1fr; gap: var(--pad-md); }
    .finding-row { flex-direction: column; gap: 8px; }
    .finding-meta { flex-direction: row; }
    .principle { grid-template-columns: 1fr; }
    .principle-num { font-size: 1.5rem; }
    .page-header h1 { font-size: 2rem; }
    .price-big { font-size: 2.5rem; }
    .vertical-stats { flex-direction: column; gap: var(--pad-md); }
    .vertical-detail-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .contact-grid { grid-template-columns: 1fr; }
    .stats-row { gap: var(--pad-sm); }
}

/* ---------- Methodology diagram + supporting sections ---------- */

.section-diagram { padding: var(--pad-md) 0 var(--pad-lg); }
.methodology-diagram { margin: 0 auto; max-width: 720px; color: var(--ink); }
.methodology-diagram svg { display: block; width: 100%; height: auto; }
.methodology-diagram .node rect {
    fill: var(--bg-card);
    stroke: var(--ink);
    stroke-width: 1.5;
}
.methodology-diagram .node-objective rect {
    fill: var(--accent-soft);
    stroke: var(--accent);
    stroke-width: 2;
}
.methodology-diagram .node-label {
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    fill: var(--ink);
}
.methodology-diagram .node-sub {
    font-family: inherit;
    font-size: 12px;
    fill: var(--ink-muted);
}
.methodology-diagram .feed-line,
.methodology-diagram .cycle-line {
    stroke: var(--ink-muted);
}
.methodology-diagram .feed-line { stroke: var(--accent); }
.diagram-caption {
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.9rem;
    margin-top: var(--pad-sm);
    font-style: italic;
}

/* Per-bucket section spacing */
.section-buckets h2 { margin-top: var(--pad-md); }
.section-buckets h2:first-child { margin-top: 0; }
.goes-deeper { margin-top: -0.2em; font-size: 0.9rem; }
.goes-deeper a { color: var(--ink-muted); border-bottom-color: transparent; }
.goes-deeper a:hover { color: var(--accent-hover); border-bottom-color: var(--accent); }

/* `.section-cycle-framing` / `.section-differentiator` / `.section-honest-standards`
   retired 2026-05-03 — use `.section-alt` instead. The adjacent-sibling
   soft-divider behavior is now handled generically by
   `.section-alt + .section-alt` near the top of this file. */

@media (max-width: 800px) {
    .methodology-diagram .node-label { font-size: 13px; }
    .methodology-diagram .node-sub { font-size: 10.5px; }
}
