/* ─── Beaconly design system ───────────────────────────────────────────────── */
/* Self-contained. Does not depend on homepage.css or product-landing.css.      */
/* All color values must reference a CSS custom property. Nothing hardcoded      */
/* except the submit button text (#fff per spec) and shadow rgba literals.      */

/* ─── Custom properties: light mode ────────────────────────────────────────── */

:root {
    --bg:              #F8FAFC;
    --bg-subtle:       #F1F5F9;
    --surface:         #FFFFFF;
    --surface-raised:  #F8FAFC;
    --ink:             #0F172A;
    --ink-soft:        #475569;
    --ink-muted:       #94A3B8;
    --line:            rgba(15, 23, 42, 0.1);
    --line-strong:     rgba(15, 23, 42, 0.18);
    --accent:          #0891B2;
    --accent-text:     #0891B2;
    --accent-bg:       rgba(8, 145, 178, 0.08);
    --pass:            #059669;
    --pass-bg:         rgba(5, 150, 105, 0.08);
    --fail:            #DC2626;
    --fail-bg:         rgba(220, 38, 38, 0.07);
    --optional:        #6B7280;
    --badge-configured-bg:       rgba(5, 150, 105, 0.1);
    --badge-configured-color:    #059669;
    --badge-partial-bg:          rgba(180, 120, 0, 0.1);
    --badge-partial-color:       #92400E;
    --badge-not-configured-bg:   rgba(220, 38, 38, 0.1);
    --badge-not-configured-color: #DC2626;
    --shadow-sm:  0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md:  0 4px 16px rgba(15,23,42,0.1), 0 2px 6px rgba(15,23,42,0.06);
    --shadow-lg:  0 12px 40px rgba(15,23,42,0.12);
    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   22px;
    --radius-pill: 999px;
    --header-bg:   rgba(248, 250, 252, 0.85);

    /* Apple redesign tokens (Phase 11) - light mode */
    --ap-ink:              #1D1D1F;
    --ap-ink-secondary:    #6E6E73;
    --ap-ink-tertiary:     #86868B;
    --ap-ink-inverse:      #F5F5F7;
    --ap-surface:          #FBFBFD;
    --ap-surface-elevated: #FFFFFF;
    --ap-surface-deep:     #F5F5F7;
    --ap-surface-ink:      #000000;
    --ap-line:             rgba(0, 0, 0, 0.1);
    --ap-line-strong:      rgba(0, 0, 0, 0.18);
    --ap-line-on-ink:      rgba(245, 245, 247, 0.16);
    --ap-accent:           #0891B2;
    --ap-accent-strong:    #06A8C8;
    --ap-accent-quiet:     rgba(8, 145, 178, 0.08);
    --ap-accent-on-ink:    #5EEAFF;
    --ap-pass:             #1D9F66;
    --ap-fail:             #DC2626;
    --ap-warn:             #B45309;
    --ap-shadow-1:         0 1px 2px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.04);
    --ap-shadow-2:         0 4px 12px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.05);
    --ap-shadow-3:         0 18px 50px -16px rgba(0,0,0,0.18);
    --ap-shadow-4:         0 40px 90px -30px rgba(0,0,0,0.22);
    --ap-shadow-glow:      0 0 60px rgba(8, 145, 178, 0.18);
    --ap-shadow-sm:        var(--ap-shadow-1);
    --ap-shadow-card:      var(--ap-shadow-2);
    --ap-shadow-lg:        var(--ap-shadow-3);
    --ap-shadow-xl:        var(--ap-shadow-4);
    --ap-hairline:         var(--ap-line);
    --ap-surface-alt:      var(--ap-surface-deep);
    --ap-header-bg:        rgba(251, 251, 253, 0.72);
    --ap-header-border:    rgba(0, 0, 0, 0.08);
}

/* ─── Custom properties: dark mode ─────────────────────────────────────────── */

html[data-theme="dark"] {
    --bg:              #060C14;
    --bg-subtle:       #0D1520;
    --surface:         #111927;
    --surface-raised:  #172030;
    --ink:             #F0F9FF;
    --ink-soft:        #94A3B8;
    --ink-muted:       #3D5068;
    --line:            rgba(240, 249, 255, 0.07);
    --line-strong:     rgba(240, 249, 255, 0.13);
    --accent:          #22D3EE;
    --accent-text:     #22D3EE;
    --accent-bg:       rgba(34, 211, 238, 0.08);
    --pass:            #34D399;
    --pass-bg:         rgba(52, 211, 153, 0.08);
    --fail:            #F87171;
    --fail-bg:         rgba(248, 113, 113, 0.08);
    --optional:        #6B7280;
    --badge-configured-bg:       rgba(52, 211, 153, 0.1);
    --badge-configured-color:    #34D399;
    --badge-partial-bg:          rgba(251, 191, 36, 0.1);
    --badge-partial-color:       #FBBF24;
    --badge-not-configured-bg:   rgba(248, 113, 113, 0.1);
    --badge-not-configured-color: #F87171;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.4);
    --header-bg:   rgba(6, 12, 20, 0.85);

    /* Apple redesign tokens (Phase 11) - dark mode */
    --ap-ink:              #F5F5F7;
    --ap-ink-secondary:    #A1A1A6;
    --ap-ink-tertiary:     #6E6E73;
    --ap-ink-inverse:      #1D1D1F;
    --ap-surface:          #000000;
    --ap-surface-elevated: #151517;
    --ap-surface-deep:     #0A0A0C;
    --ap-surface-ink:      #FBFBFD;
    --ap-line:             rgba(255, 255, 255, 0.1);
    --ap-line-strong:      rgba(255, 255, 255, 0.18);
    --ap-line-on-ink:      rgba(29, 29, 31, 0.18);
    --ap-accent:           #22D3EE;
    --ap-accent-strong:    #5EEAFF;
    --ap-accent-quiet:     rgba(34, 211, 238, 0.1);
    --ap-accent-on-ink:    #0891B2;
    --ap-pass:             #34D399;
    --ap-fail:             #F87171;
    --ap-warn:             #FBBF24;
    --ap-shadow-1:         0 1px 2px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.4);
    --ap-shadow-2:         0 4px 12px rgba(0,0,0,0.5), 0 12px 32px rgba(0,0,0,0.45);
    --ap-shadow-3:         0 18px 50px -16px rgba(0,0,0,0.7);
    --ap-shadow-4:         0 40px 90px -30px rgba(0,0,0,0.85);
    --ap-shadow-glow:      0 0 80px rgba(34, 211, 238, 0.22);
    --ap-shadow-sm:        var(--ap-shadow-1);
    --ap-shadow-card:      var(--ap-shadow-2);
    --ap-shadow-lg:        var(--ap-shadow-3);
    --ap-shadow-xl:        var(--ap-shadow-4);
    --ap-hairline:         var(--ap-line);
    --ap-surface-alt:      var(--ap-surface-deep);
    --ap-header-bg:        rgba(0, 0, 0, 0.72);
    --ap-header-border:    rgba(255, 255, 255, 0.1);
}

/* ─── Apple redesign global tokens (Phase 11) ──────────────────────────────── */
/* These tokens are theme-independent and used by all new ap- prefixed classes. */

:root {
    /* Font stacks - prefers SF Pro on Apple devices, Inter elsewhere */
    --ap-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
    --ap-font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
    --ap-font-mono:    "SF Mono", "IBM Plex Mono", Menlo, Monaco, Consolas, monospace;

    /* Type scale */
    --ap-fs-11:  0.6875rem;
    --ap-fs-12:  0.75rem;
    --ap-fs-13:  0.8125rem;
    --ap-fs-14:  0.875rem;
    --ap-fs-15:  0.9375rem;
    --ap-fs-16:  1rem;
    --ap-fs-17:  1.0625rem;
    --ap-fs-18:  1.125rem;
    --ap-fs-19:  1.1875rem;
    --ap-fs-20:  1.25rem;
    --ap-fs-22:  1.375rem;
    --ap-fs-24:  1.5rem;
    --ap-fs-28:  1.75rem;
    --ap-fs-32:  2rem;
    --ap-fs-36:  2.25rem;
    --ap-fs-48:  3rem;
    --ap-fs-64:  4rem;
    --ap-fs-80:  5rem;
    --ap-fs-96:  6rem;
    --ap-fs-128: 8rem;

    /* Spacing scale */
    --ap-sp-4:   4px;
    --ap-sp-8:   8px;
    --ap-sp-12:  12px;
    --ap-sp-16:  16px;
    --ap-sp-20:  20px;
    --ap-sp-24:  24px;
    --ap-sp-28:  28px;
    --ap-sp-32:  32px;
    --ap-sp-40:  40px;
    --ap-sp-48:  48px;
    --ap-sp-56:  56px;
    --ap-sp-64:  64px;
    --ap-sp-80:  80px;
    --ap-sp-96:  96px;
    --ap-sp-120: 120px;
    --ap-sp-128: 128px;
    --ap-sp-160: 160px;
    --ap-sp-200: 200px;

    /* Radius scale */
    --ap-r-8:    8px;
    --ap-r-12:   12px;
    --ap-r-16:   16px;
    --ap-r-18:   18px;
    --ap-r-20:   20px;
    --ap-r-24:   24px;
    --ap-r-32:   32px;
    --ap-r-lg:   20px;
    --ap-r-xl:   28px;
    --ap-r-pill: 999px;

    /* Header offset used by sticky layouts */
    --ap-header-h: 72px;

    /* Motion tokens - Apple-style cubic beziers */
    --ap-ease-out:     cubic-bezier(0.28, 0.11, 0.32, 1);
    --ap-ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
    --ap-ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
    --ap-ease-quiet:   cubic-bezier(0.4, 0, 0.2, 1);
    --ap-dur-fast:     200ms;
    --ap-dur-base:     500ms;
    --ap-dur-slow:     900ms;
    --ap-dur-xslow:    1400ms;

    /* Container widths */
    --ap-container:       1280px;
    --ap-container-tight: 980px;
    --ap-container-read:  720px;
}

/* ─── Reset and base ────────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    background-image: radial-gradient(circle, var(--line) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

img, svg {
    display: block;
}

/* ─── Container ─────────────────────────────────────────────────────────────── */

.ab-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Section spacing ───────────────────────────────────────────────────────── */

.ab-section {
    padding-top: 80px;
}

/* ─── Section heading block ─────────────────────────────────────────────────── */

.ab-section-head {
    margin-bottom: 32px;
}

.ab-section-head h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-wrap: balance;
    margin-top: 10px;
}

/* ─── Eyebrow label ─────────────────────────────────────────────────────────── */

.ab-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-text);
}

/* Spacing between the summary row and the "What we check" heading in results */
#audit-results .ab-section-head {
    margin-top: 36px;
}

/* ─── Inline code (in check detail panels) ──────────────────────────────────── */

.ab-check-detail code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82em;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    color: var(--accent-text);
}

/* ─── Primary button ────────────────────────────────────────────────────────── */

/* Text is always #fff per spec - accent buttons need white text at both
   accent values (#0891B2 and #22D3EE). */
.ab-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 150ms ease, transform 150ms ease;
}

.ab-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ab-btn-primary:active {
    transform: translateY(0);
    opacity: 1;
}

/* Secondary / ghost button (used for retry) */
.ab-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 150ms ease, color 150ms ease;
}

.ab-btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent-text);
}

/* ─── Header ────────────────────────────────────────────────────────────────── */

.ab-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateZ(0);
    contain: layout paint;
}

.ab-header-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 64px;
    gap: 16px;
}

/* ─── Brand / logo ──────────────────────────────────────────────────────────── */

.ab-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
}

.ab-brand svg {
    width: 38px;
    height: 38px;
}

.ab-brand-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink);
    white-space: nowrap;
}

/* ─── Desktop nav ───────────────────────────────────────────────────────────── */

.ab-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    justify-content: center;
}

.ab-nav > a,
.ab-nav-dropdown-trigger {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 150ms ease;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.ab-nav > a:hover,
.ab-nav-dropdown-trigger:hover {
    color: var(--ink);
}

/* Active nav item - highlights the current page link */
.ab-nav-active {
    color: var(--accent-text) !important;
}

/* Dropdown arrow chevron */
.ab-nav-arrow {
    width: 10px;
    height: 10px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
    transition: transform 180ms ease;
}

/* Dropdown container */
.ab-nav-dropdown {
    position: relative;
}

.ab-nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    /* Small arrow pointing up */
}

/* Show panel on hover or keyboard focus-within */
.ab-nav-dropdown:hover .ab-nav-dropdown-panel,
.ab-nav-dropdown:focus-within .ab-nav-dropdown-panel {
    display: flex;
}

.ab-nav-dropdown:hover .ab-nav-arrow {
    transform: rotate(180deg);
}

.ab-nav-dropdown-panel a {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--ink-soft);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    transition: background 120ms ease, color 120ms ease;
    display: block;
}

.ab-nav-dropdown-panel a:hover,
.ab-nav-dropdown-panel a:focus {
    background: var(--bg-subtle);
    color: var(--ink);
}

.ab-nav-dropdown-panel a.ab-nav-active {
    color: var(--accent-text);
}

.ab-nav-dropdown-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding: 8px 10px 4px;
}

.ab-nav-dropdown-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 0;
}

/* ─── Header actions (theme toggle + hamburger) ──────────────────────────────── */

.ab-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

/* ─── Theme toggle ──────────────────────────────────────────────────────────── */

.ab-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-soft);
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.ab-theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent-text);
    background: var(--accent-bg);
}

.ab-theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ─── Hamburger (mobile only) ───────────────────────────────────────────────── */

.ab-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    transition: border-color 150ms ease;
}

.ab-hamburger:hover {
    border-color: var(--accent);
}

.ab-hamburger svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    flex-shrink: 0;
}

/* ─── Mobile nav panel ──────────────────────────────────────────────────────── */

.ab-mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 12px 0 16px;
}

.ab-mobile-nav.is-open {
    display: block;
}

.ab-mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ab-mobile-nav-links a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    transition: background 120ms ease, color 120ms ease;
}

.ab-mobile-nav-links a:hover {
    background: var(--bg-subtle);
    color: var(--ink);
}

.ab-mobile-nav-links a.ab-nav-active {
    color: var(--accent-text);
}

/* Sub-items are visually indented */
.ab-mobile-nav-links a.ab-mobile-sub {
    padding-left: 28px;
    font-size: 0.86rem;
    font-weight: 400;
    color: var(--ink-muted);
}

.ab-mobile-nav-links a.ab-mobile-sub:hover {
    color: var(--ink-soft);
}

.ab-mobile-nav-section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding: 10px 12px 4px;
}

.ab-mobile-nav-divider {
    height: 1px;
    background: var(--line);
    margin: 6px 12px;
}

/* ─── Hero section ──────────────────────────────────────────────────────────── */

.ab-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 10vw, 96px) 0 72px;
    text-align: center;
}


.ab-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

/* Breadcrumb */
.ab-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 18px;
}

.ab-breadcrumb a {
    color: var(--accent-text);
    transition: color 150ms ease;
}

.ab-breadcrumb a:hover {
    color: var(--ink);
}

.ab-breadcrumb-sep {
    opacity: 0.5;
}

/* Eyebrow above H1 */
.ab-hero .ab-eyebrow {
    margin-bottom: 14px;
}

/* Hero H1 */
.ab-hero-heading {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-wrap: balance;
    margin-bottom: 20px;
}

/* Hero subheading */
.ab-hero-sub {
    font-size: 1.05rem;
    color: var(--ink-soft);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ─── Audit form ────────────────────────────────────────────────────────────── */

.ab-form {
    max-width: 560px;
    margin: 32px auto 0;
}

.ab-input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 10px;
    text-align: left;
}

.ab-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ab-input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    transition: border-color 180ms ease, box-shadow 180ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.ab-input::placeholder {
    color: var(--ink-muted);
    opacity: 0.8;
}

.ab-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

/* Validation hint below the form */
.ab-input-hint {
    min-height: 1.4em;
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--fail);
    text-align: left;
    padding-left: 4px;
}

/* ─── Loading state ─────────────────────────────────────────────────────────── */

.ab-loading {
    padding: 80px 0;
    text-align: center;
}

.ab-loading-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* The loading beacon SVG is the logo mark scaled up via CSS */
.ab-loading-mark {
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
}

/* Arc ping animation for the loading state */
@keyframes ab-ping {
    0%, 100% { opacity: 0.25; }
    50%       { opacity: 1;    }
}

.ab-loading-arc-near {
    animation: ab-ping 1.4s ease-in-out infinite;
}

.ab-loading-arc-far {
    animation: ab-ping 1.4s ease-in-out 0.45s infinite backwards;
}

.ab-loading-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-text);
}

.ab-loading-url {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.88rem;
    color: var(--accent-text);
    word-break: break-all;
    max-width: 480px;
}

.ab-loading-note {
    font-size: 0.88rem;
    color: var(--ink-muted);
}

/* ─── Error state ───────────────────────────────────────────────────────────── */

.ab-error {
    padding: 64px 0 0;
}

.ab-error-inner {
    max-width: 540px;
    margin: 0 auto;
    padding: 28px 32px;
    background: var(--fail-bg);
    border: 1px solid color-mix(in srgb, var(--fail) 22%, transparent);
    border-radius: var(--radius-lg);
}

.ab-error-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fail);
    margin-bottom: 8px;
}

.ab-error-message {
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.65;
    margin-bottom: 18px;
}

/* ─── Overview cards (pre-results "What we check") ──────────────────────────── */

.ab-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ab-overview-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.ab-overview-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ab-overview-card .ab-eyebrow {
    margin-bottom: 8px;
}

.ab-overview-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    margin-top: 0;
    line-height: 1.3;
}

.ab-overview-card p {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

/* ─── Results - summary row ─────────────────────────────────────────────────── */

.ab-summary {
    padding-top: 56px;
    margin-top: 56px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ab-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ab-summary-url {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-text);
    word-break: break-all;
    letter-spacing: 0.02em;
}

.ab-share-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.ab-share-btn:hover {
    background: var(--line);
}

.ab-summary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ─── Badges ─────────────────────────────────────────────────────────────────── */

.ab-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}

