/* ============================================
   BCP Design System — The Architect
   Brand Archetype: precision, structure, intelligence
   ============================================ */

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core palette — deep navy foundations */
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1424;
    --bg-tertiary: #151b2e;
    --bg-card: #131928;
    --bg-card-hover: #1a2138;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f8f9fb;
    --bg-surface-tertiary: #eef1f6;

    /* Accent — deep teal (architectural precision) */
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --accent-light: rgba(13, 148, 136, 0.10);
    --accent-glow: rgba(13, 148, 136, 0.25);

    /* Secondary accent — indigo (depth & intelligence) */
    --accent-secondary: #6366f1;
    --accent-secondary-light: rgba(99, 102, 241, 0.10);
    --accent-secondary-glow: rgba(99, 102, 241, 0.20);

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #f1f5f9;
    --text-inverse-secondary: rgba(241, 245, 249, 0.65);

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: rgba(255, 255, 255, 0.08);

    /* Semantic */
    --success: #0d9488;
    --success-bg: #f0fdfa;
    --success-border: #99f6e4;
    --error: #e11d48;
    --error-bg: #fff1f2;
    --error-border: #fecdd3;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --info: #6366f1;
    --info-bg: #eef2ff;

    /* Code */
    --code-bg: #0b1120;
    --code-border: #1e293b;
    --code-text: #cbd5e1;

    /* Typography */
    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadows — layered depth */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);

    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 840px;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-surface);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.logo-text {
    white-space: nowrap;
}

.logo-text--abbr {
    display: none;
}

.logo-byline {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
    align-items: center;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-surface-secondary);
}

.nav-links .nav-cta {
    margin-left: var(--space-sm);
    padding: 0.4rem 1rem;
    background: var(--text-primary);
    color: var(--text-inverse) !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.nav-links .nav-cta:hover {
    background: var(--bg-tertiary);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 4px 0;
    transition: all 0.2s;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn:disabled,
.btn[disabled],
button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(30%);
}

.btn--primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow), 0 0 40px rgba(13, 148, 136, 0.08);
    transform: translateY(-1px);
}

.btn--loading {
    opacity: 0.7;
    cursor: wait;
    animation: btn-pulse 1.2s ease-in-out infinite;
}

@keyframes btn-pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.4;
    }
}

.btn--secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn--secondary:hover {
    background: var(--bg-surface-secondary);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn--ghost:hover {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

.btn--dark {
    background: var(--text-primary);
    color: var(--text-inverse);
    border-color: var(--text-primary);
}

.btn--dark:hover {
    background: var(--bg-tertiary);
    color: var(--text-inverse);
}

.btn--large {
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
}

.btn--small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn--icon {
    padding: 0.5rem;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    background: var(--bg-primary);
    color: var(--text-inverse);
    padding: var(--space-4xl) 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 30% -10%, rgba(13, 148, 136, 0.18), transparent),
        radial-gradient(ellipse 60% 50% at 70% 20%, rgba(99, 102, 241, 0.12), transparent),
        radial-gradient(ellipse 80% 60% at 50% 110%, rgba(13, 148, 136, 0.08), transparent);
    pointer-events: none;
}

/* Subtle grid pattern on hero */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black, transparent);
}

.hero .container {
    position: relative;
    text-align: center;
    max-width: 860px;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.35rem 1rem;
    margin-bottom: var(--space-xl);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-dark);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.4rem 1.1rem;
    margin-bottom: var(--space-xl);
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(13, 148, 136, 0.9);
    letter-spacing: 0.02em;
}

.hero h1,
.hero__headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: var(--space-lg);
}

.hero h1 .text-accent,
.hero__headline .text-accent {
    color: #2dd4bf;
}

.hero__subtitle,
.hero__tagline {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-inverse-secondary);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto var(--space-2xl);
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn--primary {
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(13, 148, 136, 0.1);
}

.hero .btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-inverse);
    border-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero .btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-inverse);
    border-color: rgba(255, 255, 255, 0.25);
}

.hero__proof {
    margin-top: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero__proof-item {
    font-size: 0.82rem;
    color: var(--text-inverse-secondary);
    font-weight: 500;
}

.hero__proof-sep {
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Section Shared
   ============================================ */
section {
    padding: var(--space-4xl) 0;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: var(--space-md);
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.section-header {
    margin-bottom: var(--space-3xl);
}

.section-header--center {
    text-align: center;
}

.section-header--center .section-description {
    margin-left: auto;
    margin-right: auto;
}

.section--alt {
    background: var(--bg-surface-secondary);
}

/* ============================================
   Feature Cards
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-light), 0 0 40px rgba(13, 148, 136, 0.06);
    transform: translateY(-3px);
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 1.2rem;
    font-weight: 700;
}

.card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.card__text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card--link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card--link:hover {
    color: inherit;
}

/* ============================================
   Code Blocks
   ============================================ */
pre {
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    margin: var(--space-lg) 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

:not(pre)>code {
    background: var(--bg-surface-tertiary);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* ============================================
   Code Preview (Home)
   ============================================ */
.code-preview {
    background: var(--bg-surface-secondary);
}

.code-preview .container {
    max-width: 900px;
}

.code-window {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-window__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--code-border);
}

.code-window__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.code-window__dot:nth-child(1) {
    background: #ff5f57;
}

.code-window__dot:nth-child(2) {
    background: #ffbd2e;
}

.code-window__dot:nth-child(3) {
    background: #28c940;
}

.code-window__title {
    margin-left: var(--space-md);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-mono);
}

.code-window pre {
    margin: 0;
    border: none;
    border-radius: 0;
}

/* ============================================
   Use Cases (Home Preview)
   ============================================ */
.use-case-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.use-case-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.use-case-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.use-case-item__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
}

.use-case-item__content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.use-case-item__content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   Page Header (sub-pages)
   ============================================ */
.page-header {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: var(--space-lg) 0 var(--space-md);
    border-bottom: 1px solid var(--border);
}

.page-header::before,
.page-header::after {
    display: none;
}

.page-header .container {
    position: relative;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.15rem;
}

.page-header p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* ============================================
   Shared State Patterns — Loading, Error, Empty
   ============================================ */

/* Skeleton loader — apply to any element */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface-secondary) 25%, var(--bg-surface-tertiary) 50%, var(--bg-surface-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    color: transparent !important;
}

.skeleton * {
    visibility: hidden;
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-line {
    height: 0.9em;
    margin-bottom: 0.6em;
    border-radius: var(--radius-xs);
}

.skeleton-line--short {
    width: 40%;
}

.skeleton-line--medium {
    width: 65%;
}

.skeleton-line--long {
    width: 90%;
}

/* Inline spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner--sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.spinner--lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading overlay — place inside a relative parent */
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: inherit;
    z-index: 50;
}

/* Error banner — drop inside any panel */
.error-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--error-bg, #fef2f2);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: var(--error, #ef4444);
    font-size: 0.88rem;
    line-height: 1.5;
}

.error-banner__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.error-banner__message {
    flex: 1;
}

.error-banner__retry {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--error, #ef4444);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--font-sans);
}

/* Shared empty state — reusable across pages */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.empty-state__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-lg);
    background: var(--bg-surface-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.empty-state__title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.empty-state__desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 420px;
    margin: 0 auto var(--space-lg);
    line-height: 1.6;
}

.empty-state__actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Brand Workspace Shell — Unified Header
   ============================================ */

/* Shared header */
.ws-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--nav-height);
    z-index: 900;
}

/* Compact mode: breadcrumb + title + description + tabs */
.ws-header--compact .container {
    padding-top: var(--space-md);
}

/* Collapsed state — on scroll, hide everything except tabs */
.ws-header.is-collapsed .ws-header__eyebrow,
.ws-header.is-collapsed .ws-header__title-row,
.ws-header.is-collapsed .ws-header__desc {
    display: none;
}

.ws-header.is-collapsed .container {
    padding-top: 0;
}

.ws-header.is-collapsed .ws-tabs {
    margin-top: 0;
}

/* Also collapse editor bar to just tabs */
.ws-header--editor.is-collapsed .ws-header__bar {
    display: none;
}

.ws-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