.ab-badge--configured {
    background: var(--badge-configured-bg);
    color: var(--badge-configured-color);
}

.ab-badge--partial {
    background: var(--badge-partial-bg);
    color: var(--badge-partial-color);
}

.ab-badge--not-configured {
    background: var(--badge-not-configured-bg);
    color: var(--badge-not-configured-color);
}

/* ─── Score card ─────────────────────────────────────────────────────────────── */

.ab-score-card {
    margin-top: 32px;
    margin-bottom: 32px;
    padding: 28px 32px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.ab-score-main {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 16px;
}

.ab-score-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.ab-score-pct {
    font-size: 1.5rem;
    font-weight: 700;
}

.ab-score-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ab-score-label--excellent { color: var(--pass); }
.ab-score-label--good      { color: #22c55e; }
.ab-score-label--fair      { color: #f59e0b; }
.ab-score-label--poor      { color: var(--fail); }

.ab-score-bar-track {
    height: 8px;
    background: var(--line);
    border-radius: 99px;
    overflow: hidden;
}

.ab-score-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ab-score-bar--excellent { background: var(--pass); }
.ab-score-bar--good      { background: #22c55e; }
.ab-score-bar--fair      { background: #f59e0b; }
.ab-score-bar--poor      { background: var(--fail); }

/* ─── Tier cards ─────────────────────────────────────────────────────────────── */

.ab-tier-cards {
    display: grid;
    gap: 20px;
    margin-top: 28px;
}

/* Cards start hidden (opacity 0, shifted down) and animate in via .is-visible.
   See revealTierCards() in beaconly.js for the double-rAF trigger. */
.ab-tier-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 480ms ease, transform 480ms ease;
}

.ab-tier-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ab-tier-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
}

.ab-tier-card-info {
    flex: 1;
    min-width: 0;
}

.ab-tier-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 6px;
}

.ab-tier-card-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    margin: 0;
}

.ab-tier-copy {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.65;
    margin-top: 6px;
}

.ab-tier-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.ab-tier-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--ink-muted);
    letter-spacing: 0.06em;
}

/* ─── Check rows ─────────────────────────────────────────────────────────────── */

.ab-tier-checks {
    border-top: 1px solid var(--line);
}

/* Each check row starts invisible and animates in with a stagger.
   The stagger delay is set inline by revealTierCards() in beaconly.js. */
.ab-check {
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 280ms ease, transform 280ms ease;
}

.ab-check:last-child {
    border-bottom: none;
}

.ab-check.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Passing check - static row, no expand */
.ab-check--pass {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
}

/* Optional passing check - slightly muted */
.ab-check--optional.ab-check--pass .ab-check-icon {
    background: var(--bg-subtle);
    color: var(--optional);
}

.ab-check--optional.ab-check--pass .ab-check-name {
    color: var(--ink-soft);
}

/* Icon circle */
.ab-check-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.ab-check--pass .ab-check-icon {
    background: var(--pass-bg);
    color: var(--pass);
}

.ab-check--pass .ab-check-icon svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Check name text */
.ab-check-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.86rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.4;
}

.ab-check--pass .ab-check-name {
    color: var(--ink-soft);
}

/* Failing required check - expandable button */
.ab-check--fail .ab-check-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 24px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--ink);
    transition: background 120ms ease;
    font-family: 'Inter', sans-serif;
}

.ab-check--fail .ab-check-toggle:hover {
    background: var(--fail-bg);
}

.ab-check--fail .ab-check-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.ab-check--fail .ab-check-icon {
    background: var(--fail-bg);
    color: var(--fail);
}

.ab-check--fail .ab-check-icon svg {
    width: 9px;
    height: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.ab-check--fail .ab-check-name {
    flex: 1;
    color: var(--ink);
}

/* Expand/collapse arrow - rotates to x on open */
.ab-check-arrow {
    flex-shrink: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--fail);
    transition: transform 220ms ease;
    line-height: 1;
    width: 16px;
    text-align: center;
}

.ab-check--fail.is-open .ab-check-arrow {
    transform: rotate(45deg);
}

/* Detail panel (why + fix). Max-height animates open/closed. */
.ab-check-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease;
    padding: 0 24px 0 56px;
}

.ab-check--fail.is-open .ab-check-detail {
    max-height: 500px;
    padding-bottom: 16px;
}

.ab-check-why,
.ab-check-fix {
    font-size: 0.86rem;
    line-height: 1.7;
    margin-top: 8px;
}

.ab-check-why {
    color: var(--ink-soft);
}

.ab-check-fix {
    color: var(--ink);
}

.ab-check-status {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    margin-right: 2px;
}

.ab-check-status--pass {
    color: var(--pass);
}

.ab-check-status--fail {
    color: var(--fail);
}

.ab-check-docs {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.ab-check-docs:hover {
    text-decoration: underline;
}

/* Optional fail row - flat display, no expand */
.ab-check--fail-optional {
    display: flex;
    flex-direction: column;
    padding: 12px 24px;
    gap: 5px;
}

.ab-check--fail-optional .ab-check-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ab-check--fail-optional .ab-check-icon {
    background: var(--bg-subtle);
    color: var(--optional);
}

.ab-check--fail-optional .ab-check-icon svg {
    width: 9px;
    height: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.ab-check--fail-optional .ab-check-name {
    color: var(--ink-soft);
}

.ab-check-optional-tag {
    display: inline-block;
    margin-left: 7px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--accent-bg);
    color: var(--accent-text);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    vertical-align: middle;
}

.ab-check-fix-inline {
    font-size: 0.83rem;
    line-height: 1.65;
    color: var(--ink-muted);
    padding-left: 32px;
}

/* ─── FAQ section ───────────────────────────────────────────────────────────── */

.ab-faq {
    padding-top: 80px;
}

.ab-faq-list {
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ab-faq-item {
    border-bottom: 1px solid var(--line);
}

.ab-faq-item:last-child {
    border-bottom: none;
}

/* Question button */
.ab-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    border: none;
    background: none;
    text-align: left;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    transition: color 150ms ease;
}

.ab-faq-question:hover {
    color: var(--accent-text);
}

/* Plus/minus indicator via ::after */
.ab-faq-question::after {
    content: '+';
    flex-shrink: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--accent-text);
    transition: transform 220ms ease;
    line-height: 1;
}

.ab-faq-item.is-open .ab-faq-question::after {
    transform: rotate(45deg);
}

/* Answer panel - uses max-height for smooth transition */
.ab-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease;
}

.ab-faq-item.is-open .ab-faq-answer {
    max-height: 400px;
}

.ab-faq-answer p {
    padding: 0 24px 18px;
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.8;
}

/* ─── Closing CTA section ────────────────────────────────────────────────────── */

.ab-closing {
    padding-top: 80px;
    padding-bottom: 80px;
}

.ab-closing-inner {
    text-align: center;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
}

.ab-closing-inner .ab-eyebrow {
    margin-bottom: 12px;
}

.ab-closing-inner h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.025em;
    text-wrap: balance;
    max-width: 680px;
    margin: 0 auto 14px;
}

.ab-closing-inner p {
    font-size: 0.98rem;
    color: var(--ink-soft);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 28px;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */

.ab-footer {
    border-top: 1px solid var(--line);
    padding: 32px 0;
}

.ab-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.ab-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ab-footer-brand svg {
    opacity: 0.7;
}

.ab-footer-copy {
    font-size: 0.82rem;
    color: var(--ink-muted);
}

.ab-footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ab-footer-links a {
    font-size: 0.88rem;
    color: var(--ink-soft);
    transition: color 150ms ease;
    text-decoration: none;
}

.ab-footer-links a:hover {
    color: var(--ink);
}

.ab-footer-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    transition: border-color 150ms ease, color 150ms ease;
}

.ab-footer-icon-link:hover {
    border-color: var(--accent);
    color: var(--accent-text);
}

.ab-footer-icon-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ─── Scroll reveal ─────────────────────────────────────────────────────────── */

/* Elements with [data-reveal] start invisible and are revealed by the
   IntersectionObserver in beaconly.js. The stagger delay is applied via
   the data-delay attribute (multiplied by 60ms) as an inline style. */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 480ms ease, transform 480ms ease;
}

[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Reduced motion ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .ab-tier-card,
    .ab-check {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .ab-loading-arc-near,
    .ab-loading-arc-far {
        animation: none;
        opacity: 0.7;
    }

    .ab-check-detail,
    .ab-faq-answer {
        transition: none;
    }
}

/* ─── Responsive: tablet ────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .ab-overview-grid {
        grid-template-columns: 1fr;
    }

    .ab-tier-card-head {
        flex-direction: column;
        gap: 12px;
    }

    .ab-tier-card-meta {
        flex-direction: row;
        align-items: center;
    }
}

/* ─── Responsive: mobile ────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    /* Show hamburger, hide desktop nav */
    .ab-hamburger {
        display: inline-flex;
    }

    .ab-nav {
        display: none;
    }

    /* Three-column header collapses to two-column */
    .ab-header-bar {
        grid-template-columns: auto 1fr;
    }

    .ab-header-actions {
        grid-column: 2;
        justify-content: flex-end;
    }

    /* Hero and form stacking */
    .ab-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .ab-input-group .ab-btn-primary {
        justify-content: center;
    }

    /* Check row padding reduction */
    .ab-check--pass,
    .ab-check--fail .ab-check-toggle,
    .ab-check--fail-optional {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ab-check-detail {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ab-check--fail.is-open .ab-check-detail {
        padding-left: 16px;
    }

    .ab-tier-card-head {
        padding: 18px 16px;
    }

    .ab-closing-inner {
        padding: 32px 20px;
    }

    .ab-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .ab-hero {
        text-align: left;
    }

    .ab-hero-content {
        text-align: left;
    }

    .ab-hero-sub {
        margin: 0;
    }

    .ab-breadcrumb {
        display: flex;
    }

    .ab-form {
        margin-left: 0;
        margin-right: 0;
    }

    .ab-input-label {
        text-align: left;
    }

    .ab-summary {
        padding-top: 40px;
        margin-top: 40px;
    }

    .ab-faq-question {
        padding: 16px 16px;
    }

    .ab-faq-answer p {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ─── Homepage: hero variant ─────────────────────────────────────────────────── */

/* .ab-hero--home centers and enlarges the hero for a marketing landing page
   that has a CTA button instead of an audit form. */
.ab-hero--home {
    padding-top: 100px;
    padding-bottom: 88px;
    text-align: center;
}

.ab-hero--home .ab-hero-content {
    max-width: 800px;
}

.ab-hero--home .ab-eyebrow {
    margin-bottom: 20px;
}

.ab-hero--home h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--ink);
    text-wrap: balance;
    margin-bottom: 24px;
}

.ab-hero--home .ab-hero-sub {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--ink-soft);
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto 36px;
}

.ab-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Larger button variant for hero CTAs on marketing pages */
.ab-btn-large {
    height: 58px;
    padding: 0 36px;
    font-size: 1rem;
}

.ab-hero-trust {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

/* ─── Homepage: stats bar ────────────────────────────────────────────────────── */

.ab-stats-context {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-align: center;
    margin-bottom: 24px;
}

.ab-stats-section {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 32px 0;
}

.ab-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.ab-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 24px;
    border-right: 1px solid var(--line);
}

.ab-stat-item:last-child {
    border-right: none;
}

.ab-stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 500;
    color: var(--accent-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.ab-stat-label {
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.5;
    max-width: 160px;
}

/* ─── Homepage: problem section ──────────────────────────────────────────────── */

.ab-problem {
    padding-top: 88px;
}

.ab-problem-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.ab-problem-heading {
    position: sticky;
    top: 88px;
}

.ab-problem-heading .ab-eyebrow {
    margin-bottom: 12px;
}

.ab-problem-heading h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-wrap: balance;
}

.ab-problem-body p {
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.8;
    margin-bottom: 28px;
}

.ab-problem-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
}

.ab-problem-list li {
    display: flex;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.7;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.ab-problem-list li::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 8px;
}

/* ─── Homepage: tiers overview (consequence-focused) ─────────────────────────── */

.ab-home-tiers {
    padding-top: 88px;
}

.ab-home-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
}

.ab-home-tier-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.ab-home-tier-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ab-home-tier-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.ab-home-tier-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.ab-home-tier-desc {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.75;
    flex: 1;
}

.ab-home-tier-consequence {
    font-size: 0.84rem;
    color: var(--ink-muted);
    line-height: 1.65;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-style: italic;
}

/* ─── Homepage: bot comparison ───────────────────────────────────────────────── */

.ab-bots {
    padding-top: 88px;
}

.ab-bot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
}

.ab-bot-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ab-bot-type-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    align-self: flex-start;
}

.ab-bot-card--training .ab-bot-type-tag {
    background: var(--bg-subtle);
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
}

.ab-bot-card--retrieval .ab-bot-type-tag {
    background: var(--accent-bg);
    color: var(--accent-text);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.ab-bot-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.ab-bot-names {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

.ab-bot-ratio-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.ab-bot-ratio {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.02em;
}

.ab-bot-ratio-label {
    font-size: 0.82rem;
    color: var(--ink-muted);
    line-height: 1.4;
}

.ab-bot-desc {
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.8;
}

/* ─── Homepage: differentiators ──────────────────────────────────────────────── */

.ab-diff {
    padding-top: 88px;
}

.ab-diff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
}

.ab-diff-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ab-diff-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2rem;
    font-weight: 500;
    color: var(--accent-text);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.ab-diff-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.ab-diff-desc {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.75;
}

/* ─── Homepage: responsive additions ─────────────────────────────────────────── */

@media (max-width: 900px) {
    .ab-home-tier-grid {
        grid-template-columns: 1fr;
    }

    .ab-problem-cols {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ab-problem-heading {
        position: static;
    }

    .ab-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ab-stat-item:nth-child(2) {
        border-right: none;
    }

    .ab-stat-item:nth-child(3),
    .ab-stat-item:nth-child(4) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 768px) {
    .ab-hero--home {
        padding-top: 64px;
        padding-bottom: 56px;
        text-align: left;
    }

    .ab-hero--home .ab-hero-content {
        max-width: none;
    }

    .ab-hero--home .ab-hero-sub {
        margin: 0 0 32px;
    }

    .ab-hero-cta {
        align-items: flex-start;
    }

    .ab-bot-grid {
        grid-template-columns: 1fr;
    }

    .ab-diff-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ab-stat-item {
        padding: 14px 12px;
    }

    .ab-diff-number {
        font-size: 1.6rem;
    }
}

/* ─── How it works: methodology components ───────────────────────────────────── */

/* Section spacing shared across methodology page */
.ab-method-section {
    padding-top: 80px;
}

/* Sub-heading inside a section (e.g. "robots.txt checks" within Tier 1) */
.ab-method-subhead {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--ink-muted);
    margin-top: 40px;
    margin-bottom: 16px;
}

/* Intro paragraph for each section */
.ab-method-intro {
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.8;
    max-width: 740px;
    margin-bottom: 8px;
}

/* Callout / caveat note box */
.ab-method-note {
    background: var(--accent-bg);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin: 20px 0;
}

.ab-method-note p {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.ab-method-note p strong {
    color: var(--ink);
    font-weight: 600;
}

/* Code block for showing exact configuration syntax */
.ab-method-pre {
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 20px 0;
    overflow-x: auto;
}

.ab-method-pre code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--ink);
    line-height: 1.75;
    white-space: pre;
    display: block;
}

/* Grid of fetched resources */
.ab-method-fetch-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.ab-method-fetch-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ab-method-fetch-path {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-text);
    word-break: break-all;
}

.ab-method-fetch-desc {
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* Check reference list */
.ab-method-checks {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
}

.ab-method-check {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ab-method-check:last-child {
    border-bottom: none;
}

.ab-method-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ab-method-check-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}

/* Required / Optional tag on each check */
.ab-method-check-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

.ab-method-check-tag--required {
    background: color-mix(in srgb, var(--ink) 6%, transparent);
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
}

.ab-method-check-tag--optional {
    background: transparent;
    color: var(--ink-muted);
    border: 1px solid var(--line);
}

/* Pass condition description */
.ab-method-check-logic {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.ab-method-check-logic code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82em;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    color: var(--accent-text);
}

/* Scoring labels grid */
.ab-method-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.ab-method-score-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ab-method-score-label {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

/* ─── How it works: responsive ────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .ab-method-fetch-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ab-method-score-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ab-method-fetch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .ab-method-fetch-grid {
        grid-template-columns: 1fr;
    }

    .ab-method-check {
        padding: 14px 16px;
    }
}

/* ─── Guide: long-form article layout ───────────────────────────────────────── */

.ab-guide-section {
    padding-top: 80px;
}

/* Prose column: readable line length for long-form content */
.ab-guide-prose {
    max-width: 720px;
}

.ab-guide-p {
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.85;
    margin-bottom: 18px;
}

.ab-guide-h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-top: 40px;
    margin-bottom: 10px;
}

.ab-guide-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ab-guide-list li {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.ab-guide-list li::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 9px;
}

/* In-page table of contents */
.ab-guide-toc {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 56px;
    max-width: 720px;
}

.ab-guide-toc-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 14px;
}

.ab-guide-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ab-guide-toc-list a {
    font-size: 0.9rem;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 150ms ease;
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.ab-guide-toc-list a:hover {
    color: var(--accent-text);
}

.ab-guide-toc-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--ink-muted);
    flex-shrink: 0;
}

/* Bot reference table */
.ab-guide-bot-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
    margin: 20px 0;
}

.ab-guide-bot-row {
    display: grid;
    grid-template-columns: 160px 130px 1fr;
    gap: 16px;
    padding: 11px 20px;
    border-bottom: 1px solid var(--line);
    align-items: start;
}

.ab-guide-bot-row:last-child {
    border-bottom: none;
}

.ab-guide-bot-row--header {
    background: var(--bg-subtle);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding-top: 9px;
    padding-bottom: 9px;
}

.ab-guide-bot-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent-text);
    font-weight: 500;
    line-height: 1.4;
}

.ab-guide-bot-owner {
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.4;
}

.ab-guide-bot-purpose {
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ─── Guide: responsive ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .ab-guide-bot-row {
        grid-template-columns: 150px 1fr;
    }

    .ab-guide-bot-row--header .ab-guide-bot-purpose,
    .ab-guide-bot-purpose {
        display: none;
    }
}

@media (max-width: 480px) {
    .ab-guide-toc {
        padding: 18px 20px;
    }

    .ab-guide-bot-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ab-guide-bot-row--header {
        display: none;
    }

    .ab-guide-bot-purpose {
        display: block;
        grid-column: 1 / -1;
        color: var(--ink-muted);
        font-size: 0.8rem;
    }
}

/* ─── Cookie consent banner ────────────────────────────────────────────────── */

.ab-cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    background: var(--ap-surface-elevated);
    color: var(--ap-ink);
    border: 1px solid var(--ap-line-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--ap-shadow-lg);
    padding: 18px 22px;
    max-width: 720px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 220ms ease, transform 220ms ease;
    pointer-events: none;
}

.ab-cookie-banner[data-visible="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ab-cookie-banner[hidden] {
    display: none;
}

.ab-cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.ab-cookie-text {
    flex: 1 1 280px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ap-ink-secondary);
}

.ab-cookie-text strong {
    display: block;
    color: var(--ap-ink);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.ab-cookie-text a {
    color: var(--ap-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ab-cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.ab-cookie-btn {
    padding: 9px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--ap-line-strong);
    background: transparent;
    color: var(--ap-ink);
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ab-cookie-btn:hover {
    background: var(--ap-surface-deep);
    border-color: var(--ap-ink-secondary);
}

.ab-cookie-btn--solid {
    background: var(--ap-accent);
    border-color: var(--ap-accent);
    color: #fff;
}

.ab-cookie-btn--solid:hover {
    background: var(--accent);
    border-color: var(--accent);
    filter: brightness(1.08);
    color: #fff;
}

.ab-footer-cookie-btn {
    font-size: 0.88rem;
    color: var(--ink-soft);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: color 150ms ease;
}

.ab-footer-cookie-btn:hover {
    color: var(--ink);
}

@media (max-width: 560px) {
    .ab-cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 16px 18px;
    }

    .ab-cookie-banner-inner {
        gap: 14px;
    }

    .ab-cookie-actions {
        width: 100%;
    }

    .ab-cookie-btn {
        flex: 1;
    }
}

/* ═════════════════════════════════════════════════════════════════════════════
   PHASE 11 - APPLE REDESIGN PRIMITIVES
   ═════════════════════════════════════════════════════════════════════════════
   New utility classes prefixed with .ap- that pages opt into during the
   redesign. Old .ab- classes remain untouched until each page is migrated.
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── Section primitives ───────────────────────────────────────────────────── */

.ap-section {
    position: relative;
    padding: var(--ap-sp-160) 0;
    background: var(--ap-surface);
    color: var(--ap-ink);
    overflow-x: clip;
}

.ap-section--ink {
    background: var(--ap-surface-ink);
    color: var(--ap-ink-inverse);
}

html[data-theme="dark"] .ap-section--ink {
    background: var(--ap-surface-ink);
    color: var(--ap-ink-inverse);
}

.ap-section--deep {
    background: var(--ap-surface-deep);
}

.ap-section--elevated {
    background: var(--ap-surface-elevated);
}

.ap-section--tight {
    padding: var(--ap-sp-96) 0;
}

.ap-section--hero {
    padding: var(--ap-sp-128) 0 var(--ap-sp-96);
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ap-container {
    max-width: var(--ap-container);
    margin: 0 auto;
    padding: 0 var(--ap-sp-32);
}

.ap-container--tight {
    max-width: var(--ap-container-tight);
}

.ap-container--read {
    max-width: var(--ap-container-read);
}

/* ─── Type primitives ──────────────────────────────────────────────────────── */

.ap-display {
    font-family: var(--ap-font-display);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-wrap: balance;
    color: inherit;
}

.ap-display--xxl { font-size: clamp(3.5rem, 9vw, 8rem); }
.ap-display--xl  { font-size: clamp(3rem, 7.5vw, 6rem); }
.ap-display--lg  { font-size: clamp(2.5rem, 6vw, 5rem); }
.ap-display--md  { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.ap-display--sm  { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }

.ap-eyebrow {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ap-accent);
}

.ap-section--ink .ap-eyebrow {
    color: var(--ap-accent-on-ink);
}

.ap-lead {
    font-family: var(--ap-font-text);
    font-size: clamp(1.125rem, 1.6vw, var(--ap-fs-22));
    line-height: 1.5;
    font-weight: 400;
    color: var(--ap-ink-secondary);
    text-wrap: pretty;
    max-width: 640px;
}

.ap-section--ink .ap-lead {
    color: var(--ap-ink-secondary);
}

.ap-body {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-19);
    line-height: 1.7;
    color: var(--ap-ink-secondary);
}

.ap-caption {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    line-height: 1.5;
    color: var(--ap-ink-tertiary);
}

.ap-gradient-text {
    background: linear-gradient(120deg, var(--ap-accent) 0%, var(--ap-accent-strong) 60%, #67E8F9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */

.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ap-sp-8);
    height: 56px;
    padding: 0 28px;
    border-radius: var(--ap-r-pill);
    border: none;
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-17);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--ap-dur-fast) var(--ap-ease-out),
                background var(--ap-dur-fast) var(--ap-ease-out),
                color var(--ap-dur-fast) var(--ap-ease-out),
                box-shadow var(--ap-dur-fast) var(--ap-ease-out);
}

.ap-btn:hover {
    transform: translateY(-1px);
}

.ap-btn:active {
    transform: translateY(0);
}

.ap-btn--primary {
    background: var(--ap-accent);
    color: #FFFFFF;
}

.ap-btn--primary:hover {
    background: var(--ap-accent-strong);
    box-shadow: var(--ap-shadow-glow);
}

.ap-section--ink .ap-btn--primary {
    background: var(--ap-accent-on-ink);
    color: var(--ap-ink-inverse);
}

.ap-section--ink .ap-btn--primary:hover {
    background: var(--ap-accent-strong);
    color: #06121F;
}

.ap-btn--ghost {
    background: transparent;
    color: var(--ap-ink);
    border: 1px solid var(--ap-line-strong);
}

.ap-btn--ghost:hover {
    border-color: var(--ap-ink);
}

.ap-section--ink .ap-btn--ghost {
    color: var(--ap-ink-inverse);
    border-color: var(--ap-line-on-ink);
}

.ap-section--ink .ap-btn--ghost:hover {
    border-color: var(--ap-ink-inverse);
}

.ap-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ap-accent);
    font-size: var(--ap-fs-17);
    font-weight: 500;
    text-decoration: none;
    transition: gap var(--ap-dur-fast) var(--ap-ease-out);
}

.ap-link::after {
    content: "→";
    transition: transform var(--ap-dur-fast) var(--ap-ease-out);
}

.ap-link:hover {
    gap: 10px;
}

.ap-link:hover::after {
    transform: translateX(2px);
}

.ap-section--ink .ap-link {
    color: var(--ap-accent-on-ink);
}

/* ─── Card primitives ──────────────────────────────────────────────────────── */

.ap-card {
    position: relative;
    background: var(--ap-surface-elevated);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-32);
    box-shadow: var(--ap-shadow-2);
    border: 1px solid var(--ap-line);
    transition: transform var(--ap-dur-base) var(--ap-ease-out),
                box-shadow var(--ap-dur-base) var(--ap-ease-out);
}

.ap-section--ink .ap-card {
    background: var(--ap-surface-elevated);
    color: var(--ap-ink-inverse);
    border-color: var(--ap-line-on-ink);
}

html[data-theme="dark"] .ap-card {
    background: var(--ap-surface-elevated);
    border-color: var(--ap-line);
}

.ap-card--lift {
    cursor: default;
}

.ap-card--lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-3);
}

.ap-card--lg {
    padding: var(--ap-sp-48);
    border-radius: var(--ap-r-32);
}

.ap-card--bleed {
    border-radius: var(--ap-r-32);
    padding: var(--ap-sp-64);
}

/* ─── Bento grid ───────────────────────────────────────────────────────────── */

.ap-bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: var(--ap-sp-24);
}

.ap-bento > .ap-bento-tile {
    grid-column: span 3;
    background: var(--ap-surface-elevated);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-32);
    border: 1px solid var(--ap-line);
    box-shadow: var(--ap-shadow-1);
    transition: transform var(--ap-dur-base) var(--ap-ease-out),
                box-shadow var(--ap-dur-base) var(--ap-ease-out);
    overflow: hidden;
}

.ap-bento-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-3);
}

.ap-bento-tile--wide  { grid-column: span 4; }
.ap-bento-tile--tall  { grid-column: span 2; grid-row: span 2; }
.ap-bento-tile--full  { grid-column: 1 / -1; }
.ap-bento-tile--third { grid-column: span 2; }

@media (max-width: 1024px) {
    .ap-bento {
        grid-template-columns: repeat(4, 1fr);
    }
    .ap-bento > .ap-bento-tile { grid-column: span 2; }
    .ap-bento-tile--wide  { grid-column: span 4; }
    .ap-bento-tile--tall  { grid-column: span 2; grid-row: span 2; }
    .ap-bento-tile--third { grid-column: span 2; }
}

@media (max-width: 640px) {
    .ap-bento {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .ap-bento > .ap-bento-tile,
    .ap-bento-tile--wide,
    .ap-bento-tile--tall,
    .ap-bento-tile--third {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

/* ─── Reveal animation initial states (Phase B fills in JS) ────────────────── */

[data-ap-reveal] {
    opacity: 0;
    transition: opacity var(--ap-dur-slow) var(--ap-ease-out),
                transform var(--ap-dur-slow) var(--ap-ease-out);
    will-change: opacity, transform;
}

[data-ap-reveal="fade"]       { /* opacity only */ }
[data-ap-reveal="fade-up"]    { transform: translate3d(0, 32px, 0); }
[data-ap-reveal="fade-down"]  { transform: translate3d(0, -32px, 0); }
[data-ap-reveal="slide-left"] { transform: translate3d(-48px, 0, 0); }
[data-ap-reveal="slide-right"]{ transform: translate3d(48px, 0, 0); }
[data-ap-reveal="scale"]      { transform: scale(0.94); }

[data-ap-reveal].is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    [data-ap-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ─── Mobile responsive overrides for ap- primitives ───────────────────────── */

@media (max-width: 1024px) {
    .ap-section          { padding: var(--ap-sp-128) 0; }
    .ap-section--tight   { padding: var(--ap-sp-64) 0; }
    .ap-section--hero    { padding: var(--ap-sp-96) 0 var(--ap-sp-64); min-height: 80vh; }
}

@media (max-width: 768px) {
    .ap-container        { padding: 0 var(--ap-sp-24); }
    .ap-section          { padding: var(--ap-sp-96) 0; }
    .ap-section--tight   { padding: var(--ap-sp-48) 0; }
    .ap-section--hero    { padding: var(--ap-sp-64) 0 var(--ap-sp-48); min-height: auto; }
    .ap-card             { padding: var(--ap-sp-24); border-radius: var(--ap-r-18); }
    .ap-card--lg         { padding: var(--ap-sp-32); border-radius: var(--ap-r-24); }
    .ap-card--bleed      { padding: var(--ap-sp-32); border-radius: var(--ap-r-24); }
    .ap-btn              { height: 52px; font-size: var(--ap-fs-17); padding: 0 24px; }
}

@media (max-width: 480px) {
    .ap-container        { padding: 0 var(--ap-sp-16); }
    .ap-section          { padding: var(--ap-sp-64) 0; }
}

/* ─── Phase 11B - Motion runtime support ───────────────────────────────────── */

/* Page entrance: <html> starts at opacity 0, fades to 1 once motion.js
   sets [data-page-entered]. Falls back to opacity 1 if JS never runs. */
html:not([data-page-entered]) body.ap-page {
    opacity: 0;
}

html[data-page-entered] body.ap-page {
    opacity: 1;
    transition: opacity var(--ap-dur-base) var(--ap-ease-out);
}

@media (prefers-reduced-motion: reduce) {
    html:not([data-page-entered]) body.ap-page,
    html[data-page-entered] body.ap-page {
        opacity: 1;
        transition: none;
    }
}

/* Pin section base. JS sets height/sticky inline, but we need overflow rules. */
[data-pin-section] {
    overflow-x: clip;
}

[data-pin-section][data-pin-disabled] {
    height: auto !important;
}

[data-pin-track] {
    width: 100%;
}

/* A pin slide is positioned absolutely inside the pin track. Its visibility
   is driven by its own --pin-slide-index relative to the section's --pin-step. */
.ap-pin-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.98);
    transition: opacity var(--ap-dur-base) var(--ap-ease-out),
                transform var(--ap-dur-base) var(--ap-ease-out);
    pointer-events: none;
    will-change: opacity, transform;
}

.ap-pin-slide.is-active {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
}

[data-pin-section][data-pin-disabled] .ap-pin-slide {
    position: relative;
    inset: auto;
    opacity: 1;
    transform: none;
    margin-bottom: var(--ap-sp-48);
}

/* ═════════════════════════════════════════════════════════════════════════════
   PHASE 11C - HOMEPAGE-SPECIFIC STYLES (scoped to body.ap-page)
   ═════════════════════════════════════════════════════════════════════════════ */

body.ap-page {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-17);
    line-height: 1.6;
    color: var(--ap-ink);
    background: var(--ap-surface);
    background-image: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Ap-page header overrides ─────────────────────────────────────────────── */

body.ap-page .ab-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ap-header-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: background var(--ap-dur-base) var(--ap-ease-out),
                border-color var(--ap-dur-base) var(--ap-ease-out),
                height var(--ap-dur-base) var(--ap-ease-out);
}

html[data-scrolled] body.ap-page .ab-header {
    border-bottom-color: var(--ap-header-border);
}

body.ap-page .ab-header-bar {
    max-width: var(--ap-container);
    padding: 0 var(--ap-sp-32);
    height: 64px;
    transition: height var(--ap-dur-base) var(--ap-ease-out);
}

html[data-scrolled] body.ap-page .ab-header-bar {
    height: 56px;
}

body.ap-page .ab-brand-name {
    font-family: var(--ap-font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ap-ink);
}

body.ap-page .ab-nav a {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    font-weight: 500;
    color: var(--ap-ink-secondary);
    position: relative;
    padding: 4px 2px;
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--ap-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ab-nav a:hover {
    color: var(--ap-ink);
}

body.ap-page .ab-nav a:hover::after {
    transform: scaleX(1);
}

@media (max-width: 768px) {
    body.ap-page .ab-header-bar {
        padding: 0 var(--ap-sp-24);
    }
}

/* ─── Ap-page hero ─────────────────────────────────────────────────────────── */

.ap-home-hero {
    position: relative;
    padding: var(--ap-sp-128) 0 var(--ap-sp-160);
    background: var(--ap-surface);
    color: var(--ap-ink);
    overflow: hidden;
    isolation: isolate;
}

.ap-home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34, 211, 238, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 40% at 10% 90%, rgba(8, 145, 178, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.ap-home-hero > * {
    position: relative;
    z-index: 1;
}

.ap-home-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ap-sp-32);
    min-height: 70vh;
    justify-content: center;
    padding-top: var(--ap-sp-48);
}

.ap-home-hero .ap-eyebrow {
    color: var(--ap-accent);
}

.ap-home-hero h1 {
    font-family: var(--ap-font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.045em;
    color: var(--ap-ink);
    text-wrap: balance;
    max-width: 15ch;
}

.ap-home-hero h1 .ap-line-accent {
    background: linear-gradient(110deg, #67E8F9 0%, #22D3EE 50%, #0891B2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.ap-home-hero-lead {
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
    line-height: 1.55;
    color: var(--ap-ink-secondary);
    max-width: 640px;
    font-weight: 400;
}

.ap-home-hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-12);
    align-items: flex-start;
}

.ap-home-hero-trust {
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-tertiary);
    margin: 0;
}

/* Animated beacon visual + scroll cue */
.ap-home-hero-visual {
    position: absolute;
    right: max(-10%, -160px);
    bottom: -5%;
    width: min(55vw, 680px);
    aspect-ratio: 1;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

.ap-home-hero-visual svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ap-beacon-core {
    transform-origin: center;
    animation: apBeaconPulse 3.2s var(--ap-ease-in-out) infinite;
}

.ap-beacon-ring {
    transform-origin: center;
    opacity: 0;
    animation: apBeaconRing 3.2s var(--ap-ease-out) infinite;
}

.ap-beacon-ring--2 { animation-delay: 0.8s; }
.ap-beacon-ring--3 { animation-delay: 1.6s; }

@keyframes apBeaconPulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.06); opacity: 0.9; }
}

@keyframes apBeaconRing {
    0%   { transform: scale(0.4); opacity: 0; }
    20%  { opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.ap-scroll-cue {
    position: absolute;
    bottom: var(--ap-sp-48);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(245, 245, 247, 0.48);
    font-size: var(--ap-fs-12);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
}

.ap-scroll-cue-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(245, 245, 247, 0.48), transparent);
    animation: apScrollCue 2s var(--ap-ease-in-out) infinite;
}

@keyframes apScrollCue {
    0%, 100% { opacity: 0.2; transform: scaleY(0.7); }
    50%      { opacity: 1;   transform: scaleY(1); }
}

@media (max-width: 768px) {
    .ap-home-hero { padding: var(--ap-sp-96) 0 var(--ap-sp-96); }
    .ap-home-hero-inner { min-height: auto; gap: var(--ap-sp-24); padding-top: 0; }
    .ap-home-hero-visual { display: none; }
    .ap-scroll-cue { display: none; }
}

/* ─── Ap-page stats section ────────────────────────────────────────────────── */

.ap-home-stats {
    background: var(--ap-surface-deep);
    color: var(--ap-ink);
    padding: var(--ap-sp-128) 0;
    border-top: 1px solid var(--ap-line);
}

.ap-home-stats-lead {
    font-family: var(--ap-font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--ap-ink);
    max-width: 22ch;
    margin-bottom: var(--ap-sp-96);
}

.ap-home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--ap-sp-48);
    border-top: 1px solid var(--ap-line);
    padding-top: var(--ap-sp-48);
}