.ws-header__eyebrow a {
    color: var(--text-tertiary);
    text-decoration: none;
}

.ws-header__eyebrow a:hover {
    color: var(--text-secondary);
}

.ws-header__title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: 0.15rem;
}

.ws-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.ws-header__desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 640px;
    margin-top: 0.15rem;
}

.ws-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    flex-shrink: 0;
}

/* Chips */
.ws-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.ws-chip--accent {
    background: var(--accent-light);
    color: var(--accent);
    border-color: rgba(13, 148, 136, 0.14);
}

/* Inline tabs — always inside the header */
.ws-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: var(--space-xs) 0;
    margin-top: var(--space-xs);
}

.ws-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}

.ws-tab:hover {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

.ws-tab.is-active {
    color: var(--accent);
    background: var(--accent-light);
}

/* Editor mode: ultra-compact single bar */
.ws-header--editor .container {
    padding-top: var(--space-xs);
    padding-bottom: 0;
}

.ws-header__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.ws-header--editor .ws-header__eyebrow {
    margin-bottom: 0;
}

.ws-header--editor .ws-tabs {
    margin-top: 2px;
    padding: 2px 0 var(--space-xs);
}

.ws-header--editor .ws-tab {
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
}

/* Keep old class names working for summary section */
.brand-workspace-chip {
    /* deprecated — use ws-chip */
}

/* Responsive */
@media (max-width: 768px) {
    .ws-header__title-row {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .ws-header__bar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .ws-header h1 {
        font-size: 1.35rem;
    }

    .ws-tabs {
        gap: 0;
    }

    .ws-tab {
        font-size: 0.76rem;
        padding: 0.35rem 0.55rem;
    }
}

.brand-workspace-summary {
    background: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border-light);
}

.brand-workspace-summary__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg) 0;
}

.brand-workspace-summary__card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.brand-workspace-summary__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 0.35rem;
}

.brand-workspace-summary__value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.brand-workspace-summary__meta {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.brand-workspace-body--compact {
    padding: var(--space-lg) 0 var(--space-3xl);
}

.brand-workspace-body--editor {
    padding: 0;
}

.brand-bcp-section {
    padding: 0;
}

.brand-bcp-section>.container {
    max-width: 100%;
    padding: 0 var(--space-lg);
}

/* Workspace Shell — Responsive */
@media (max-width: 768px) {

    .brand-workspace-hero--compact,
    .brand-workspace-hero--editor {
        padding: var(--space-md) 0 var(--space-xs);
    }

    .brand-workspace-hero__content {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .brand-workspace-hero__meta {
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }

    .brand-workspace-hero--compact h1,
    .brand-workspace-hero--editor h1 {
        font-size: 1.5rem;
    }

    .brand-workspace-tabs__nav {
        gap: 0;
    }

    .brand-workspace-tab {
        font-size: 0.78rem;
        padding: 0.5rem 0.65rem;
    }

    .brand-workspace-summary__grid {
        grid-template-columns: 1fr 1fr;
    }

    .brand-workspace-body--compact {
        padding: var(--space-md) 0 var(--space-2xl);
    }
}

@media (max-width: 480px) {
    .brand-workspace-summary__grid {
        grid-template-columns: 1fr;
    }

    .brand-workspace-chip {
        font-size: 0.68rem;
        padding: 0.22rem 0.55rem;
    }
}

/* ============================================
   Brand Overview
   ============================================ */
.brand-overview-section {
    padding: 0 0 var(--space-3xl);
    background: var(--bg-surface-secondary);
}

.brand-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.brand-overview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.brand-overview-card--accent {
    background:
        linear-gradient(180deg, rgba(13, 148, 136, 0.08), rgba(255, 255, 255, 0)),
        var(--bg-surface);
    border-color: rgba(13, 148, 136, 0.18);
}

.brand-overview-card__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.brand-overview-card__value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

.brand-overview-card__subvalue {
    display: inline-block;
    margin-left: var(--space-sm);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.brand-overview-card__hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 3.2rem;
}

.brand-overview-card__link {
    display: inline-flex;
    margin-top: var(--space-md);
    font-size: 0.9rem;
    font-weight: 600;
}

.brand-overview-card__link--muted {
    color: var(--text-tertiary);
}

.brand-overview-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.brand-overview-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.brand-overview-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    background: rgba(248, 250, 252, 0.8);
}

.brand-overview-panel__header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.brand-overview-panel__header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.brand-overview-panel__link {
    font-size: 0.88rem;
    font-weight: 600;
}

.brand-overview-list {
    display: flex;
    flex-direction: column;
}

.brand-overview-list__item {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.brand-overview-list__item:last-child {
    border-bottom: none;
}

.brand-overview-list__label {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brand-overview-list__value {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: right;
}

.brand-overview-actions {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.brand-overview-action {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface-secondary);
    color: inherit;
}

.brand-overview-action:hover {
    border-color: rgba(13, 148, 136, 0.24);
    box-shadow: var(--shadow-sm);
    color: inherit;
}

.brand-overview-action strong {
    font-size: 0.95rem;
}

.brand-overview-action span {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.brand-overview-table-wrap {
    overflow-x: auto;
}

.brand-overview-table {
    width: 100%;
    border-collapse: collapse;
}

.brand-overview-table th,
.brand-overview-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    font-size: 0.88rem;
}

.brand-overview-table th {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.brand-overview-table tbody tr:hover td {
    background: var(--bg-surface-secondary);
}

.brand-overview-decision {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.brand-overview-decision--pass,
.brand-overview-decision--allow {
    background: var(--success-bg);
    color: #065f46;
}

.brand-overview-decision--warn {
    background: #fef3c7;
    color: #92400e;
}

.brand-overview-decision--block,
.brand-overview-decision--fail {
    background: #fee2e2;
    color: #991b1b;
}

.brand-overview-decision--unknown {
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
}

.brand-overview-empty {
    padding: var(--space-xl) var(--space-lg);
    color: var(--text-secondary);
}

/* ============================================
   Documentation
   ============================================ */
.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-3xl);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
    min-height: calc(100vh - var(--nav-height));
}

.docs-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-xl));
    height: fit-content;
    max-height: calc(100vh - var(--nav-height) - var(--space-2xl));
    overflow-y: auto;
}

.docs-sidebar__group {
    margin-bottom: var(--space-xl);
}

.docs-sidebar__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 0 0 var(--space-sm);
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar li {
    margin-bottom: 1px;
}

.docs-sidebar a {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.1s ease;
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
    color: var(--text-primary);
    background: var(--bg-surface-secondary);
}

.docs-content {
    max-width: 720px;
    min-width: 0;
}

.docs-content h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-md);
    padding-top: var(--space-xl);
}

.docs-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.docs-content p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: 1.8;
}

.docs-content ul,
.docs-content ol {
    margin: var(--space-sm) 0 var(--space-lg) var(--space-xl);
    color: var(--text-secondary);
}

.docs-content li {
    margin-bottom: var(--space-xs);
    line-height: 1.7;
}

.docs-content li strong {
    color: var(--text-primary);
}

/* Docs Table */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    font-size: 0.9rem;
}