.ap-home-stat {
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-12);
}

.ap-home-stat-value {
    font-family: var(--ap-font-display);
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ap-ink);
}

.ap-home-stat-label {
    font-size: var(--ap-fs-14);
    line-height: 1.5;
    color: var(--ap-ink-secondary);
    max-width: 24ch;
}

@media (max-width: 900px) {
    .ap-home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--ap-sp-48) var(--ap-sp-32);
    }
    .ap-home-stats-lead { margin-bottom: var(--ap-sp-64); }
}

@media (max-width: 480px) {
    .ap-home-stats { padding: var(--ap-sp-96) 0; }
    .ap-home-stats-grid { grid-template-columns: 1fr; gap: var(--ap-sp-32); }
}

/* ─── Ap-page problem section ──────────────────────────────────────────────── */

.ap-home-problem {
    background: var(--ap-surface);
    color: var(--ap-ink);
    padding: var(--ap-sp-160) 0;
}

html[data-theme="dark"] .ap-home-problem {
    background: var(--ap-surface-elevated);
}

.ap-home-problem-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--ap-sp-96);
    align-items: flex-start;
}

.ap-home-problem-head h2 {
    font-family: var(--ap-font-display);
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ap-ink);
    text-wrap: balance;
    margin-top: var(--ap-sp-16);
}

.ap-home-problem-body p {
    font-size: var(--ap-fs-19);
    line-height: 1.65;
    color: var(--ap-ink-secondary);
    margin-bottom: var(--ap-sp-24);
}

.ap-home-problem-list {
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-24);
    margin-top: var(--ap-sp-32);
    list-style: none;
    padding: 0;
}

.ap-home-problem-list li {
    position: relative;
    padding-left: var(--ap-sp-32);
    font-size: var(--ap-fs-17);
    line-height: 1.6;
    color: var(--ap-ink-secondary);
}

.ap-home-problem-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 18px;
    height: 2px;
    background: var(--ap-accent);
    border-radius: 2px;
}

@media (max-width: 900px) {
    .ap-home-problem-grid {
        grid-template-columns: 1fr;
        gap: var(--ap-sp-48);
    }
    .ap-home-problem { padding: var(--ap-sp-96) 0; }
}

/* ─── Ap-page tier pin section ─────────────────────────────────────────────── */

.ap-home-tiers {
    background: var(--ap-surface);
    color: var(--ap-ink);
}

.ap-home-tiers [data-pin-track] {
    background: var(--ap-surface);
}

.ap-home-tier-slide {
    width: 100%;
    max-width: var(--ap-container);
    margin: 0 auto;
    padding: 0 var(--ap-sp-32);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: var(--ap-sp-96);
    align-items: center;
}

.ap-home-tier-label {
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-16);
}

.ap-home-tier-index {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-14);
    letter-spacing: 0.2em;
    color: var(--ap-accent);
    text-transform: uppercase;
}

.ap-home-tier-title {
    font-family: var(--ap-font-display);
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--ap-ink);
    text-wrap: balance;
}

.ap-home-tier-body {
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-24);
    max-width: 48ch;
}

.ap-home-tier-body p {
    font-size: var(--ap-fs-19);
    line-height: 1.6;
    color: var(--ap-ink-secondary);
}

.ap-home-tier-body .ap-home-tier-conseq {
    padding-top: var(--ap-sp-24);
    border-top: 1px solid var(--ap-line);
    color: var(--ap-ink-tertiary);
    font-size: var(--ap-fs-17);
}

.ap-tier-progress {
    position: absolute;
    bottom: var(--ap-sp-48);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--ap-sp-12);
    z-index: 3;
    pointer-events: none;
}

.ap-tier-progress-dot {
    width: 36px;
    height: 2px;
    background: var(--ap-line-strong);
    border-radius: 1px;
    transition: background var(--ap-dur-base) var(--ap-ease-out),
                width var(--ap-dur-base) var(--ap-ease-out);
}

[data-pin-section][data-pin-active-step="0"] .ap-tier-progress-dot:nth-child(1),
[data-pin-section][data-pin-active-step="1"] .ap-tier-progress-dot:nth-child(2),
[data-pin-section][data-pin-active-step="2"] .ap-tier-progress-dot:nth-child(3) {
    background: var(--ap-accent);
    width: 48px;
}

@media (max-width: 900px) {
    .ap-home-tier-slide {
        grid-template-columns: 1fr;
        gap: var(--ap-sp-32);
        padding: var(--ap-sp-64) var(--ap-sp-24);
    }
    .ap-tier-progress {
        bottom: var(--ap-sp-24);
    }
}

[data-pin-section][data-pin-disabled] .ap-home-tier-slide {
    padding-top: var(--ap-sp-96);
    padding-bottom: var(--ap-sp-96);
}

/* ─── Ap-page bots section ─────────────────────────────────────────────────── */

.ap-home-bots {
    background: var(--ap-surface);
    color: var(--ap-ink);
    padding: var(--ap-sp-160) 0;
}

html[data-theme="dark"] .ap-home-bots {
    background: var(--ap-surface-elevated);
}

.ap-home-bots-head {
    max-width: 48ch;
    margin-bottom: var(--ap-sp-96);
}

.ap-home-bots-head h2 {
    font-family: var(--ap-font-display);
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ap-ink);
    text-wrap: balance;
    margin-top: var(--ap-sp-16);
}

.ap-home-bots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ap-sp-32);
}

.ap-bot-card {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-48);
    box-shadow: var(--ap-shadow-2);
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-16);
    position: relative;
    overflow: hidden;
    transition: transform var(--ap-dur-base) var(--ap-ease-out),
                box-shadow var(--ap-dur-base) var(--ap-ease-out);
}

.ap-bot-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ap-accent), transparent);
    opacity: 0;
    transition: opacity var(--ap-dur-base) var(--ap-ease-out);
}

.ap-bot-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-3);
}

.ap-bot-card:hover::before {
    opacity: 1;
}

.ap-bot-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: var(--ap-r-pill);
    background: var(--ap-accent-quiet);
    color: var(--ap-accent);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    align-self: flex-start;
}

.ap-bot-card h3 {
    font-family: var(--ap-font-display);
    font-size: clamp(1.5rem, 2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
    text-wrap: balance;
}

.ap-bot-names {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-tertiary);
    line-height: 1.5;
}

.ap-bot-ratio {
    display: flex;
    align-items: baseline;
    gap: var(--ap-sp-12);
    padding: var(--ap-sp-16) 0;
    border-top: 1px solid var(--ap-line);
    border-bottom: 1px solid var(--ap-line);
    margin: var(--ap-sp-8) 0;
}

.ap-bot-ratio-value {
    font-family: var(--ap-font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ap-ink);
    line-height: 1;
}

.ap-bot-ratio-label {
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-secondary);
}

.ap-bot-desc {
    font-size: var(--ap-fs-17);
    line-height: 1.6;
    color: var(--ap-ink-secondary);
}

@media (max-width: 900px) {
    .ap-home-bots { padding: var(--ap-sp-96) 0; }
    .ap-home-bots-grid { grid-template-columns: 1fr; gap: var(--ap-sp-24); }
    .ap-home-bots-head { margin-bottom: var(--ap-sp-48); }
    .ap-bot-card { padding: var(--ap-sp-32); }
}

/* ─── Ap-page differentiators bento ────────────────────────────────────────── */

.ap-home-diff {
    background: var(--ap-surface-deep);
    color: var(--ap-ink);
    padding: var(--ap-sp-160) 0;
}

html[data-theme="dark"] .ap-home-diff {
    background: var(--ap-surface);
}

.ap-home-diff-head {
    max-width: 48ch;
    margin-bottom: var(--ap-sp-96);
}

.ap-home-diff-head h2 {
    font-family: var(--ap-font-display);
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ap-ink);
    text-wrap: balance;
    margin-top: var(--ap-sp-16);
}

.ap-home-diff-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(240px, auto);
    gap: var(--ap-sp-24);
}

.ap-diff-tile {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-48);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--ap-sp-24);
    box-shadow: var(--ap-shadow-1);
    transition: transform var(--ap-dur-base) var(--ap-ease-out),
                box-shadow var(--ap-dur-base) var(--ap-ease-out),
                border-color var(--ap-dur-base) var(--ap-ease-out);
    overflow: hidden;
    position: relative;
}

.ap-diff-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-3);
    border-color: var(--ap-line-strong);
}

.ap-diff-tile--wide { grid-column: span 4; }
.ap-diff-tile--half { grid-column: span 3; }
.ap-diff-tile--third { grid-column: span 2; }
.ap-diff-tile--tall { grid-column: span 2; grid-row: span 2; }

.ap-diff-big {
    font-family: var(--ap-font-display);
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.9;
    color: var(--ap-ink);
    background: linear-gradient(120deg, var(--ap-accent-strong) 0%, var(--ap-accent) 60%, var(--ap-ink) 120%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ap-diff-title {
    font-family: var(--ap-font-display);
    font-size: clamp(1.375rem, 2vw, 1.625rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
    text-wrap: balance;
}

.ap-diff-desc {
    font-size: var(--ap-fs-17);
    line-height: 1.6;
    color: var(--ap-ink-secondary);
}

@media (max-width: 1024px) {
    .ap-home-diff-grid { grid-template-columns: repeat(4, 1fr); }
    .ap-diff-tile--wide { grid-column: span 4; }
    .ap-diff-tile--half { grid-column: span 2; }
    .ap-diff-tile--third { grid-column: span 2; }
    .ap-diff-tile--tall { grid-column: span 2; grid-row: span 2; }
}

@media (max-width: 640px) {
    .ap-home-diff { padding: var(--ap-sp-96) 0; }
    .ap-home-diff-head { margin-bottom: var(--ap-sp-48); }
    .ap-home-diff-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .ap-home-diff-grid > * { grid-column: 1 / -1; grid-row: auto; }
    .ap-diff-tile { padding: var(--ap-sp-32); }
}

/* ─── Ap-page FAQ overrides ────────────────────────────────────────────────── */

body.ap-page .ap-home-faq {
    background: var(--ap-surface);
    color: var(--ap-ink);
    padding: var(--ap-sp-160) 0;
}

html[data-theme="dark"] body.ap-page .ap-home-faq {
    background: var(--ap-surface-elevated);
}

body.ap-page .ap-home-faq-head {
    max-width: 48ch;
    margin-bottom: var(--ap-sp-64);
}

body.ap-page .ap-home-faq-head h2 {
    font-family: var(--ap-font-display);
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ap-ink);
    text-wrap: balance;
    margin-top: var(--ap-sp-16);
}

/* The FAQ uses existing .ab-faq-* classes so beaconly.js still handles toggle.
   We override their look when inside .ap-home-faq. */

body.ap-page .ap-home-faq .ab-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    border-top: 1px solid var(--ap-line);
}

body.ap-page .ap-home-faq .ab-faq-item {
    border-bottom: 1px solid var(--ap-line);
    padding: 0;
    background: transparent;
}

body.ap-page .ap-home-faq .ab-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ap-sp-24);
    width: 100%;
    padding: var(--ap-sp-32) 0;
    background: transparent;
    border: none;
    font-family: var(--ap-font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
    cursor: pointer;
    text-align: left;
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ap-home-faq .ab-faq-question:hover {
    color: var(--ap-accent);
}

body.ap-page .ap-home-faq .ab-faq-question::after {
    content: "+";
    font-family: var(--ap-font-display);
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    color: var(--ap-ink-secondary);
    flex-shrink: 0;
    transition: transform var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ap-home-faq .ab-faq-item.is-open .ab-faq-question::after {
    transform: rotate(45deg);
}

body.ap-page .ap-home-faq .ab-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ap-dur-slow) var(--ap-ease-out);
}

body.ap-page .ap-home-faq .ab-faq-item.is-open .ab-faq-answer {
    max-height: 600px;
}

body.ap-page .ap-home-faq .ab-faq-answer p {
    font-size: var(--ap-fs-19);
    line-height: 1.65;
    color: var(--ap-ink-secondary);
    padding: 0 0 var(--ap-sp-32) 0;
    max-width: 72ch;
}

@media (max-width: 900px) {
    body.ap-page .ap-home-faq { padding: var(--ap-sp-96) 0; }
    body.ap-page .ap-home-faq .ab-faq-question { padding: var(--ap-sp-24) 0; }
}

/* ─── Ap-page closing CTA ──────────────────────────────────────────────────── */

.ap-home-closing {
    background: var(--ap-surface-deep);
    color: var(--ap-ink);
    padding: var(--ap-sp-160) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ap-home-closing::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 50% 100%, rgba(8, 145, 178, 0.10), transparent 70%);
    pointer-events: none;
}

.ap-home-closing-inner {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ap-sp-32);
}

.ap-home-closing h2 {
    font-family: var(--ap-font-display);
    font-size: clamp(2.5rem, 6.5vw, 5.5rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--ap-ink);
    text-wrap: balance;
    max-width: 18ch;
}

.ap-home-closing-sub {
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: var(--ap-ink-secondary);
    max-width: 52ch;
    line-height: 1.55;
}

@media (max-width: 768px) {
    .ap-home-closing { padding: var(--ap-sp-96) 0; }
}

/* ─── Ap-page footer overrides (keep structure, restyle typography) ────────── */

body.ap-page .ab-footer {
    background: var(--ap-surface-deep);
    color: var(--ap-ink-secondary);
    padding: var(--ap-sp-64) 0 var(--ap-sp-48);
    border-top: 1px solid var(--ap-line);
}

html[data-theme="dark"] body.ap-page .ab-footer {
    background: var(--ap-surface-elevated);
}

body.ap-page .ab-footer-inner {
    max-width: var(--ap-container);
    padding: 0 var(--ap-sp-32);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--ap-sp-24);
}

body.ap-page .ab-footer-brand {
    display: flex;
    align-items: center;
    gap: var(--ap-sp-12);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-secondary);
}

body.ap-page .ab-footer-copy {
    font-family: var(--ap-font-text);
    color: var(--ap-ink-secondary);
}

body.ap-page .ab-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ap-sp-24);
}

body.ap-page .ab-footer-links a {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    font-weight: 500;
    color: var(--ap-ink-secondary);
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-footer-links a:hover {
    color: var(--ap-accent);
}

@media (max-width: 768px) {
    body.ap-page .ab-footer-inner {
        padding: 0 var(--ap-sp-24);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ap-sp-16);
    }
}

/* ─── Phase 11D - Beacon page ───────────────────────────────────────────────
   Two parts:
   1. New .ap-beacon-* markup (hero, loading, error, overview, summary wrap).
   2. Apple-style visual overrides for the JS-injected .ab-score-card,
      .ab-tier-card, .ab-check, .ab-badge markup. The classes stay because
      beaconly.js writes them; only appearance changes. */

/* Active nav link permanent underline (used by Beacon page [aria-current]) */
body.ap-page .ab-nav a.ab-nav-active {
    color: var(--ap-ink);
    font-weight: 600;
}
body.ap-page .ab-nav a.ab-nav-active::after {
    transform: scaleX(1);
}

/* ─ Hero ─ */
.ap-beacon-hero {
    position: relative;
    padding: var(--ap-sp-16) 0;
    min-height: calc(100svh - var(--ap-header-h, 72px));
    display: flex;
    align-items: center;
    background: var(--ap-surface);
    color: var(--ap-ink);
    overflow: hidden;
    isolation: isolate;
}

.ap-beacon-hero-inner {
    width: 100%;
}

.ap-beacon-hero .ap-display--xl {
    font-size: clamp(1.875rem, 3.6vw, 2.75rem);
    line-height: 1.08;
}

.ap-beacon-hero .ap-eyebrow {
    margin: 0 0 var(--ap-sp-12);
}

.ap-beacon-headline {
    margin: 0 auto var(--ap-sp-16);
    max-width: 38ch;
}

.ap-beacon-lead {
    margin: 0 auto var(--ap-sp-20);
    font-size: clamp(0.9375rem, 1.05vw, 1rem);
    line-height: 1.5;
    max-width: 62ch;
}

.ap-beacon-form {
    margin: 0 auto var(--ap-sp-16);
}

.ap-beacon-input-label {
    margin: 0 0 var(--ap-sp-8);
}

.ap-beacon-input-hint {
    min-height: 0;
    margin-top: var(--ap-sp-8);
}

.ap-beacon-input-hint:empty {
    display: none;
}

.ap-beacon-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(8, 145, 178, 0.10), transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 100%, rgba(8, 145, 178, 0.07), transparent 60%),
        radial-gradient(ellipse 40% 35% at 15% 90%, rgba(8, 145, 178, 0.04), transparent 60%);
}

.ap-beacon-hero-inner {
    text-align: center;
}

.ap-beacon-hero .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-24);
}

.ap-beacon-headline {
    color: var(--ap-ink);
    margin: 0 auto var(--ap-sp-32);
    max-width: 18ch;
}

.ap-beacon-headline .ap-gradient-text {
    background: linear-gradient(135deg, #06B6D4 0%, #0891B2 50%, #0E7490 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html[data-theme="dark"] .ap-beacon-headline .ap-gradient-text {
    background: linear-gradient(135deg, #67E8F9 0%, #22D3EE 50%, #06B6D4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ap-beacon-lead {
    color: var(--ap-ink-secondary);
    max-width: 58ch;
    margin: 0 auto var(--ap-sp-48);
}

.ap-beacon-form {
    margin: 0 auto var(--ap-sp-32);
    max-width: 620px;
    text-align: left;
}

.ap-beacon-input-label {
    display: block;
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ap-ink-tertiary);
    margin: 0 0 var(--ap-sp-12);
    padding-left: var(--ap-sp-4);
}

.ap-beacon-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--ap-surface-elevated);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ap-line-strong);
    border-radius: var(--ap-r-pill);
    padding: 8px 8px 8px 20px;
    transition: border-color var(--ap-dur-fast) var(--ap-ease-out),
                background var(--ap-dur-fast) var(--ap-ease-out),
                box-shadow var(--ap-dur-fast) var(--ap-ease-out);
}

.ap-beacon-input-group:focus-within {
    border-color: rgba(8, 145, 178, 0.6);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.15);
}

.ap-beacon-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--ap-ink-tertiary);
    flex: 0 0 auto;
}

.ap-beacon-input-icon svg {
    width: 20px;
    height: 20px;
}

.ap-beacon-input {
    flex: 1 1 auto;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--ap-ink);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-18);
    font-weight: 500;
    padding: 12px 16px;
    min-width: 0;
}

.ap-beacon-input::placeholder {
    color: var(--ap-ink-tertiary);
}

.ap-beacon-submit {
    flex: 0 0 auto;
    border-radius: var(--ap-r-pill);
    padding: 14px 28px;
    font-size: var(--ap-fs-15);
}

.ap-beacon-input-hint {
    margin: var(--ap-sp-12) 0 0;
    padding-left: var(--ap-sp-20);
    font-size: var(--ap-fs-14);
    color: #FCA5A5;
    min-height: 1.2em;
}

.ap-beacon-trust {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--ap-sp-32);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-13);
    font-weight: 500;
    color: var(--ap-ink-tertiary);
    letter-spacing: 0.01em;
}

.ap-beacon-trust li {
    position: relative;
    padding-left: var(--ap-sp-20);
}

.ap-beacon-trust li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(8, 145, 178, 0.14);
    border: 1px solid var(--ap-accent);
    transform: translateY(-50%);
}

.ap-beacon-trust li::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    width: 6px;
    height: 3px;
    border-left: 1.5px solid var(--ap-accent);
    border-bottom: 1.5px solid var(--ap-accent);
    transform: translateY(-80%) rotate(-45deg);
}

/* ─ Loading card ─ */
.ap-beacon-loading-card {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-64) var(--ap-sp-48);
    text-align: center;
    box-shadow: var(--ap-shadow-lg);
}

html[data-theme="dark"] body.ap-page .ap-beacon-loading-card {
    background: var(--ap-surface-elevated);
    border-color: var(--ap-line);
}

.ap-beacon-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--ap-sp-32);
}

.ap-beacon-gauge svg {
    width: 100%;
    height: 100%;
}

.ap-beacon-gauge-track {
    fill: none;
    stroke: var(--ap-line);
    stroke-width: 6;
}

.ap-beacon-gauge-arc {
    fill: none;
    stroke: url(#ap-beacon-gauge-grad);
    stroke: var(--ap-accent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 220;
    transform-origin: 60px 60px;
    animation: ap-beacon-gauge-spin 1.6s var(--ap-ease-in-out) infinite;
}

@keyframes ap-beacon-gauge-spin {
    0%   { transform: rotate(0deg);   stroke-dashoffset: 260; }
    50%  { transform: rotate(180deg); stroke-dashoffset: 120; }
    100% { transform: rotate(360deg); stroke-dashoffset: 260; }
}

.ap-beacon-gauge-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ap-accent);
}

.ap-beacon-gauge-core svg {
    width: 42px;
    height: 42px;
}

.ap-beacon-loading-card .ap-eyebrow {
    margin: 0 0 var(--ap-sp-12);
}

.ap-beacon-loading-url {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink);
    word-break: break-all;
    margin: 0 0 var(--ap-sp-16);
}

.ap-beacon-loading-note {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-secondary);
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .ap-beacon-gauge-arc {
        animation: none;
        stroke-dashoffset: 180;
    }
}

/* ─ Error card ─ */
.ap-beacon-error-card {
    background: var(--ap-surface-elevated);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-48);
    text-align: center;
    box-shadow: var(--ap-shadow-lg);
}

.ap-beacon-error-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--ap-sp-20);
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-beacon-error-icon svg {
    width: 28px;
    height: 28px;
}

.ap-beacon-error-card .ap-eyebrow {
    color: #EF4444;
    margin: 0 0 var(--ap-sp-12);
}

.ap-beacon-error-message {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-16);
    color: var(--ap-ink);
    margin: 0 0 var(--ap-sp-24);
    line-height: 1.55;
}

/* ─ Overview section (pre-results) ─ */
.ap-beacon-overview-section {
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface);
}

.ap-beacon-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--ap-sp-64);
}

.ap-beacon-section-head .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-16);
}

.ap-beacon-section-head h2 {
    color: var(--ap-ink);
    margin: 0;
}

.ap-beacon-section-head--results {
    margin-top: var(--ap-sp-80);
}

.ap-beacon-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ap-sp-24);
}

.ap-beacon-overview-card {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-40) var(--ap-sp-32);
    transition: transform var(--ap-dur-base) var(--ap-ease-out),
                box-shadow var(--ap-dur-base) var(--ap-ease-out),
                border-color var(--ap-dur-base) var(--ap-ease-out);
}

.ap-beacon-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-lg);
    border-color: var(--ap-line-strong);
}

.ap-beacon-overview-card .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-12);
}

.ap-beacon-overview-card h3 {
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-24);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
    margin: 0 0 var(--ap-sp-16);
}

.ap-beacon-overview-card p {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-15);
    color: var(--ap-ink-secondary);
    line-height: 1.6;
    margin: 0 0 var(--ap-sp-20);
}

.ap-beacon-overview-list {
    list-style: none;
    margin: 0;
    padding: var(--ap-sp-20) 0 0;
    border-top: 1px solid var(--ap-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ap-beacon-overview-list li {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-secondary);
    padding-left: var(--ap-sp-20);
    position: relative;
}

.ap-beacon-overview-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ap-accent);
}

/* ─ Results section ─ */
.ap-beacon-results-section {
    padding: var(--ap-sp-80) 0 var(--ap-sp-120);
    background: var(--ap-surface);
}

.ap-beacon-summary {
    margin-bottom: var(--ap-sp-48);
}

.ap-beacon-summary-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--ap-sp-24);
    margin-bottom: var(--ap-sp-24);
    flex-wrap: wrap;
}

.ap-beacon-summary-url-block {
    flex: 1 1 auto;
    min-width: 0;
}

.ap-beacon-summary-url-block .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-8);
}

body.ap-page .ab-summary-url {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-18);
    color: var(--ap-ink);
    font-weight: 500;
    word-break: break-all;
    margin: 0;
    line-height: 1.35;
}

.ap-beacon-share-btn {
    flex: 0 0 auto;
    font-size: var(--ap-fs-14);
    padding: 10px 20px;
}

body.ap-page .ab-summary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ap-sp-8);
    margin: 0;
    padding: 0;
}

body.ap-page .ab-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--ap-r-pill);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    color: var(--ap-ink-secondary);
}

body.ap-page .ab-badge.ab-badge--pass,
body.ap-page .ab-badge.ab-badge--tier-passed {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.32);
    color: #059669;
}

html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--pass,
html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--tier-passed {
    color: #34D399;
}

body.ap-page .ab-badge.ab-badge--warn,
body.ap-page .ab-badge.ab-badge--tier-partial {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.32);
    color: #B45309;
}

html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--warn,
html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--tier-partial {
    color: #FBBF24;
}

body.ap-page .ab-badge.ab-badge--fail,
body.ap-page .ab-badge.ab-badge--tier-failed {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.32);
    color: #B91C1C;
}

html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--fail,
html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--tier-failed {
    color: #F87171;
}

/* ─ Score card (JS-injected) ─ */
.ap-beacon-score-wrap {
    margin-bottom: var(--ap-sp-64);
}

body.ap-page .ab-score-card {
    background: var(--ap-surface-deep);
    color: var(--ap-ink);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-32);
    padding: var(--ap-sp-64) var(--ap-sp-56);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--ap-shadow-xl);
}

body.ap-page .ab-score-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 20% 20%, rgba(8, 145, 178, 0.10), transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 90%, rgba(8, 145, 178, 0.06), transparent 60%);
}

body.ap-page .ab-score-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--ap-sp-32);
    margin-bottom: var(--ap-sp-32);
    flex-wrap: wrap;
}

body.ap-page .ab-score-number {
    font-family: var(--ap-font-display);
    font-size: clamp(88px, 14vw, 160px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.9;
    color: var(--ap-ink);
    display: inline-flex;
    align-items: baseline;
}

body.ap-page .ab-score-pct {
    font-size: 0.35em;
    font-weight: 600;
    color: var(--ap-ink-tertiary);
    margin-left: 8px;
}

body.ap-page .ab-score-label {
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-32);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
    align-self: center;
}

body.ap-page .ab-score-label--excellent { color: #34D399; }
body.ap-page .ab-score-label--good      { color: #67E8F9; }
body.ap-page .ab-score-label--fair      { color: #FBBF24; }
body.ap-page .ab-score-label--poor      { color: #F87171; }

body.ap-page .ab-score-bar-track {
    position: relative;
    height: 10px;
    background: var(--ap-line);
    border-radius: var(--ap-r-pill);
    overflow: hidden;
}

body.ap-page .ab-score-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: var(--ap-r-pill);
    transition: width 1200ms var(--ap-ease-out);
}

body.ap-page .ab-score-bar--excellent { background: linear-gradient(90deg, #10B981, #34D399); }
body.ap-page .ab-score-bar--good      { background: linear-gradient(90deg, #0891B2, #67E8F9); }
body.ap-page .ab-score-bar--fair      { background: linear-gradient(90deg, #D97706, #FBBF24); }
body.ap-page .ab-score-bar--poor      { background: linear-gradient(90deg, #DC2626, #F87171); }

/* ─ Tier card stack (JS-injected) ─ */
body.ap-page .ab-tier-cards {
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-24);
}

body.ap-page .ab-tier-card {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-40);
    /* revealTierCards() controls opacity/transform via .is-visible */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--ap-dur-base) var(--ap-ease-out),
                transform var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ab-tier-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.ap-page .ab-tier-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ap-sp-32);
    margin-bottom: var(--ap-sp-32);
    padding-bottom: var(--ap-sp-32);
    border-bottom: 1px solid var(--ap-line);
    flex-wrap: wrap;
}

body.ap-page .ab-tier-card-info {
    flex: 1 1 auto;
    min-width: 0;
}

body.ap-page .ab-tier-eyebrow {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-8);
}

body.ap-page .ab-tier-card-info h3 {
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-32);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--ap-ink);
    margin: 0 0 var(--ap-sp-12);
}

body.ap-page .ab-tier-copy {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-15);
    color: var(--ap-ink-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 52ch;
}

body.ap-page .ab-tier-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

body.ap-page .ab-tier-count {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-secondary);
    font-weight: 500;
}

body.ap-page .ab-tier-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ─ Check row (JS-injected) ─ */
body.ap-page .ab-check {
    border-bottom: 1px solid var(--ap-line);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--ap-dur-fast) var(--ap-ease-out),
                transform var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-check.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.ap-page .ab-check:last-child {
    border-bottom: 0;
}

body.ap-page .ab-check-row,
body.ap-page .ab-check-toggle {
    display: flex;
    align-items: center;
    gap: var(--ap-sp-16);
    width: 100%;
    padding: var(--ap-sp-20) 0;
    background: transparent;
    border: 0;
    text-align: left;
    font-family: inherit;
    color: inherit;
    cursor: default;
}

body.ap-page .ab-check-toggle {
    cursor: pointer;
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-check-toggle:hover {
    color: var(--ap-ink);
}

body.ap-page .ab-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex: 0 0 auto;
}

body.ap-page .ab-check-icon svg {
    width: 14px;
    height: 14px;
}

body.ap-page .ab-check--pass .ab-check-icon,
body.ap-page .ab-check:not(.ab-check--fail):not(.ab-check--fail-optional) .ab-check-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

body.ap-page .ab-check--fail .ab-check-icon {
    background: rgba(239, 68, 68, 0.14);
    color: #DC2626;
}

body.ap-page .ab-check--fail-optional .ab-check-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #D97706;
}

html[data-theme="dark"] body.ap-page .ab-check--pass .ab-check-icon,
html[data-theme="dark"] body.ap-page .ab-check:not(.ab-check--fail):not(.ab-check--fail-optional) .ab-check-icon {
    color: #34D399;
}

html[data-theme="dark"] body.ap-page .ab-check--fail .ab-check-icon {
    color: #F87171;
}

html[data-theme="dark"] body.ap-page .ab-check--fail-optional .ab-check-icon {
    color: #FBBF24;
}

body.ap-page .ab-check-status {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-11);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: var(--ap-r-8);
    flex: 0 0 auto;
    min-width: 44px;
    text-align: center;
}

body.ap-page .ab-check-status--pass {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

body.ap-page .ab-check-status--fail {
    background: rgba(239, 68, 68, 0.12);
    color: #DC2626;
}

html[data-theme="dark"] body.ap-page .ab-check-status--pass { color: #34D399; }
html[data-theme="dark"] body.ap-page .ab-check-status--fail { color: #F87171; }

body.ap-page .ab-check-name {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-15);
    font-weight: 500;
    color: var(--ap-ink);
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.ap-page .ab-check-optional-tag {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-11);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: var(--ap-r-8);
    background: var(--ap-surface-deep);
    color: var(--ap-ink-secondary);
    border: 1px solid var(--ap-line);
}

body.ap-page .ab-check-arrow {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: var(--ap-ink-secondary);
    transition: transform var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ab-check--fail.is-open .ab-check-arrow {
    transform: rotate(45deg);
}

body.ap-page .ab-check-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ap-dur-slow) var(--ap-ease-in-out);
}

body.ap-page .ab-check--fail.is-open .ab-check-detail {
    max-height: 1200px;
}

body.ap-page .ab-check-detail > * {
    margin-top: var(--ap-sp-12);
}

body.ap-page .ab-check-why,
body.ap-page .ab-check-fix-inline {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-secondary);
    line-height: 1.6;
    padding: 0 0 0 var(--ap-sp-56);
    margin: 0;
}

body.ap-page .ab-check-fix {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-13);
    background: var(--ap-surface-deep);
    border: 1px solid var(--ap-line);
    color: var(--ap-ink);
    padding: var(--ap-sp-16) var(--ap-sp-20);
    border-radius: var(--ap-r-12);
    line-height: 1.6;
    margin-left: var(--ap-sp-56);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

body.ap-page .ab-check-fix code,
body.ap-page .ab-check-fix-inline code,
body.ap-page .ab-check-why code {
    font-family: var(--ap-font-mono);
    font-size: 0.92em;
    background: var(--ap-surface-deep);
    border: 1px solid var(--ap-line);
    padding: 1px 6px;
    border-radius: var(--ap-r-8);
    color: var(--ap-accent);
}

body.ap-page .ab-check-fix code {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
}

body.ap-page .ab-check-docs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: var(--ap-sp-56);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-13);
    font-weight: 500;
    color: var(--ap-accent);
    padding-bottom: var(--ap-sp-12);
    transition: opacity var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-check-docs:hover {
    opacity: 0.75;
}

body.ap-page .ab-check--fail-optional .ab-check-fix-inline {
    padding-left: var(--ap-sp-56);
    padding-bottom: var(--ap-sp-12);
}

/* ─ Beacon FAQ (same visual as homepage FAQ, scoped for clarity) ─ */
.ap-beacon-faq {
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface);
}

html[data-theme="dark"] body.ap-page .ap-beacon-faq {
    background: var(--ap-surface);
}

body.ap-page .ap-beacon-faq .ab-faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    border-top: 1px solid var(--ap-line);
}

body.ap-page .ap-beacon-faq .ab-faq-item {
    border-bottom: 1px solid var(--ap-line);
}

body.ap-page .ap-beacon-faq .ab-faq-question {
    width: 100%;
    padding: var(--ap-sp-32) 0;
    background: transparent;
    border: 0;
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-20);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ap-ink);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ap-sp-24);
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ap-beacon-faq .ab-faq-question:hover {
    color: var(--ap-accent);
}

body.ap-page .ap-beacon-faq .ab-faq-question::after {
    content: "+";
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 400;
    color: var(--ap-ink-secondary);
    transition: transform var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ap-beacon-faq .ab-faq-item.is-open .ab-faq-question::after {
    transform: rotate(45deg);
}

body.ap-page .ap-beacon-faq .ab-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ap-dur-slow) var(--ap-ease-in-out);
}

body.ap-page .ap-beacon-faq .ab-faq-item.is-open .ab-faq-answer {
    max-height: 600px;
}

body.ap-page .ap-beacon-faq .ab-faq-answer p {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-16);
    color: var(--ap-ink-secondary);
    line-height: 1.65;
    margin: 0 0 var(--ap-sp-32);
    max-width: 72ch;
}

/* ─ Closing CTA ─ */
.ap-beacon-closing {
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface-deep);
    color: var(--ap-ink);
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.ap-beacon-closing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(8, 145, 178, 0.08), transparent 70%);
}

.ap-beacon-closing-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ap-sp-24);
}

.ap-beacon-closing .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0;
}

.ap-beacon-closing h2 {
    color: var(--ap-ink);
    margin: 0;
    max-width: 24ch;
}

.ap-beacon-closing .ap-lead {
    color: var(--ap-ink-secondary);
    max-width: 58ch;
    margin: 0;
}

.ap-beacon-closing .ap-btn {
    margin-top: var(--ap-sp-16);
}

/* ─ Beacon page responsive ─ */
@media (max-width: 1024px) {
    .ap-beacon-hero { padding: var(--ap-sp-32) 0; }
    .ap-beacon-overview { grid-template-columns: repeat(2, 1fr); }
    body.ap-page .ab-score-card { padding: var(--ap-sp-48) var(--ap-sp-40); }
}