.docs-table th,
.docs-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-table th {
    background: var(--bg-surface-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.docs-table td code {
    font-size: 0.8rem;
}

.docs-table tr:hover td {
    background: var(--bg-surface-secondary);
}

/* Callout */
.callout {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.callout--info {
    background: var(--info-bg);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.callout--warning {
    background: var(--warning-bg);
    border: 1px solid #fde68a;
    color: #92400e;
}

.callout__icon {
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* ============================================
   Example Cards
   ============================================ */
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.example-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.example-card__header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
}

.example-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.example-card__name {
    font-size: 1.1rem;
    font-weight: 700;
}

.example-card__desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: var(--space-md) var(--space-xl);
}

.example-card__companions {
    padding: 0 var(--space-xl) var(--space-md);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.example-card__companions-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: var(--space-xs);
}

.example-card__footer {
    margin-top: auto;
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-surface-secondary);
    display: flex;
    gap: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 100px;
    white-space: nowrap;
}

.badge--green {
    background: #ecfdf5;
    color: #065f46;
}

.badge--blue {
    background: #eff6ff;
    color: #1e40af;
}

.badge--purple {
    background: #f5f3ff;
    color: #5b21b6;
}

.badge--orange {
    background: #fff7ed;
    color: #9a3412;
}

.badge--teal {
    background: #f0fdfa;
    color: #115e59;
}

.badge--pink {
    background: #fdf2f8;
    color: #9d174d;
}

.badge--outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.badge--outline:hover {
    background: var(--accent);
    color: #fff;
}

/* ============================================
   Getting Started Steps
   ============================================ */
.steps {
    counter-reset: step;
}

.step-item {
    position: relative;
    padding-left: 4rem;
    padding-bottom: var(--space-3xl);
    border-left: 2px solid var(--border);
    margin-left: 1.25rem;
}

.step-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.step-item::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -1.35rem;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    border: 3px solid var(--bg-surface);
}

.step-item__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.step-item__content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.step-item__content ul {
    margin: var(--space-sm) 0 var(--space-md) var(--space-xl);
    color: var(--text-secondary);
}

.step-item__content li {
    margin-bottom: var(--space-xs);
}

/* ============================================
   Use Cases (Detail)
   ============================================ */
.use-case-section {
    padding: var(--space-4xl) 0;
}

.use-case-section:nth-child(even) {
    background: var(--bg-surface-secondary);
}

.use-case-section__grid {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: var(--space-3xl);
    align-items: start;
}

.use-case-section__problem h3,
.use-case-section__solution h3 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
}

.use-case-section__problem h3 {
    color: var(--error);
}

.use-case-section__solution h3 {
    color: var(--accent);
}

.use-case-section__problem p,
.use-case-section__solution p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

/* ============================================
   Validator
   ============================================ */
.validator-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
}

.validator-layout h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}

.validator-layout>p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.editor-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--space-xl);
}

.editor-grid>* {
    min-width: 0;
    overflow: hidden;
}

.editor-pane__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.editor-pane__label h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.code-editor-wrap {
    display: flex;
    position: relative;
    height: 480px;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.code-editor-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.line-numbers {
    flex-shrink: 0;
    width: 44px;
    padding: var(--space-lg) 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: right;
    color: rgba(201, 209, 217, 0.35);
    background: rgba(0, 0, 0, 0.15);
    border-right: 1px solid var(--code-border);
    user-select: none;
    overflow: hidden;
}

.line-numbers span {
    display: block;
    padding-right: 10px;
}

.line-numbers span.line-numbers--highlight {
    color: #f87171;
    font-weight: 700;
    background: rgba(248, 113, 113, 0.1);
}

.code-editor-wrap textarea {
    flex: 1;
    height: 100%;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    padding: var(--space-lg);
    background: transparent;
    color: var(--code-text);
    border: none;
    resize: none;
    outline: none;
    overflow-y: auto;
    white-space: pre;
    overflow-x: auto;
}

.code-editor-wrap textarea::placeholder {
    color: rgba(201, 209, 217, 0.4);
}

/* Keep existing standalone textarea styles for non-gutter contexts */
.editor-pane textarea:not(.code-editor-wrap textarea) {
    width: 100%;
    min-height: 480px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    padding: var(--space-lg);
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-md);
    resize: vertical;
    outline: none;
    transition: border-color 0.15s ease;
}

.editor-pane textarea:not(.code-editor-wrap textarea):focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.editor-pane textarea:not(.code-editor-wrap textarea)::placeholder {
    color: rgba(201, 209, 217, 0.4);
}

.editor-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.result-panel {
    min-height: 200px;
}

.result {
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
}

.result--success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

.result--error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
}

.result__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.result__header--valid {
    color: #065f46;
}

.result__header--invalid {
    color: #991b1b;
}

.result__score {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
}

.result__score--high {
    color: #065f46;
}

.result__score--medium {
    color: #92400e;
}

.result__score--low {
    color: #991b1b;
}

.result h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.result ul {
    list-style: none;
    margin: 0;
}

.result li {
    padding: var(--space-sm) 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    line-height: 1.5;
}

.result li:last-child {
    border-bottom: none;
}

.result li strong {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
}

.result__line {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: #7c3aed;
    background: #ede9fe;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-right: 0.3rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.result__line:hover {
    background: #7c3aed;
    color: #fff;
}

.result__error-msg {
    font-size: 0.9rem;
    color: #991b1b;
    line-height: 1.5;
    margin-bottom: var(--space-sm);
}

.result__context {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    background: #1a1d2b;
    color: #e2e8f0;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
    overflow-x: auto;
    white-space: pre;
}

.result__error-item {
    padding-bottom: var(--space-md) !important;
}

.result-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: var(--space-2xl);
    background: var(--bg-surface-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.result-placeholder p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: var(--bg-primary);
    color: var(--text-inverse);
    padding: var(--space-4xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 30% 100%, var(--accent-glow), transparent),
        radial-gradient(ellipse 40% 50% at 70% 100%, var(--accent-secondary-glow), transparent);
    pointer-events: none;
}

.cta-section .container {
    position: relative;
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-md);
}