@media (max-width: 768px) {
    .ap-beacon-hero { padding: var(--ap-sp-24) 0; min-height: calc(100svh - var(--ap-header-h, 64px)); }
    .ap-beacon-hero .ap-display--xl { font-size: clamp(2rem, 8vw, 2.75rem); }
    .ap-beacon-lead { font-size: var(--ap-fs-15); margin-bottom: var(--ap-sp-24); }
    .ap-beacon-form { margin-bottom: var(--ap-sp-20); }
    .ap-beacon-overview { grid-template-columns: 1fr; }
    .ap-beacon-overview-section,
    .ap-beacon-results-section,
    .ap-beacon-faq,
    .ap-beacon-closing { padding: var(--ap-sp-80) 0; }
    .ap-beacon-section-head { margin-bottom: var(--ap-sp-48); }
    .ap-beacon-input-group {
        flex-wrap: wrap;
        border-radius: var(--ap-r-24);
        padding: var(--ap-sp-12);
    }
    .ap-beacon-input-icon { display: none; }
    .ap-beacon-input {
        flex: 1 1 100%;
        padding: var(--ap-sp-12) var(--ap-sp-16);
        font-size: var(--ap-fs-16);
    }
    .ap-beacon-submit {
        flex: 1 1 100%;
        border-radius: var(--ap-r-16);
    }
    .ap-beacon-trust { gap: var(--ap-sp-20); font-size: var(--ap-fs-12); }
    body.ap-page .ab-score-card { padding: var(--ap-sp-40) var(--ap-sp-32); }
    body.ap-page .ab-score-main { flex-direction: column; align-items: flex-start; gap: var(--ap-sp-16); }
    body.ap-page .ab-tier-card { padding: var(--ap-sp-32) var(--ap-sp-24); }
    body.ap-page .ab-tier-card-head { flex-direction: column; align-items: flex-start; gap: var(--ap-sp-16); }
    body.ap-page .ab-tier-card-meta { align-items: flex-start; flex-direction: row; }
    body.ap-page .ab-tier-card-info h3 { font-size: var(--ap-fs-24); }
    body.ap-page .ab-check-why,
    body.ap-page .ab-check-fix,
    body.ap-page .ab-check-fix-inline,
    body.ap-page .ab-check-docs { margin-left: 0; padding-left: var(--ap-sp-16); }
    body.ap-page .ap-beacon-faq .ab-faq-question { font-size: var(--ap-fs-18); padding: var(--ap-sp-24) 0; }
}

@media (max-width: 480px) {
    .ap-beacon-hero-inner .ap-display--xl { font-size: clamp(40px, 10vw, 56px); }
    .ap-beacon-loading-card,
    .ap-beacon-error-card { padding: var(--ap-sp-40) var(--ap-sp-24); }
    .ap-beacon-overview-card { padding: var(--ap-sp-32) var(--ap-sp-24); }
}

/* ─── Phase 11E - How it works page ─────────────────────────────────────────
   Two parts:
   1. New .ap-hiw-* primitives (hero, closing).
   2. Apple-style overrides for the existing .ab-method-* markup so the 35
      check rows, pre/code examples, fetch grid, and scoring grid pick up
      the new visual language without touching content. */

/* ─ Hero ─ */
.ap-hiw-hero {
    position: relative;
    padding: var(--ap-sp-120) 0 var(--ap-sp-120);
    background: var(--ap-surface);
    color: var(--ap-ink);
    overflow: hidden;
    isolation: isolate;
}

.ap-hiw-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 75% 55% at 50% 0%, rgba(8, 145, 178, 0.10), transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(8, 145, 178, 0.08), transparent 60%);
}

.ap-hiw-hero-inner {
    text-align: center;
}

.ap-hiw-hero .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-24);
}

.ap-hiw-headline {
    color: var(--ap-ink);
    margin: 0 auto var(--ap-sp-32);
    max-width: 16ch;
}

.ap-hiw-headline .ap-gradient-text {
    background: linear-gradient(135deg, var(--ap-accent-strong) 0%, var(--ap-accent) 60%, #06B6D4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ap-hiw-lead {
    color: var(--ap-ink-secondary);
    max-width: 64ch;
    margin: 0 auto var(--ap-sp-64);
}

.ap-hiw-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ap-sp-32);
    max-width: 640px;
    margin: 0 auto;
    padding-top: var(--ap-sp-48);
    border-top: 1px solid var(--ap-line);
}

.ap-hiw-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ap-sp-8);
}

.ap-hiw-hero-stat-value {
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-64);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--ap-ink);
}

.ap-hiw-hero-stat-label {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-13);
    font-weight: 500;
    color: var(--ap-ink-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─ Method section shell (existing .ab-method-section markup) ─ */
body.ap-page .ab-method-section {
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface);
}

body.ap-page .ab-method-section + .ab-method-section {
    padding-top: 0;
}

body.ap-page .ab-method-section:nth-of-type(even) {
    background: var(--ap-surface-deep);
}

/* Section head override (existing .ab-section-head markup) */
body.ap-page .ab-method-section .ab-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--ap-sp-48);
}

body.ap-page .ab-method-section .ab-section-head .ab-eyebrow {
    display: inline-block;
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-16);
}

body.ap-page .ab-method-section .ab-section-head h2 {
    font-family: var(--ap-font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ap-ink);
    margin: 0;
}

/* Intro paragraph */
body.ap-page .ab-method-intro {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-18);
    line-height: 1.6;
    color: var(--ap-ink-secondary);
    max-width: 720px;
    margin: 0 auto var(--ap-sp-48);
    text-align: center;
}

body.ap-page .ab-method-intro code {
    font-family: var(--ap-font-mono);
    font-size: 0.9em;
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    padding: 2px 8px;
    border-radius: var(--ap-r-8);
    color: var(--ap-accent);
}

/* Subhead inside a tier section (robots.txt / llms.txt / sitemap) */
body.ap-page .ab-method-subhead {
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-24);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ap-ink);
    margin: var(--ap-sp-64) 0 var(--ap-sp-24);
    padding-left: var(--ap-sp-16);
    border-left: 3px solid var(--ap-accent);
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

/* Wildcard-does-not-count style note card */
body.ap-page .ab-method-note {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-left: 3px solid var(--ap-accent);
    border-radius: var(--ap-r-16);
    padding: var(--ap-sp-24) var(--ap-sp-32);
    max-width: 1080px;
    margin: 0 auto var(--ap-sp-32);
    box-shadow: var(--ap-shadow-sm);
}

body.ap-page .ab-method-note p {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-15);
    color: var(--ap-ink-secondary);
    line-height: 1.6;
    margin: 0;
}

body.ap-page .ab-method-note strong {
    color: var(--ap-ink);
    font-weight: 600;
}

body.ap-page .ab-method-note code {
    font-family: var(--ap-font-mono);
    font-size: 0.9em;
    background: var(--ap-surface-deep);
    border: 1px solid var(--ap-line);
    padding: 1px 6px;
    border-radius: var(--ap-r-8);
    color: var(--ap-accent);
}

/* Fetch grid (Step 1: Five resources) */
body.ap-page .ab-method-fetch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ap-sp-20);
    max-width: 1080px;
    margin: 0 auto;
}

body.ap-page .ab-method-fetch-item {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-20);
    padding: var(--ap-sp-28) var(--ap-sp-24);
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-12);
    transition: transform var(--ap-dur-base) var(--ap-ease-out),
                box-shadow var(--ap-dur-base) var(--ap-ease-out),
                border-color var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ab-method-fetch-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--ap-shadow-lg);
    border-color: var(--ap-line-strong);
}

body.ap-page .ab-method-fetch-path {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-15);
    font-weight: 500;
    color: var(--ap-accent);
    background: var(--ap-surface-deep);
    border: 1px solid var(--ap-line);
    padding: 6px 12px;
    border-radius: var(--ap-r-8);
    display: inline-block;
    align-self: flex-start;
}

body.ap-page .ab-method-fetch-desc {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    color: var(--ap-ink-secondary);
    line-height: 1.55;
}

/* Check list (shared across tier 1 / 2 / 3) */
body.ap-page .ab-method-checks {
    list-style: none;
    margin: 0 auto var(--ap-sp-48);
    padding: 0;
    max-width: 1080px;
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-20);
    overflow: hidden;
    box-shadow: var(--ap-shadow-sm);
}

body.ap-page .ab-method-check {
    padding: var(--ap-sp-24) var(--ap-sp-32);
    border-bottom: 1px solid var(--ap-line);
    transition: background var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-method-check:last-child {
    border-bottom: 0;
}

body.ap-page .ab-method-check:hover {
    background: var(--ap-surface-deep);
}

body.ap-page .ab-method-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ap-sp-16);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

body.ap-page .ab-method-check-name {
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-18);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ap-ink);
}

body.ap-page .ab-method-check-tag {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-11);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: var(--ap-r-pill);
    flex: 0 0 auto;
}

body.ap-page .ab-method-check-tag--required {
    background: rgba(8, 145, 178, 0.1);
    border: 1px solid rgba(8, 145, 178, 0.32);
    color: var(--ap-accent);
}

body.ap-page .ab-method-check-tag--optional {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.32);
    color: #B45309;
}

html[data-theme="dark"] body.ap-page .ab-method-check-tag--optional {
    color: #FBBF24;
}

body.ap-page .ab-method-check-logic {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-15);
    color: var(--ap-ink-secondary);
    line-height: 1.65;
    margin: 0;
    max-width: 82ch;
}

body.ap-page .ab-method-check-logic code {
    font-family: var(--ap-font-mono);
    font-size: 0.9em;
    background: var(--ap-surface-deep);
    border: 1px solid var(--ap-line);
    padding: 1px 6px;
    border-radius: var(--ap-r-8);
    color: var(--ap-accent);
}

/* Code example block (robots.txt / llms.txt examples) - always dark for
   the terminal aesthetic, regardless of site theme. */
body.ap-page .ab-method-pre {
    background: #18181B;
    color: #F5F5F7;
    border-radius: var(--ap-r-20);
    padding: var(--ap-sp-32) var(--ap-sp-32);
    margin: 0 auto var(--ap-sp-48);
    max-width: 1080px;
    overflow-x: auto;
    box-shadow: var(--ap-shadow-lg);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.ap-page .ab-method-pre::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #EF4444;
    box-shadow:
        20px 0 0 #F59E0B,
        40px 0 0 #10B981;
    opacity: 0.7;
}

body.ap-page .ab-method-pre code {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-13);
    color: rgba(240, 249, 255, 0.88);
    line-height: 1.7;
    white-space: pre;
    display: block;
    padding-top: var(--ap-sp-24);
}

/* Scoring grid (Configured / Partial / Not Configured) */
body.ap-page .ab-method-score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ap-sp-24);
    max-width: 1080px;
    margin: 0 auto;
}

body.ap-page .ab-method-score-item {
    background: var(--ap-surface-elevated);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-r-24);
    padding: var(--ap-sp-40) var(--ap-sp-32);
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-20);
    transition: transform var(--ap-dur-base) var(--ap-ease-out),
                box-shadow var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ab-method-score-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-lg);
}

body.ap-page .ab-method-score-item .ab-badge {
    align-self: flex-start;
}

body.ap-page .ab-method-score-label {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-15);
    color: var(--ap-ink-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Scoring badges (configured / partial / not-configured variants) */
body.ap-page .ab-badge.ab-badge--configured {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: #059669;
    padding: 6px 14px;
    border-radius: var(--ap-r-pill);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--configured {
    color: #34D399;
}

body.ap-page .ab-badge.ab-badge--partial {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.32);
    color: #B45309;
    padding: 6px 14px;
    border-radius: var(--ap-r-pill);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--partial {
    color: #FBBF24;
}

body.ap-page .ab-badge.ab-badge--not-configured {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.32);
    color: #B91C1C;
    padding: 6px 14px;
    border-radius: var(--ap-r-pill);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

html[data-theme="dark"] body.ap-page .ab-badge.ab-badge--not-configured {
    color: #F87171;
}

/* Closing CTA */
.ap-hiw-closing {
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface-deep);
    color: var(--ap-ink);
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.ap-hiw-closing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(8, 145, 178, 0.10), transparent 70%);
}

.ap-hiw-closing-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ap-sp-24);
}

.ap-hiw-closing .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0;
}

.ap-hiw-closing h2 {
    color: var(--ap-ink);
    margin: 0;
    max-width: 20ch;
}

.ap-hiw-closing .ap-lead {
    color: var(--ap-ink-secondary);
    max-width: 58ch;
    margin: 0;
}

.ap-hiw-closing .ap-btn {
    margin-top: var(--ap-sp-16);
}

/* ─ How-it-works responsive ─ */
@media (max-width: 1024px) {
    .ap-hiw-hero { padding: var(--ap-sp-96) 0; }
    body.ap-page .ab-method-fetch-grid { grid-template-columns: repeat(2, 1fr); }
    body.ap-page .ab-method-score-grid { grid-template-columns: 1fr; max-width: 640px; }
}

@media (max-width: 768px) {
    .ap-hiw-hero { padding: var(--ap-sp-80) 0; }
    .ap-hiw-hero-stats {
        grid-template-columns: 1fr;
        gap: var(--ap-sp-24);
        padding-top: var(--ap-sp-32);
    }
    .ap-hiw-hero-stat-value { font-size: var(--ap-fs-48); }
    body.ap-page .ab-method-section { padding: var(--ap-sp-80) 0; }
    body.ap-page .ab-method-intro { font-size: var(--ap-fs-16); margin-bottom: var(--ap-sp-32); }
    body.ap-page .ab-method-subhead { font-size: var(--ap-fs-20); margin: var(--ap-sp-48) 0 var(--ap-sp-20); }
    body.ap-page .ab-method-fetch-grid { grid-template-columns: 1fr; }
    body.ap-page .ab-method-check { padding: var(--ap-sp-20) var(--ap-sp-24); }
    body.ap-page .ab-method-check-head { flex-direction: column; align-items: flex-start; gap: var(--ap-sp-8); }
    body.ap-page .ab-method-check-name { font-size: var(--ap-fs-16); }
    body.ap-page .ab-method-pre { padding: var(--ap-sp-40) var(--ap-sp-24) var(--ap-sp-24); }
    body.ap-page .ab-method-pre code { font-size: var(--ap-fs-12); }
    .ap-hiw-closing { padding: var(--ap-sp-80) 0; }
}

@media (max-width: 480px) {
    .ap-hiw-hero-inner .ap-display--xl { font-size: clamp(40px, 10vw, 56px); }
    body.ap-page .ab-method-note { padding: var(--ap-sp-20) var(--ap-sp-20); }
    body.ap-page .ab-method-score-item { padding: var(--ap-sp-32) var(--ap-sp-24); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 11F: Guide page (body.ap-page scoped)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─ Guide hero ─ */
.ap-guide-hero {
    position: relative;
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface);
    color: var(--ap-ink);
    overflow: hidden;
    isolation: isolate;
}

.ap-guide-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(8, 145, 178, 0.10), transparent 60%),
        radial-gradient(ellipse 45% 35% at 15% 100%, rgba(8, 145, 178, 0.06), transparent 60%);
    pointer-events: none;
}

.ap-guide-hero-inner {
    text-align: center;
    max-width: 960px;
}

.ap-guide-hero .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-24);
}

.ap-guide-hero-title {
    color: var(--ap-ink);
    margin: 0 auto var(--ap-sp-32);
    max-width: 18ch;
}

.ap-guide-hero-lede {
    color: var(--ap-ink-secondary);
    max-width: 64ch;
    margin: 0 auto var(--ap-sp-64);
    font-size: clamp(1.125rem, 1.6vw, var(--ap-fs-22));
    line-height: 1.5;
}

.ap-guide-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--ap-sp-24);
    padding: var(--ap-sp-20) var(--ap-sp-32);
    border: 1px solid var(--ap-line-strong);
    border-radius: var(--ap-r-pill);
    background: var(--ap-surface-elevated);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ap-guide-hero-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: var(--ap-sp-8);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-13);
    font-weight: 500;
    color: var(--ap-ink-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.ap-guide-hero-meta-num {
    font-family: var(--ap-font-display);
    font-size: var(--ap-fs-22);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
    text-transform: none;
}

.ap-guide-hero-meta-sep {
    width: 1px;
    height: 18px;
    background: var(--ap-line);
}

/* ─ Guide section shell + alternating backgrounds (existing markup) ─ */
body.ap-page section.ab-guide-section {
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface);
}

body.ap-page section.ab-guide-section:nth-of-type(odd) {
    background: var(--ap-surface-alt);
}

body.ap-page section.ab-guide-section .ab-container {
    max-width: var(--ap-container);
    padding: 0 var(--ap-sp-32);
}

body.ap-page section.ab-guide-section .ab-section-head {
    max-width: 820px;
    margin: 0 auto var(--ap-sp-64);
    text-align: left;
}

body.ap-page section.ab-guide-section .ab-section-head .ab-eyebrow {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-16);
}

body.ap-page section.ab-guide-section .ab-section-head h2 {
    font-family: var(--ap-font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ap-ink);
    margin: 0;
    text-wrap: balance;
}

/* ─ Table of contents (first section after hero) ─ */
body.ap-page .ab-guide-toc {
    max-width: 820px;
    margin: 0 auto;
    padding: var(--ap-sp-48) var(--ap-sp-56);
    background: var(--ap-surface);
    border: 1px solid var(--ap-hairline);
    border-radius: var(--ap-r-xl);
    box-shadow: var(--ap-shadow-card);
}

body.ap-page .ab-guide-toc-title {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-32);
}

body.ap-page .ab-guide-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: ap-guide-toc;
}

body.ap-page .ab-guide-toc-list li {
    border-top: 1px solid var(--ap-hairline);
}

body.ap-page .ab-guide-toc-list li:last-child {
    border-bottom: 1px solid var(--ap-hairline);
}

body.ap-page .ab-guide-toc-list a {
    display: flex;
    align-items: center;
    gap: var(--ap-sp-24);
    padding: var(--ap-sp-24) 0;
    font-family: var(--ap-font-display);
    font-size: clamp(1.35rem, 2.2vw, var(--ap-fs-28));
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--ap-ink);
    text-decoration: none;
    transition: color var(--ap-dur-fast) var(--ap-ease-out),
                padding-left var(--ap-dur-base) var(--ap-ease-out);
}

body.ap-page .ab-guide-toc-list a:hover {
    color: var(--ap-accent);
    padding-left: var(--ap-sp-12);
}

body.ap-page .ab-guide-toc-num {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-13);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ap-ink-tertiary);
    min-width: 32px;
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-guide-toc-list a:hover .ab-guide-toc-num {
    color: var(--ap-accent);
}

/* ─ Guide prose (reading column) ─ */
body.ap-page .ab-guide-prose {
    max-width: 820px;
    margin: 0 auto;
}

body.ap-page .ab-guide-prose + .ab-guide-prose {
    margin-top: var(--ap-sp-24);
}

body.ap-page .ab-guide-p {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-19);
    line-height: 1.7;
    color: var(--ap-ink-secondary);
    margin: 0 0 var(--ap-sp-24);
    text-wrap: pretty;
}

body.ap-page .ab-guide-p:last-child {
    margin-bottom: 0;
}

body.ap-page .ab-guide-p strong {
    color: var(--ap-ink);
    font-weight: 600;
}

body.ap-page .ab-guide-p code,
body.ap-page .ab-guide-list code {
    font-family: var(--ap-font-mono);
    font-size: 0.88em;
    padding: 0.15em 0.45em;
    background: var(--ap-surface-alt);
    border: 1px solid var(--ap-hairline);
    border-radius: 6px;
    color: var(--ap-ink);
}

body.ap-page .ab-guide-h3 {
    font-family: var(--ap-font-display);
    font-size: clamp(1.5rem, 2.4vw, var(--ap-fs-32));
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ap-ink);
    margin: var(--ap-sp-64) 0 var(--ap-sp-20);
    text-wrap: balance;
}

body.ap-page .ab-guide-prose > .ab-guide-h3:first-child {
    margin-top: 0;
}

/* ─ Guide unordered lists ─ */
body.ap-page .ab-guide-list {
    list-style: none;
    margin: 0 0 var(--ap-sp-32);
    padding: 0;
}

body.ap-page .ab-guide-list li {
    display: block;
    position: relative;
    padding: var(--ap-sp-16) 0 var(--ap-sp-16) var(--ap-sp-32);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-17);
    line-height: 1.65;
    color: var(--ap-ink-secondary);
    border-bottom: 1px solid var(--ap-hairline);
    gap: 0;
}

body.ap-page .ab-guide-list li:first-child {
    border-top: 1px solid var(--ap-hairline);
}

body.ap-page .ab-guide-list li::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: var(--ap-sp-24);
    width: 16px;
    height: 16px;
    margin: 0;
    border-radius: 50%;
    background: var(--ap-accent);
    opacity: 0.14;
    flex-shrink: 0;
}

body.ap-page .ab-guide-list li::after {
    content: "";
    display: block;
    position: absolute;
    left: 5px;
    top: calc(var(--ap-sp-24) + 5px);
    width: 6px;
    height: 6px;
    margin: 0;
    border-radius: 50%;
    background: var(--ap-accent);
}

body.ap-page .ab-guide-list li strong {
    color: var(--ap-ink);
    font-weight: 600;
}

/* ─ Bot list table (14 AI bots) ─ */
body.ap-page .ab-guide-bot-list {
    max-width: 820px;
    margin: var(--ap-sp-32) auto var(--ap-sp-48);
    border: 1px solid var(--ap-hairline);
    border-radius: var(--ap-r-lg);
    overflow: hidden;
    background: var(--ap-surface);
    box-shadow: var(--ap-shadow-card);
}

body.ap-page .ab-guide-bot-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.8fr;
    gap: var(--ap-sp-24);
    padding: var(--ap-sp-20) var(--ap-sp-32);
    border-bottom: 1px solid var(--ap-hairline);
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-15);
    line-height: 1.5;
    align-items: center;
    transition: background var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ab-guide-bot-row:last-child {
    border-bottom: none;
}

body.ap-page .ab-guide-bot-row:hover:not(.ab-guide-bot-row--header) {
    background: var(--ap-surface-alt);
}

body.ap-page .ab-guide-bot-row--header {
    background: var(--ap-surface-alt);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ap-ink-tertiary);
}

body.ap-page .ab-guide-bot-name {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-14);
    font-weight: 500;
    color: var(--ap-ink);
}

body.ap-page .ab-guide-bot-row--header .ab-guide-bot-name {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
}

body.ap-page .ab-guide-bot-owner {
    color: var(--ap-ink-secondary);
    font-weight: 500;
}

body.ap-page .ab-guide-bot-purpose {
    color: var(--ap-ink-tertiary);
    font-size: var(--ap-fs-14);
}

/* ─ Guide closing CTA ─ */
.ap-guide-closing {
    position: relative;
    padding: var(--ap-sp-120) 0;
    background: var(--ap-surface-deep);
    color: var(--ap-ink);
    overflow: hidden;
    isolation: isolate;
    text-align: center;
}

.ap-guide-closing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 55% at 50% 100%, rgba(8, 145, 178, 0.10), transparent 60%),
        radial-gradient(ellipse 40% 30% at 85% 0%, rgba(8, 145, 178, 0.06), transparent 60%);
    pointer-events: none;
}

.ap-guide-closing-inner {
    max-width: 880px;
    text-align: center;
}

.ap-guide-closing-title {
    color: var(--ap-ink);
    margin: 0 auto var(--ap-sp-32);
    max-width: 20ch;
}

.ap-guide-closing-lede {
    color: var(--ap-ink-secondary);
    max-width: 60ch;
    margin: 0 auto var(--ap-sp-48);
    font-size: clamp(1.125rem, 1.6vw, var(--ap-fs-22));
    line-height: 1.55;
}

.ap-guide-closing-cta {
    display: flex;
    justify-content: center;
}

/* ─ Phase 11F responsive ─ */
@media (max-width: 1024px) {
    .ap-guide-hero { padding: var(--ap-sp-96) 0; }
    body.ap-page section.ab-guide-section { padding: var(--ap-sp-96) 0; }
    .ap-guide-closing { padding: var(--ap-sp-96) 0; }
    body.ap-page .ab-guide-toc { padding: var(--ap-sp-40) var(--ap-sp-40); }
}

@media (max-width: 768px) {
    .ap-guide-hero { padding: var(--ap-sp-80) 0; }
    .ap-guide-hero-lede { margin-bottom: var(--ap-sp-48); }
    .ap-guide-hero-meta {
        flex-direction: column;
        gap: var(--ap-sp-16);
        padding: var(--ap-sp-24) var(--ap-sp-32);
        border-radius: var(--ap-r-lg);
    }
    .ap-guide-hero-meta-sep { display: none; }

    body.ap-page section.ab-guide-section { padding: var(--ap-sp-80) 0; }
    body.ap-page section.ab-guide-section .ab-section-head { margin-bottom: var(--ap-sp-48); }
    body.ap-page .ab-guide-toc { padding: var(--ap-sp-32) var(--ap-sp-24); }
    body.ap-page .ab-guide-toc-list a {
        padding: var(--ap-sp-20) 0;
        font-size: var(--ap-fs-18);
        gap: var(--ap-sp-16);
    }
    body.ap-page .ab-guide-p { font-size: var(--ap-fs-17); }
    body.ap-page .ab-guide-h3 { margin-top: var(--ap-sp-48); }

    body.ap-page .ab-guide-bot-row {
        grid-template-columns: 1fr;
        gap: var(--ap-sp-8);
        padding: var(--ap-sp-20) var(--ap-sp-24);
    }
    body.ap-page .ab-guide-bot-row--header { display: none; }
    body.ap-page .ab-guide-bot-name { font-size: var(--ap-fs-15); }
    body.ap-page .ab-guide-bot-purpose { font-size: var(--ap-fs-13); }

    .ap-guide-closing { padding: var(--ap-sp-80) 0; }
}

@media (max-width: 480px) {
    .ap-guide-hero-inner .ap-display--xl { font-size: clamp(40px, 10vw, 56px); }
    body.ap-page section.ab-guide-section .ab-container { padding: 0 var(--ap-sp-16); }
    body.ap-page .ab-guide-toc { padding: var(--ap-sp-28) var(--ap-sp-20); }
    body.ap-page .ab-guide-list li { padding-left: var(--ap-sp-24); font-size: var(--ap-fs-15); }
}

@media (prefers-reduced-motion: reduce) {
    body.ap-page .ab-guide-toc-list a { transition: none; }
    body.ap-page .ab-guide-toc-list a:hover { padding-left: 0; }
    body.ap-page .ab-guide-bot-row { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 11G: Privacy + Terms (legal pages)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─ Compact dark hero ─ */
.ap-legal-hero {
    position: relative;
    padding: var(--ap-sp-120) 0 var(--ap-sp-80);
    background: var(--ap-surface);
    color: var(--ap-ink);
    overflow: hidden;
    isolation: isolate;
}

.ap-legal-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(8, 145, 178, 0.08), transparent 60%),
        radial-gradient(ellipse 40% 30% at 10% 100%, rgba(8, 145, 178, 0.05), transparent 60%);
    pointer-events: none;
}

.ap-legal-hero-inner {
    max-width: 960px;
    text-align: left;
}

.ap-legal-hero .ap-eyebrow {
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-24);
}

.ap-legal-hero-title {
    color: var(--ap-ink);
    margin: 0 0 var(--ap-sp-32);
    max-width: 14ch;
}

.ap-legal-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--ap-sp-16);
    padding: var(--ap-sp-12) var(--ap-sp-20);
    border: 1px solid var(--ap-line-strong);
    border-radius: var(--ap-r-pill);
    background: var(--ap-surface-elevated);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: 0;
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    line-height: 1;
}

.ap-legal-hero-meta-label {
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ap-ink-tertiary);
}

.ap-legal-hero-meta-value {
    font-weight: 500;
    color: var(--ap-ink);
}

/* ─ Legal content shell ─ */
body.ap-page .ap-legal-content {
    padding: var(--ap-sp-96) 0 var(--ap-sp-120);
    background: var(--ap-surface);
}

.ap-legal-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--ap-sp-80);
    align-items: start;
}

/* Sticky TOC sidebar */
.ap-legal-toc {
    position: sticky;
    top: calc(var(--ap-header-h, 72px) + var(--ap-sp-32));
    align-self: start;
    max-height: calc(100vh - var(--ap-header-h, 72px) - var(--ap-sp-64));
    overflow-y: auto;
    padding-right: var(--ap-sp-16);
    scrollbar-width: thin;
}

.ap-legal-toc-title {
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-12);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ap-accent);
    margin: 0 0 var(--ap-sp-24);
}

.ap-legal-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--ap-hairline);
}

.ap-legal-toc-list li {
    margin: 0;
}

.ap-legal-toc-list a {
    display: flex;
    align-items: baseline;
    gap: var(--ap-sp-12);
    padding: 10px var(--ap-sp-16);
    margin-left: -1px;
    border-left: 1px solid transparent;
    font-family: var(--ap-font-text);
    font-size: var(--ap-fs-14);
    font-weight: 500;
    line-height: 1.45;
    color: var(--ap-ink-tertiary);
    text-decoration: none;
    transition: color var(--ap-dur-fast) var(--ap-ease-out),
                border-color var(--ap-dur-fast) var(--ap-ease-out),
                background var(--ap-dur-fast) var(--ap-ease-out);
}

.ap-legal-toc-list a:hover {
    color: var(--ap-ink);
    border-left-color: var(--ap-accent);
    background: var(--ap-surface-alt);
}

.ap-legal-toc-num {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-12);
    font-weight: 500;
    color: var(--ap-ink-tertiary);
    min-width: 24px;
    flex-shrink: 0;
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

.ap-legal-toc-list a:hover .ap-legal-toc-num {
    color: var(--ap-accent);
}

/* ─ Legal prose column ─ */
body.ap-page .ap-legal-prose {
    max-width: 720px;
    margin: 0;
}

body.ap-page .ap-legal-prose .ab-guide-section {
    padding: 0;
    margin: 0 0 var(--ap-sp-64);
    background: none;
    border-top: 1px solid var(--ap-hairline);
    padding-top: var(--ap-sp-48);
    scroll-margin-top: calc(var(--ap-header-h, 72px) + var(--ap-sp-24));
}

body.ap-page .ap-legal-prose .ab-guide-section:first-child {
    border-top: none;
    padding-top: 0;
}

body.ap-page .ap-legal-prose .ab-guide-section:last-child {
    margin-bottom: 0;
}

body.ap-page .ap-legal-prose .ab-guide-section > .ab-guide-h3:first-child {
    margin-top: 0;
}

/* Subheadings inside sections (inline-styled h3s) */
body.ap-page .ap-legal-prose .ab-guide-section h3.ab-guide-h3 {
    font-size: var(--ap-fs-17);
    font-weight: 600;
    margin: var(--ap-sp-32) 0 var(--ap-sp-12);
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--ap-ink);
}

body.ap-page .ap-legal-prose .ab-guide-p {
    font-size: var(--ap-fs-17);
    line-height: 1.7;
}

body.ap-page .ap-legal-prose .ab-guide-p a {
    color: var(--ap-accent);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: color var(--ap-dur-fast) var(--ap-ease-out);
}

body.ap-page .ap-legal-prose .ab-guide-p a:hover {
    color: var(--ap-accent-strong);
}

/* ─ Phase 11G responsive ─ */
@media (max-width: 1024px) {
    .ap-legal-hero { padding: var(--ap-sp-96) 0 var(--ap-sp-64); }
    body.ap-page .ap-legal-content { padding: var(--ap-sp-80) 0 var(--ap-sp-96); }
    .ap-legal-grid {
        grid-template-columns: 1fr;
        gap: var(--ap-sp-48);
    }
    .ap-legal-toc {
        position: static;
        max-height: none;
        padding-right: 0;
        padding: var(--ap-sp-32) var(--ap-sp-32);
        background: var(--ap-surface-alt);
        border: 1px solid var(--ap-hairline);
        border-radius: var(--ap-r-lg);
    }
    .ap-legal-toc-list {
        border-left: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 var(--ap-sp-16);
    }
    .ap-legal-toc-list a {
        padding: var(--ap-sp-8) 0;
        border-left: none;
    }
    .ap-legal-toc-list a:hover { background: none; }
}

@media (max-width: 768px) {
    .ap-legal-hero { padding: var(--ap-sp-80) 0 var(--ap-sp-48); }
    .ap-legal-hero-title { max-width: 18ch; }
    .ap-legal-grid { gap: var(--ap-sp-40); }
    body.ap-page .ap-legal-content { padding: var(--ap-sp-64) 0 var(--ap-sp-80); }
    body.ap-page .ap-legal-prose .ab-guide-section {
        padding-top: var(--ap-sp-40);
        margin-bottom: var(--ap-sp-48);
    }
    body.ap-page .ap-legal-prose .ab-guide-p { font-size: var(--ap-fs-16); }
    body.ap-page .ap-legal-prose .ab-guide-section h3.ab-guide-h3 { font-size: var(--ap-fs-16); }
    .ap-legal-toc-list { grid-template-columns: 1fr; }
    .ap-legal-toc { padding: var(--ap-sp-24); }
}