.cta-section p {
    color: var(--text-inverse-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--space-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--bg-surface-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-2xl) 0;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-footer__copy {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.site-footer__attribution {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.site-footer__links {
    display: flex;
    gap: var(--space-lg);
}

.site-footer__links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.site-footer__links a:hover {
    color: var(--text-primary);
}

/* ============================================
   Empty state
   ============================================ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-4xl);
    color: var(--text-tertiary);
}

/* ============================================
   Navbar Auth
   ============================================ */
.nav-user-menu {
    position: relative;
}

.nav-user-trigger {
    border: 1px solid transparent;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font-sans);
}

.nav-user-trigger:hover,
.nav-user-menu.open .nav-user-trigger {
    background: var(--bg-surface-secondary);
    border-color: var(--border);
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-surface-tertiary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-user-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-chevron {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    line-height: 1;
}

.nav-waitlist-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.nav-user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    min-width: 190px;
    padding: 0.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: white;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1100;
}

.nav-user-menu.open .nav-user-dropdown {
    display: block;
}

.nav-user-dropdown a,
.nav-user-dropdown .nav-logout-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: var(--font-sans);
}

.nav-user-dropdown a:hover,
.nav-user-dropdown .nav-logout-btn:hover {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

.nav-logout-btn {
    margin: 0;
}

.nav-logout-form {
    margin: 0;
}

/* ============================================
   Generator (Homepage)
   ============================================ */
.generator-form {
    max-width: 600px;
    margin: var(--space-xl) auto 0;
}

.generator-input-group {
    display: flex;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.generator-input {
    flex: 1;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    outline: none;
    transition: border-color 0.15s;
}

.generator-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.generator-input:focus {
    border-color: var(--accent);
}

.generator-btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    white-space: nowrap;
    min-width: 150px;
}

.generator-hint {
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
    margin-top: var(--space-sm);
    text-align: center;
}

.generator-error {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 0.9rem;
    text-align: center;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading section */
.loading-section {
    padding: var(--space-2xl) 0;
}

.loading-animation {
    width: 200px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto var(--space-md);
    overflow: hidden;
}

.loading-bar {
    width: 40%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    animation: loading-slide 1.5s ease-in-out infinite;
}

@keyframes loading-slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(350%);
    }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Preview section */
.preview-section {
    padding: var(--space-3xl) 0;
}

.preview-section .container {
    max-width: 900px;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.preview-score {
    text-align: center;
}

.preview-score__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.preview-score__value {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.preview-score__value.score--high {
    color: #065f46;
}

.preview-score__value.score--medium {
    color: #92400e;
}

.preview-score__value.score--low {
    color: #991b1b;
}

.preview-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    justify-content: center;
}

/* ============================================
   Dashboard
   ============================================ */
.dashboard-actions {
    margin-bottom: var(--space-xl);
}

.dashboard-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.dashboard-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.dashboard-card__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.dashboard-card__left {
    padding: var(--space-lg) var(--space-xl);
}

.dashboard-card__top {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.dashboard-card__name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

.dashboard-card__id {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.dashboard-card__meta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dashboard-card__right {
    border-left: 1px solid var(--border-light);
    background: var(--bg-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
}

.dashboard-card__footer {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 420px;
}

.updates-panel {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border-light);
    background: #fcfdfd;
}

.updates-panel__section+.updates-panel__section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px dashed var(--border);
}

.updates-panel__section h4 {
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.updates-panel__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.updates-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.updates-form-grid label,
.updates-actions-row label,
.updates-block {
    display: block;
}

.updates-form-grid span,
.updates-actions-row span,
.updates-block span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.updates-form-grid select,
.updates-form-grid input,
.updates-actions-row input,
.updates-block textarea,
.rollback-row input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    background: #fff;
}

.updates-actions-row {
    display: flex;
    align-items: end;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.updates-message {
    font-size: 0.8rem;
}

.updates-message--error {
    color: #b91c1c;
}

.updates-message--success {
    color: #065f46;
}

.updates-message--info {
    color: var(--text-secondary);
}

.source-item,
.version-item,
.draft-change-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.7rem;
    background: #fff;
}

.source-item {
    display: flex;
    gap: var(--space-sm);
    align-items: start;
    margin-bottom: var(--space-xs);
}

.version-item,
.draft-change-item {
    margin-bottom: var(--space-xs);
}

.draft-change-item--reviewed {
    opacity: 0.65;
    border-color: var(--border-light, #e0e0e0);
}

/* Full-value diff layout */
.change-values-full {
    display: flex;
    gap: var(--space-sm);
    align-items: stretch;
    margin: var(--space-sm) 0;
}

.change-value-block {
    flex: 1;
    min-width: 0;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.change-value-block--current {
    background: var(--bg-subtle, #f5f5f5);
    border: 1px solid var(--border-light, #e0e0e0);
}

.change-value-block--proposed {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.change-value-block__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.change-value-block__content {
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.5;
}

.change-value-block__arrow {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    padding: 0 2px;
}

.change-rationale {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: var(--space-xs) 0;
    padding-left: var(--space-sm);
    border-left: 2px solid var(--border);
}

/* Badge color variants */
.badge--green {
    background: #dcfce7;
    color: #166534;
}

.badge--red {
    background: #fef2f2;
    color: #991b1b;
}

.badge--blue {
    background: #dbeafe;
    color: #1e40af;
}

.badge--gray {
    background: #f3f4f6;
    color: #6b7280;
}

.draft-status {
    margin: var(--space-sm) 0;
}

.muted {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.rollback-row {
    margin-top: var(--space-sm);
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: var(--space-sm);
}

.updates-workspace__topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.updates-brand-meta {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    flex-wrap: wrap;
}

.updates-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.summary-pill {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.8rem;
}

.summary-pill__label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-pill__value {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.updates-flow {
    display: grid;
    gap: var(--space-md);
}

.workflow-step {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.workflow-step__header {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.workflow-step__header h3 {
    font-size: 1.05rem;
}

.step-status {
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: #475569;
    white-space: nowrap;
}

.workflow-step[data-state='completed'] .step-status {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.workflow-step[data-state='in_progress'] .step-status {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.workflow-step[data-state='blocked'] .step-status {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

.draft-progress {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.rollback-panel {
    margin-top: var(--space-sm);
    border-top: 1px dashed var(--border);
    padding-top: var(--space-sm);
}

.rollback-panel summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 200px 1fr;
        gap: var(--space-xl);
    }

    .use-case-section__grid {
        grid-template-columns: 1fr;
    }

    .card-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-card__content {
        grid-template-columns: 1fr;
    }

    .dashboard-card__right {
        border-left: none;
        border-top: 1px solid var(--border-light);
        justify-content: flex-start;
    }

    .dashboard-card__footer {
        justify-content: flex-start;
        max-width: none;
    }

    .dashboard-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .updates-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .workspace-panels {
        grid-template-columns: 1fr;
    }

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

    .brand-overview-columns {
        grid-template-columns: 1fr;
    }

    .brand-workspace-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --space-4xl: 3.5rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-text--full {
        display: none;
    }

    .logo-text--abbr {
        display: inline;
    }

    .logo-byline {
        display: none;
    }

    .navbar .container {
        position: relative;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: var(--space-md);
        box-shadow: var(--shadow-lg);
        gap: var(--space-xs);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links .nav-cta {
        margin-left: 0;
        text-align: center;
    }

    .nav-user-menu {
        width: 100%;
    }

    .nav-user-trigger {
        width: 100%;
        justify-content: space-between;
        border-radius: var(--radius-sm);
    }

    .nav-user-dropdown {
        position: static;
        width: 100%;
        margin-top: var(--space-xs);
        box-shadow: none;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .brand-workspace-hero__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-workspace-hero__meta {
        justify-content: flex-start;
    }

    .brand-workspace-summary__grid {
        grid-template-columns: 1fr;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .editor-grid {
        grid-template-columns: 1fr;
    }

    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: var(--space-xl);
        margin-bottom: var(--space-xl);
    }

    .example-grid {
        grid-template-columns: 1fr;
    }

    .card-grid--3 {
        grid-template-columns: 1fr;
    }

    .step-item {
        padding-left: 3rem;
    }

    .site-footer .container {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .dashboard-card__footer {
        flex-wrap: wrap;
    }

    .updates-workspace__topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .updates-summary-grid {
        grid-template-columns: 1fr;
    }

    .workflow-step__header {
        flex-direction: column;
    }

    .brand-overview-grid {
        grid-template-columns: 1fr;
    }

    .brand-overview-list__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-overview-list__value {
        text-align: left;
    }
}

/* ============================================
   Developers Page & New Utilities
   ============================================ */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.gap-lg {
    gap: var(--space-lg);
}

.mb-8 {
    margin-bottom: var(--space-2xl);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

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

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-surface-secondary);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

.feature-card__content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.feature-card__content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.app-card {
    display: block;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.app-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    color: inherit;
}

.app-card__image-placeholder {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.app-card__content {
    padding: var(--space-xl);
}

.app-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.app-card__title {
    font-size: 1.25rem;
    font-weight: 700;
}

.app-card__desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

.badge--warning {
    background: #fffbeb;
    color: #b45309;
}

.text-large {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.mt-4 {
    margin-top: var(--space-lg);
}

@media (max-width: 768px) {

    .grid--2,
    .grid--3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Workspace Panels (Updates Redesign)
   ============================================ */
.workspace-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.workspace-panels--full {
    grid-template-columns: 1fr;
}

.workspace-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.workspace-panel--span {
    grid-column: 1 / -1;
}

.workspace-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface-secondary);
}

.workspace-panel__header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.workspace-panel__body {
    padding: var(--space-lg);
}

/* Signal Type Grid */
.signal-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.signal-type-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.signal-type-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.signal-type-card.active {
    border-color: var(--accent);
    background: var(--accent-light);
}

.signal-type-card__name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.signal-type-card__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--bg-surface-tertiary);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.signal-type-card__count--has-data {
    background: var(--accent-light);
    color: var(--accent);
}

.signal-type-card__actions {
    margin-top: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Sample download link */
.sample-download-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.sample-download-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================
   Companion Contexts
   ============================================ */
.companion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.companion-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all 0.2s ease;
}

.companion-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.companion-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.companion-card__icon {
    width: 40px;
    height: 40px;
    background: var(--bg-surface-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.companion-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.companion-card__actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

/* ============================================
   Modal Dialog
   ============================================ */
dialog.modal {
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 720px;
    width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

dialog.modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal__content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
}

.modal__header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.modal__body {
    padding: var(--space-lg) var(--space-xl);
    overflow-y: auto;
    flex: 1;
}

.modal__body .code-editor-wrap {
    height: 340px;
}

.modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid var(--border);
    background: var(--bg-surface-secondary);
}

/* Step Number Badge */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: var(--space-xs);
    flex-shrink: 0;
}

/* Locked Panel State */
.workspace-panel--locked {
    opacity: 0.55;
    pointer-events: none;
    position: relative;
}

.workspace-panel--locked .workspace-panel__header {
    pointer-events: auto;
}

.panel-locked-message {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.88rem;
    justify-content: center;
}

.panel-locked-message[hidden] {
    display: none;
}

.panel-locked-message svg {
    flex-shrink: 0;
    color: var(--text-tertiary);
}

/* Signal inline upload form */
.signal-upload-form {
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-md);
    margin-top: var(--space-md);
}

.signal-upload-form .field-hints {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.signal-upload-form .field-hints strong {
    color: var(--text-secondary);
}

/* Finding Cards */
.finding-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    border-left: 4px solid var(--border);
}

.finding-card--low {
    border-left-color: var(--info);
}

.finding-card--medium {
    border-left-color: var(--warning);
}

.finding-card--high {
    border-left-color: #f97316;
}

.finding-card--critical {
    border-left-color: var(--error);
}

.finding-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.finding-card__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
}

.finding-card__tags {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.finding-card__evidence {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--border-light);
}

.finding-card__evidence ul {
    list-style: none;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.finding-card__evidence li {
    padding: 2px 0;
}

.finding-card__evidence li::before {
    content: "\2022 ";
    color: var(--text-tertiary);
}

/* Proposed Change Card */
.proposed-change-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: #fff;
}

.proposed-change-card__field {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.proposed-change-card__values {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
}

.proposed-change-card__current {
    color: var(--text-tertiary);
    text-decoration: line-through;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proposed-change-card__arrow {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.proposed-change-card__suggested {
    color: var(--accent);
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proposed-change-card__rationale {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Confidence Bar */
.confidence-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.confidence-bar__track {
    flex: 1;
    height: 4px;
    background: var(--bg-surface-tertiary);
    border-radius: 2px;
    overflow: hidden;
    max-width: 100px;
}

.confidence-bar__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.confidence-bar__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Change Group (Draft Review) */
.change-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.change-group__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border-light);
}

.change-group__header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    flex: 1;
}

.change-group__body {
    padding: var(--space-md) var(--space-lg);
}

/* Data Preview Table */
.data-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: var(--space-sm);
}

.data-preview-table th,
.data-preview-table td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-preview-table th {
    background: var(--bg-surface-secondary);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.data-preview-table tr:hover td {
    background: var(--bg-surface-secondary);
}

/* Analysis Spinner */
.analysis-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-2xl);
    gap: var(--space-md);
}

.analysis-spinner[hidden] {
    display: none;
}

.analysis-spinner .spinner {
    width: 28px;
    height: 28px;
    border-color: var(--border);
    border-top-color: var(--accent);
}

.analysis-spinner__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Analysis Meta Row */
.analysis-meta-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.analysis-meta-row .badge {
    font-size: 0.75rem;
}

/* Analysis Themes */
.analysis-themes {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.analysis-themes .theme-pill {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--bg-surface-tertiary);
    border-radius: 100px;
    color: var(--text-secondary);
}

/* Per-source summaries collapsible */
.per-source-summaries {
    margin-bottom: var(--space-md);
}

.per-source-summaries summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.per-source-summary-item {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.per-source-summary-item:last-child {
    border-bottom: none;
}

/* Source selection checkboxes in panel B */
.source-select-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.source-select-row:last-child {
    border-bottom: none;
}

/* Severity badge variants */
.badge--severity-low {
    background: var(--info-bg);
    color: #1e40af;
}

.badge--severity-medium {
    background: var(--warning-bg);
    color: #92400e;
}

.badge--severity-high {
    background: #fff7ed;
    color: #c2410c;
}

.badge--severity-critical {
    background: var(--error-bg);
    color: #991b1b;
}

/* Sentiment badge */
.badge--positive {
    background: #ecfdf5;
    color: #065f46;
}

.badge--mixed {
    background: #fffbeb;
    color: #92400e;
}

.badge--negative {
    background: #fef2f2;
    color: #991b1b;
}

/* ============================================
   Suggested Tag Input Dropdown
   ============================================ */
.tag-input--with-suggestions {
    position: relative;
}

.tag-input__input-wrap {
    position: relative;
    flex: 1;
}

.tag-input__suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.tag-input__suggestion-item {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.1s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-input__suggestion-item:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* ============================================
   Checkbox Select (multi-select dropdown)
   ============================================ */
.checkbox-select {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.checkbox-select__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.checkbox-select__trigger {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.checkbox-select__trigger:hover {
    background: var(--accent);
    color: #fff;
}

.checkbox-select__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    margin-top: 0.3rem;
    min-width: 220px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 0.35rem 0;
}

.checkbox-select__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.1s ease;
}

.checkbox-select__option:hover {
    background: var(--accent-light);
}

.checkbox-select__option input[type="checkbox"] {
    accent-color: var(--accent);
}

@media (max-width: 768px) {
    .signal-type-grid {
        grid-template-columns: 1fr;
    }

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

/* ============================================
   Profile — API Key Management
   ============================================ */

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profile-section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.profile-section-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.5;
}

/* New key form */
.api-key-form {
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.api-key-form__inner {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.api-key-input {
    flex: 1;
    min-width: 200px;
    height: 38px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.875rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

.api-key-input:focus {
    border-color: var(--accent);
}

.api-key-form__hint {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* One-time reveal banner */
.api-key-reveal {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-md, 8px);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.api-key-reveal__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 0.6rem;
}

.api-key-reveal__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.api-key-reveal__value {
    flex: 1;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85rem;
    background: #fff;
    border: 1px solid var(--success-border);
    border-radius: 4px;
    padding: 0.4rem 0.75rem;
    word-break: break-all;
    color: var(--text-primary);
}

/* Key table */
.api-key-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.api-key-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.75rem 0.6rem;
    border-bottom: 1px solid var(--border);
}

.api-key-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-primary);
}

.api-key-table tr:last-child td {
    border-bottom: none;
}

.api-key-table__name {
    font-weight: 500;
}

.api-key-table__date {
    color: var(--text-secondary);
    white-space: nowrap;
}

.api-key-prefix {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.82rem;
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--text-secondary);
}

.api-key-empty {
    padding: 2rem 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ============================================
   Context Keys — Scoped BCP Access
   ============================================ */

.ctx-public-url {
    display: block;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    color: var(--text-secondary);
    word-break: break-all;
    margin-top: 0.5rem;
}

.ctx-scope-group {
    margin-top: 0.85rem;
}

.ctx-scope-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.ctx-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
}

.ctx-scope-cell {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.ctx-scope-cell input[type="checkbox"] {
    accent-color: var(--accent);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.ctx-share-url {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ============================================
   Phase 1 — Marketing & X-Ray
   ============================================ */

/* Marketing Hero */
.hero--marketing {
    padding: var(--space-4xl) 0 var(--space-3xl);
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1040 50%, #0f2027 100%);
}

.hero__headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-inverse);
    margin-bottom: var(--space-2xl);
}

.hero__tagline {
    font-size: clamp(1.2rem, 2.5vw, 1.3rem);
    color: var(--text-inverse-secondary);
    margin-bottom: var(--space-2xl);
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

.btn--outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-inverse);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Light section */
.section--light {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
    padding: var(--space-4xl) 0;
}

.section--light .section-title,
.section--light .section-description {
    color: var(--text-primary);
}

.card--light {
    background: var(--bg-surface);
    border-color: var(--border);
}

.card--light .card__title {
    color: var(--text-primary);
}

.card--light .card__text {
    color: var(--text-secondary);
}

/* 2-column card grid */
.card-grid--2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 640px) {
    .card-grid--2 {
        grid-template-columns: 1fr;
    }
}

/* Solution boxes — see enhanced version below (line ~6076) */

/* X-Ray feature list */
.xray-feature-list {
    list-style: none;
    padding: 0;
    margin-top: var(--space-md);
}

.xray-feature-list li {
    padding: var(--space-sm) 0;
    padding-left: 1.6rem;
    position: relative;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.xray-feature-list li:last-child {
    border-bottom: none;
}

.xray-feature-list li::before {
    content: "\2713";
    color: var(--accent);
    font-weight: 600;
    position: absolute;
    left: 0;
}

/* Steps list */
/* Steps list — see enhanced version below (line ~6131) */

/* CTA grid */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

@media (max-width: 640px) {
    .cta-grid {
        grid-template-columns: 1fr;
    }
}

.cta-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
}

.cta-card h3 {
    font-size: 1.25rem;
    color: var(--text-inverse);
    margin-bottom: var(--space-sm);
}

.cta-card p {
    color: var(--text-inverse-secondary);
    margin-bottom: var(--space-lg);
}

/* Early access banner */
.early-access-banner {
    text-align: center;
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(16, 185, 129, 0.06);
}

.early-access-banner h3 {
    font-size: 1.3rem;
    color: var(--text-inverse);
    margin-bottom: var(--space-sm);
}

.early-access-banner p {
    color: var(--text-inverse-secondary);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.early-access-banner__note {
    display: block;
    margin-top: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
}

/* Hero — eyebrow & proof bar */
.hero__eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.hero__proof {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
}

.hero__proof-sep {
    opacity: 0.4;
}

/* Stack diagram */
.stack-diagram {
    max-width: 600px;
    margin: var(--space-xl) auto 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stack-layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.stack-layer--muted {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-tertiary);
}

.stack-layer--active {
    background: var(--accent);
    color: white;
    font-weight: 700;
    border: 1px solid var(--accent);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.stack-layer__label {
    flex: 1;
}

.stack-layer__desc {
    flex: 1;
    text-align: right;
    font-size: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .stack-layer {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
    }

    .stack-layer__desc {
        text-align: center;
    }

    .hero__proof {
        flex-direction: column;
        align-items: center;
    }

    .hero__proof-sep {
        display: none;
    }
}

/* ---- X-Ray Results Page (dark theme) ---- */
.xray-results {
    background: var(--bg-primary);
    color: var(--text-inverse);
}

.xray-results .section-title {
    color: var(--text-inverse);
}

.xray-results .section-description {
    color: var(--text-inverse-secondary);
}

/* Override light-theme cards inside dark xray-results */
.xray-results .card {
    background: var(--bg-card);
    border-color: var(--border-dark);
}

.xray-results .card:hover {
    border-color: var(--accent);
}

.xray-results .card__title {
    color: var(--text-inverse);
}

.xray-results .card__text {
    color: var(--text-inverse-secondary);
}

.xray-results .card__icon {
    color: var(--accent);
}

.xray-results .breakdown-score {
    color: var(--text-inverse);
}

.xray-results .breakdown-icon {
    width: auto;
    height: auto;
    display: inline-block;
    color: var(--accent);
    background: rgba(16, 185, 129, 0.12);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- X-Ray Scan Form ---- */
.xray-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.xray-social-toggle {
    margin-top: var(--space-sm);
    text-align: left;
}

.xray-social-toggle__btn {
    background: none;
    border: none;
    color: var(--text-inverse-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.xray-social-toggle__btn:hover {
    color: var(--text-inverse);
}

.xray-social-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

@media (max-width: 480px) {
    .xray-social-fields {
        grid-template-columns: 1fr;
    }
}

.input--small {
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-inverse);
    font-size: 0.9rem;
    width: 100%;
}

.input--small::placeholder {
    color: var(--text-inverse-secondary);
}

.spinner-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* ---- Recent Scans Grid ---- */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.section-header--stacked {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
}

.section-link {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.recent-scans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.scan-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.scan-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.scan-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.scan-card__name {
    font-weight: 600;
    color: var(--text-inverse);
    font-size: 1rem;
}

.scan-card__grade {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.scan-card__score {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.scan-card__bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.scan-card__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}

.scan-card__value {
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    color: var(--text-tertiary);
    padding: var(--space-2xl);
}

.empty-state a {
    color: var(--accent);
}

/* ---- Grade Colors ---- */
.grade--a {
    background: var(--success-bg);
    color: #065f46;
}

.grade--b {
    background: var(--info-bg);
    color: #1e40af;
}

.grade--c {
    background: var(--warning-bg);
    color: #92400e;
}

.grade--d {
    background: #fff7ed;
    color: #9a3412;
}

.grade--f {
    background: var(--error-bg);
    color: #991b1b;
}

.grade-badge {
    display: inline-block;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

/* ---- Score Card ---- */
.score-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-2xl) 0;
}

.score-card__main {
    display: flex;
    align-items: baseline;
}

.score-card__number {
    font-size: 5rem;
    font-weight: 800;
    color: var(--text-inverse);
    line-height: 1;
}

.score-card__max {
    font-size: 1.5rem;
    color: var(--text-inverse-secondary);
    margin-left: 4px;
}

.score-card__grade {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 4px 20px;
    border-radius: var(--radius-md);
}

/* Breakdown */
.breakdown-icon {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.breakdown-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-inverse);
    margin: var(--space-sm) 0;
}

/* ---- Progress Steps (scan in-progress) ---- */
.progress-steps {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
    flex-wrap: wrap;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0.4;
    transition: opacity 0.3s;
}

.progress-step--active,
.progress-step--done {
    opacity: 1;
}

.progress-step__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.progress-step--done .progress-step__icon {
    background: var(--accent);
}

.progress-step--active .progress-step__icon {
    background: var(--accent-light);
    border: 2px solid var(--accent);
}

.progress-step__label {
    font-size: 0.8rem;
    color: var(--text-inverse-secondary);
    white-space: nowrap;
}

.spinner--small {
    width: 16px;
    height: 16px;
}

/* Progress bar */
.progress-bar-wrapper {
    max-width: 400px;
    margin: var(--space-xl) auto 0;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-bar__text {
    display: block;
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
}

/* ---- Recommendations ---- */
.recommendations-list {
    display: grid;
    gap: var(--space-md);
    max-width: 700px;
    margin: 0 auto;
}

.recommendation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.recommendation-card--high {
    border-left: 3px solid var(--error);
}

.recommendation-card--medium {
    border-left: 3px solid var(--warning);
}

.recommendation-card__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.recommendation-card__category {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.recommendation-card__priority {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.recommendation-card--high .recommendation-card__priority {
    color: var(--error);
}

.recommendation-card--medium .recommendation-card__priority {
    color: var(--warning);
}

.recommendation-card__title {
    font-weight: 600;
    color: var(--text-inverse);
    margin-bottom: var(--space-xs);
}

.recommendation-card__text {
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
}

/* ---- Narrated Progress ---- */
.scan-loading-shell {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: var(--space-2xl);
}

.scan-loading-hero {
    max-width: 680px;
    margin: 0 auto;
    display: grid;
    justify-items: center;
    gap: var(--space-sm);
}

.scan-loading-hero .section-title {
    margin-bottom: 0;
}

.scan-loading-subtitle,
.scan-loading-note {
    margin: 0;
    max-width: 620px;
    color: var(--text-inverse-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.scan-loading-note {
    max-width: 560px;
}

.scan-loading-url {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

.scan-narrative {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.scan-activity {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
    color: var(--text-inverse);
    margin-bottom: var(--space-lg);
    justify-content: center;
}

.scan-profiles-found {
    margin-bottom: var(--space-lg);
}

.scan-profiles-found__label {
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
    margin-bottom: var(--space-sm);
    text-align: center;
}

.profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
}

.profile-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-inverse-secondary);
    border: 1px solid var(--border-dark);
    transition: all 0.3s ease;
}

.profile-chip--active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.profile-chip--done {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.scan-log {
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border-dark);
    padding-top: var(--space-md);
    text-align: left;
}

.scan-log__entry {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
    animation: fadeIn 0.3s ease;
}

.scan-log__check {
    color: var(--success);
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 1px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Notification Card (scan wait) ---- */
.notify-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    max-width: 440px;
    margin: var(--space-xl) auto 0;
    text-align: left;
    animation: fadeIn 0.4s ease;
}

.notify-card__header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.notify-card__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.notify-card__text {
    flex: 1;
}

.notify-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-inverse);
    margin: 0 0 2px;
}

.notify-card__subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0;
}

.notify-card__dismiss {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.notify-card__dismiss:hover {
    color: var(--text-inverse);
}

.notify-card__form {
    display: flex;
    gap: var(--space-sm);
}

.notify-card__input {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    outline: none;
}

.notify-card__input:focus {
    border-color: var(--primary);
}

.notify-card__input::placeholder {
    color: var(--text-tertiary);
}

.notify-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s;
}

.notify-input-group:focus-within {
    border-color: var(--primary);
}

.notify-card__input--username {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    min-width: 80px;
}

.notify-card__input--username:focus {
    border: none !important;
    box-shadow: none;
}

.notify-input-group__suffix {
    padding: 8px 12px 8px 0;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
}

.notify-card__btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.notify-card__error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: var(--space-xs);
}

.notify-card__confirmed {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-inverse-secondary);
}

.notify-card__confirmed-icon {
    color: var(--success);
    font-size: 1.1rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .notify-card__form {
        flex-direction: column;
    }

    .notify-card__btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .scan-loading-shell {
        gap: var(--space-xl);
    }

    .scan-loading-subtitle,
    .scan-loading-note {
        font-size: 1rem;
    }

    .scan-loading-url {
        width: 100%;
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ---- Brand Profile (What We Found) ---- */
.brand-profile {
    max-width: 800px;
    margin: 0 auto;
}

.bp-section {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.bp-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-inverse);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.bp-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bp-sublabel {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.bp-sublabel--positive {
    color: var(--success);
}

.bp-sublabel--negative {
    color: var(--error);
}

/* Identity */
.bp-identity {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.bp-badge-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.bp-archetype-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.bp-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-inverse-secondary);
    border: 1px solid var(--border-dark);
}

.bp-mission {
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.bp-values {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.bp-value-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-inverse-secondary);
    border: 1px solid var(--border-dark);
}

/* Color Swatches */
.bp-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.bp-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bp-swatch__color {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.15s ease;
}

.bp-swatch:hover .bp-swatch__color {
    transform: scale(1.1);
}

.bp-swatch__hex {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.bp-swatch__name {
    font-size: 0.7rem;
    color: var(--text-inverse-secondary);
    max-width: 70px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-swatch__bucket {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Fonts */
.bp-font-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.bp-font-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-inverse);
    border: 1px solid var(--border-dark);
    font-weight: 500;
}

.bp-font-card {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.bp-font-card__family {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-inverse);
}

.bp-font-card__tier {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Logos */
.bp-logos {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.bp-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.bp-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Voice & Tone */
.bp-voice-desc {
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.bp-tone-meters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 480px) {
    .bp-tone-meters {
        grid-template-columns: 1fr;
    }
}

.bp-tone-meter__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.bp-tone-meter__value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.bp-tone-meter__bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.bp-tone-meter__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.bp-tone-meter__desc {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* Vocabulary */
.bp-vocabulary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

@media (max-width: 480px) {
    .bp-vocabulary {
        grid-template-columns: 1fr;
    }
}

.bp-word-group {
    min-width: 0;
}

.bp-word-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bp-word-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.bp-word-chip--positive {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bp-word-chip--negative {
    background: rgba(239, 68, 68, 0.08);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

/* Target Audience */
.bp-audience-desc {
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Social Links */
.bp-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.bp-social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dark);
    color: var(--text-inverse-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: capitalize;
    transition: all 0.15s ease;
}

.bp-social-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    color: var(--accent);
}

.bp-social-link__arrow {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ---- Coherence Summary ---- */
.coherence-summary {
    color: var(--text-inverse-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.6;
}

/* ---- Platform Breakdown ---- */
.platform-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    max-width: 1100px;
    margin: 0 auto;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.platform-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.platform-card__name {
    font-weight: 600;
    color: var(--text-inverse);
    font-size: 1rem;
}

.platform-card__score {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.platform-card__detail {
    font-size: 0.85rem;
    color: var(--text-inverse-secondary);
    margin-bottom: var(--space-sm);
}

.platform-card__issues {
    border-top: 1px solid var(--border-dark);
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
}

.platform-card__issue {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

/* ---- Alignment Strengths ---- */
.alignment-strengths {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: var(--space-sm);
}

.strength-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
}

.strength-card__icon {
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---- Inconsistency Cards ---- */
.inconsistencies-list {
    display: grid;
    gap: var(--space-md);
    max-width: 700px;
    margin: 0 auto;
}

.inconsistency-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.inconsistency-card--high {
    border-left: 3px solid var(--error);
}

.inconsistency-card--medium {
    border-left: 3px solid var(--warning);
}

.inconsistency-card--low {
    border-left: 3px solid var(--info);
}

.inconsistency-card__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.inconsistency-card__type {
    text-transform: capitalize;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.inconsistency-card__severity {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.inconsistency-card--high .inconsistency-card__severity {
    color: var(--error);
}

.inconsistency-card--medium .inconsistency-card__severity {
    color: var(--warning);
}

.inconsistency-card--low .inconsistency-card__severity {
    color: var(--info);
}

.inconsistency-card__text {
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.inconsistency-card__platforms {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.recommendation-card__platforms {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ---- Leaderboard ---- */
.leaderboard-section {
    background: var(--bg-primary);
    color: var(--text-inverse);
    padding-bottom: var(--space-4xl);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    background: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border);
}

.leaderboard-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    font-size: 0.9rem;
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr:hover td {
    background: var(--bg-surface-secondary);
}

/* Leaderboard Filters */
.leaderboard-filters {
    margin-bottom: var(--space-lg);
}

.leaderboard-filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.leaderboard-filter-row+.leaderboard-filter-row {
    margin-top: 0.5rem;
}

.leaderboard-filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-inverse-secondary);
    white-space: nowrap;
    min-width: 4rem;
}

.leaderboard-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid var(--border-dark);
    background: transparent;
    color: var(--text-inverse-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: inherit;
}

.leaderboard-chip:hover {
    border-color: var(--accent);
    color: var(--text-inverse);
}

.leaderboard-chip--active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

/* ---- Modal ---- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal--open {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal__content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-2xl);
    z-index: 1;
}

.modal__content--wide {
    max-width: 700px;
}

.modal__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--text-inverse-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}

.modal__close:hover {
    color: var(--text-inverse);
}

.modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-inverse);
    margin-bottom: var(--space-sm);
}

.modal__subtitle {
    color: var(--text-inverse-secondary);
    margin-bottom: var(--space-xl);
    font-size: 0.95rem;
}

.modal__fine-print {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: var(--space-md);
}

/* Form elements */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-inverse);
    margin-bottom: var(--space-xs);
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-inverse);
    font-size: 0.95rem;
    font-family: var(--font-sans);
}

.form-input::placeholder {
    color: var(--text-inverse-secondary);
}

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

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

@media (max-width: 480px) {
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9rem;
    color: var(--text-inverse);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent);
}

/* Calendly embed */
.calendly-embed {
    margin-top: var(--space-lg);
}

/* ============================================
   X-Ray Results Redesign
   ============================================ */

/* ---- 1. Hero — Logo + URL ---- */
.hero-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hero-url {
    color: var(--text-inverse-secondary);
    font-size: 0.95rem;
    margin-top: var(--space-xs);
    margin-bottom: 0;
}

/* ---- Hero Score Ring ---- */
.score-ring-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: var(--space-2xl) 0 var(--space-lg);
}

.score-ring-wrapper svg {
    transform: rotate(-90deg);
}

.score-ring__track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
}

.score-ring__fill {
    fill: none;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-ring__inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-ring__number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-inverse);
}

.score-ring__max {
    font-size: 1rem;
    color: var(--text-inverse-secondary);
    margin-top: 2px;
}

.score-ring__grade {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 2px 14px;
    border-radius: var(--radius-md);
    margin-top: var(--space-xs);
}

.scan-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

/* ---- 2. Breakdown Bars ---- */
.breakdown-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: var(--space-sm);
}

.breakdown-bar__fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.breakdown-bar__fill--good {
    background: #10b981;
}

.breakdown-bar__fill--ok {
    background: #f59e0b;
}

.breakdown-bar__fill--low {
    background: #ef4444;
}

/* ---- 3. Executive Summary ---- */
.exec-summary {
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
}

.exec-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (max-width: 480px) {
    .exec-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.exec-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
}

.exec-stat__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-inverse);
    line-height: 1;
}

.exec-stat__label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.exec-callout {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.exec-callout__text {
    color: var(--text-inverse-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ---- 4. Brand Profile Tabs ---- */
.bp-tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bp-tabs::-webkit-scrollbar {
    display: none;
}

.bp-tab {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-lg);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-inverse-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.bp-tab:hover {
    color: var(--text-inverse);
}

.bp-tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.bp-tab-content {
    animation: fadeIn 0.2s ease;
}

/* ---- 5. Platform Score Bars ---- */
.platform-score-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.platform-score-row__label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    min-width: 50px;
}

.platform-score-row__bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.platform-score-row__fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.platform-score-row__fill--good {
    background: #10b981;
}

.platform-score-row__fill--ok {
    background: #f59e0b;
}

.platform-score-row__fill--low {
    background: #ef4444;
}

.platform-score-row__value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-inverse-secondary);
    min-width: 42px;
    text-align: right;
}

/* Platform-specific borders */
.platform-card--linkedin {
    border-left: 3px solid #0a66c2;
}

.platform-card--twitter {
    border-left: 3px solid #1d9bf0;
}

.platform-card--instagram {
    border-left: 3px solid #e1306c;
}

.platform-card--youtube {
    border-left: 3px solid #ff0000;
}

.platform-card--website {
    border-left: 3px solid #10b981;
}

/* ---- 6. Key Findings ---- */
.findings-section {
    max-width: 800px;
    margin: 0 auto;
}

.findings-block {
    margin-bottom: var(--space-2xl);
}

.findings-block__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-inverse);
    margin-bottom: var(--space-lg);
}

.severity-group {
    margin-bottom: var(--space-md);
}

.severity-group__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    cursor: pointer;
    user-select: none;
}

.severity-group__header:hover {
    opacity: 0.85;
}

.severity-group__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-inverse);
    text-transform: capitalize;
}

.severity-group__count {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.severity-group__count--high {
    background: var(--error);
}

.severity-group__count--medium {
    background: var(--warning);
}

.severity-group__count--low {
    background: var(--info);
}

.severity-group__chevron {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.severity-group__chevron--open {
    transform: rotate(90deg);
}

.severity-group__items {
    padding-left: var(--space-sm);
    display: grid;
    gap: var(--space-md);
    padding-top: var(--space-sm);
}

/* ---- 7. Recommendations — Grouped by Priority ---- */
.priority-group {
    margin-bottom: var(--space-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.priority-group__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    cursor: pointer;
    user-select: none;
}

.priority-group__header:hover {
    opacity: 0.85;
}

.priority-group__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-group__dot--high {
    background: var(--error);
}

.priority-group__dot--medium {
    background: var(--warning);
}

.priority-group__dot--low {
    background: var(--info);
}

.priority-group__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-inverse);
    text-transform: capitalize;
}

.priority-group__count {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.priority-group__count--high {
    background: var(--error);
}

.priority-group__count--medium {
    background: var(--warning);
}

.priority-group__count--low {
    background: var(--info);
}

.priority-group__chevron {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.priority-group__chevron--open {
    transform: rotate(90deg);
}

.priority-group__items {
    padding-top: var(--space-sm);
    display: grid;
    gap: var(--space-md);
}

/* ---- 8. Section Dividers & Entry Animations ---- */
.section-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    max-width: 200px;
    margin: var(--space-2xl) auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.xray-results div[x-show="status === 'completed'"]>.container,
.xray-results div[x-show="status === 'completed'"]>.exec-summary-wrapper,
.xray-results div[x-show="status === 'completed'"]>section,
.xray-results div[x-show="status === 'completed'"]>hr {
    animation: slideUp 0.5s ease both;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(1) {
    animation-delay: 0s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(2) {
    animation-delay: 0.05s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(3) {
    animation-delay: 0.1s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(4) {
    animation-delay: 0.15s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(5) {
    animation-delay: 0.2s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(6) {
    animation-delay: 0.25s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(7) {
    animation-delay: 0.3s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(8) {
    animation-delay: 0.35s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(9) {
    animation-delay: 0.4s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(10) {
    animation-delay: 0.45s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(11) {
    animation-delay: 0.5s;
}

.xray-results div[x-show="status === 'completed'"]> :nth-child(12) {
    animation-delay: 0.55s;
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* ============================================
   Enhanced Section Variants
   ============================================ */
.section--gradient {
    position: relative;
    background:
        radial-gradient(ellipse 60% 40% at 20% 0%, rgba(13, 148, 136, 0.04), transparent),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(99, 102, 241, 0.03), transparent),
        var(--bg-surface);
}

/* ============================================
   Visual Flow Diagram (How BCP Works)
   ============================================ */
.flow-diagram {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}

.flow-step {
    flex: 1;
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    position: relative;
}

.flow-step__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-md);
    background: var(--accent-light);
    border: 2px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.3s ease;
}

.flow-step:hover .flow-step__icon {
    background: var(--accent);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 0 30px var(--accent-glow);
}

.flow-step__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.flow-step__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.flow-arrow {
    display: flex;
    align-items: center;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
    opacity: 0.4;
}

/* ============================================
   Stack Diagram (Enhanced)
   ============================================ */
.stack-diagram {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stack-layer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.stack-layer--muted {
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-tertiary);
}

.stack-layer--active {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(99, 102, 241, 0.06));
    border: 2px solid rgba(13, 148, 136, 0.3);
    color: var(--text-primary);
    box-shadow: 0 0 30px rgba(13, 148, 136, 0.08);
    transform: scale(1.02);
}

.stack-layer__label {
    font-weight: 700;
    font-family: var(--font-display);
}

.stack-layer--active .stack-layer__label {
    color: var(--accent);
}

.stack-layer__desc {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ============================================
   Before/After Comparison (Enhanced)
   ============================================ */
.solution-box {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.solution-box p {
    font-weight: 600;
    margin-bottom: var(--space-md);
    font-family: var(--font-display);
}

.solution-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.solution-box li {
    padding: var(--space-xs) 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--text-secondary);
}

.solution-box li::before {
    position: absolute;
    left: 0;
    font-weight: 700;
}

.solution-box--old {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
}

.solution-box--old li::before {
    content: '\2717';
    color: var(--error);
}

.solution-box--new {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

.solution-box--new li::before {
    content: '\2713';
    color: var(--success);
}

/* ============================================
   CTA Grid (Home page dual CTA)
   ============================================ */
.cta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.cta-card {
    padding: var(--space-2xl);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.cta-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.cta-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-inverse);
}

.cta-card p {
    font-size: 0.9rem;
    color: var(--text-inverse-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

/* ============================================
   Steps List (How It Works — Vertical Timeline)
   ============================================ */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

/* Connecting line */
.steps-list::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 44px;
    bottom: 44px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(13, 148, 136, 0.3), rgba(99, 102, 241, 0.3));
}

.step {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    padding: var(--space-md) 0;
    position: relative;
}

.step__number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    border: 2px solid rgba(13, 148, 136, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    z-index: 1;
}

.step__content {
    padding-top: 6px;
}

.step__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.step__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step__link {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

/* ============================================
   Dashboard Stats (Enhanced)
   ============================================ */
.dash-stat {
    position: relative;
    overflow: hidden;
}

.dash-stat::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dash-stat:hover::after {
    opacity: 1;
}

/* ============================================
   Brand Card Color Indicator
   ============================================ */
.brand-color-dots {
    display: flex;
    gap: 4px;
    margin-top: var(--space-sm);
}

.brand-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 0 1px var(--border);
}

/* ============================================
   Responsive Overrides
   ============================================ */
@media (max-width: 768px) {
    .flow-diagram {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
        justify-content: center;
        padding: var(--space-sm) 0;
    }

    .steps-list {
        max-width: 100%;
    }

    .cta-grid {
        grid-template-columns: 1fr;
    }

    .card-grid--3 {
        grid-template-columns: 1fr;
    }

    /* X-Ray hero: stack input + button on mobile */
    .generator-form {
        max-width: 100%;
        padding: 0 var(--space-md);
    }

    .generator-input-group {
        flex-direction: column;
    }

    .generator-input {
        border-right: 2px solid rgba(255, 255, 255, 0.15);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .generator-btn {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        min-width: unset;
        width: 100%;
    }

    /* Recent Scans: smaller title so it stays on one line */
    .section-header .section-title {
        font-size: 1.4rem;
        white-space: nowrap;
    }

    .section-header {
        gap: var(--space-sm);
    }
}