@media (max-width: 480px) {
    .ap-legal-hero-title { font-size: clamp(36px, 10vw, 48px); }
    .ap-legal-hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ap-sp-4);
        padding: var(--ap-sp-16) var(--ap-sp-20);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ap-legal-toc-list a { transition: none; }
    .ap-legal-toc-num { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 11H2: Mobile polish pass
   Targeted per-breakpoint fixes layered on top of the page-specific
   responsive blocks above. Goals: prevent horizontal scroll, hit 44px touch
   targets, respect iOS safe-area insets, kill iOS input zoom, soften reveal
   distances, tighten ultra-small-screen padding, give sticky anchors a
   header offset, and keep heros legible at 320px.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─ Global mobile baseline (applies at all sizes) ─ */
body.ap-page {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

html:has(body.ap-page) {
    scroll-padding-top: calc(var(--ap-header-h, 64px) + 16px);
}

/* Sticky-header offset for in-page anchors across guide + legal pages */
body.ap-page section.ab-guide-section[id],
body.ap-page .ap-legal-prose .ab-guide-section[id] {
    scroll-margin-top: calc(var(--ap-header-h, 64px) + var(--ap-sp-24));
}

/* ─ Tablet and below (≤1024px) ─ */
@media (max-width: 1024px) {
    /* Soften reveal distance so off-screen translates do not create overflow */
    [data-ap-reveal="fade-up"]    { transform: translate3d(0, 24px, 0); }
    [data-ap-reveal="fade-down"]  { transform: translate3d(0, -24px, 0); }
    [data-ap-reveal="slide-left"] { transform: translate3d(-32px, 0, 0); }
    [data-ap-reveal="slide-right"]{ transform: translate3d(32px, 0, 0); }

    /* Home hero padding compresses on narrower viewports */
    .ap-home-hero { padding: var(--ap-sp-96) 0 var(--ap-sp-120); }
    .ap-home-hero-inner { min-height: 60vh; padding-top: var(--ap-sp-32); }
}

/* ─ Phone landscape and below (≤768px) ─ */
@media (max-width: 768px) {
    /* Header: respect iOS safe-area for left/right insets, expand hamburger to 44px touch target */
    body.ap-page .ab-header-bar {
        padding-left: max(var(--ap-sp-24), env(safe-area-inset-left));
        padding-right: max(var(--ap-sp-24), env(safe-area-inset-right));
        height: 56px;
    }
    html[data-scrolled] body.ap-page .ab-header-bar { height: 52px; }

    body.ap-page .ab-hamburger {
        width: 44px;
        height: 44px;
        border-radius: var(--ap-r-12, 12px);
    }
    body.ap-page .ab-hamburger svg { width: 20px; height: 20px; }

    /* Mobile nav panel: bigger touch targets, safe-area-bottom for home indicator */
    body.ap-page .ab-mobile-nav {
        padding: var(--ap-sp-12) 0 max(var(--ap-sp-16), env(safe-area-inset-bottom));
        background: var(--ap-surface);
        border-top: 1px solid var(--ap-line);
    }
    body.ap-page .ab-mobile-nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: var(--ap-sp-12) var(--ap-sp-20);
        font-size: var(--ap-fs-15);
        color: var(--ap-ink);
    }
    body.ap-page .ab-mobile-nav-links a.ab-mobile-sub {
        min-height: 40px;
        padding-left: var(--ap-sp-32);
        font-size: var(--ap-fs-14);
        color: var(--ap-ink-secondary);
    }
    body.ap-page .ab-mobile-nav-section-label {
        font-family: var(--ap-font-mono);
        font-size: 11px;
        letter-spacing: 0.12em;
        padding: var(--ap-sp-12) var(--ap-sp-20) var(--ap-sp-4);
        color: var(--ap-ink-tertiary, var(--ap-ink-secondary));
    }

    /* Inputs: enforce 16px font-size to prevent iOS auto-zoom on focus */
    body.ap-page input,
    body.ap-page select,
    body.ap-page textarea {
        font-size: 16px;
    }

    /* Footer: stack with safe-area padding, give links 44px touch height */
    body.ap-page .ab-footer {
        padding: var(--ap-sp-48) 0 max(var(--ap-sp-32), env(safe-area-inset-bottom));
    }
    body.ap-page .ab-footer-inner {
        padding-left: max(var(--ap-sp-24), env(safe-area-inset-left));
        padding-right: max(var(--ap-sp-24), env(safe-area-inset-right));
    }
    body.ap-page .ab-footer-links {
        gap: var(--ap-sp-8) var(--ap-sp-20);
        width: 100%;
    }
    body.ap-page .ab-footer-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Home hero: tighter padding, fluid content gap */
    .ap-home-hero { padding: var(--ap-sp-80) 0 var(--ap-sp-96); }
    .ap-home-hero-inner {
        gap: var(--ap-sp-24);
        min-height: auto;
        padding-top: var(--ap-sp-16);
        align-items: center;
        text-align: center;
    }
    .ap-home-hero h1 { max-width: 100%; }

    /* Legal TOC links: 44px touch targets when collapsed to 2-col grid */
    body.ap-page .ap-legal-toc-list a {
        min-height: 44px;
        align-items: center;
    }

    /* Beacon: ensure share/copy buttons hit 44px */
    body.ap-page .ab-share-btn,
    body.ap-page .ab-copy-btn {
        min-height: 44px;
        padding-left: var(--ap-sp-16);
        padding-right: var(--ap-sp-16);
    }

    /* Beacon: input itself locked to 16px to prevent iOS zoom (override fs-16 token) */
    body.ap-page .ap-beacon-input { font-size: 16px; min-height: 48px; }
    body.ap-page .ap-beacon-submit { min-height: 48px; }

    /* Code blocks: prevent overflow blow-out, allow momentum scroll */
    body.ap-page pre,
    body.ap-page .ab-method-pre {
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    /* FAQ question gap tighten so the "+" indicator never wraps */
    body.ap-page .ap-home-faq .ab-faq-question {
        gap: var(--ap-sp-16);
    }
}

/* ─ Small phone (≤480px) ─ */
@media (max-width: 480px) {
    /* Container padding shrinks, but never below safe-area */
    body.ap-page .ap-container,
    body.ap-page .ab-container {
        padding-left: max(var(--ap-sp-16), env(safe-area-inset-left));
        padding-right: max(var(--ap-sp-16), env(safe-area-inset-right));
    }

    /* Header brand name shrinks slightly so actions never wrap */
    body.ap-page .ab-brand-name { font-size: var(--ap-fs-15); }

    /* Home hero h1 - fluid floor at 320px */
    .ap-home-hero h1 { font-size: clamp(2.5rem, 11vw, 3.5rem); }
    .ap-home-hero { padding: var(--ap-sp-64) 0 var(--ap-sp-80); }

    /* Section padding floor */
    .ap-section { padding: var(--ap-sp-64) 0; }
    .ap-section--tight { padding: var(--ap-sp-40) 0; }

    /* Card padding floor */
    .ap-card,
    body.ap-page .ab-tier-card,
    body.ap-page .ab-score-card { border-radius: var(--ap-r-16); }

    /* Diff tiles: tighter padding so 1-col layout doesn't dwarf content */
    .ap-diff-tile { padding: var(--ap-sp-24); }

    /* Beacon overview cards */
    .ap-beacon-overview-card { padding: var(--ap-sp-24) var(--ap-sp-20); }

    /* Score card numerals */
    body.ap-page .ab-score-card { padding: var(--ap-sp-32) var(--ap-sp-20); }
    body.ap-page .ab-score-pct,
    body.ap-page .ab-score-pct-num { font-size: clamp(3rem, 14vw, 4.5rem); }

    /* Legal hero meta pill: full-width */
    .ap-legal-hero-meta { width: 100%; }

    /* Guide hero meta pill: full-width */
    .ap-guide-hero-meta { width: 100%; }
}

/* ─ Ultra-small (≤375px, iPhone SE / Mini) ─ */
@media (max-width: 375px) {
    .ap-home-hero h1 { font-size: clamp(2.25rem, 12vw, 3rem); }
    .ap-beacon-hero-inner .ap-display--xl,
    .ap-hiw-hero-inner .ap-display--xl,
    .ap-guide-hero-inner .ap-display--xl { font-size: clamp(2.25rem, 11vw, 3rem); }

    .ap-section { padding: var(--ap-sp-56) 0; }
    .ap-section--hero { padding: var(--ap-sp-48) 0 var(--ap-sp-32); }

    body.ap-page .ap-beacon-faq .ab-faq-question,
    body.ap-page .ap-home-faq .ab-faq-question { font-size: var(--ap-fs-17); }

    /* Footer copy never wraps awkwardly */
    body.ap-page .ab-footer-copy { font-size: var(--ap-fs-13); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 12: Homepage refinement pass
   12A token contrast repair (dark mode card-on-elevated invisibility)
   12B logo-pulse beacon background (replaces radial orbs)
   12C hero compactness + visible scroll cue + right-side fill
   12D stat label sizing
   12E layer cards: more info + horizontal scroll-snap chip rows
   12F FAQ frame (kill left-edge bleed)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 12A: token contrast repair ──────────────────────────────────────────── */

/* The bots section sat on --ap-surface-elevated in dark mode and so did
   .ap-bot-card, making cards invisible. Bump section to plain --ap-surface
   in dark and tighten the light-mode bg to --ap-surface-deep so cards stand
   out in both themes. */
.ap-home-bots {
    background: var(--ap-surface-deep);
}
html[data-theme="dark"] .ap-home-bots {
    background: var(--ap-surface);
}

/* Same fix for the FAQ section: in dark mode it shared bg with siblings.
   Pull it down to --ap-surface so the bordered list is visible. */
html[data-theme="dark"] body.ap-page .ap-home-faq {
    background: var(--ap-surface);
}

/* Problem section: same swap. Was --ap-surface in light + --ap-surface-elevated
   in dark, both nearly identical to body. Use the deep step in light. */
.ap-home-problem {
    background: var(--ap-surface-deep);
}
html[data-theme="dark"] .ap-home-problem {
    background: var(--ap-surface);
}

/* Diff section in dark mode: keep --ap-surface section, tiles already use
   --ap-surface-elevated which is brighter, so contrast holds. No change. */

/* Footer in dark mode: was --ap-surface-elevated, hard to distinguish from
   the diff section above it. Drop to --ap-surface-deep. */
html[data-theme="dark"] body.ap-page .ab-footer {
    background: var(--ap-surface-deep);
    border-top-color: var(--ap-line-strong);
}

/* Beacon/HIW/Guide page sections: card backgrounds need a brighter step in
   dark mode so they read against the elevated bg the legal pages use. */
html[data-theme="dark"] body.ap-page .ab-tier-card,
html[data-theme="dark"] body.ap-page .ab-score-card,
html[data-theme="dark"] body.ap-page .ab-method-check,
html[data-theme="dark"] body.ap-page .ab-method-fetch-step,
html[data-theme="dark"] body.ap-page .ab-method-score-item,
html[data-theme="dark"] body.ap-page .ab-method-pre,
html[data-theme="dark"] body.ap-page .ab-method-note,
html[data-theme="dark"] body.ap-page .ab-guide-toc,
html[data-theme="dark"] body.ap-page .ab-guide-bot-row,
html[data-theme="dark"] .ap-legal-toc,
html[data-theme="dark"] .ap-beacon-overview-card,
html[data-theme="dark"] .ap-beacon-loading-card,
html[data-theme="dark"] .ap-beacon-error-card,
html[data-theme="dark"] .ap-beacon-input-group,
html[data-theme="dark"] .ap-guide-hero-meta,
html[data-theme="dark"] .ap-legal-hero-meta {
    background: #18181B;
    border-color: rgba(255, 255, 255, 0.14);
}

/* Brighten secondary ink in dark mode so body copy reads on dark cards */
html[data-theme="dark"] {
    --ap-ink-secondary: #C2C2C7;
    --ap-ink-tertiary:  #8E8E93;
}

/* Stronger hairlines in dark mode for card outlines and dividers */
html[data-theme="dark"] {
    --ap-line:          rgba(255, 255, 255, 0.14);
    --ap-line-strong:   rgba(255, 255, 255, 0.22);
}

/* ─── 12A2: header always follows site theme ──────────────────────────────────
   The header sits above a dark hero on every page, but it should still match
   the site theme (light header in light mode, dark header in dark mode) rather
   than invert. Force nav links to use the themed ink token at full opacity so
   the cascade from earlier phases cannot fade them out. */

/* Header background must be OPAQUE per theme so the dark hero behind it
   does not bleed through the translucent default. */
html:not([data-theme="dark"]) body.ap-page header.ab-header {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="dark"] body.ap-page header.ab-header {
    background: #000000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Light mode: nav links black, dark mode: nav links white. Hardcoded values
   to bypass any token cascade ambiguity. */
html:not([data-theme="dark"]) body.ap-page header.ab-header nav.ab-nav a,
html:not([data-theme="dark"]) body.ap-page header.ab-header .ab-brand-name,
html:not([data-theme="dark"]) body.ap-page header.ab-header .ab-theme-toggle,
html:not([data-theme="dark"]) body.ap-page header.ab-header .ab-hamburger {
    color: #1D1D1F !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body.ap-page header.ab-header nav.ab-nav a,
html[data-theme="dark"] body.ap-page header.ab-header .ab-brand-name,
html[data-theme="dark"] body.ap-page header.ab-header .ab-theme-toggle,
html[data-theme="dark"] body.ap-page header.ab-header .ab-hamburger {
    color: #F5F5F7 !important;
    opacity: 1 !important;
}

html body.ap-page header.ab-header nav.ab-nav a {
    font-weight: 600;
}

html body.ap-page header.ab-header nav.ab-nav a:hover,
html body.ap-page header.ab-header nav.ab-nav a.ab-nav-active {
    color: var(--ap-accent) !important;
}

body.ap-page .ab-hamburger {
    border-color: var(--ap-line-strong);
}

/* Mobile nav panel uses elevated surface when opened */
body.ap-page .ab-mobile-nav {
    background: var(--ap-surface-elevated);
    border-top: 1px solid var(--ap-line);
}

/* ─── 12B: logo-pulse beacon background ───────────────────────────────────── */

/* Kill the radial-gradient orbs that previously decorated the hero corner. */
.ap-home-hero::before { display: none; }

/* The hero visual is now the actual beacon logo glyph: a center dot plus
   three concentric arcs broadcasting outward, scaled huge and faded behind
   the headline. The arcs pulse outward in a staggered loop. */
.ap-home-hero-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    right: auto;
    bottom: auto;
    opacity: 1;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.ap-home-hero-visual svg {
    width: min(120vh, 1400px);
    height: min(120vh, 1400px);
    max-width: 140%;
    max-height: 140%;
    overflow: visible;
    transform: translateX(8%);
    opacity: 0.18;
    filter: drop-shadow(0 0 60px rgba(34, 211, 238, 0.35));
}

.ap-beacon-glyph-core {
    transform-origin: 10px 14px;
    animation: apGlyphCore 4s var(--ap-ease-in-out) infinite;
}

.ap-beacon-glyph-arc {
    transform-origin: 10px 14px;
    animation: apGlyphArc 4s var(--ap-ease-out) infinite;
}

.ap-beacon-glyph-arc--inner { animation-delay: 0s; }
.ap-beacon-glyph-arc--mid   { animation-delay: 0.6s; }
.ap-beacon-glyph-arc--outer { animation-delay: 1.2s; }

@keyframes apGlyphCore {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%      { transform: scale(1.08); opacity: 0.85; }
}

@keyframes apGlyphArc {
    0%   { transform: scale(0.85); opacity: 0; }
    25%  { opacity: 0.9; }
    100% { transform: scale(1.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ap-beacon-glyph-core,
    .ap-beacon-glyph-arc { animation: none; }
    .ap-beacon-glyph-arc { opacity: 0.6; }
}

/* ─── 12C: hero compactness + scroll cue + right-side fill ────────────────── */

.ap-home-hero {
    padding: var(--ap-sp-96) 0 var(--ap-sp-80);
    min-height: auto;
}

.ap-home-hero-inner {
    min-height: 0;
    padding-top: var(--ap-sp-24);
    padding-bottom: var(--ap-sp-80);
    gap: var(--ap-sp-24);
    max-width: var(--ap-container);
    align-items: flex-start;
    text-align: left;
}

.ap-home-hero h1 {
    font-size: clamp(2.75rem, 6vw, 5.25rem);
    line-height: 1.04;
    max-width: 18ch;
}

.ap-home-hero-lead {
    font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
    line-height: 1.55;
    max-width: 56ch;
    color: var(--ap-ink-secondary);
}

.ap-home-hero-cta {
    flex-direction: row;
    align-items: center;
    gap: var(--ap-sp-24);
    margin-top: var(--ap-sp-8);
}

.ap-home-hero-trust {
    margin: 0;
    font-size: var(--ap-fs-13);
    color: var(--ap-ink-tertiary);
}

/* Scroll cue: smaller, lifted high enough that both the label and the
   line sit fully inside the hero (was clipping at the section bottom). */
.ap-scroll-cue {
    bottom: var(--ap-sp-64);
    font-size: var(--ap-fs-11, 11px);
    color: var(--ap-ink-tertiary);
}

.ap-scroll-cue-line {
    height: 28px;
}

/* Hero responsive (phone): full-width text, smaller glyph fade */
@media (max-width: 900px) {
    .ap-home-hero { padding: var(--ap-sp-80) 0 var(--ap-sp-64); }
    .ap-home-hero-inner {
        padding-bottom: var(--ap-sp-48);
        gap: var(--ap-sp-20);
    }
    .ap-home-hero-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ap-sp-12);
    }
    .ap-home-hero-visual svg {
        width: min(100vh, 800px);
        height: min(100vh, 800px);
        opacity: 0.14;
        transform: translateX(15%);
    }
    .ap-scroll-cue { display: none; }
}

/* ─── 12D: stat label sizing ──────────────────────────────────────────────── */

.ap-home-stat-label {
    font-size: var(--ap-fs-16);
    line-height: 1.55;
    color: rgba(245, 245, 247, 0.78);
    max-width: 26ch;
    font-weight: 400;
}

/* ─── 12E: layer cards - more info + horizontal scroll-snap ───────────────── */

.ap-home-tier-count {
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-12);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ap-ink-tertiary);
    margin-top: var(--ap-sp-4);
}

.ap-home-tier-list {
    list-style: none;
    padding: 0;
    margin: var(--ap-sp-8) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--ap-sp-12);
}

.ap-home-tier-list li {
    position: relative;
    padding-left: var(--ap-sp-24);
    font-size: var(--ap-fs-16);
    line-height: 1.55;
    color: var(--ap-ink-secondary);
}

.ap-home-tier-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 12px;
    height: 1px;
    background: var(--ap-accent);
}

.ap-home-tier-chips {
    display: flex;
    gap: var(--ap-sp-8);
    overflow-x: auto;
    overflow-y: hidden;
    margin: var(--ap-sp-16) 0 var(--ap-sp-8);
    padding-bottom: var(--ap-sp-12);
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--ap-line-strong) transparent;
    -webkit-overflow-scrolling: touch;
}

.ap-home-tier-chips::-webkit-scrollbar { height: 6px; }
.ap-home-tier-chips::-webkit-scrollbar-track { background: transparent; }
.ap-home-tier-chips::-webkit-scrollbar-thumb {
    background: var(--ap-line-strong);
    border-radius: 3px;
}

.ap-home-tier-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 var(--ap-sp-16);
    border-radius: var(--ap-r-pill);
    border: 1px solid var(--ap-line-strong);
    background: var(--ap-surface-elevated);
    color: var(--ap-ink-secondary);
    font-family: var(--ap-font-mono);
    font-size: var(--ap-fs-12);
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: border-color var(--ap-dur-fast) var(--ap-ease-out),
                background var(--ap-dur-fast) var(--ap-ease-out),
                color var(--ap-dur-fast) var(--ap-ease-out);
}

.ap-home-tier-chip:hover {
    border-color: var(--ap-accent);
    background: var(--ap-accent-quiet);
    color: var(--ap-ink);
}

@media (max-width: 900px) {
    .ap-home-tier-list li { font-size: var(--ap-fs-15); }
    .ap-home-tier-chips { margin-left: calc(-1 * var(--ap-sp-24)); padding-left: var(--ap-sp-24); }
}

/* ─── 12F: FAQ frame (kill left-edge bleed) ───────────────────────────────── */

body.ap-page .ap-home-faq .ap-home-faq-list {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 var(--ap-sp-32);
    border-top: 1px solid var(--ap-line);
}

body.ap-page .ap-home-faq .ap-home-faq-list .ab-faq-item {
    padding: 0;
}

body.ap-page .ap-home-faq .ap-home-faq-list .ab-faq-question {
    padding-left: 0;
    padding-right: 0;
}

body.ap-page .ap-home-faq-head {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--ap-sp-32);
    text-align: left;
}

@media (max-width: 768px) {
    body.ap-page .ap-home-faq .ap-home-faq-list,
    body.ap-page .ap-home-faq-head {
        padding: 0 var(--ap-sp-24);
    }
}

/* ─── 12A3: Global custom scrollbar ─────────────────────────────────────────
   Sleek themed scrollbar applied site-wide. Light mode uses translucent dark,
   dark mode uses translucent light. Covers the page, sticky TOCs, code blocks,
   and any other overflow container. */

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
}

html[data-theme="dark"] {
    scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.22);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background-color 160ms ease;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: rgba(15, 23, 42, 0.42);
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

html[data-theme="dark"] *::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.18);
    background-clip: padding-box;
}

html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.36);
    background-clip: padding-box;
}

/* Slimmer variant inside sticky TOCs and code blocks so they stay subtle */
.ap-legal-toc::-webkit-scrollbar,
.ab-method-pre::-webkit-scrollbar,
pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
